2 * Copyright (c) 1990 - 1994, Julianne Frances Haugh
3 * Copyright (c) 1996 - 2000, Marek Michałkiewicz
4 * Copyright (c) 2001 - 2006, Tomasz Kłoczko
5 * Copyright (c) 2007 - 2008, Nicolas François
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. The name of the copyright holders or contributors may not be used to
17 * endorse or promote products derived from this software without
18 * specific prior written permission.
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43 #include <sys/types.h>
45 #include "exitcodes.h"
48 #include "prototypes.h"
55 /* The name of this command, as it is invoked */
59 /* Indicate if shadow groups are enabled on the system
60 * (/etc/gshadow present) */
61 static bool is_shadowgrp;
62 static bool gshadow_locked = false;
64 static bool group_locked = false;
66 /* Flags set by options */
67 static bool aflg = false;
68 static bool Aflg = false;
69 static bool dflg = false;
70 static bool Mflg = false;
71 static bool rflg = false;
72 static bool Rflg = false;
73 /* The name of the group that is being affected */
74 static char *group = NULL;
75 /* The name of the user being added (-a) or removed (-d) from group */
76 static char *user = NULL;
77 /* The new list of members set with -M */
78 static char *members = NULL;
80 /* The new list of group administrators set with -A */
81 static char *admins = NULL;
83 /* The name of the caller */
84 static char *myname = NULL;
85 /* The UID of the caller */
87 /* Indicate if gpasswd was called by root */
88 #define amroot (0 == bywho)
90 /* The number of retries for th user to provide and repeat a new password */
95 /* local function prototypes */
96 static void usage (void);
97 static RETSIGTYPE catch_signals (int killed);
98 static void fail_exit (int status);
99 static bool is_valid_user_list (const char *users);
100 static void process_flags (int argc, char **argv);
101 static void check_flags (int argc, int opt_index);
102 static void open_files (void);
103 static void close_files (void);
105 static void get_group (struct group *gr, struct sgrp *sg);
106 static void check_perms (const struct group *gr, const struct sgrp *sg);
107 static void update_group (struct group *gr, struct sgrp *sg);
108 static void change_passwd (struct group *gr, struct sgrp *sg);
110 static void get_group (struct group *gr);
111 static void check_perms (const struct group *gr);
112 static void update_group (struct group *gr);
113 static void change_passwd (struct group *gr);
117 * usage - display usage message
119 static void usage (void)
121 fprintf (stderr, _("Usage: %s [-r|-R] group\n"), Prog);
122 fprintf (stderr, _(" %s [-a user] group\n"), Prog);
123 fprintf (stderr, _(" %s [-d user] group\n"), Prog);
126 _(" %s [-A user,...] [-M user,...] group\n"), Prog);
128 fprintf (stderr, _(" %s [-M user,...] group\n"), Prog);
134 * catch_signals - set or reset termio modes.
136 * catch_signals() is called before processing begins. signal() is then
137 * called with catch_signals() as the signal handler. If signal later
138 * calls catch_signals() with a signal number, the terminal modes are
141 static RETSIGTYPE catch_signals (int killed)
152 (void) putchar ('\n');
153 (void) fflush (stdout);
159 * fail_exit - undo as much as possible
161 static void fail_exit (int status)
164 if (gr_unlock () == 0) {
165 fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ());
166 SYSLOG ((LOG_WARN, "failed to unlock %s", gr_dbname ()));
168 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
169 "unlocking group file",
170 group, AUDIT_NO_ID, 0);
175 if (gshadow_locked) {
176 if (sgr_unlock () == 0) {
177 fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, sgr_dbname ());
178 SYSLOG ((LOG_WARN, "failed to unlock %s", sgr_dbname ()));
180 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
181 "unlocking gshadow file",
182 group, AUDIT_NO_ID, 0);
192 * is_valid_user_list - check a comma-separated list of user names for validity
194 * is_valid_user_list scans a comma-separated list of user names and
195 * checks that each listed name exists is the user database.
197 * It returns true if the list of users is valid.
199 static bool is_valid_user_list (const char *users)
201 const char *start, *end;
206 for (start = users; (NULL != start) && ('\0' != *start); start = end) {
207 end = strchr (start, ',');
209 len = (size_t) (end - start);
212 len = strlen (start);
215 if (len > sizeof (username) - 1) {
216 len = sizeof (username) - 1;
218 strncpy (username, start, len);
219 username[len] = '\0';
222 * This user must exist.
225 /* local, no need for xgetpwnam */
226 if (getpwnam (username) == NULL) {
227 fprintf (stderr, _("%s: user '%s' does not exist\n"),
235 static void failure (void)
237 fprintf (stderr, _("%s: Permission denied.\n"), Prog);
242 * process_flags - process the command line options and arguments
244 static void process_flags (int argc, char **argv)
248 while ((flag = getopt (argc, argv, "a:A:d:gM:rR")) != EOF) {
250 case 'a': /* add a user */
252 /* local, no need for xgetpwnam */
253 if (getpwnam (user) == NULL) {
255 _("%s: user '%s' does not exist\n"), Prog,
258 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
260 user, AUDIT_NO_ID, 0);
270 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
271 "Listing administrators",
272 NULL, (unsigned int) bywho, 0);
278 _("%s: shadow group passwords required for -A\n"),
283 if (!is_valid_user_list (admins)) {
289 case 'd': /* delete a user */
293 case 'g': /* no-op from normal password */
298 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
300 NULL, (unsigned int) bywho, 0);
305 if (!is_valid_user_list (members)) {
310 case 'r': /* remove group password */
313 case 'R': /* restrict group password */
321 /* Get the name of the group that is being affected. */
322 group = argv[optind];
324 check_flags (argc, optind);
328 * check_flags - check the validity of options
330 static void check_flags (int argc, int opt_index)
334 * Make sure exclusive flags are exclusive
356 * Make sure one (and only one) group was provided
358 if ((argc != (opt_index+1)) || (NULL == group)) {
364 * open_files - lock and open the group databases
366 * It will call exit in case of error.
368 static void open_files (void)
370 if (gr_lock () == 0) {
372 _("%s: cannot lock %s; try again later.\n"),
375 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
376 "locking /etc/group",
377 group, AUDIT_NO_ID, 0);
384 if (sgr_lock () == 0) {
386 _("%s: cannot lock %s; try again later.\n"),
387 Prog, sgr_dbname ());
389 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
390 "locking /etc/gshadow",
391 group, AUDIT_NO_ID, 0);
395 gshadow_locked = true;
398 if (gr_open (O_RDWR) == 0) {
399 fprintf (stderr, _("%s: cannot open %s\n"), Prog, gr_dbname ());
400 SYSLOG ((LOG_WARN, "cannot open %s", gr_dbname ()));
402 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
403 "opening /etc/group",
404 group, AUDIT_NO_ID, 0);
409 if (is_shadowgrp && (sgr_open (O_RDWR) == 0)) {
410 fprintf (stderr, _("%s: cannot open %s\n"), Prog, sgr_dbname ());
411 SYSLOG ((LOG_WARN, "cannot open %s", sgr_dbname ()));
413 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
414 "opening /etc/gshadow",
415 group, AUDIT_NO_ID, 0);
423 * close_files - close and unlock the group databases
425 * This cause any changes in the databases to be committed.
427 * It will call exit in case of error.
429 static void close_files (void)
431 if (gr_close () == 0) {
432 fprintf (stderr, _("%s: failure while writing changes to %s\n"), Prog, gr_dbname ());
433 SYSLOG ((LOG_WARN, "failure while writing changes to %s", gr_dbname ()));
435 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
436 "rewriting /etc/group",
437 group, AUDIT_NO_ID, 0);
443 if (sgr_close () == 0) {
444 fprintf (stderr, _("%s: failure while writing changes to %s\n"), Prog, sgr_dbname ());
445 SYSLOG ((LOG_WARN, "failure while writing changes to %s", sgr_dbname ()));
447 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
448 "rewriting /etc/gshadow",
449 group, AUDIT_NO_ID, 0);
453 if (sgr_unlock () == 0) {
454 fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, sgr_dbname ());
455 SYSLOG ((LOG_WARN, "failed to unlock %s", sgr_dbname ()));
457 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
458 "unlocking gshadow file",
459 group, AUDIT_NO_ID, 0);
463 gshadow_locked = false;
466 if (gr_unlock () == 0) {
467 fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ());
468 SYSLOG ((LOG_WARN, "failed to unlock %s", gr_dbname ()));
470 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
471 "unlocking group file",
472 group, AUDIT_NO_ID, 0);
476 group_locked = false;
480 * check_perms - check if the user is allowed to change the password of
481 * the specified group.
483 * It only returns if the user is allowed.
486 static void check_perms (const struct group *gr, const struct sgrp *sg)
488 static void check_perms (const struct group *gr)
494 * The policy here for changing a group is that
495 * 1) you must be root or
496 * 2) you must be listed as an administrative member.
497 * Administrative members can do anything to a group that
500 if (!amroot && !is_on_list (sg->sg_adm, myname)) {
502 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
504 group, AUDIT_NO_ID, 0);
509 #endif /* ! SHADOWGRP */
511 #ifdef FIRST_MEMBER_IS_ADMIN
513 * The policy here for changing a group is that
514 * 1) you must be root or
515 * 2) you must be the first listed member of the group.
516 * The first listed member of a group can do anything to
517 * that group that the root user can. The rationale for
518 * this hack is that the FIRST user is probably the most
519 * important user in this entire group.
521 * This feature enabled by default could be a security
522 * problem when installed on existing systems where the
523 * first group member might be just a normal user.
527 if (gr->gr_mem[0] == (char *) 0) {
529 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
531 group, AUDIT_NO_ID, 0);
536 if (strcmp (gr->gr_mem[0], myname) != 0) {
538 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
540 myname, AUDIT_NO_ID, 0);
545 #else /* ! FIRST_MEMBER_IS_ADMIN */
548 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
550 group, AUDIT_NO_ID, 0);
559 * update_group - Update the group information in the databases
562 static void update_group (struct group *gr, struct sgrp *sg)
564 static void update_group (struct group *gr)
567 if (gr_update (gr) == 0) {
569 _("%s: cannot update entry '%s' in %s\n"),
570 Prog, gr->gr_name, gr_dbname ());
571 SYSLOG ((LOG_WARN, "cannot update entry '%s' in %s", gr->gr_name, gr_dbname ()));
573 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
574 "updating /etc/group",
575 group, AUDIT_NO_ID, 0);
580 if (is_shadowgrp && (sgr_update (sg) == 0)) {
581 fprintf (stderr, _("%s: cannot update entry '%s' in %s\n"), Prog, sg->sg_name, sgr_dbname ());
582 SYSLOG ((LOG_WARN, "cannot update entry '%s' in %s", sg->sg_name, sgr_dbname ()));
584 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
585 "updating /etc/gshadow",
586 group, AUDIT_NO_ID, 0);
594 * get_group - get the current information for the group
596 * The information are copied in group structure(s) so that they can be
599 * Note: If !is_shadowgrp, *sg will not be initialized.
602 static void get_group (struct group *gr, struct sgrp *sg)
604 static void get_group (struct group *gr)
607 struct group const*tmpgr = NULL;
608 struct sgrp const*tmpsg = NULL;
610 if (gr_open (O_RDONLY) == 0) {
611 fprintf (stderr, _("%s: cannot open %s\n"), Prog, gr_dbname ());
612 SYSLOG ((LOG_WARN, "cannot open %s", gr_dbname ()));
614 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
615 "opening /etc/group",
616 group, AUDIT_NO_ID, 0);
621 tmpgr = gr_locate (group);
623 fprintf (stderr, _("%s: group '%s' does not exist in %s\n"), Prog, group, gr_dbname ());
625 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
627 group, AUDIT_NO_ID, 0);
633 gr->gr_name = xstrdup (tmpgr->gr_name);
634 gr->gr_passwd = xstrdup (tmpgr->gr_passwd);
635 gr->gr_mem = dup_list (tmpgr->gr_mem);
637 if (gr_close () == 0) {
638 fprintf (stderr, _("%s: failure while writing changes to %s\n"), Prog, gr_dbname ());
639 SYSLOG ((LOG_WARN, "failure while writing changes to %s", gr_dbname ()));
641 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
642 "closing /etc/group",
643 group, AUDIT_NO_ID, 0);
650 if (sgr_open (O_RDONLY) == 0) {
652 _("%s: cannot open %s\n"), Prog, sgr_dbmane ());
653 SYSLOG ((LOG_WARN, "cannot open %s", sgr_dbname ()));
655 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
656 "opening /etc/gshadow",
657 group, AUDIT_NO_ID, 0);
661 tmpsg = sgr_locate (group);
664 sg->sg_name = xstrdup (tmpsg->sg_name);
665 sg->sg_passwd = xstrdup (tmpsg->sg_passwd);
667 sg->sg_mem = dup_list (tmpsg->sg_mem);
668 sg->sg_adm = dup_list (tmpsg->sg_adm);
670 sg->sg_name = xstrdup (group);
671 sg->sg_passwd = gr->gr_passwd;
672 gr->gr_passwd = SHADOW_PASSWD_STRING; /* XXX warning: const */
674 sg->sg_mem = dup_list (gr->gr_mem);
676 sg->sg_adm = (char **) xmalloc (sizeof (char *) * 2);
677 #ifdef FIRST_MEMBER_IS_ADMIN
679 sg->sg_adm[0] = xstrdup (sg->sg_mem[0]);
680 sg->sg_adm[1] = NULL;
684 sg->sg_adm[0] = NULL;
688 if (sgr_close () == 0) {
690 _("%s: failure while writing changes to %s\n"), Prog, sgr_dbname ());
691 SYSLOG ((LOG_WARN, "failure while writing changes to %s", sgr_dbname ()));
693 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
694 "closing /etc/gshadow",
695 group, AUDIT_NO_ID, 0);
700 #endif /* SHADOWGRP */
704 * change_passwd - change the group's password
706 * Get the new password from the user and update the password in the
709 * It will call exit in case of error.
712 static void change_passwd (struct group *gr, struct sgrp *sg)
714 static void change_passwd (struct group *gr)
718 static char pass[BUFSIZ];
722 * A new password is to be entered and it must be encrypted, etc.
723 * The password will be prompted for twice, and both entries must be
724 * identical. There is no need to validate the old password since
725 * the invoker is either the group owner, or root.
727 printf (_("Changing the password for group %s\n"), group);
729 for (retries = 0; retries < RETRIES; retries++) {
730 cp = getpass (_("New Password: "));
737 cp = getpass (_("Re-enter new password: "));
742 if (strcmp (pass, cp) == 0) {
748 memzero (pass, sizeof pass);
750 if (retries + 1 < RETRIES) {
751 puts (_("They don't match; try again"));
753 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
755 group, AUDIT_NO_ID, 0);
760 if (retries == RETRIES) {
761 fprintf (stderr, _("%s: Try again later\n"), Prog);
765 cp = pw_encrypt (pass, crypt_make_salt (NULL, NULL));
766 memzero (pass, sizeof pass);
776 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
778 group, AUDIT_NO_ID, 1);
780 SYSLOG ((LOG_INFO, "change the password for group %s by %s", group,
785 * gpasswd - administer the /etc/group file
787 * -a user add user to the named group
788 * -d user remove user from the named group
789 * -r remove password from the named group
790 * -R restrict access to the named group
791 * -A user,... make list of users the administrative users
792 * -M user,... make list of users the group members
794 int main (int argc, char **argv)
800 struct passwd *pw = NULL;
807 (void) setlocale (LC_ALL, "");
808 (void) bindtextdomain (PACKAGE, LOCALEDIR);
809 (void) textdomain (PACKAGE);
812 * Make a note of whether or not this command was invoked by root.
813 * This will be used to bypass certain checks later on. Also, set
814 * the real user ID to match the effective user ID. This will
815 * prevent the invoker from issuing signals which would interfer
819 Prog = Basename (argv[0]);
822 setbuf (stdout, NULL);
823 setbuf (stderr, NULL);
826 is_shadowgrp = sgr_file_present ();
829 /* Parse the options */
830 process_flags (argc, argv);
833 * Determine the name of the user that invoked this command. This
834 * is really hit or miss because there are so many ways that command
835 * can be executed and so many ways to trip up the routines that
836 * report the user name.
839 pw = get_my_pwent ();
841 fputs (_("Who are you?\n"), stderr);
843 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
845 NULL, (unsigned int) bywho, 0);
849 myname = xstrdup (pw->pw_name);
852 * Replicate the group so it can be modified later on.
855 get_group (&grent, &sgent);
861 * Check if the user is allowed to change the password of this group.
864 check_perms (&grent, &sgent);
866 check_perms (&grent);
870 * Removing a password is straight forward. Just set the password
874 grent.gr_passwd = ""; /* XXX warning: const */
876 sgent.sg_passwd = ""; /* XXX warning: const */
879 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
880 "deleting group password",
881 group, AUDIT_NO_ID, 1);
883 SYSLOG ((LOG_INFO, "remove password from group %s by %s",
888 * Same thing for restricting the group. Set the password
891 grent.gr_passwd = "!"; /* XXX warning: const */
893 sgent.sg_passwd = "!"; /* XXX warning: const */
896 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
897 "restrict access to group",
898 group, AUDIT_NO_ID, 1);
900 SYSLOG ((LOG_INFO, "restrict access to group %s by %s",
906 * Adding a member to a member list is pretty straightforward as
907 * well. Call the appropriate routine and split.
910 printf (_("Adding user %s to group %s\n"), user, group);
911 grent.gr_mem = add_list (grent.gr_mem, user);
914 sgent.sg_mem = add_list (sgent.sg_mem, user);
918 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
919 "adding group member",
920 user, AUDIT_NO_ID, 1);
922 SYSLOG ((LOG_INFO, "add member %s to group %s by %s", user,
928 * Removing a member from the member list is the same deal as adding
929 * one, except the routine is different.
932 bool removed = false;
934 printf (_("Removing user %s from group %s\n"), user, group);
936 if (is_on_list (grent.gr_mem, user)) {
938 grent.gr_mem = del_list (grent.gr_mem, user);
942 if (is_on_list (sgent.sg_mem, user)) {
944 sgent.sg_mem = del_list (sgent.sg_mem, user);
949 fprintf (stderr, _("%s: user '%s' is not a member of '%s'\n"),
952 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
954 user, AUDIT_NO_ID, 0);
959 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
961 user, AUDIT_NO_ID, 1);
963 SYSLOG ((LOG_INFO, "remove member %s from group %s by %s",
964 user, group, myname));
969 * Replacing the entire list of administrators is simple. Check the
970 * list to make sure everyone is a real user. Then slap the new list
975 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
976 "setting group admin",
977 group, AUDIT_NO_ID, 1);
979 SYSLOG ((LOG_INFO, "set administrators of %s to %s",
981 sgent.sg_adm = comma_to_list (admins);
989 * Replacing the entire list of members is simple. Check the list to
990 * make sure everyone is a real user. Then slap the new list in
995 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
996 "setting group members",
997 group, AUDIT_NO_ID, 1);
999 SYSLOG ((LOG_INFO, "set members of %s to %s", group, members));
1001 sgent.sg_mem = comma_to_list (members);
1003 grent.gr_mem = comma_to_list (members);
1008 * If the password is being changed, the input and output must both
1009 * be a tty. The typical keyboard signals are caught so the termio
1010 * modes can be restored.
1012 if ((isatty (0) == 0) || (isatty (1) == 0)) {
1013 fprintf (stderr, _("%s: Not a tty\n"), Prog);
1015 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
1016 "changing password",
1017 group, AUDIT_NO_ID, 0);
1022 catch_signals (0); /* save tty modes */
1024 (void) signal (SIGHUP, catch_signals);
1025 (void) signal (SIGINT, catch_signals);
1026 (void) signal (SIGQUIT, catch_signals);
1027 (void) signal (SIGTERM, catch_signals);
1029 (void) signal (SIGTSTP, catch_signals);
1032 /* Prompt for the new password */
1034 change_passwd (&grent, &sgent);
1036 change_passwd (&grent);
1040 * This is the common arrival point to output the new group file.
1041 * The freshly crafted entry is in allocated space. The group file
1042 * will be locked and opened for writing. The new entry will be
1046 if (setuid (0) != 0) {
1047 fputs (_("Cannot change ID to root.\n"), stderr);
1048 SYSLOG ((LOG_ERR, "can't setuid(0)"));
1050 audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
1051 "changing id to root",
1052 group, AUDIT_NO_ID, 0);
1062 update_group (&grent, &sgent);
1064 update_group (&grent);
1069 nscd_flush_cache ("group");