diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2005-11-23 16:42:39 +0000 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2005-11-23 16:42:39 +0000 |
commit | dc1ef1998cff01323a93ee312f638cf4ba45c794 (patch) | |
tree | db6b0d9b81db1894b206778f941f2747283b586c /modules/pam_xauth/pam_xauth.c | |
parent | 85defa52f249728c26961febff913e45a64a57ef (diff) | |
download | pam-dc1ef1998cff01323a93ee312f638cf4ba45c794.tar.gz pam-dc1ef1998cff01323a93ee312f638cf4ba45c794.tar.bz2 pam-dc1ef1998cff01323a93ee312f638cf4ba45c794.zip |
Relevant BUGIDs: none
Purpose of commit: bugfix
Commit summary:
---------------
2005-11-23 Thorsten Kukuk <kukuk@suse.de>
* modules/pam_xauth/pam_xauth.c (pam_sm_open_session): Introduce
new variable to fix compiler warning.
* libpam/pam_modutil_getlogin.c (pam_modutil_getlogin): PAM_TTY
don't need to start with /dev/.
Diffstat (limited to 'modules/pam_xauth/pam_xauth.c')
-rw-r--r-- | modules/pam_xauth/pam_xauth.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/pam_xauth/pam_xauth.c b/modules/pam_xauth/pam_xauth.c index 886b2f88..5376bd8b 100644 --- a/modules/pam_xauth/pam_xauth.c +++ b/modules/pam_xauth/pam_xauth.c @@ -64,7 +64,7 @@ #define XAUTHTMP ".xauthXXXXXX" /* Possible paths to xauth executable */ -static const char * const xauthpaths[] = { +static const char * const xauthpaths[] = { #ifdef PAM_PATH_XAUTH PAM_PATH_XAUTH, #endif @@ -329,11 +329,12 @@ pam_sm_open_session (pam_handle_t *pamh, int flags UNUSED, pam_syslog(pamh, LOG_WARNING, "unrecognized option `%s'", argv[i]); } - + if (xauth == NULL) { - for (i = 0; i < sizeof(xauthpaths)/sizeof(xauthpaths[0]); i++) { - if (access(xauthpaths[i], X_OK) == 0) { - xauth = xauthpaths[i]; + size_t j; + for (j = 0; j < sizeof(xauthpaths)/sizeof(xauthpaths[0]); j++) { + if (access(xauthpaths[j], X_OK) == 0) { + xauth = xauthpaths[j]; break; } } |