From 94fc44a93c46cece9b9fa947bff62087dbcd89fa Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 12 Feb 2001 16:18:02 +0000 Subject: Merge of JohnR's changes to appliance-head, JF's changes to 2.2, updated the POSIX_ACL code to be in sync. Jeremy. (This used to be commit c0517d6f4e3079feca1309fd1ea7b21e83f0de02) --- source3/smbd/nttrans.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source3/smbd/nttrans.c') diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 19f5859abb..207786768b 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -291,7 +291,7 @@ static void get_filename_transact( char *fname, char *inbuf, int data_offset, in * the end here. */ - if((data_len - fname_len == 1) || (inbuf[data_offset] == '\0')) { + if((data_len == 1) || (inbuf[data_offset] == '\0')) { /* * Ensure that the data offset is aligned * on a 2 byte boundary - add one if not. @@ -1110,6 +1110,15 @@ static BOOL set_sd(files_struct *fsp, char *data, uint32 sd_len, uint security_i return False; } + if (psd->off_owner_sid==0) + security_info_sent &= ~OWNER_SECURITY_INFORMATION; + if (psd->off_grp_sid==0) + security_info_sent &= ~GROUP_SECURITY_INFORMATION; + if (psd->off_sacl==0) + security_info_sent &= ~DACL_SECURITY_INFORMATION; + if (psd->off_dacl==0) + security_info_sent &= ~SACL_SECURITY_INFORMATION; + ret = set_nt_acl( fsp, security_info_sent, psd); if (!ret) { -- cgit