]> git.ipfire.org Git - thirdparty/shadow.git/log
thirdparty/shadow.git
4 years agoAdd tests for group checking in newuidmap/newgidmap 308/head
Martijn de Gouw [Mon, 8 Feb 2021 12:20:04 +0000 (13:20 +0100)] 
Add tests for group checking in newuidmap/newgidmap

4 years agonewuidmap,newgidmap: Relax gid checking to allow running under alternative group ID
Martijn de Gouw [Thu, 7 Jan 2021 11:15:25 +0000 (12:15 +0100)] 
newuidmap,newgidmap: Relax gid checking to allow running under alternative group ID

Signed-off-by: Martijn de Gouw <martijn.de.gouw@prodrive-technologies.com>
4 years agoMerge pull request #306 from hallyn/2021-01-01/nosubids
Serge Hallyn [Fri, 1 Jan 2021 19:10:53 +0000 (13:10 -0600)] 
Merge pull request #306 from hallyn/2021-01-01/nosubids

useradd: don't try to create 0 subuids

4 years agouseradd: don't try to create 0 subuids 306/head
Serge Hallyn [Fri, 1 Jan 2021 19:10:12 +0000 (13:10 -0600)] 
useradd: don't try to create 0 subuids

Closes #289

Signed-off-by: Serge Hallyn <serge@hallyn.com>
4 years agoMerge pull request #305 from hallyn/2021-01-01/static-dynamic
Serge Hallyn [Fri, 1 Jan 2021 19:05:33 +0000 (13:05 -0600)] 
Merge pull request #305 from hallyn/2021-01-01/static-dynamic

libsubid: move libmisc.a to last LIBADD entry

4 years agolibsubid: move libmisc.a to last LIBADD entry 305/head
Serge Hallyn [Fri, 1 Jan 2021 19:01:54 +0000 (13:01 -0600)] 
libsubid: move libmisc.a to last LIBADD entry

Closes #297

Signed-off-by: Serge Hallyn <serge@hallyn.com>
4 years agoMerge pull request #302 from whzhe51/br_master
Serge Hallyn [Sun, 27 Dec 2020 06:37:46 +0000 (00:37 -0600)] 
Merge pull request #302 from whzhe51/br_master

useradd.c:fix memleaks of grp

4 years agoMerge pull request #301 from whzhe51/br_whzhe
Serge Hallyn [Sun, 27 Dec 2020 06:31:30 +0000 (00:31 -0600)] 
Merge pull request #301 from whzhe51/br_whzhe

useradd.c:fix memleak in get_groups

4 years agoMerge pull request #299 from lnussel/master
Serge Hallyn [Sun, 27 Dec 2020 06:26:47 +0000 (00:26 -0600)] 
Merge pull request #299 from lnussel/master

useradd: use built-in settings by default

4 years agoMerge pull request #296 from ikerexxe/log_exit_code
Serge Hallyn [Sun, 27 Dec 2020 06:18:12 +0000 (00:18 -0600)] 
Merge pull request #296 from ikerexxe/log_exit_code

useradd: log exit code when failing

4 years agoMerge pull request #295 from ikerexxe/newusers_clarification
Serge Hallyn [Sun, 27 Dec 2020 06:16:18 +0000 (00:16 -0600)] 
Merge pull request #295 from ikerexxe/newusers_clarification

newusers: doesn't create parent home directories

4 years agouseradd.c:fix memleak in get_groups 301/head
whzhe [Thu, 17 Dec 2020 08:27:15 +0000 (03:27 -0500)] 
useradd.c:fix memleak in get_groups

Signed-off-by: whzhe <wanghongzhe@huawei.com>
4 years agouseradd.c:fix memleaks of grp 302/head
whzhe51 [Sat, 19 Dec 2020 09:29:06 +0000 (04:29 -0500)] 
useradd.c:fix memleaks of grp
Signed-off-by: whzhe51 <wanghongzhe@huawei.com>
4 years agouseradd: use built-in settings by default 299/head
Ludwig Nussel [Thu, 3 Dec 2020 17:05:59 +0000 (18:05 +0100)] 
useradd: use built-in settings by default

Avoids installing inconsistent settings. The correct ones would be
written as soon as an admin uses useradd -D to modify the defaults.

4 years agouseradd: log exit code when failing 296/head
ikerexxe [Tue, 17 Nov 2020 15:58:40 +0000 (16:58 +0100)] 
useradd: log exit code when failing

src/useradd.c: log exit code when failing

4 years agonewusers: doesn't create parent home directories 295/head
ikerexxe [Tue, 17 Nov 2020 15:46:10 +0000 (16:46 +0100)] 
newusers: doesn't create parent home directories

man/newusers.8.xml: clarify that newusers doesn't create parent
directories of the new user's home directory.

4 years agoMerge pull request #293 from ikerexxe/sync_file_write
Serge Hallyn [Sun, 8 Nov 2020 22:36:36 +0000 (16:36 -0600)] 
Merge pull request #293 from ikerexxe/sync_file_write

commonio: force lock file sync

4 years agoMerge pull request #291 from ikerexxe/covscan_issues
Serge Hallyn [Sun, 8 Nov 2020 22:33:55 +0000 (16:33 -0600)] 
Merge pull request #291 from ikerexxe/covscan_issues

Two covscan issues

4 years agoMerge pull request #290 from jamincollins/master
Serge Hallyn [Sun, 8 Nov 2020 22:29:29 +0000 (16:29 -0600)] 
Merge pull request #290 from jamincollins/master

add parsing support for advertised force long opt

4 years agocommonio: force lock file sync 293/head
ikerexxe [Mon, 2 Nov 2020 16:08:55 +0000 (17:08 +0100)] 
commonio: force lock file sync

lib/commonio.c: after writing to the lock file, force a file sync to
the storage system.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1862056

4 years agoupdate groupdel man page for the --force option 290/head
Jamin W. Collins [Mon, 2 Nov 2020 00:24:49 +0000 (17:24 -0700)] 
update groupdel man page for the --force option

Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
4 years agouseradd: free grp to avoid leak 291/head
ikerexxe [Tue, 27 Oct 2020 10:35:53 +0000 (11:35 +0100)] 
useradd: free grp to avoid leak

covscan issue:
Error: RESOURCE_LEAK (CWE-772): [#def39] [important]
src/useradd.c:728: alloc_fn: Storage is returned from allocation function "get_local_group".
src/useradd.c:728: var_assign: Assigning: "grp" = storage returned from "get_local_group(list)".
src/useradd.c:728: overwrite_var: Overwriting "grp" in "grp = get_local_group(list)" leaks the storage that "grp" points to.
726|     * GID values, otherwise the string is looked up as is.
727|     */
728|->  grp = get_local_group (list);
729|
730|    /*

4 years agonewgrp: delete dead code
ikerexxe [Tue, 27 Oct 2020 10:33:46 +0000 (11:33 +0100)] 
newgrp: delete dead code

covscan issue:
Error: CLANG_WARNING: [#def31]
src/newgrp.c:448:2: warning: Value stored to 'gid' is never read [deadcode.DeadStores]
gid = getgid ();

4 years agoadd parsing support for advertised force long opt
Jamin W. Collins [Sat, 17 Oct 2020 16:18:30 +0000 (09:18 -0700)] 
add parsing support for advertised force long opt

Existing help output advertises --force as a long opt.

  -f, --force                   delete group even if it is the primary group of a user

But errors when the long opt is used.

groupdel: unrecognized option '--force'

Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
4 years agoMerge pull request #288 from whzhe51/br_whzhe
Serge Hallyn [Fri, 16 Oct 2020 14:59:34 +0000 (09:59 -0500)] 
Merge pull request #288 from whzhe51/br_whzhe

xfree: move xfree() function to xmalloc.c

4 years agoxfree: move xfree() function to xmalloc.c 288/head
w00475903 [Tue, 13 Oct 2020 01:29:37 +0000 (21:29 -0400)] 
xfree: move xfree() function to xmalloc.c

Signed-off-by: whzhe <wanghongzhe@huawei.com>
4 years agoMerge pull request #286 from karelzak/defs
Serge Hallyn [Mon, 12 Oct 2020 13:40:50 +0000 (08:40 -0500)] 
Merge pull request #286 from karelzak/defs

getdefs: add foreign (non-shadow-utils) items

4 years agoMerge pull request #285 from masmullin2000/master
Serge Hallyn [Mon, 12 Oct 2020 13:36:33 +0000 (08:36 -0500)] 
Merge pull request #285 from masmullin2000/master

Fix the undefined xfree issue

4 years agogetdefs: add foreign (non-shadow-utils) items 286/head
Karel Zak [Thu, 8 Oct 2020 10:17:30 +0000 (12:17 +0200)] 
getdefs: add foreign (non-shadow-utils) items

The login.defs is shared between more upstream projects (util-linux,
etc.). We need to improve compatibility between the projects do not
report valid, but foreign items.

Addresses: https://github.com/shadow-maint/shadow/issues/276
Signed-off-by: Karel Zak <kzak@redhat.com>
4 years agoUse {} to kep more in line with code style 285/head
Michael Mullin [Sat, 3 Oct 2020 18:23:06 +0000 (14:23 -0400)] 
Use {} to kep more in line with code style

4 years agoFix the undefined xfree issue
Michael Mullin [Sat, 3 Oct 2020 18:19:46 +0000 (14:19 -0400)] 
Fix the undefined xfree issue

4 years agoMerge pull request #282 from ikerexxe/sssd_cache_error
Serge Hallyn [Sat, 3 Oct 2020 00:38:35 +0000 (19:38 -0500)] 
Merge pull request #282 from ikerexxe/sssd_cache_error

lib/sssd: redirect warning message to file

4 years agoMerge pull request #277 from whzhe51/br_whzhe
Serge Hallyn [Sat, 3 Oct 2020 00:37:20 +0000 (19:37 -0500)] 
Merge pull request #277 from whzhe51/br_whzhe

gpasswd.c: fix memory leak in sg_adm

4 years agolib/sssd: redirect warning message to file 282/head
ikerexxe [Fri, 2 Oct 2020 14:09:42 +0000 (16:09 +0200)] 
lib/sssd: redirect warning message to file

Instead of printing warning in stderr print it to file. This way the
user is not spammed with unnecessary messages when updating packages.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1749001

4 years agoMerge pull request #281 from towerpark/fix-newxidmap-man
Serge Hallyn [Thu, 1 Oct 2020 18:26:11 +0000 (13:26 -0500)] 
Merge pull request #281 from towerpark/fix-newxidmap-man

Fix the inaccurate description about ID range in man new{u,g}idmap

4 years agoFix the inaccurate description about the ID range to be verified against /etc/sub... 281/head
towerpark [Sat, 26 Sep 2020 12:01:01 +0000 (21:01 +0900)] 
Fix the inaccurate description about the ID range to be verified against /etc/sub{u,g}id.

4 years agogpasswd.c: fix memory leak in sg_adm 277/head
w00475903 [Wed, 16 Sep 2020 08:15:06 +0000 (04:15 -0400)] 
gpasswd.c: fix memory leak in sg_adm

Signed-off-by: whzhe <wanghongzhe@huawei.com>
4 years agoMerge pull request #279 from juergenhoetzel/fix-de-translation
Serge Hallyn [Fri, 25 Sep 2020 02:59:58 +0000 (21:59 -0500)] 
Merge pull request #279 from juergenhoetzel/fix-de-translation

Fix incorrect translation (de)

4 years agoMerge pull request #278 from edneville/104_su_waitpid
Serge Hallyn [Fri, 25 Sep 2020 02:58:35 +0000 (21:58 -0500)] 
Merge pull request #278 from edneville/104_su_waitpid

loop until waitpid returns pid_child or error

4 years agoFix incorrect translation (de) 279/head
Juergen Hoetzel [Tue, 22 Sep 2020 14:00:00 +0000 (16:00 +0200)] 
Fix incorrect translation (de)

4 years agoloop until waitpid returns pid_child or error 278/head
ed neville [Sun, 20 Sep 2020 22:02:58 +0000 (23:02 +0100)] 
loop until waitpid returns pid_child or error

closes #104

Signed-off-by: ed neville <ed@s5h.net>
4 years agoRevert "su.c: replace getopt with ad-hoc flag processing"
Serge Hallyn [Fri, 28 Aug 2020 20:16:11 +0000 (15:16 -0500)] 
Revert "su.c: replace getopt with ad-hoc flag processing"

This reverts commit dc732e77347461d18dd6132c429630a4c0f8ca97.

4 years agoRevert "su.c: s/doshell/do_interactive_shell/"
Serge Hallyn [Fri, 28 Aug 2020 20:16:04 +0000 (15:16 -0500)] 
Revert "su.c: s/doshell/do_interactive_shell/"

This reverts commit 6f38f43fdd745fa28b9e100f08bdf8b59b474280.

4 years agoRevert "su.c: implement --exec"
Serge Hallyn [Fri, 28 Aug 2020 20:15:56 +0000 (15:15 -0500)] 
Revert "su.c: implement --exec"

This reverts commit 4047d1fe8edbe5ae952fef17fc09a4105d0de14b.

4 years agoRevert "Update su tests"
Serge Hallyn [Fri, 28 Aug 2020 20:15:47 +0000 (15:15 -0500)] 
Revert "Update su tests"

This reverts commit cf8101aaae51464cbe7e8bf3fe9c03d10c82a8ac.

4 years agoMerge pull request #275 from hallyn/2020-08-27/test-su
Christian Brauner [Fri, 28 Aug 2020 10:13:49 +0000 (12:13 +0200)] 
Merge pull request #275 from hallyn/2020-08-27/test-su

Add tests on top of #254

4 years agoUpdate su tests 275/head
Serge Hallyn [Fri, 28 Aug 2020 04:09:13 +0000 (23:09 -0500)] 
Update su tests

Some of these tests seem wrong.  The assume that

    su -- -c command

should work, whereas -- should mean pass all remaining arguments
along to the command.

Add some new tests based on examples in Issue 253

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
4 years agosu.c: implement --exec
Vito Caputo [Sun, 10 May 2020 01:01:22 +0000 (18:01 -0700)] 
su.c: implement --exec

It's now possible to run commands as other users without shell
interpolation by using "--exec":

Read /etc/shadow as root without specifying user:
```
su --exec /bin/cat -- /etc/shadow
```

Or specify user:
```
su --exec /bin/cat root -- /etc/shadow
```

4 years agosu.c: s/doshell/do_interactive_shell/
Vito Caputo [Sun, 10 May 2020 00:43:14 +0000 (17:43 -0700)] 
su.c: s/doshell/do_interactive_shell/

Mechanical rename distinguishing this variable from intended changes
supporting executing commands without using an interpretive shell
(i.e. no '/bin/sh -c').

4 years agosu.c: replace getopt with ad-hoc flag processing
Vito Caputo [Sat, 9 May 2020 23:06:27 +0000 (16:06 -0700)] 
su.c: replace getopt with ad-hoc flag processing

In preparation for supporting --exec I was testing the robustness
of "--" handling and it became apparent that things are currently
a bit broken in `su`.

Since "--" is currently of limited utility, as the subsequent
words are simply passed to the shell after "-c","command_string",
it seems to have gone unnoticed for ages.

However, with --exec, it's expected that "--" would be an almost
required separator with every such usage, considering the
following flags must be passed verbatim to execve() and will
likely begin with hyphens looking indistinguishable from any
other flags in lieu of shell interpolation to worry about.

For some practical context of the existing situation, this
invocation doesn't work today:
```
  $ su --command ls -- flags for shell
  No passwd entry for user 'flags'
  $
```

This should just run ls as root with "flags","for","shell"
forwarded to the shell after "-c","ls".

The "--" should block "flags" from being treated as the user.
That particular issue isn't a getopt one per-se, it's arguably
just a bug in su.c's implementation.

It *seemed* like an easy fix for this would be to add a check if
argv[optind-1] were "--" before treating argv[optind] as USER.

But testing that fix revealed getopt was rearranging things when
encountering "--", the "--" would always separate the handled
opts from the unhandled ones.  USER would become shifted to
*after* "--" even when it occurred before it!

If we change the command to specify the user, it works as-is:
```
  $ su --command ls root -- flags for shell
  Password:
  testfile
  $

```

But what's rather surprising is how that works; the argv winds up:

"su","--command","ls","--","root","flags","for","shell"

with optind pointing at "root".

That arrangement of argv is indistinguishable from omitting the
user and having "root","flags","for","shell" as the stuff after
"--".

This makes it non-trivial to fix the bug of omitting user
treating the first word after "--" as the user, which one could
argue is a potentially serious security bug if you omit the user,
expect the command to run as root, and the first word after "--"
is a valid user, and what follows that something valid and
potentially destructive not only running in unintended form but
as whatever user happened to be the first word after "--".

So, it seems like something important to fix, and getopt seems to
be getting in the way of fixing it properly without being more
trouble than replacing getopt.

In disbelief of what I was seeing getopt doing with argv here, I
took a glance at the getopt source and found the following:

```
      /* The special ARGV-element '--' means premature end of options.
 Skip it like a null option,
 then exchange with previous non-options as if it were an option,
 then skip everything else like a non-option.  */

      if (d->optind != argc && !strcmp (argv[d->optind], "--"))
```

I basically never use getopt personally because ages ago it
annoyed me with its terrible API for what little it brought to
the table, and this brings it to a whole new level of awful.

4 years agoMerge pull request #267 from stoeckmann/chage
Serge Hallyn [Thu, 13 Aug 2020 05:34:19 +0000 (00:34 -0500)] 
Merge pull request #267 from stoeckmann/chage

chage: Prevent signed integer overflows.

4 years agoMerge pull request #273 from edneville/trailing_n_in_help_typo
Serge Hallyn [Thu, 13 Aug 2020 05:11:24 +0000 (00:11 -0500)] 
Merge pull request #273 from edneville/trailing_n_in_help_typo

Removing trailing n typo

4 years agoRemoving trailing n typo 273/head
ed neville [Wed, 12 Aug 2020 16:53:28 +0000 (17:53 +0100)] 
Removing trailing n typo

Signed-off-by: ed neville <ed@s5h.net>
4 years agoMerge pull request #263 from edneville/261_grpck_questionable_warning
Serge Hallyn [Tue, 11 Aug 2020 18:58:22 +0000 (13:58 -0500)] 
Merge pull request #263 from edneville/261_grpck_questionable_warning

Option to suppress group/gshadow inconsistencies

4 years agoOption to suppress group/gshadow inconsistencies 263/head
ed neville [Sat, 13 Jun 2020 08:02:32 +0000 (09:02 +0100)] 
Option to suppress group/gshadow inconsistencies

'gshadow' man page suggests that "You should use the same list of users
as in /etc/group", but not must.

Closes #261

4 years agoMerge pull request #270 from darktemplarbasealt/fix_resource_leak
Serge Hallyn [Tue, 11 Aug 2020 01:34:50 +0000 (20:34 -0500)] 
Merge pull request #270 from darktemplarbasealt/fix_resource_leak

Fix potential resource leak in set_selinux_file_context function

4 years agoMerge pull request #268 from stoeckmann/chfn
Serge Hallyn [Mon, 10 Aug 2020 18:45:15 +0000 (13:45 -0500)] 
Merge pull request #268 from stoeckmann/chfn

chfn: Prevent buffer overflow.

4 years agoMerge pull request #272 from ikerexxe/useradd_covscan
Christian Brauner [Mon, 10 Aug 2020 10:34:52 +0000 (12:34 +0200)] 
Merge pull request #272 from ikerexxe/useradd_covscan

useradd: check return value from chmod and log it

4 years agouseradd: check return value from chmod and log it 272/head
ikerexxe [Mon, 10 Aug 2020 09:44:00 +0000 (11:44 +0200)] 
useradd: check return value from chmod and log it

covscan was complaining abot calling chmod and ignoring the return
value:
Error: CHECKED_RETURN (CWE-252):
shadow-4.6/src/useradd.c:2084: check_return: Calling
"chmod(prefix_user_home, mode)" without checking return value. This
library function may fail and return an error code.
2082|    mode_t mode = getdef_num ("HOME_MODE",
2083|                              0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK));
2084|->  chmod (prefix_user_home, mode);
2085|    home_added = true;
2086|   #ifdef WITH_AUDIT

4 years agoMerge pull request #271 from hallyn/2020-08-08/groupmembers
Christian Brauner [Mon, 10 Aug 2020 08:22:45 +0000 (10:22 +0200)] 
Merge pull request #271 from hallyn/2020-08-08/groupmembers

add -U option to groupadd and groupmod

4 years agoadd -U option to groupadd and groupmod 271/head
Serge Hallyn [Sun, 9 Aug 2020 21:44:30 +0000 (16:44 -0500)] 
add -U option to groupadd and groupmod

Add a -U option which adds new usernames as members.  For groupmod,
also add -a (append), without which existing members are removed.

Closes #265

4 years agoFix potential resource leak in set_selinux_file_context function 270/head
Aleksei Nikiforov [Tue, 4 Aug 2020 07:24:46 +0000 (10:24 +0300)] 
Fix potential resource leak in set_selinux_file_context function

4 years agouseradd: suggest --badnames when given a bad name
Serge Hallyn [Sat, 1 Aug 2020 02:29:21 +0000 (21:29 -0500)] 
useradd: suggest --badnames when given a bad name

Closes #266

4 years agochfn: Prevent buffer overflow. 268/head
Tobias Stoeckmann [Sun, 12 Jul 2020 17:01:52 +0000 (19:01 +0200)] 
chfn: Prevent buffer overflow.

This is a stability fix, not a security fix, because the affected -o
option can only be used by root and it takes a modified passwd file.

If a gecos field for a user has BUFSIZ characters without commas and an
equals sign (i.e. a huge slop/extra field) and chfn is called with -o,
then a buffer overflow occurs.

It is not possible to trigger this with shadow tools. Therefore, the
passwd file must be modified manually.

I have fixed this unlikely case the easiest and cleanest way possible.
Since chfn bails out if more than 80 characters excluding commas are
supposed to be written into gecos field, we can stop processing early on
if -o argument is too long.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
4 years agochage: Prevent signed integer overflows. 267/head
Tobias Stoeckmann [Sun, 12 Jul 2020 15:56:38 +0000 (17:56 +0200)] 
chage: Prevent signed integer overflows.

This is merely a stability fix, not a security fix.

As the root user, it is possible to set time values which later on
result in signed integer overflows.

For this to work, an sgetspent implementation must be used which
supports long values (glibc on amd64 only parses 32 bit, not 64).
Either use musl or simply call configure with following environment
variable:

$ ac_cv_func_sgetspent=no ./configure

Also it is recommended to compile with -fsanitize=undefined or
-ftrapv to see these issues easily.

Examples to trigger issues when calling "chage -l user":

$ chage -d 9223372036854775807 user

$ chage -d 106751991167300 user
$ chage -M 9999 user

$ chage -d 90000000000000 user
$ chage -I 90000000000000 user
$ chage -M 9999 user

$ chage -E 9223372036854775807 user

While at it, I fixed casting issues which could lead to signed integer
overflows on systems which still have a 32 bit time_t.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
5 years agolibsubid: fix a prototype in api.h
Serge Hallyn [Sat, 20 Jun 2020 03:09:20 +0000 (22:09 -0500)] 
libsubid: fix a prototype in api.h

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
5 years agoMerge pull request #234 from edneville/79_userdel
Serge Hallyn [Wed, 10 Jun 2020 05:31:10 +0000 (00:31 -0500)] 
Merge pull request #234 from edneville/79_userdel

Adding run-parts for userdel

5 years agoAdding run-parts style for pre and post useradd/del 234/head
ed [Thu, 12 Mar 2020 21:14:57 +0000 (21:14 +0000)] 
Adding run-parts style for pre and post useradd/del

Signed-off-by: ed neville <ed@s5h.net>
5 years agoMerge pull request #250 from hallyn/libsubid
Serge Hallyn [Mon, 8 Jun 2020 05:10:16 +0000 (00:10 -0500)] 
Merge pull request #250 from hallyn/libsubid

[strawman] Implement libsubid

5 years agoCreate a new libsubid 250/head
Serge Hallyn [Sat, 18 Apr 2020 23:03:54 +0000 (18:03 -0500)] 
Create a new libsubid

Closes #154

Currently this has three functions: one which returns the
list of subuid ranges for a user, one returning the subgids,
and one which frees the ranges lists.

I might be mistaken about what -disable-man means;  some of
the code suggests it means just don't re-generate them, but
not totally ignore them.  But that doesn't seem to really work,
so let's just ignore man/ when -disable-man.

Remove --disable-shared.  I'm not sure why it was there, but it stems
from long, long ago, and I suspect it comes from some ancient
toolchain bug.

Create a tests/run_some, a shorter version of run_all.  I'll
slowly add tests to this as I verify they work, then I can
work on fixing the once which don't.

Also, don't touch man/ if not -enable-man.

Changelog:
Apr 22: change the subid list api as recomended by Dan Walsh.
Apr 23: implement get_subid_owner
Apr 24: implement range add/release
Apr 25: finish tests and rebase
May 10: make @owner const

Signed-off-by: Serge Hallyn <serge@hallyn.com>
5 years agoconfigure: define abi versions
Serge Hallyn [Sat, 18 Apr 2020 19:57:56 +0000 (14:57 -0500)] 
configure: define abi versions

Signed-off-by: Serge Hallyn <serge@hallyn.com>
5 years agodrop svn complications from test runner
Serge Hallyn [Fri, 24 Apr 2020 21:41:34 +0000 (16:41 -0500)] 
drop svn complications from test runner

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
5 years agotests: use git to determine top_dir
Serge Hallyn [Sun, 19 Apr 2020 04:32:59 +0000 (23:32 -0500)] 
tests: use git to determine top_dir

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
5 years agotrivial: drop useless version-info from libshadow_la_LDFLAGS
Serge Hallyn [Sun, 19 Apr 2020 00:17:51 +0000 (19:17 -0500)] 
trivial: drop useless version-info from libshadow_la_LDFLAGS

Signed-off-by: Serge Hallyn <serge@hallyn.com>
5 years agoMerge pull request #262 from andydna/master
Serge Hallyn [Sat, 6 Jun 2020 17:59:59 +0000 (12:59 -0500)] 
Merge pull request #262 from andydna/master

correct grammar in shadow(5)

5 years agocorrect grammar in shadow(5) 262/head
andydna [Fri, 5 Jun 2020 03:29:15 +0000 (22:29 -0500)] 
correct grammar in shadow(5)

5 years agoMerge pull request #259 from Inrin/lastlog_MaxPadding
Serge Hallyn [Thu, 28 May 2020 19:45:23 +0000 (14:45 -0500)] 
Merge pull request #259 from Inrin/lastlog_MaxPadding

Add maximum padding to fit IPv6-Addresses

5 years agoMerge pull request #257 from Frans-Spiesschaert/new_dutch_po_branch
Serge Hallyn [Tue, 26 May 2020 19:48:48 +0000 (14:48 -0500)] 
Merge pull request #257 from Frans-Spiesschaert/new_dutch_po_branch

(nl) updated Dutch translation

5 years agoAdd maximum padding to fit IPv6-Addresses 259/head
Inrin [Sun, 24 May 2020 21:22:34 +0000 (23:22 +0200)] 
Add maximum padding to fit IPv6-Addresses

We use a fixed padding for the From column to fit the maximum of a
minimized IPv6-LL-Address and it's interface.

5 years ago(nl) updated Dutch translation 257/head
Frans Spiesschaert [Sun, 24 May 2020 13:26:06 +0000 (15:26 +0200)] 
(nl) updated Dutch translation

5 years agoMerge pull request #251 from lifecrisis/nonexistent
Serge Hallyn [Mon, 11 May 2020 14:13:34 +0000 (09:13 -0500)] 
Merge pull request #251 from lifecrisis/nonexistent

Add "NONEXISTENT" to "login.defs"

5 years agoUpdate the "README" file 251/head
Jason Franklin [Fri, 8 May 2020 20:21:09 +0000 (16:21 -0400)] 
Update the "README" file

5 years agoAdd "NONEXISTENT.xml" to "man/Makefile.am"
Jason Franklin [Fri, 8 May 2020 19:26:09 +0000 (15:26 -0400)] 
Add "NONEXISTENT.xml" to "man/Makefile.am"

5 years agoName "NONEXISTENT" in the man page for "pwck"
Jason Franklin [Fri, 8 May 2020 19:17:43 +0000 (15:17 -0400)] 
Name "NONEXISTENT" in the man page for "pwck"

5 years agoAdd detailed documentation for "NONEXISTENT"
Jason Franklin [Fri, 8 May 2020 19:14:44 +0000 (15:14 -0400)] 
Add detailed documentation for "NONEXISTENT"

5 years agoAdd "NONEXISTENT" to the "login.defs" man page
Jason Franklin [Fri, 8 May 2020 18:58:31 +0000 (14:58 -0400)] 
Add "NONEXISTENT" to the "login.defs" man page

5 years agoCheck for "NONEXISTENT" in "src/pwck.c"
Jason Franklin [Fri, 8 May 2020 17:20:14 +0000 (13:20 -0400)] 
Check for "NONEXISTENT" in "src/pwck.c"

5 years agoAdd "NONEXISTENT" to def_table
Jason Franklin [Fri, 8 May 2020 14:42:52 +0000 (10:42 -0400)] 
Add "NONEXISTENT" to def_table

5 years agoAdd "NONEXISTENT" to "etc/login.defs"
Jason Franklin [Fri, 8 May 2020 13:52:34 +0000 (09:52 -0400)] 
Add "NONEXISTENT" to "etc/login.defs"

5 years agoMerge pull request #237 from ikerexxe/usermod_fails
Serge Hallyn [Sat, 2 May 2020 03:26:41 +0000 (22:26 -0500)] 
Merge pull request #237 from ikerexxe/usermod_fails

Check only local groups when adding new supplementary groups to a user

5 years agoMerge pull request #249 from brauner/coverity
Serge Hallyn [Sat, 25 Apr 2020 17:32:13 +0000 (12:32 -0500)] 
Merge pull request #249 from brauner/coverity

travis: reorder sections and add regenerated coverity token

5 years agotravis: reorder sections and add regenerated coverity token 249/head
Christian Brauner [Sat, 25 Apr 2020 16:45:24 +0000 (18:45 +0200)] 
travis: reorder sections and add regenerated coverity token

Also remove the openssl section since both lxc and lxcfs don't need it
either.

Signed-off-by: Christian Brauner <christian@brauner.io>
5 years agoMerge pull request #248 from brauner/coverity
Serge Hallyn [Sat, 25 Apr 2020 16:32:23 +0000 (11:32 -0500)] 
Merge pull request #248 from brauner/coverity

travis: add more architectures + enable Coverity

5 years agotravis: add more architectures and Coverity support 248/head
Christian Brauner [Sat, 25 Apr 2020 10:43:53 +0000 (12:43 +0200)] 
travis: add more architectures and Coverity support

Now that travis supports more architectures let's make sure we test on
all of them and that we enable Coverity too.

Signed-off-by: Christian Brauner <christian@brauner.io>
5 years agoMerge pull request #247 from jubalh/unusedcpp
Christian Brauner [Sat, 25 Apr 2020 10:34:49 +0000 (12:34 +0200)] 
Merge pull request #247 from jubalh/unusedcpp

Remove unused variables

5 years agoRemove unused 'buf' in shadow.c 247/head
Michael Vetter [Sat, 25 Apr 2020 10:23:10 +0000 (12:23 +0200)] 
Remove unused 'buf' in shadow.c

5 years agoRemove unused variable 'cpp'
Michael Vetter [Sat, 25 Apr 2020 10:10:39 +0000 (12:10 +0200)] 
Remove unused variable 'cpp'

5 years agoMerge pull request #244 from sthibaul/master
Serge Hallyn [Thu, 23 Apr 2020 15:56:48 +0000 (10:56 -0500)] 
Merge pull request #244 from sthibaul/master

Fix hurd build

5 years agoMerge pull request #246 from blueskycs2c/stderr-pr
Christian Brauner [Mon, 20 Apr 2020 08:01:27 +0000 (10:01 +0200)] 
Merge pull request #246 from blueskycs2c/stderr-pr

check_uid_range : warnings go to stderr

5 years agocheck_uid_range : warnings go to stderr 246/head
blueskycs2c [Mon, 20 Apr 2020 02:16:19 +0000 (10:16 +0800)] 
check_uid_range : warnings go to stderr