From a24714b9fd11b6ac166483f0f13deda8d6f7f7cc 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 (This used to be commit 70c589a8323637ff8e1f96a56f8acaf550a58dc4) --- source3/lib/util_sec.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3') 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 -- cgit