@@ -57,35 +57,14 @@ int pw_auth (const char *cipher,
57
57
char * clear = NULL ;
58
58
const char * cp ;
59
59
const char * encrypted ;
60
- const char * input = NULL ;
60
+ const char * input ;
61
61
62
62
#ifdef SKEY
63
63
bool use_skey = false;
64
64
char challenge_info [40 ];
65
65
struct skey skey ;
66
66
#endif
67
67
68
- /*
69
- * There are programs for adding and deleting authentication data.
70
- */
71
-
72
- if ((PW_ADD == reason ) || (PW_DELETE == reason )) {
73
- return 0 ;
74
- }
75
-
76
- /*
77
- * WARNING:
78
- *
79
- * When we change a password and we are root, we don't prompt.
80
- * This is so root can change any password without having to
81
- * know it. This is a policy decision that might have to be
82
- * revisited.
83
- */
84
-
85
- if ((PW_CHANGE == reason ) && (getuid () == 0 )) {
86
- return 0 ;
87
- }
88
-
89
68
/*
90
69
* WARNING:
91
70
*
@@ -120,25 +99,22 @@ int pw_auth (const char *cipher,
120
99
#endif
121
100
122
101
/*
123
- * Prompt for the password as required. FTPD and REXECD both
124
- * get the cleartext password for us.
102
+ * Prompt for the password as required.
125
103
*/
126
104
127
- if ((PW_FTP != reason ) && (PW_REXEC != reason )) {
128
- cp = getdef_str ("LOGIN_STRING" );
129
- if (NULL == cp ) {
130
- cp = _ (PROMPT );
131
- }
105
+ cp = getdef_str ("LOGIN_STRING" );
106
+ if (NULL == cp ) {
107
+ cp = _ (PROMPT );
108
+ }
132
109
#ifdef SKEY
133
- if (use_skey ) {
134
- printf ("[%s]\n" , challenge_info );
135
- }
110
+ if (use_skey ) {
111
+ printf ("[%s]\n" , challenge_info );
112
+ }
136
113
#endif
137
114
138
- SNPRINTF (prompt , cp , user );
139
- clear = agetpass (prompt );
140
- input = (clear == NULL ) ? "" : clear ;
141
- }
115
+ SNPRINTF (prompt , cp , user );
116
+ clear = agetpass (prompt );
117
+ input = (clear == NULL ) ? "" : clear ;
142
118
143
119
/*
144
120
* Convert the cleartext password into a ciphertext string.
0 commit comments