summaryrefslogtreecommitdiff
path: root/usr/src/lib/passwdutil/files_attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/passwdutil/files_attr.c')
-rw-r--r--usr/src/lib/passwdutil/files_attr.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr/src/lib/passwdutil/files_attr.c b/usr/src/lib/passwdutil/files_attr.c
index 22519fb5df..b7d128cd20 100644
--- a/usr/src/lib/passwdutil/files_attr.c
+++ b/usr/src/lib/passwdutil/files_attr.c
@@ -19,12 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#include <fcntl.h>
#include <errno.h>
@@ -740,8 +738,9 @@ files_update(attrlist *items, pwu_repository_t *rep, void *buf)
case ATTR_LOCK_ACCOUNT:
if (spw->sp_pwdp == NULL) {
spw->sp_pwdp = LOCKSTRING;
- } else if (strncmp(spw->sp_pwdp, LOCKSTRING,
- sizeof (LOCKSTRING)-1) != 0) {
+ } else if ((strncmp(spw->sp_pwdp, LOCKSTRING,
+ sizeof (LOCKSTRING)-1) != 0) &&
+ (strcmp(spw->sp_pwdp, NOLOGINSTRING) != 0)) {
len = sizeof (LOCKSTRING)-1 +
strlen(spw->sp_pwdp) + 1;
pword = malloc(len);