/[mailutils]/mailutils/mail.local/script.c
ViewVC logotype

Diff of /mailutils/mail.local/script.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by gray, Thu Jun 27 09:17:31 2002 UTC revision 1.6 by gray, Tue Aug 13 13:24:57 2002 UTC
# Line 73  mda_init (void *data) Line 73  mda_init (void *data)
73  static void  static void
74  mda_switch_to_user (struct mda_data *md)  mda_switch_to_user (struct mda_data *md)
75  {  {
76    struct passwd *pw = NULL;    struct mu_auth_data *auth = NULL;
77        
78    if (md && *md->argv != NULL)    if (md && *md->argv != NULL)
79      pw = mu_getpwnam (*md->argv);      auth = mu_get_auth_by_name (*md->argv);
80    
81    if (pw)    if (auth)
82      {      {
83        switch_user_id (pw->pw_uid);        switch_user_id (auth->uid);
84        chdir (pw->pw_dir);        chdir (auth->dir);
85          mu_auth_data_free (auth);
86      }      }
87    else    else
88      {      {

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26