summaryrefslogtreecommitdiff
path: root/source3/smbd/sec_ctx.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-08-24 13:56:59 +1000
committerMichael Adam <obnox@samba.org>2008-08-26 14:39:42 +0200
commitd9f61dbdc91fae6560361f98d981b1f7bea80422 (patch)
tree6be75509fe252fdf14a309dfe311947a0bb9ed50 /source3/smbd/sec_ctx.c
parent52c39dd55d0a3eda3e9ed9a0981f546ca7b88cff (diff)
downloadsamba-d9f61dbdc91fae6560361f98d981b1f7bea80422.tar.gz
samba-d9f61dbdc91fae6560361f98d981b1f7bea80422.tar.bz2
samba-d9f61dbdc91fae6560361f98d981b1f7bea80422.zip
Avoid a race condition in glibc between AIO and setresuid().
See this test: http://samba.org/~tridge/junkcode/aio_uid.c The problem is that setresuid() tries to be clever about threads, and tries to change the euid of any threads that are running. If a AIO read or write completes while this is going on then the signal from the thread where the IO completed is lost, as it gets -1/EPERM from rt_sigqueueinfo() The simplest fix is to try to use setreuid() instead of setresuid(), as setreuid() doesn't try to be clever. Unfortunately this also means we must use become_root()/unbecome_root() in the aio code. (This used to be commit 56c5a6f024875bb79b0104beb36f6b0ec1e1e9f9)
Diffstat (limited to 'source3/smbd/sec_ctx.c')
0 files changed, 0 insertions, 0 deletions