svn commit: samba r20842 - in branches: SAMBA_3_0/source/smbd
SAMBA_3_0_24/source/smbd
jra at samba.org
jra at samba.org
Tue Jan 16 20:53:50 GMT 2007
Author: jra
Date: 2007-01-16 20:53:50 +0000 (Tue, 16 Jan 2007)
New Revision: 20842
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20842
Log:
Only one more BOOL ok to go...
Jeremy.
Modified:
branches/SAMBA_3_0/source/smbd/reply.c
branches/SAMBA_3_0_24/source/smbd/reply.c
Changeset:
Modified: branches/SAMBA_3_0/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/reply.c 2007-01-16 20:49:51 UTC (rev 20841)
+++ branches/SAMBA_3_0/source/smbd/reply.c 2007-01-16 20:53:50 UTC (rev 20842)
@@ -4755,7 +4755,6 @@
{
int snum;
int outsize = 0;
- BOOL ok = False;
pstring newdir;
NTSTATUS status;
@@ -4775,19 +4774,14 @@
RESOLVE_DFSPATH(newdir, conn, inbuf, outbuf);
- if (strlen(newdir) == 0) {
- ok = True;
- } else {
- ok = vfs_directory_exist(conn,newdir,NULL);
- if (ok)
- set_conn_connectpath(conn,newdir);
+ if (strlen(newdir) != 0) {
+ if (!vfs_directory_exist(conn,newdir,NULL)) {
+ END_PROFILE(pathworks_setdir);
+ return ERROR_DOS(ERRDOS,ERRbadpath);
+ }
+ set_conn_connectpath(conn,newdir);
}
- if (!ok) {
- END_PROFILE(pathworks_setdir);
- return ERROR_DOS(ERRDOS,ERRbadpath);
- }
-
outsize = set_message(outbuf,0,0,False);
SCVAL(outbuf,smb_reh,CVAL(inbuf,smb_reh));
Modified: branches/SAMBA_3_0_24/source/smbd/reply.c
===================================================================
--- branches/SAMBA_3_0_24/source/smbd/reply.c 2007-01-16 20:49:51 UTC (rev 20841)
+++ branches/SAMBA_3_0_24/source/smbd/reply.c 2007-01-16 20:53:50 UTC (rev 20842)
@@ -4754,7 +4754,6 @@
{
int snum;
int outsize = 0;
- BOOL ok = False;
pstring newdir;
NTSTATUS status;
@@ -4774,19 +4773,14 @@
RESOLVE_DFSPATH(newdir, conn, inbuf, outbuf);
- if (strlen(newdir) == 0) {
- ok = True;
- } else {
- ok = vfs_directory_exist(conn,newdir,NULL);
- if (ok)
- set_conn_connectpath(conn,newdir);
+ if (strlen(newdir) != 0) {
+ if (!vfs_directory_exist(conn,newdir,NULL)) {
+ END_PROFILE(pathworks_setdir);
+ return ERROR_DOS(ERRDOS,ERRbadpath);
+ }
+ set_conn_connectpath(conn,newdir);
}
- if (!ok) {
- END_PROFILE(pathworks_setdir);
- return ERROR_DOS(ERRDOS,ERRbadpath);
- }
-
outsize = set_message(outbuf,0,0,False);
SCVAL(outbuf,smb_reh,CVAL(inbuf,smb_reh));
More information about the samba-cvs
mailing list