diff options
Diffstat (limited to '')
-rw-r--r-- | src/home/pam_systemd_home.c | 7 | ||||
-rw-r--r-- | src/login/pam_systemd.c | 13 |
2 files changed, 8 insertions, 12 deletions
diff --git a/src/home/pam_systemd_home.c b/src/home/pam_systemd_home.c index 624f1ced88..0d28e99ba2 100644 --- a/src/home/pam_systemd_home.c +++ b/src/home/pam_systemd_home.c @@ -115,7 +115,6 @@ static int acquire_user_record( r = pam_get_user(handle, &username, NULL); if (r != PAM_SUCCESS) return pam_syslog_pam_error(handle, LOG_ERR, r, "Failed to get user name: @PAMERR@"); - if (isempty(username)) return pam_syslog_pam_error(handle, LOG_ERR, PAM_SERVICE_ERR, "User name not set."); } @@ -535,7 +534,6 @@ static int acquire_home( r = pam_get_user(handle, &username, NULL); if (r != PAM_SUCCESS) return pam_syslog_pam_error(handle, LOG_ERR, r, "Failed to get user name: @PAMERR@"); - if (isempty(username)) return pam_syslog_pam_error(handle, LOG_ERR, PAM_SERVICE_ERR, "User name not set."); @@ -879,7 +877,6 @@ _public_ PAM_EXTERN int pam_sm_close_session( r = pam_get_user(handle, &username, NULL); if (r != PAM_SUCCESS) return pam_syslog_pam_error(handle, LOG_ERR, r, "Failed to get user name: @PAMERR@"); - if (isempty(username)) return pam_syslog_pam_error(handle, LOG_ERR, PAM_SERVICE_ERR, "User name not set."); @@ -949,7 +946,7 @@ _public_ PAM_EXTERN int pam_sm_acct_mgmt( if (r != PAM_SUCCESS) return r; - r = acquire_user_record(handle, NULL, debug, &ur, NULL); + r = acquire_user_record(handle, /* username= */ NULL, debug, &ur, /* bus_data= */ NULL); if (r != PAM_SUCCESS) return r; @@ -1057,7 +1054,7 @@ _public_ PAM_EXTERN int pam_sm_chauthtok( pam_debug_syslog(handle, debug, "pam-systemd-homed account management"); - r = acquire_user_record(handle, NULL, debug, &ur, NULL); + r = acquire_user_record(handle, /* username= */ NULL, debug, &ur, /* bus_data= */ NULL); if (r != PAM_SUCCESS) return r; diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c index 893d03cdb6..9a0ec294f0 100644 --- a/src/login/pam_systemd.c +++ b/src/login/pam_systemd.c @@ -187,7 +187,6 @@ static int acquire_user_record( r = pam_get_user(handle, &username, NULL); if (r != PAM_SUCCESS) return pam_syslog_pam_error(handle, LOG_ERR, r, "Failed to get user name: @PAMERR@"); - if (isempty(username)) return pam_syslog_pam_error(handle, LOG_ERR, PAM_SERVICE_ERR, "User name not valid."); @@ -224,7 +223,7 @@ static int acquire_user_record( _cleanup_free_ char *formatted = NULL; /* Request the record ourselves */ - r = userdb_by_name(username, 0, &ur); + r = userdb_by_name(username, /* flags= */ 0, &ur); if (r < 0) { pam_syslog_errno(handle, LOG_ERR, r, "Failed to get user record: %m"); return PAM_USER_UNKNOWN; @@ -1468,12 +1467,12 @@ _public_ PAM_EXTERN int pam_sm_close_session( if (parse_argv(handle, argc, argv, - NULL, - NULL, - NULL, + /* class= */ NULL, + /* type= */ NULL, + /* deskop= */ NULL, &debug, - NULL, - NULL) < 0) + /* default_capability_bounding_set */ NULL, + /* default_capability_ambient_set= */ NULL) < 0) return PAM_SESSION_ERR; pam_debug_syslog(handle, debug, "pam-systemd shutting down"); |