diff options
author | Jeremy Allison <jra@samba.org> | 2006-02-14 20:26:38 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:10:07 -0500 |
commit | 7f7c9849e4aed9ff7b51989a81f6039c5b59f2dd (patch) | |
tree | 1b3298423784586d3525174002c0bc75802b524c /source3/smbd | |
parent | c9b5c9b9412a208b105513c0194bd9654a3f1144 (diff) | |
download | samba-7f7c9849e4aed9ff7b51989a81f6039c5b59f2dd.tar.gz samba-7f7c9849e4aed9ff7b51989a81f6039c5b59f2dd.tar.bz2 samba-7f7c9849e4aed9ff7b51989a81f6039c5b59f2dd.zip |
r13497: Fix #3508 from jason@ncac.gwu.edu
Jeremy.
(This used to be commit a28bc614a0eb8409a98b254b32ad17c50c2eec0e)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/posix_acls.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 2befca40c2..d4801d1743 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -4210,7 +4210,6 @@ BOOL can_write_to_file(connection_struct *conn, const char *fname, SMB_STRUCT_ST SEC_DESC* get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fname) { SEC_DESC *psd, *ret_sd; - size_t sd_size; connection_struct conn; files_struct finfo; struct fd_handle fh; @@ -4221,7 +4220,7 @@ SEC_DESC* get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fname) conn.service = -1; if ( !(conn.mem_ctx = talloc_init( "novfs_get_nt_acl" )) ) { - DEBUG(0,("novfs_get_nt_acl: talloc() failed!\n")); + DEBUG(0,("get_nt_acl_no_snum: talloc() failed!\n")); return NULL; } @@ -4229,7 +4228,8 @@ SEC_DESC* get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fname) set_conn_connectpath(&conn, path); if (!smbd_vfs_init(&conn)) { - DEBUG(0,("novfs_get_nt_acl: Unable to create a fake connection struct!\n")); + DEBUG(0,("get_nt_acl_no_snum: Unable to create a fake connection struct!\n")); + conn_free_internal( &conn ); return NULL; } @@ -4243,7 +4243,11 @@ SEC_DESC* get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fname) pstrcpy( filename, fname ); finfo.fsp_name = filename; - sd_size = get_nt_acl( &finfo, DACL_SECURITY_INFORMATION, &psd ); + if (get_nt_acl( &finfo, DACL_SECURITY_INFORMATION, &psd ) == 0) { + DEBUG(0,("get_nt_acl_no_snum: get_nt_acl returned zero.\n")); + conn_free_internal( &conn ); + return NULL; + } ret_sd = dup_sec_desc( ctx, psd ); |