diff options
author | Gerald Carter <jerry@samba.org> | 2007-04-09 16:04:07 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2007-04-09 16:04:07 +0000 |
commit | 7dcb89c1236f9712f9018744bea2e016b5cdfab9 (patch) | |
tree | 69b6dd928b31818c82a7368be3cff169cc8b8a61 /source/lib/messages.c | |
parent | 099d375891d4444320bd451486e8bf7d9afdbe0f (diff) | |
download | samba-7dcb89c1236f9712f9018744bea2e016b5cdfab9.tar.gz samba-7dcb89c1236f9712f9018744bea2e016b5cdfab9.tar.xz samba-7dcb89c1236f9712f9018744bea2e016b5cdfab9.zip |
r22138: * Sync up with the SAMBA_3_0_25 as of svn r22132.
* Set VERSION to 3.0.25rc1
* Update release notes.
Diffstat (limited to 'source/lib/messages.c')
-rw-r--r-- | source/lib/messages.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/lib/messages.c b/source/lib/messages.c index e2c8a6b52fa..08a94142572 100644 --- a/source/lib/messages.c +++ b/source/lib/messages.c @@ -183,13 +183,18 @@ static NTSTATUS message_notify(struct process_id procid) SMB_ASSERT(pid > 0); if (euid != 0) { - become_root_uid_only(); + /* If we're not root become so to send the message. */ + save_re_uid(); + set_effective_uid(0); } ret = kill(pid, SIGUSR1); if (euid != 0) { - unbecome_root_uid_only(); + /* Go back to who we were. */ + int saved_errno = errno; + restore_re_uid_fromroot(); + errno = saved_errno; } if (ret == -1) { |