summaryrefslogtreecommitdiff
path: root/source3/lib/util_sec.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-01-24 16:15:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:26 -0500
commita24714b9fd11b6ac166483f0f13deda8d6f7f7cc (patch)
tree973959b27e55e4d994b8410b805d711287447bb2 /source3/lib/util_sec.c
parent3f70efd4f97235272680bdb80dc3e52d0e56501b (diff)
downloadsamba-a24714b9fd11b6ac166483f0f13deda8d6f7f7cc.tar.gz
samba-a24714b9fd11b6ac166483f0f13deda8d6f7f7cc.tar.bz2
samba-a24714b9fd11b6ac166483f0f13deda8d6f7f7cc.zip
r21005: Add a debug message for EAGAIN error of setresuid.
Volker (This used to be commit 70c589a8323637ff8e1f96a56f8acaf550a58dc4)
Diffstat (limited to 'source3/lib/util_sec.c')
-rw-r--r--source3/lib/util_sec.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/lib/util_sec.c b/source3/lib/util_sec.c
index 3f8cb690cd..3d997ee76a 100644
--- a/source3/lib/util_sec.c
+++ b/source3/lib/util_sec.c
@@ -198,7 +198,13 @@ void set_effective_uid(uid_t uid)
{
#if USE_SETRESUID
/* Set the effective as well as the real uid. */
- setresuid(uid,uid,-1);
+ if (setresuid(uid,uid,-1) == -1) {
+ if (errno == EAGAIN) {
+ DEBUG(0, ("setresuid failed with EAGAIN. uid(%d) "
+ "might be over its NPROC limit\n",
+ (int)uid));
+ }
+ }
#endif
#if USE_SETREUID