View | Details | Raw Unified | Return to bug 848 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-4 / +24 lines)
Line  Link Here
0
-- openssh-4.2p1/auth-shadow.c 2005-07-17 12:34:47.000000000 +0530
0
++ openssh-4.2p1-pwagefix/auth-shadow.c        2005-09-26 17:44:50.000000000 +0530
Lines 87-97 Link Here
87
       const char *user = ctxt->pw->pw_name;
87
       const char *user = ctxt->pw->pw_name;
88
       char buf[256];
88
       char buf[256];
89
       time_t today;
89
       time_t today;
90
       int daysleft, disabled = 0;
90
       int daysleft, i=0, j=3, disabled = 0, age_info[3];
91
       long pwage;
91
       if ((spw = getspnam((char *)user)) == NULL) {
92
       if ((spw = getspnam((char *)user)) == NULL) {
92
               error("Could not get shadow information for %.100s", user);
93
               spw=(struct spwd *)xmalloc(sizeof(struct spwd));
93
               return 0;
94
95
               spw->sp_namp = ctxt->pw->pw_name;
96
               spw->sp_pwdp = ctxt->pw->pw_passwd;
97
98
        if (strlen(ctxt->pw->pw_age) > 0) {
99
                pwage = a64l(ctxt->pw->pw_age);
100
                for(i=0;i<j;i++)
101
                {
102
                        if(i<2)
103
                                age_info[i]=(pwage >> j*i*2) & 077;
104
                        else
105
                                age_info[i]=(pwage >> j*i*2);
106
                }
107
108
       /* HP-UX passwd command rounds of expiry days to nearest week */
109
110
                spw->sp_max = age_info[0] * 7;
111
                spw->sp_min = age_info[1] * 7;
112
                spw->sp_lstchg = age_info[2] * 7;
113
                }
94
       }
114
       }
95
       today = time(NULL) / DAY;
115
       today = time(NULL) / DAY;
(-)openssh-4.2p1/misc.c (+1 lines)
Lines 170-175 Link Here
170
#endif
170
#endif
171
       copy->pw_dir = xstrdup(pw->pw_dir);
171
       copy->pw_dir = xstrdup(pw->pw_dir);
172
       copy->pw_shell = xstrdup(pw->pw_shell);
172
       copy->pw_shell = xstrdup(pw->pw_shell);
173
       copy->pw_age = xstrdup(pw->pw_age);
173
       return copy;
174
       return copy;
174
}
175
}

Return to bug 848