These are the two opcodes with DO_CHDIR, we don't want the
set_current_case_sensitive() logic for them,
so we don't need the full set_current_service() anymore.
The AS_USER case is already handled before, set_current_case_sensitive()
is called directly before change_to_user(), which already
calls chdir_current_service().
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
}
}
- if (!set_current_service(conn,SVAL(req->inbuf,smb_flg),
- (flags & (AS_USER|DO_CHDIR)
- ?True:False))) {
- reply_nterror(req, NT_STATUS_ACCESS_DENIED);
- return conn;
+ if (flags & DO_CHDIR) {
+ bool ok;
+
+ ok = chdir_current_service(conn);
+ if (!ok) {
+ reply_nterror(req, NT_STATUS_ACCESS_DENIED);
+ return conn;
+ }
}
conn->num_smb_operations++;
}