Lines Matching refs:attributes
35 * to add, change and display password attributes.
37 * password attributes which corresponds to their login name.
68 * flags indicate password attributes to be modified
76 #define SFLAG 0x010 /* display password attributes */
78 #define AFLAG 0x040 /* display password attributes for all users */
79 #define SAFLAG (SFLAG|AFLAG) /* display password attributes for all users */
202 static int ckarg(int argc, char **argv, attrlist **attributes);
220 * administrator to add, change and display password attributes.
222 * password attributes which corresponds to their login name.
233 attrlist *attributes = NULL;
268 flag = ckarg(argc, argv, &attributes);
288 * modify password aging attributes
312 if (flag == SAFLAG) { /* display password attributes for all users */
325 &attributes);
326 (void) display_attr(namelist[i], attributes);
328 (void) free_attr(attributes);
333 } else if (flag == SFLAG) { /* display password attributes by user */
334 if (get_attr(usrname, &repository, &attributes) ==
336 (void) display_attr(usrname, attributes);
337 (void) free_attr(attributes);
447 } else { /* changing attributes */
449 case EFLAG: /* changing user password attributes */
452 attrlist_add(&attributes, ATTR_SHELL, input);
459 attrlist_add(&attributes, ATTR_GECOS, input);
466 attrlist_add(&attributes, ATTR_HOMEDIR, input);
472 if (attributes != NULL) {
475 &repository, attributes, &updated_reps);
678 * attrlist => pointer to list of password attributes
682 ckarg(int argc, char **argv, attrlist **attributes)
749 attrlist_add(attributes, ATTR_PASSWD, NULL);
781 attrlist_add(attributes, ATTR_NOLOGIN_ACCOUNT, NULL);
813 attrlist_add(attributes, ATTR_LOCK_ACCOUNT, NULL);
845 attrlist_add(attributes, ATTR_UNLOCK_ACCOUNT, NULL);
846 attrlist_add(attributes, ATTR_RST_FAILED_LOGINS, NULL);
887 attrlist_add(attributes, ATTR_MAX, optarg);
926 attrlist_add(attributes, ATTR_MIN, optarg);
967 attrlist_add(attributes, ATTR_WARN, optarg);
970 case 's': /* display password attributes */
977 /* display password attributes */
1002 case 'a': /* display password attributes */
1032 case 'f': /* expire password attributes */
1060 attrlist_add(attributes, ATTR_EXPIRE_PASSWORD, NULL);
1139 attrlist_reorder(attributes);
1209 get_attr(char *username, pwu_repository_t *repository, attrlist **attributes)
1213 attrlist_add(attributes, ATTR_PASSWD, NULL);
1214 attrlist_add(attributes, ATTR_LSTCHG, "0");
1215 attrlist_add(attributes, ATTR_MIN, "0");
1216 attrlist_add(attributes, ATTR_MAX, "0");
1217 attrlist_add(attributes, ATTR_WARN, "0");
1219 res = __get_authtoken_attr(username, repository, *attributes);
1237 * This function prints out the password attributes of a usr
1241 display_attr(char *usrname, attrlist *attributes)
1248 while (attributes) {
1249 switch (attributes->type) {
1251 passwd = attributes->data.val_s;
1267 lstchg = attributes->data.val_i * DAY;
1270 min = attributes->data.val_i;
1273 max = attributes->data.val_i;
1276 warn = attributes->data.val_i;
1281 attributes = attributes->next;
1307 free_attr(attrlist *attributes)
1309 while (attributes) {
1310 if (attributes->type == ATTR_PASSWD)
1311 free(attributes->data.val_s);
1312 attributes = attributes->next;