First Commit
[librecmc/package-feed.git] / utils / shadow / patches / 003-fix-disabling-subids.patch
1 --- a/src/usermod.c
2 +++ b/src/usermod.c
3 @@ -1361,6 +1361,7 @@ static void process_flags (int argc, cha
4                 exit (E_UID_IN_USE);
5         }
6  
7 +#ifdef ENABLE_SUBIDS
8         if (   (vflg || Vflg)
9             && !is_sub_uid) {
10                 fprintf (stderr,
11 @@ -1376,6 +1377,7 @@ static void process_flags (int argc, cha
12                          Prog, sub_gid_dbname (), "-w", "-W");
13                 exit (E_USAGE);
14         }
15 +#endif
16  }
17  
18  /*
19 --- a/src/Makefile.am
20 +++ b/src/Makefile.am
21 @@ -52,7 +52,10 @@ usbin_PROGRAMS = \
22  noinst_PROGRAMS = id sulogin
23  
24  suidbins       = su
25 -suidubins      = chage chfn chsh expiry gpasswd newgrp passwd newuidmap newgidmap
26 +suidubins      = chage chfn chsh expiry gpasswd newgrp passwd
27 +if ENABLE_SUBIDS
28 +       suidubins += newuidmap newgidmap
29 +endif
30  if ACCT_TOOLS_SETUID
31         suidubins += chage chgpasswd chpasswd groupadd groupdel groupmod newusers useradd userdel usermod
32  endif