From 70c589a8323637ff8e1f96a56f8acaf550a58dc4 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 24 Jan 2007 16:15:29 +0000 Subject: r21005: Add a debug message for EAGAIN error of setresuid. Volker --- source/lib/util_sec.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source/lib/util_sec.c') diff --git a/source/lib/util_sec.c b/source/lib/util_sec.c index 3f8cb690cd0..3d997ee76ac 100644 --- a/source/lib/util_sec.c +++ b/source/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 -- cgit