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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr/src/cmd/nscd/nscd_selfcred.c b/usr/src/cmd/nscd/nscd_selfcred.c
index df4d2a2c5b..bc56fc19c7 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>
@@ -44,6 +45,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <libscf.h>
+#include <pthread.h>
#include "nscd_door.h"
#include "nscd_config.h"
#include "nscd_log.h"
@@ -425,6 +427,8 @@ forker_monitor(
char *fmri;
char *me = "forker_monitor";
+ (void) pthread_setname_np(pthread_self(), me);
+
/* wait until forker exits */
fpid = forker_pid;
(void) selfcred_pulse(forking_door);
@@ -1416,7 +1420,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 +1470,8 @@ check_user_process(void *arg)
int found;
char *me = "check_user_process";
+ (void) pthread_setname_np(pthread_self(), me);
+
for (;;) {
(void) sleep(60);