git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@882 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1996-10-25 04:13:39 +00:00
parent 338c2664b5
commit 8ff6aa59a0

View File

@@ -19,7 +19,7 @@ RCSID("$Id$");
int int
pop_pass (POP *p) pop_pass (POP *p)
{ {
struct passwd * pw; struct passwd *pw;
char lrealm[REALM_SZ]; char lrealm[REALM_SZ];
int status; int status;
int i; int i;
@@ -31,15 +31,17 @@ pop_pass (POP *p)
/* Look for the user in the password file */ /* Look for the user in the password file */
if ((pw = k_getpwnam(p->user)) == NULL) if ((pw = k_getpwnam(p->user)) == NULL)
return (pop_msg(p,POP_FAILURE, return (pop_msg(p,POP_FAILURE,
"Password supplied for \"%s\" is incorrect.",p->user)); "Password supplied for \"%s\" is incorrect.",
p->user));
if ((status = krb_get_lrealm(lrealm,1)) == KFAILURE) { if ((status = krb_get_lrealm(lrealm,1)) == KFAILURE) {
pop_log(p, POP_FAILURE, "%s: (%s.%s@%s) %s", p->client, pop_log(p, POP_FAILURE, "%s: (%s.%s@%s) %s", p->client,
p->kdata.pname, p->kdata.pinst, p->kdata.prealm, p->kdata.pname, p->kdata.pinst, p->kdata.prealm,
krb_get_err_text(status)); krb_get_err_text(status));
return(pop_msg(p,POP_FAILURE, return(pop_msg(p,POP_FAILURE,
"Kerberos error: \"%s\".", krb_get_err_text(status))); "Kerberos error: \"%s\".",
krb_get_err_text(status)));
} }
if (!p->kerberosp) { if (!p->kerberosp) {
@@ -84,7 +86,7 @@ pop_pass (POP *p)
} }
/* Build the name of the user's maildrop */ /* Build the name of the user's maildrop */
(void)sprintf(p->drop_name,"%s/%s",POP_MAILDIR,p->user); sprintf(p->drop_name, "%s/%s", POP_MAILDIR, p->user);
/* Make a temporary copy of the user's maildrop */ /* Make a temporary copy of the user's maildrop */
/* and set the group and user id */ /* and set the group and user id */
@@ -97,7 +99,7 @@ pop_pass (POP *p)
p->last_msg = 0; p->last_msg = 0;
/* Authorization completed successfully */ /* Authorization completed successfully */
return (pop_msg (p,POP_SUCCESS, return (pop_msg (p, POP_SUCCESS,
"%s has %d message(s) (%d octets).", "%s has %d message(s) (%d octets).",
p->user,p->msg_count,p->drop_size)); p->user, p->msg_count, p->drop_size));
} }