summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@redhat.com>2010-02-19 15:25:09 +0100
committerStefan Metzmacher <metze@samba.org>2010-02-23 12:23:42 +0100
commit069350d7e4d9e13ea5451273db51023e972a9373 (patch)
tree89b335b1b2db1716a7850dcd38b1485c064a96e4
parentb9cf55cfeae854cd90cd4bd7b55b7313f34af828 (diff)
downloadsamba-069350d7e4d9e13ea5451273db51023e972a9373.tar.gz
samba-069350d7e4d9e13ea5451273db51023e972a9373.tar.bz2
samba-069350d7e4d9e13ea5451273db51023e972a9373.zip
s3-pam_smbpass: Remove obsolete signal type cast.
-rw-r--r--source3/pam_smbpass/pam_smb_acct.c14
-rw-r--r--source3/pam_smbpass/pam_smb_auth.c4
-rw-r--r--source3/pam_smbpass/pam_smb_passwd.c24
3 files changed, 21 insertions, 21 deletions
diff --git a/source3/pam_smbpass/pam_smb_acct.c b/source3/pam_smbpass/pam_smb_acct.c
index 9ad74788f0..650d322b35 100644
--- a/source3/pam_smbpass/pam_smb_acct.c
+++ b/source3/pam_smbpass/pam_smb_acct.c
@@ -82,30 +82,30 @@ int pam_sm_acct_mgmt( pam_handle_t *pamh, int flags,
/* Getting into places that might use LDAP -- protect the app
from a SIGPIPE it's not expecting */
- oldsig_handler = CatchSignal(SIGPIPE, SIGNAL_CAST SIG_IGN);
+ oldsig_handler = CatchSignal(SIGPIPE, SIG_IGN);
if (!initialize_password_db(True, NULL)) {
_log_err(pamh, LOG_ALERT, "Cannot access samba password database" );
- CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
+ CatchSignal(SIGPIPE, oldsig_handler);
return PAM_AUTHINFO_UNAVAIL;
}
/* Get the user's record. */
if (!(sampass = samu_new( NULL ))) {
- CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
+ CatchSignal(SIGPIPE, oldsig_handler);
/* malloc fail. */
return nt_status_to_pam(NT_STATUS_NO_MEMORY);
}
if (!pdb_getsampwnam(sampass, name )) {
_log_err(pamh, LOG_DEBUG, "acct: could not identify user");
- CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
+ CatchSignal(SIGPIPE, oldsig_handler);
return PAM_USER_UNKNOWN;
}
/* check for lookup failure */
if (!strlen(pdb_get_username(sampass)) ) {
- CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
+ CatchSignal(SIGPIPE, oldsig_handler);
return PAM_USER_UNKNOWN;
}
@@ -118,13 +118,13 @@ int pam_sm_acct_mgmt( pam_handle_t *pamh, int flags,
, "Your account has been disabled; "
"please see your system administrator." );
- CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
+ CatchSignal(SIGPIPE, oldsig_handler);
return PAM_ACCT_EXPIRED;
}
/* TODO: support for expired passwords. */
- CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
+ CatchSignal(SIGPIPE, oldsig_handler);
return PAM_SUCCESS;
}
diff --git a/source3/pam_smbpass/pam_smb_auth.c b/source3/pam_smbpass/pam_smb_auth.c
index 88ff9851f5..feb469792d 100644
--- a/source3/pam_smbpass/pam_smb_auth.c
+++ b/source3/pam_smbpass/pam_smb_auth.c
@@ -44,7 +44,7 @@
#define AUTH_RETURN \
do { \
/* Restore application signal handler */ \
- CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler); \
+ CatchSignal(SIGPIPE, oldsig_handler); \
if(ret_data) { \
*ret_data = retval; \
pam_set_data( pamh, "smb_setcred_return" \
@@ -92,7 +92,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
/* we need to do this before we call AUTH_RETURN */
/* Getting into places that might use LDAP -- protect the app
from a SIGPIPE it's not expecting */
- oldsig_handler = CatchSignal(SIGPIPE, SIGNAL_CAST SIG_IGN);
+ oldsig_handler = CatchSignal(SIGPIPE, SIG_IGN);
/* get the username */
retval = pam_get_user( pamh, &name, "Username: " );
diff --git a/source3/pam_smbpass/pam_smb_passwd.c b/source3/pam_smbpass/pam_smb_passwd.c
index 0563af383c..473a55e065 100644
--- a/source3/pam_smbpass/pam_smb_passwd.c
+++ b/source3/pam_smbpass/pam_smb_passwd.c
@@ -133,23 +133,23 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
/* Getting into places that might use LDAP -- protect the app
from a SIGPIPE it's not expecting */
- oldsig_handler = CatchSignal(SIGPIPE, SIGNAL_CAST SIG_IGN);
+ oldsig_handler = CatchSignal(SIGPIPE, SIG_IGN);
if (!initialize_password_db(False, NULL)) {
_log_err(pamh, LOG_ALERT, "Cannot access samba password database" );
- CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
+ CatchSignal(SIGPIPE, oldsig_handler);
return PAM_AUTHINFO_UNAVAIL;
}
/* obtain user record */
if ( !(sampass = samu_new( NULL )) ) {
- CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
+ CatchSignal(SIGPIPE, oldsig_handler);
return nt_status_to_pam(NT_STATUS_NO_MEMORY);
}
if (!pdb_getsampwnam(sampass,user)) {
_log_err(pamh, LOG_ALERT, "Failed to find entry for user %s.", user);
- CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
+ CatchSignal(SIGPIPE, oldsig_handler);
return PAM_USER_UNKNOWN;
}
if (on( SMB_DEBUG, ctrl )) {
@@ -167,7 +167,7 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
if (_smb_blankpasswd( ctrl, sampass )) {
TALLOC_FREE(sampass);
- CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
+ CatchSignal(SIGPIPE, oldsig_handler);
return PAM_SUCCESS;
}
@@ -181,7 +181,7 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
if (Announce == NULL) {
_log_err(pamh, LOG_CRIT, "password: out of memory");
TALLOC_FREE(sampass);
- CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
+ CatchSignal(SIGPIPE, oldsig_handler);
return PAM_BUF_ERR;
}
strncpy( Announce, greeting, sizeof(greeting) );
@@ -197,7 +197,7 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
_log_err(pamh, LOG_NOTICE,
"password - (old) token not obtained");
TALLOC_FREE(sampass);
- CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
+ CatchSignal(SIGPIPE, oldsig_handler);
return retval;
}
@@ -212,7 +212,7 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
pass_old = NULL;
TALLOC_FREE(sampass);
- CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
+ CatchSignal(SIGPIPE, oldsig_handler);
return retval;
} else if (flags & PAM_UPDATE_AUTHTOK) {
@@ -242,7 +242,7 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
if (retval != PAM_SUCCESS) {
_log_err(pamh, LOG_NOTICE, "password: user not authenticated");
TALLOC_FREE(sampass);
- CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
+ CatchSignal(SIGPIPE, oldsig_handler);
return retval;
}
@@ -270,7 +270,7 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
}
pass_old = NULL; /* tidy up */
TALLOC_FREE(sampass);
- CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
+ CatchSignal(SIGPIPE, oldsig_handler);
return retval;
}
@@ -290,7 +290,7 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
_log_err(pamh, LOG_NOTICE, "new password not acceptable");
pass_new = pass_old = NULL; /* tidy up */
TALLOC_FREE(sampass);
- CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
+ CatchSignal(SIGPIPE, oldsig_handler);
return retval;
}
@@ -339,7 +339,7 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
}
TALLOC_FREE(sampass);
- CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
+ CatchSignal(SIGPIPE, oldsig_handler);
return retval;
}