Print this page
4078 groupadd execs getent unnecessarily
Reviewed by: Rich Lowe <richlowe@richlowe.net>
Reviewed by: Gary Mills <gary_mills@fastmail.fm>
Reviewed by: Milan Jurik <milan.jurik@xylab.cz>
Reviewed by: Gordon Ross <Gordon.W.Ross@gmail.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/oamuser/user/usermod.c
          +++ new/usr/src/cmd/oamuser/user/usermod.c
↓ open down ↓ 18 lines elided ↑ open up ↑
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
  26   26  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  27   27  /*        All Rights Reserved   */
  28   28  
  29      -
       29 +/*
       30 + * Copyright (c) 2013 RackTop Systems.
       31 + */
  30   32  
  31   33  #include <sys/types.h>
  32   34  #include <sys/stat.h>
  33   35  #include <sys/param.h>
  34   36  #include <stdio.h>
  35   37  #include <stdlib.h>
  36   38  #include <ctype.h>
  37   39  #include <limits.h>
  38   40  #include <string.h>
  39   41  #include <userdefs.h>
↓ open down ↓ 463 lines elided ↑ open up ↑
 503  505                              (statbuf.st_mode & 0555) != 0555) {
 504  506  
 505  507                                  errmsg(M_INVALID, shell, "shell");
 506  508                                  exit(EX_BADARG);
 507  509                          }
 508  510  
 509  511                          call_pass = 1;
 510  512                  }
 511  513          }
 512  514  
 513      -        if (comment)
      515 +        if (comment) {
 514  516                  /* ignore comment if comment is not changed */
 515  517                  if (strcmp(pstruct->pw_comment, comment))
 516  518                          call_pass = 1;
 517  519                  else
 518  520                          comment = NULL;
      521 +        }
 519  522  
 520  523          /* inactive string is a positive integer */
 521  524          if (inactstr) {
 522  525                  /* convert inactstr to integer */
 523  526                  inact = (int)strtol(inactstr, &ptr, 10);
 524  527                  if (*ptr || inact < 0) {
 525  528                          errmsg(M_INVALID, inactstr, "inactivity period");
 526  529                          exit(EX_BADARG);
 527  530                  }
 528  531                  call_pass = 1;
↓ open down ↓ 147 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX