diff options
Diffstat (limited to 'source3/smbd/dosmode.c')
-rw-r--r-- | source3/smbd/dosmode.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index 88c6a51770..784b36d9bd 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -277,14 +277,15 @@ static bool set_ea_dos_attribute(connection_struct *conn, const char *path, SMB_ * are not violating security in doing the setxattr. */ - if (!NT_STATUS_IS_OK(open_file_fchmod(conn,path,sbuf,&fsp))) + if (!NT_STATUS_IS_OK(open_file_fchmod(NULL, conn, path, sbuf, + &fsp))) return ret; become_root(); if (SMB_VFS_SETXATTR(conn, path, SAMBA_XATTR_DOS_ATTRIB, attrstr, strlen(attrstr), 0) == 0) { ret = True; } unbecome_root(); - close_file_fchmod(fsp); + close_file_fchmod(NULL, fsp); return ret; } DEBUG(10,("set_ea_dos_attribute: set EA %s on file %s\n", attrstr, path)); @@ -540,12 +541,13 @@ int file_set_dosmode(connection_struct *conn, const char *fname, * break batch oplocks open by others. JRA. */ files_struct *fsp; - if (!NT_STATUS_IS_OK(open_file_fchmod(conn,fname,st,&fsp))) + if (!NT_STATUS_IS_OK(open_file_fchmod(NULL, conn, fname, st, + &fsp))) return -1; become_root(); ret = SMB_VFS_FCHMOD(fsp, unixmode); unbecome_root(); - close_file_fchmod(fsp); + close_file_fchmod(NULL, fsp); if (!newfile) { notify_fname(conn, NOTIFY_ACTION_MODIFIED, FILE_NOTIFY_CHANGE_ATTRIBUTES, fname); |