summaryrefslogtreecommitdiff
path: root/usr/src/cmd/nscd/nscd_selfcred.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/nscd/nscd_selfcred.c')
-rw-r--r--usr/src/cmd/nscd/nscd_selfcred.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/src/cmd/nscd/nscd_selfcred.c b/usr/src/cmd/nscd/nscd_selfcred.c
index df4d2a2c5b..b6cdba8c7a 100644
--- a/usr/src/cmd/nscd/nscd_selfcred.c
+++ b/usr/src/cmd/nscd/nscd_selfcred.c
@@ -22,6 +22,7 @@
/*
* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012 Milan Jurik. All rights reserved.
+ * Copyright 2018 Joyent Inc.
*/
#include <stdio.h>
@@ -425,6 +426,8 @@ forker_monitor(
char *fmri;
char *me = "forker_monitor";
+ (void) thr_setname(thr_self(), me);
+
/* wait until forker exits */
fpid = forker_pid;
(void) selfcred_pulse(forking_door);
@@ -1416,7 +1419,7 @@ check_uid(char *pid_name)
static uid_t uid = 0;
static uid_t euid = 0;
int pfd; /* file descriptor for /proc/<pid>/psinfo */
- psinfo_t info; /* process information from /proc */
+ psinfo_t info; /* process information from /proc */
if (uid == 0) {
pid = getpid();
@@ -1466,6 +1469,8 @@ check_user_process(void *arg)
int found;
char *me = "check_user_process";
+ (void) thr_setname(thr_self(), me);
+
for (;;) {
(void) sleep(60);