diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-01-08 13:21:43 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:16:58 -0500 |
commit | 72ecfaf32c2f6db114cff37dd1526a85722935fd (patch) | |
tree | 55d00d141e8305fea3692da52659c43df11ce976 | |
parent | 21cc3895458100158f329786a89bc2a77fe1e8ce (diff) | |
download | samba-72ecfaf32c2f6db114cff37dd1526a85722935fd.tar.gz samba-72ecfaf32c2f6db114cff37dd1526a85722935fd.tar.bz2 samba-72ecfaf32c2f6db114cff37dd1526a85722935fd.zip |
r20607: Next micro-step for reply_setatr
(This used to be commit cea9a01434490fb8a17c3f12db7a092efda21186)
-rw-r--r-- | source3/smbd/reply.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 66bbce064f..e00d8d99a5 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -979,7 +979,6 @@ int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size { pstring fname; int outsize = 0; - BOOL ok=False; int mode; time_t mtime; SMB_STRUCT_STAT sbuf; @@ -1022,15 +1021,14 @@ int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size else mode &= ~aDIR; - ok = (file_set_dosmode(conn,fname,mode,&sbuf,False) == 0); - } else { - ok = True; + if (file_set_dosmode(conn,fname,mode,&sbuf,False) != 0) { + END_PROFILE(SMBsetatr); + return set_bad_path_error(errno, False, outbuf, + ERRDOS, ERRnoaccess); + } } - if (ok) - ok = set_filetime(conn,fname,mtime); - - if (!ok) { + if (!set_filetime(conn,fname,mtime)) { END_PROFILE(SMBsetatr); return set_bad_path_error(errno, False, outbuf, ERRDOS, ERRnoaccess); |