summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/access.c2
-rw-r--r--source3/lib/util.c7
2 files changed, 3 insertions, 6 deletions
diff --git a/source3/lib/access.c b/source3/lib/access.c
index 079253cdbd..8f57c37c26 100644
--- a/source3/lib/access.c
+++ b/source3/lib/access.c
@@ -15,7 +15,7 @@ should be sent to samba-bugs@samba.anu.edu.au
extern int DEBUGLEVEL;
#ifndef INADDR_NONE
-#define INADDR_NONE ((unsigned long)~0)
+#define INADDR_NONE ((uint32)~0)
#endif
diff --git a/source3/lib/util.c b/source3/lib/util.c
index aeaac29ae1..5ef1d21a7a 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -3089,11 +3089,8 @@ BOOL process_exists(int pid)
}
}
- /* a best guess for non root access */
- if (geteuid() != 0) return(True);
-
- /* otherwise use kill */
- return(pid == getpid() || kill(pid,0) == 0);
+ /* CGH 8/16/96 - added ESRCH test */
+ return(pid == getpid() || kill(pid,0) == 0 || errno != ESRCH);
#endif
}