aboutsummaryrefslogtreecommitdiff
path: root/libbb/obscure.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/obscure.c')
-rw-r--r--libbb/obscure.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libbb/obscure.c b/libbb/obscure.c
index 7d839d624..2599095df 100644
--- a/libbb/obscure.c
+++ b/libbb/obscure.c
@@ -157,14 +157,14 @@ static const char *obscure_msg(const char *old_p, const char *new_p, const struc
157 return NULL; 157 return NULL;
158} 158}
159 159
160int obscure(const char *old, const char *newval, const struct passwd *pwdp) 160int obscure(const char *old, const char *newval, const struct passwd *pw)
161{ 161{
162 const char *msg; 162 const char *msg;
163 163
164 if ((msg = obscure_msg(old, newval, pwdp))) { 164 msg = obscure_msg(old, newval, pw);
165 printf("Bad password: %s.\n", msg); 165 if (msg) {
166 /* If user is root warn only */ 166 printf("Bad password: %s\n", msg);
167 return getuid() ? 1 : 0; 167 return 1;
168 } 168 }
169 return 0; 169 return 0;
170} 170}