summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2009-12-04 13:01:09 +0100
committerStephen Gallagher <sgallagh@redhat.com>2009-12-07 10:19:03 -0500
commitd64a2e5ebaccd872912a8dea9006f2a7724dd830 (patch)
treecf4a459fbe2f11cbcabfae730262e4cd7846a5ac /server
parent6e2a1ba6379e47c2c2ee515ce5d2316c797778e3 (diff)
downloadsssd-d64a2e5ebaccd872912a8dea9006f2a7724dd830.tar.gz
sssd-d64a2e5ebaccd872912a8dea9006f2a7724dd830.tar.xz
sssd-d64a2e5ebaccd872912a8dea9006f2a7724dd830.zip
Do not treat missing proc files as errors.
Diffstat (limited to 'server')
-rw-r--r--server/util/find_uid.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/util/find_uid.c b/server/util/find_uid.c
index 2fead50a3..626d37f6f 100644
--- a/server/util/find_uid.c
+++ b/server/util/find_uid.c
@@ -87,6 +87,11 @@ static errno_t get_uid_from_pid(const pid_t pid, uid_t *uid)
ret = lstat(path, &stat_buf);
if (ret == -1) {
+ if (errno == ENOENT) {
+ DEBUG(7, ("Proc file [%s] is not available anymore, continuing.\n",
+ path));
+ return EOK;
+ }
DEBUG(1, ("lstat failed [%d][%s].\n", errno, strerror(errno)));
return errno;
}
@@ -98,6 +103,11 @@ static errno_t get_uid_from_pid(const pid_t pid, uid_t *uid)
fd = open(path, O_RDONLY);
if (fd == -1) {
+ if (errno == ENOENT) {
+ DEBUG(7, ("Proc file [%s] is not available anymore, continuing.\n",
+ path));
+ return EOK;
+ }
DEBUG(1, ("open failed [%d][%s].\n", errno, strerror(errno)));
return errno;
}