Author: vlendec Date: 2007-01-08 13:21:43 +0000 (Mon, 08 Jan 2007) New Revision: 20607
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20607 Log: Next micro-step for reply_setatr Modified: branches/SAMBA_3_0/source/smbd/reply.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/reply.c =================================================================== --- branches/SAMBA_3_0/source/smbd/reply.c 2007-01-08 13:18:23 UTC (rev 20606) +++ branches/SAMBA_3_0/source/smbd/reply.c 2007-01-08 13:21:43 UTC (rev 20607) @@ -979,7 +979,6 @@ { pstring fname; int outsize = 0; - BOOL ok=False; int mode; time_t mtime; SMB_STRUCT_STAT sbuf; @@ -1022,15 +1021,14 @@ 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);