int num_sessions, snum, ret;
fstring username;
fstring machine;
+ BOOL not_root = False;
/* SE_PRIV se_diskop = SE_DISK_OPERATOR; / * Is disk op appropriate here ? JRA. * /
BOOL is_disk_op = False; / * No. SSS. :) */
strequal(session_list[snum].remote_machine, machine)) {
if (user.uid != sec_initial_uid()) {
+ not_root = True;
become_root();
}
if ((ret = message_send_pid(session_list[snum].pid, MSG_SHUTDOWN, NULL, 0, False))) {
} else {
r_u->status = WERR_ACCESS_DENIED;
}
- if (user.uid != sec_initial_uid()) {
+ if (not_root) {
unbecome_root();
}
}