1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00

r20605: Simplify logic in reply_setatr slightly

(This used to be commit f19db8f33e)
This commit is contained in:
Volker Lendecke 2007-01-08 13:05:36 +00:00 committed by Gerald (Jerry) Carter
parent 395d304f22
commit ccc54da805

View File

@ -999,7 +999,7 @@ int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
RESOLVE_DFSPATH(fname, conn, inbuf, outbuf);
unix_convert(fname,conn,0,&bad_path,&sbuf);
if (bad_path) {
if (bad_path || !check_name(fname, conn)) {
END_PROFILE(SMBsetatr);
return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND);
}
@ -1022,9 +1022,7 @@ int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
else
mode &= ~aDIR;
if (check_name(fname,conn)) {
ok = (file_set_dosmode(conn,fname,mode,&sbuf,False) == 0);
}
ok = (file_set_dosmode(conn,fname,mode,&sbuf,False) == 0);
} else {
ok = True;
}