summaryrefslogtreecommitdiff
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:18:52 -0500
commitb1a074deb982b536b41fadfcb72f363630b0b8c5 (patch)
tree780054615078a6c18d493ea153c222a4f671ab6e /server
parent457d7dc822de590ab024cef8df66135445a4b377 (diff)
downloadsssd-b1a074deb982b536b41fadfcb72f363630b0b8c5.tar.gz
sssd-b1a074deb982b536b41fadfcb72f363630b0b8c5.tar.bz2
sssd-b1a074deb982b536b41fadfcb72f363630b0b8c5.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 2fead50a..626d37f6 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;
}