[SCM] Samba Shared Repository - branch master updated
David Disseldorp
ddiss at samba.org
Wed Oct 30 13:32:02 MDT 2013
The branch, master has been updated
via 508b86e s3:modules: nfs4_acls ACLs with zero entries are fine.
via a6bc2fd s3:modules: Fix realloc with zero sized ACLs
via d35ce08 rpc_server: Fix a typo
from 8dc931b librpc-idl: change the drsuapi_DsBindInfoCtr so that it match what is on the wire both in NDR32 and NDR64.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 508b86e6eff056a780c27b7dbb402d4d0a29ec3b
Author: Alexander Werth <alexander.werth at de.ibm.com>
Date: Thu Aug 22 15:01:17 2013 +0200
s3:modules: nfs4_acls ACLs with zero entries are fine.
Signed-off-by: Alexander Werth <alexander.werth at de.ibm.com>
Reviewed-by: David Disseldorp <ddiss at samba.org>
Autobuild-User(master): David Disseldorp <ddiss at samba.org>
Autobuild-Date(master): Wed Oct 30 20:31:42 CET 2013 on sn-devel-104
commit a6bc2fd0d1df3746d7ae3d987765b346feee2bd8
Author: Alexander Werth <alexander.werth at de.ibm.com>
Date: Tue Oct 29 16:20:04 2013 +0100
s3:modules: Fix realloc with zero sized ACLs
A realloc with size zero is similar to a free.
Since we return the number of acls that's not an error.
Signed-off-by: Alexander Werth <alexander.werth at de.ibm.com>
Reviewed-by: David Disseldorp <ddiss at samba.org>
commit d35ce088fe28745e81d2d3efee94f9d04242d2c2
Author: Volker Lendecke <vl at samba.org>
Date: Tue Oct 29 08:50:01 2013 +0000
rpc_server: Fix a typo
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: David Disseldorp <ddiss at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/modules/nfs4_acls.c | 24 +++++++++++++-----------
source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 2 +-
2 files changed, 14 insertions(+), 12 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c
index 500cb47..08ae141 100644
--- a/source3/modules/nfs4_acls.c
+++ b/source3/modules/nfs4_acls.c
@@ -328,15 +328,15 @@ static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx,
DEBUG(10, ("smbacl_nfs42win entered\n"));
aclint = get_validated_aclint(theacl);
- /* We do not check for naces being 0 or theacl being NULL here
- because it is done upstream in smb_get_nt_acl_nfs4().
+ /* We do not check for theacl being NULL here
+ because this is already checked in smb_get_nt_acl_nfs4().
We reserve twice the number of input aces because one nfs4
ace might result in 2 nt aces.*/
nt_ace_list = (struct security_ace *)TALLOC_ZERO_SIZE(
mem_ctx, 2 * aclint->naces * sizeof(struct security_ace));
if (nt_ace_list==NULL)
{
- DEBUG(10, ("talloc error"));
+ DEBUG(10, ("talloc error with %d aces", aclint->naces));
errno = ENOMEM;
return false;
}
@@ -473,10 +473,12 @@ static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx,
}
}
- nt_ace_list = (struct security_ace *)TALLOC_REALLOC(mem_ctx,
- nt_ace_list,
- good_aces * sizeof(struct security_ace));
- if (nt_ace_list == NULL) {
+ nt_ace_list = (struct security_ace *)
+ TALLOC_REALLOC(mem_ctx, nt_ace_list,
+ good_aces * sizeof(struct security_ace));
+ /* returns a NULL ace list when good_aces is zero. */
+ if (good_aces && nt_ace_list == NULL) {
+ DEBUG(10, ("realloc error with %d aces", good_aces));
errno = ENOMEM;
return false;
}
@@ -501,11 +503,11 @@ static NTSTATUS smb_get_nt_acl_nfs4_common(const SMB_STRUCT_STAT *sbuf,
struct security_acl *psa = NULL;
TALLOC_CTX *frame = talloc_stackframe();
- if (theacl==NULL || smb_get_naces(theacl)==0) {
+ if (theacl==NULL) {
TALLOC_FREE(frame);
return NT_STATUS_ACCESS_DENIED; /* special because we
- * shouldn't alloc 0 for
- * win */
+ * need to think through
+ * the null case.*/
}
uid_to_sid(&sid_owner, sbuf->st_ex_uid);
@@ -513,7 +515,7 @@ static NTSTATUS smb_get_nt_acl_nfs4_common(const SMB_STRUCT_STAT *sbuf,
if (smbacl4_nfs42win(mem_ctx, params, theacl, &sid_owner, &sid_group,
S_ISDIR(sbuf->st_ex_mode),
- &nt_ace_list, &good_aces)==false) {
+ &nt_ace_list, &good_aces)==false) {
DEBUG(8,("smbacl4_nfs42win failed\n"));
TALLOC_FREE(frame);
return map_nt_error_from_unix(errno);
diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
index 22737e8..6707805 100644
--- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c
@@ -2499,7 +2499,7 @@ WERROR _srvsvc_NetFileClose(struct pipes_struct *p,
}
/* enum_file_close_fn sends the close message to
- * the relevent smbd process. */
+ * the relevant smbd process. */
r->out.result = WERR_BADFILE;
state.r = r;
--
Samba Shared Repository
More information about the samba-cvs
mailing list