reply_nterror(req, NT_STATUS_ACCESS_DENIED);
return conn;
}
+ } else if (flags & AS_GUEST) {
+ /*
+ * Does this protocol need to be run as guest? (Only archane
+ * messenger service requests have this...)
+ */
+ if (!change_to_guest()) {
+ reply_nterror(req, NT_STATUS_ACCESS_DENIED);
+ return conn;
+ }
} else {
/* This call needs to be run as root */
change_to_root_user();
conn->num_smb_operations++;
}
- /*
- * Does this protocol need to be run as guest? (Only archane
- * messenger service requests have this...)
- */
- if (flags & AS_GUEST) {
- if (!change_to_guest()) {
- reply_nterror(req, NT_STATUS_ACCESS_DENIED);
- return conn;
- }
- }
-
/*
* Update encryption and signing state tracking flags that are
* used by smbstatus to display signing and encryption status.