1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-05 21:57:51 +03:00

r15539: Use portable wrapper functions instead of seteuid

directly in winbindd.
Jeremy.
This commit is contained in:
Jeremy Allison 2006-05-11 22:47:28 +00:00 committed by Gerald (Jerry) Carter
parent 45cfba12cf
commit 2e65fcc9de
2 changed files with 7 additions and 7 deletions

View File

@ -105,7 +105,7 @@ static void krb5_ticket_refresh_handler(struct timed_event *te,
if ((entry->renew_until < time(NULL)) && (entry->pass != NULL)) {
seteuid(entry->uid);
set_effective_uid(entry->uid);
ret = kerberos_kinit_password_ext(entry->principal_name,
entry->pass,
@ -116,7 +116,7 @@ static void krb5_ticket_refresh_handler(struct timed_event *te,
False, /* no PAC required anymore */
True,
WINBINDD_PAM_AUTH_KRB5_RENEW_TIME);
seteuid(0);
gain_root_privilege();
if (ret) {
DEBUG(3,("could not re-kinit: %s\n", error_message(ret)));
@ -132,13 +132,13 @@ static void krb5_ticket_refresh_handler(struct timed_event *te,
goto done;
}
seteuid(entry->uid);
set_effective_uid(entry->uid);
ret = smb_krb5_renew_ticket(entry->ccname,
entry->principal_name,
entry->service,
&new_start);
seteuid(0);
gain_root_privilege();
if (ret) {
DEBUG(3,("could not renew tickets: %s\n", error_message(ret)));

View File

@ -478,7 +478,7 @@ static NTSTATUS winbindd_raw_kerberos_login(struct winbindd_domain *domain,
if (!internal_ccache) {
seteuid(uid);
set_effective_uid(uid);
DEBUG(10,("winbindd_raw_kerberos_login: uid is %d\n", uid));
}
@ -533,7 +533,7 @@ static NTSTATUS winbindd_raw_kerberos_login(struct winbindd_domain *domain,
}
if (!internal_ccache) {
seteuid(0);
gain_root_privilege();
}
/************************ NON-ROOT **********************/
@ -631,7 +631,7 @@ done:
SAFE_FREE(client_princ_out);
if (!internal_ccache) {
seteuid(0);
gain_root_privilege();
}
return result;