svn commit: samba r3836 - in branches/SAMBA_4_0/source: libcli/security ntvfs/posix smb_server

tridge at samba.org tridge at samba.org
Thu Nov 18 04:19:26 GMT 2004


Author: tridge
Date: 2004-11-18 04:19:26 +0000 (Thu, 18 Nov 2004)
New Revision: 3836

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3836

Log:
- fixed the handling of NT_STATUS_BUFFER_TOO_SMALL in nttrans server

- fixed revision number on default DACL

- fixed DACL_PRESENT bit in acl query

with these fixes cacls.exe and the GUI ACL editor in w2k both work
against pvfs. The GUI editor is slow as it times out looking up the
SID -> name mappings.



Modified:
   branches/SAMBA_4_0/source/libcli/security/security_descriptor.c
   branches/SAMBA_4_0/source/ntvfs/posix/pvfs_acl.c
   branches/SAMBA_4_0/source/smb_server/nttrans.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/security/security_descriptor.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/security/security_descriptor.c	2004-11-18 03:59:24 UTC (rev 3835)
+++ branches/SAMBA_4_0/source/libcli/security/security_descriptor.c	2004-11-18 04:19:26 UTC (rev 3836)
@@ -115,7 +115,7 @@
 		if (sd->dacl == NULL) {
 			return NT_STATUS_NO_MEMORY;
 		}
-		sd->dacl->revision = SD_REVISION;
+		sd->dacl->revision = NT4_ACL_REVISION;
 		sd->dacl->size     = 0;
 		sd->dacl->num_aces = 0;
 		sd->dacl->aces     = NULL;

Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_acl.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_acl.c	2004-11-18 03:59:24 UTC (rev 3835)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_acl.c	2004-11-18 04:19:26 UTC (rev 3836)
@@ -52,6 +52,7 @@
 	if (token->num_sids > 1) {
 		sd->group_sid = token->user_sids[1];
 	}
+	sd->type |= SEC_DESC_DACL_PRESENT;
 
 	for (i=0;i<token->num_sids;i++) {
 		struct security_ace ace;

Modified: branches/SAMBA_4_0/source/smb_server/nttrans.c
===================================================================
--- branches/SAMBA_4_0/source/smb_server/nttrans.c	2004-11-18 03:59:24 UTC (rev 3835)
+++ branches/SAMBA_4_0/source/smb_server/nttrans.c	2004-11-18 04:19:26 UTC (rev 3836)
@@ -413,6 +413,19 @@
 		return;
 	}
 
+	if (trans.out.setup_count > trans.in.max_setup) {
+		req_reply_error(req, NT_STATUS_BUFFER_TOO_SMALL);
+		return;
+	}
+	if (trans.out.params.length > trans.in.max_param) {
+		status = NT_STATUS_BUFFER_TOO_SMALL;
+		trans.out.params.length = trans.in.max_param;
+	}
+	if (trans.out.data.length > trans.in.max_data) {
+		status = NT_STATUS_BUFFER_TOO_SMALL;
+		trans.out.data.length = trans.in.max_data;
+	}
+
 	params_left = trans.out.params.length;
 	data_left   = trans.out.data.length;
 	params      = trans.out.params.data;



More information about the samba-cvs mailing list