]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
implement and document additional error codes for groupmod add E_CLEANUP_SERVICE...
authorsbts <info@sbts.com.au>
Sun, 18 Jun 2017 14:17:01 +0000 (22:17 +0800)
committerSerge Hallyn <serge@hallyn.com>
Tue, 11 Jul 2017 02:50:49 +0000 (21:50 -0500)
man/groupmod.8.xml
src/groupmod.c

index 46666252fb04b86400e1e0e984f903a9e5ce3cfe..01b22d7c2e4a9eae3a8e98c0b7c5236bd8a94672 100644 (file)
            <para>can't update group file</para>
          </listitem>
        </varlistentry>
+         <term><replaceable>11</replaceable></term>
+         <listitem>
+           <para>E_CLEANUP_SERVICE: can't setup cleanup service</para>
+         </listitem>
+       </varlistentry>
+         <term><replaceable>12</replaceable></term>
+         <listitem>
+           <para>E_PAM_USERNAME: can't determine your username for use with pam</para>
+         </listitem>
+       </varlistentry>
+         <term><replaceable>13</replaceable></term>
+         <listitem>
+           <para>E_PAM_ERROR: pam returned an error, see syslog facility id groupmod for the PAM error message</para>
+         </listitem>
+       </varlistentry>
       </variablelist>
     </para>
   </refsect1>
index 757c1a40235d457ed469d45892e44a8bd2b83939..ae4835dd0f6b913d96dae1cf38a97ca46fc7c864 100644 (file)
 #define E_NOTFOUND     6       /* specified group doesn't exist */
 #define E_NAME_IN_USE  9       /* group name already in use */
 #define E_GRP_UPDATE   10      /* can't update group file */
+#define E_CLEANUP_SERVICE      11      /* can't setup cleanup service */
+#define E_PAM_USERNAME 12      /* can't determine your username for use with pam */
+#define E_PAM_ERROR    13      /* pam returned an error, see Syslog facility id groupmod */
+
+
 /*
  * Global variables
  */
@@ -756,7 +761,7 @@ int main (int argc, char **argv)
                fprintf (stderr,
                         _("%s: Cannot setup cleanup service.\n"),
                         Prog);
-               exit (1);
+               exit (E_CLEANUP_SERVICE);
        }
 
        process_flags (argc, argv);
@@ -770,7 +775,7 @@ int main (int argc, char **argv)
                        fprintf (stderr,
                                 _("%s: Cannot determine your user name.\n"),
                                 Prog);
-                       exit (1);
+                       exit (E_PAM_USERNAME);
                }
 
                retval = pam_start ("groupmod", pampw->pw_name, &conv, &pamh);
@@ -791,7 +796,7 @@ int main (int argc, char **argv)
                if (NULL != pamh) {
                        (void) pam_end (pamh, retval);
                }
-               exit (1);
+               exit (E_PAM_ERROR);
        }
        (void) pam_end (pamh, retval);
 #endif                         /* USE_PAM */