aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_namespace/pam_namespace.c
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 21:06:32 -0800
committerSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 21:06:32 -0800
commitf3c0273b7bd2d7fdcac3fe3604cedd82afc57f49 (patch)
treeead579aab3f7345280205fa43570f2c033b1f6ce /modules/pam_namespace/pam_namespace.c
parentb70316c593cbc8e5c9155e5c6597497090c6eb88 (diff)
parent46cdce51ed99e5b86c613fb19dafa973c219d255 (diff)
downloadpam-f3c0273b7bd2d7fdcac3fe3604cedd82afc57f49.tar.gz
pam-f3c0273b7bd2d7fdcac3fe3604cedd82afc57f49.tar.bz2
pam-f3c0273b7bd2d7fdcac3fe3604cedd82afc57f49.zip
New upstream version 1.1.3
Diffstat (limited to 'modules/pam_namespace/pam_namespace.c')
-rw-r--r--modules/pam_namespace/pam_namespace.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/pam_namespace/pam_namespace.c b/modules/pam_namespace/pam_namespace.c
index f6219271..a13f9599 100644
--- a/modules/pam_namespace/pam_namespace.c
+++ b/modules/pam_namespace/pam_namespace.c
@@ -1181,14 +1181,15 @@ static int inst_init(const struct polydir_s *polyptr, const char *ipath,
} else {
pid = fork();
if (pid == 0) {
+ static char *envp[] = { NULL };
#ifdef WITH_SELINUX
if (idata->flags & PAMNS_SELINUX_ENABLED) {
if (setexeccon(NULL) < 0)
_exit(1);
}
#endif
- if (execl(init_script, init_script,
- polyptr->dir, ipath, newdir?"1":"0", idata->user, (char *)NULL) < 0)
+ if (execle(init_script, init_script,
+ polyptr->dir, ipath, newdir?"1":"0", idata->user, NULL, envp) < 0)
_exit(1);
} else if (pid > 0) {
while (((rc = waitpid(pid, &status, 0)) == (pid_t)-1) &&
@@ -1608,13 +1609,14 @@ static int cleanup_tmpdirs(struct instance_data *idata)
if (pptr->method == TMPDIR && access(pptr->instance_prefix, F_OK) == 0) {
pid = fork();
if (pid == 0) {
+ static char *envp[] = { NULL };
#ifdef WITH_SELINUX
if (idata->flags & PAMNS_SELINUX_ENABLED) {
if (setexeccon(NULL) < 0)
_exit(1);
}
#endif
- if (execl("/bin/rm", "/bin/rm", "-rf", pptr->instance_prefix, (char *)NULL) < 0)
+ if (execle("/bin/rm", "/bin/rm", "-rf", pptr->instance_prefix, NULL, envp) < 0)
_exit(1);
} else if (pid > 0) {
while (((rc = waitpid(pid, &status, 0)) == (pid_t)-1) &&