summaryrefslogtreecommitdiff
path: root/libpam/pam_start.c
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2004-09-14 13:48:38 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2004-09-14 13:48:38 +0000
commitff883e0d18e0c274da4689b6efa7064408d8c74b (patch)
tree4a9da60a2686cb5bc9951ee5ea8a8bb043aa85a9 /libpam/pam_start.c
parent44d2b97a5ca02cad258093bd3add986f3e095941 (diff)
Relevant BUGIDs:
Purpose of commit: Commit summary: --------------- bugfix: Bug 1027903 and 1027912
Diffstat (limited to 'libpam/pam_start.c')
-rw-r--r--libpam/pam_start.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libpam/pam_start.c b/libpam/pam_start.c
index ef1dae1d..f8955854 100644
--- a/libpam/pam_start.c
+++ b/libpam/pam_start.c
@@ -34,6 +34,11 @@ int pam_start (
return (PAM_BUF_ERR);
}
+ /* All service names should be files below /etc/pam.d and nothing
+ else. Forbid paths. */
+ if (strrchr(service_name, '/') != NULL)
+ service_name = strrchr(service_name, '/') + 1;
+
/* Mark the caller as the application - permission to do certain
things is limited to a module or an application */