diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2005-09-18 10:44:25 +0000 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2005-09-18 10:44:25 +0000 |
commit | 652b57c94099e205c8881444c425d88b24f42530 (patch) | |
tree | 6688179ba3ce6112d896fdfb3b79465e180fa75f /modules/pam_selinux/pam_selinux_check.c | |
parent | 8ec517a521107ca5d69216640cbdf0e0b31f3361 (diff) | |
download | pam-652b57c94099e205c8881444c425d88b24f42530.tar.gz pam-652b57c94099e205c8881444c425d88b24f42530.tar.bz2 pam-652b57c94099e205c8881444c425d88b24f42530.zip |
Relevant BUGIDs: none
Purpose of commit: bugfix
Commit summary:
---------------
check if argument which we try to access exists
Diffstat (limited to 'modules/pam_selinux/pam_selinux_check.c')
-rw-r--r-- | modules/pam_selinux/pam_selinux_check.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/pam_selinux/pam_selinux_check.c b/modules/pam_selinux/pam_selinux_check.c index 6ff3fbc0..73c77fa0 100644 --- a/modules/pam_selinux/pam_selinux_check.c +++ b/modules/pam_selinux/pam_selinux_check.c @@ -121,6 +121,9 @@ main (int argc, char **argv) pam_handle_t *pamh; int childPid; + if (argc < 1) + exit (-1); + if (!authenticate_via_pam(argv[1],&pamh)) exit(-1); @@ -149,7 +152,7 @@ main (int argc, char **argv) pam_end( pamh, PAM_SUCCESS ); exit(0); } - argv[0]="/bin/sh"; + argv[0]=strdup ("/bin/sh"); argv[1]=NULL; /* NOTE: The environment has not been sanitized. LD_PRELOAD and other fun |