summaryrefslogtreecommitdiff
path: root/comsat/comsat.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2002-08-13 13:24:57 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2002-08-13 13:24:57 +0000
commit3373742327451a83f03946e47d0dd512295303f0 (patch)
tree469cb5f2d4cb478bc0eacfa17c90108e68cae73c /comsat/comsat.c
parent257c5cdac7638dc2e7b4d2ada0c4c336fd178ff7 (diff)
downloadmailutils-3373742327451a83f03946e47d0dd512295303f0.tar.gz
mailutils-3373742327451a83f03946e47d0dd512295303f0.tar.bz2
Switched to the new authentication/authorization functions.
Diffstat (limited to 'comsat/comsat.c')
-rw-r--r--comsat/comsat.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/comsat/comsat.c b/comsat/comsat.c
index b9832adea..f23d22daa 100644
--- a/comsat/comsat.c
+++ b/comsat/comsat.c
@@ -585,27 +585,19 @@ change_user (const char *user)
char *
mailbox_path (const char *user)
{
- struct passwd *pw;
+ struct mu_auth_data *auth;
char *mailbox_name;
- pw = mu_getpwnam (user);
- if (!pw)
+ auth = mu_get_auth_by_name (user);
+
+ if (!auth)
{
syslog (LOG_ALERT, "user nonexistent: %s", user);
return NULL;
}
- if (!mu_virtual_domain)
- {
- mailbox_name = calloc (strlen (mu_path_maildir) + 1 +
- strlen (pw->pw_name) + 1, 1);
- sprintf (mailbox_name, "%s%s", mu_path_maildir, pw->pw_name);
- }
- else
- {
- mailbox_name = calloc (strlen (pw->pw_dir) + strlen ("/INBOX"), 1);
- sprintf (mailbox_name, "%s/INBOX", pw->pw_dir);
- }
+ mailbox_name = strdup (auth->mailbox);
+ mu_auth_data_free (auth);
return mailbox_name;
}

Return to:

Send suggestions and report system problems to the System administrator.