Print this page
OS-5440 pfexec and the case of the missing error message
Reviewed by: Joshua M. Clulow <jmc@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
*** 37,46 ****
--- 37,48 ----
#include <sys/systm.h>
#include <sys/sysmacros.h>
#include <sys/pathname.h>
#include <sys/varargs.h>
#include <sys/zone.h>
+ #include <sys/cmn_err.h>
+ #include <sys/sdt.h>
#include <netinet/in.h>
#define ROUNDUP(a, n) (((a) + ((n) - 1)) & ~((n) - 1))
static kmutex_t klpd_mutex;
*** 858,869 ****
mutex_enter(&myzone->zone_lock);
if ((pfd = myzone->zone_pfexecd) != NULL)
klpd_hold(pfd);
mutex_exit(&myzone->zone_lock);
! if (pfd == NULL)
return (0);
if (pfd->klpd_door_pid == curproc->p_pid) {
klpd_rele(pfd);
return (0);
}
--- 860,876 ----
mutex_enter(&myzone->zone_lock);
if ((pfd = myzone->zone_pfexecd) != NULL)
klpd_hold(pfd);
mutex_exit(&myzone->zone_lock);
! if (pfd == NULL) {
! DTRACE_PROBE2(pfexecd__not__running,
! zone_t *, myzone, char *, rpnp->pn_path);
! uprintf("pfexecd not running; pid %d privileges not "
! "elevated\n", curproc->p_pid);
return (0);
+ }
if (pfd->klpd_door_pid == curproc->p_pid) {
klpd_rele(pfd);
return (0);
}
*** 894,903 ****
--- 901,913 ----
case EBADF:
/* FALLTHROUGH */
case EINTR:
/* FALLTHROUGH */
default:
+ DTRACE_PROBE4(pfexecd__failure,
+ int, dres, zone_t *, myzone,
+ char *, rpnp->pn_path, klpd_reg_t *, pfd);
goto out;
}
}
prp = (pfexec_reply_t *)da.rbuf;