]>
git.ipfire.org Git - thirdparty/shadow.git/log
Christian Göttsche [Mon, 3 Jan 2022 11:26:25 +0000 (12:26 +0100)]
Declare read-only lookup pointers const
pwck.c:587:31: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
587 | spw = (struct spwd *) spw_locate (pwd->pw_name);
| ^
grpck.c:599:31: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
599 | sgr = (struct sgrp *) sgr_locate (grp->gr_name);
| ^
grpck.c:761:23: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
761 | grp = (struct group *) gr_locate (sgr->sg_name);
| ^
Christian Göttsche [Mon, 3 Jan 2022 11:19:00 +0000 (12:19 +0100)]
Declare variable for string literal const
newgidmap.c:87:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
87 | policy = "deny\n";
| ^
Christian Göttsche [Mon, 3 Jan 2022 11:49:02 +0000 (12:49 +0100)]
Declare argument of nss_init const
nss_init() does not modify its path argument, thus declare it const.
Also drop superfluous prototype.
nss.c:54:31: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
54 | nsswitch_path = NSSWITCH;
| ^
Christian Göttsche [Mon, 3 Jan 2022 11:17:22 +0000 (12:17 +0100)]
Do not drop const qualifier for Basename
The private Basename() implementation does not modify its argument, so
a cast to a non-const char pointer is not necessary.
newgrp.c:790:39: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
790 | progbase = (char *) Basename ((char *) prog);
| ^
newgrp.c:790:20: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
790 | progbase = (char *) Basename ((char *) prog);
| ^
shell.c:48:70: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual]
48 | (void) snprintf (arg0, sizeof arg0, "-%s", Basename ((char *) file));
| ^
Christian Göttsche [Mon, 3 Jan 2022 11:43:01 +0000 (12:43 +0100)]
Use strict prototypes
Function declarations with no argument declare functions taking an
arbitrary number of arguments. Use the special type void to declare
functions taking no argument.
Christian Göttsche [Mon, 3 Jan 2022 11:41:13 +0000 (12:41 +0100)]
Declare file local functions static
Serge Hallyn [Mon, 3 Jan 2022 03:07:38 +0000 (21:07 -0600)]
configure.ac and changelog: release 4.11.1
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Sam James [Mon, 3 Jan 2022 02:37:58 +0000 (02:37 +0000)]
build: include lib/shadowlog_internal.h in dist tarballs
Fixes: #485
Signed-off-by: Sam James <sam@gentoo.org>
Serge Hallyn [Mon, 3 Jan 2022 00:59:13 +0000 (18:59 -0600)]
configure.ac and changelog: release 4.11
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Serge Hallyn [Mon, 3 Jan 2022 00:38:42 +0000 (18:38 -0600)]
Merge pull request #451 from hallyn/2021-12-05/license
Serge Hallyn [Sun, 2 Jan 2022 16:38:45 +0000 (10:38 -0600)]
Merge pull request #483 from edneville/317_nofollow
Adding nofollow to opens
ed neville [Fri, 31 Dec 2021 22:40:13 +0000 (22:40 +0000)]
Adding nofollow to opens
Serge Hallyn [Thu, 30 Dec 2021 23:45:20 +0000 (17:45 -0600)]
Merge pull request #460 from edneville/404_userdel_kill
script to kill subjects processes
ed neville [Fri, 17 Dec 2021 14:29:48 +0000 (14:29 +0000)]
script to kill subjects processes from userdel
Closes #404
Closes #317
Signed-off-by: ed neville <ed@s5h.net>
Serge Hallyn [Wed, 29 Dec 2021 18:03:34 +0000 (12:03 -0600)]
Merge pull request #482 from xry111/useradd_segfault_fix
fix segfault running useradd -D
Xi Ruoyao [Wed, 29 Dec 2021 09:06:39 +0000 (17:06 +0800)]
fix segfault running useradd -D
Serge Hallyn [Tue, 28 Dec 2021 01:12:24 +0000 (19:12 -0600)]
Merge pull request #479 from alejandro-colomar/getgroups
Remove HAVE_GETGROUPS ifdefs
Serge Hallyn [Tue, 28 Dec 2021 01:10:48 +0000 (19:10 -0600)]
Merge pull request #480 from alejandro-colomar/memcpy
Remove HAVE_MEMCPY and HAVE_MEMSET ifdefs
Serge Hallyn [Tue, 28 Dec 2021 01:10:06 +0000 (19:10 -0600)]
Merge pull request #477 from alejandro-colomar/strftime
Remove HAVE_STRFTIME ifdefs
Serge Hallyn [Mon, 27 Dec 2021 23:10:21 +0000 (17:10 -0600)]
Merge pull request #478 from hallyn/alpine
add alpine edge CI build
Serge Hallyn [Mon, 27 Dec 2021 21:26:27 +0000 (15:26 -0600)]
nss test_range: make sure /etc/nsswitch.conf and /etc/subuid exists
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Serge Hallyn [Mon, 27 Dec 2021 19:56:55 +0000 (13:56 -0600)]
add alpine edge CI build
Mainly to get a musl build in there.
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Alejandro Colomar [Mon, 27 Dec 2021 19:50:06 +0000 (20:50 +0100)]
Remove HAVE_MEMSET ifdefs
memset(3) has been in standard C since C89. It is also in
POSIX.1-2001, in SVr4, and in 4.3BSD (see memset(3) and memset(3p)).
We can assume that this function is always available.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Alejandro Colomar [Mon, 27 Dec 2021 19:50:06 +0000 (20:50 +0100)]
Remove HAVE_MEMCPY ifdefs
memcpy(3) has been in standard C since C89. It is also in
POSIX.1-2001, in SVr4, and in 4.3BSD (see memcpy(3) and memcpy(3p)).
We can assume that this function is always available.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Alejandro Colomar [Mon, 27 Dec 2021 19:50:06 +0000 (20:50 +0100)]
Remove HAVE_GETGROUPS ifdefs
getgroups(2) has been in POSIX since POSIX.1-2001. It is also in
in SVr4 and in 4.3BSD (see getgroups(2) and getgroups(3p)).
We can assume that this function is always available.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Alejandro Colomar [Mon, 27 Dec 2021 19:50:06 +0000 (20:50 +0100)]
Remove HAVE_STRFTIME ifdefs
strftime(3) has been in standard C since C89. It is also in
POSIX.1-2001, and in SVr4 (see strftime(3) and strftime(3p)).
We can assume that this function is always available.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Serge Hallyn [Mon, 27 Dec 2021 19:26:11 +0000 (13:26 -0600)]
Merge pull request #476 from hallyn/2021-12-27/impish
add ubuntu impish build
Serge Hallyn [Mon, 27 Dec 2021 19:21:24 +0000 (13:21 -0600)]
add ubuntu impish build
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Serge Hallyn [Mon, 27 Dec 2021 18:46:34 +0000 (12:46 -0600)]
Merge pull request #474 from atsampson/subidprogname
Default value for progname/logfd, and set progname in subid_init too
Adam Sampson [Sun, 26 Dec 2021 18:21:09 +0000 (18:21 +0000)]
lib: provide default values for shadow_progname/shadow_logfd
Adam Sampson [Sun, 26 Dec 2021 18:16:10 +0000 (18:16 +0000)]
libsubid: use log_set_progname in subid_init
The static Prog variable here is no longer used, so remove it.
Serge Hallyn [Mon, 27 Dec 2021 15:53:00 +0000 (09:53 -0600)]
Merge pull request #467 from alejandro-colomar/date_to_str
Have a single definition of date_to_str()
Serge Hallyn [Mon, 27 Dec 2021 15:40:19 +0000 (09:40 -0600)]
Merge pull request #473 from hallyn/2021-12-26/srht
Test sr.ht CI integration
Serge Hallyn [Sun, 26 Dec 2021 19:46:50 +0000 (13:46 -0600)]
fix newuidmap testcase
sleep 2s before running newxidmap - it seems we were sometimes
racing, causing newxidmap to fail.
Make sure to remove /tmp/test-xidmap, for some reason they
were sometimes still there, causing test to fail.
Fix some irregular tabbing.
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Serge Hallyn [Sun, 26 Dec 2021 17:55:01 +0000 (11:55 -0600)]
libsubid_zzz (test): fix pointer test
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Serge Hallyn [Sun, 7 Nov 2021 23:56:31 +0000 (17:56 -0600)]
run_some: exit error if there were failed tests
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Serge Hallyn [Sun, 26 Dec 2021 17:51:21 +0000 (11:51 -0600)]
remove broken github actions
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Serge Hallyn [Sun, 26 Dec 2021 17:45:52 +0000 (11:45 -0600)]
add a .build.yml to build on builds.sr.ht
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Alejandro Colomar [Wed, 22 Dec 2021 14:32:17 +0000 (15:32 +0100)]
Have a single definition of date_to_str()
PARAMETERS:
According to the C2x charter, I reordered the parameters 'size'
and 'buf' from previously existing date_to_str() definitions.
C2x charter:
> 15. Application Programming Interfaces (APIs) should be
> self-documenting when possible. In particular, the order of
> parameters in function declarations should be arranged such that
> the size of an array appears before the array. The purpose is to
> allow Variable-Length Array (VLA) notation to be used. This not
> only makes the code's purpose clearer to human readers, but also
> makes static analysis easier. Any new APIs added to the Standard
> should take this into consideration.
I used 'long' for the date parameter, as some uses of the function
need to pass a negative value meaning "never".
FUNCTION BODY:
I didn't check '#ifdef HAVE_STRFTIME', which old definitions did,
since strftime(3) is guaranteed by the C89 standard, and all of
the conversion specifiers that we use are also specified by that
standard, so we don't need any extensions at all.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Serge Hallyn [Sun, 26 Dec 2021 16:02:04 +0000 (10:02 -0600)]
Merge pull request #472 from atsampson/progname
lib: rename Prog to shadow_progname, with only one definition
Adam Sampson [Sat, 25 Dec 2021 22:41:58 +0000 (22:41 +0000)]
lib: rename Prog to shadow_progname, with only one definition
The build was failing with duplicate symbol errors with -fno-common.
This is the default in GCC 10 and later, and explicitly enabled in some
distributions to catch problems like this. There were two causes:
- Prog and shadow_logfd were defined in a header file that was included
in multiple other files. Fix this by defining them once in
shadowlog.c, and having extern declarations in the header.
- Most of the tools (except id/nologin) also define a Prog variable,
which is not intended to alias the one in the library. Fix
this by renaming Prog in the library to shadow_progname, which also
matches the new accessor functions for it.
Serge Hallyn [Sun, 5 Dec 2021 15:35:27 +0000 (09:35 -0600)]
Update licensing info
Closes #238
Update all files to list SPDX license shortname. Most files are
BSD 3 clause license.
The exceptions are:
serge@sl ~/src/shadow$ git grep SPDX-License | grep -v BSD-3-Clause
contrib/atudel:# SPDX-License-Identifier: BSD-4-Clause
lib/tcbfuncs.c: * SPDX-License-Identifier: 0BSD
libmisc/salt.c: * SPDX-License-Identifier: Unlicense
src/login_nopam.c: * SPDX-License-Identifier: Unlicense
src/nologin.c: * SPDX-License-Identifier: BSD-2-Clause
src/vipw.c: * SPDX-License-Identifier: GPL-2.0-or-later
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Serge Hallyn [Thu, 23 Dec 2021 21:19:16 +0000 (15:19 -0600)]
Merge pull request #471 from hallyn/2021-12-23/extern
Make shadow_logfd and Prog not extern
Serge Hallyn [Sun, 28 Nov 2021 23:37:53 +0000 (17:37 -0600)]
Make shadow_logfd and Prog not extern
Closes #444
Closes #465
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Serge Hallyn [Mon, 20 Dec 2021 01:46:55 +0000 (19:46 -0600)]
Merge pull request #463 from thesamesam/master
libsubid: fix defining SONAME version
Sam James [Mon, 20 Dec 2021 01:37:23 +0000 (01:37 +0000)]
libsubid: fix defining SONAME version
We were overriding this when --enable-shared was passed. We can actually
just dump the conditional logic as libtool will do the right thing for
us here anyway.
Without this patch, libsubid is installed as .0.
Signed-off-by: Sam James <sam@gentoo.org>
Serge Hallyn [Sun, 19 Dec 2021 20:06:09 +0000 (14:06 -0600)]
configure.ac and changelog: release 4.9
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Serge Hallyn [Sun, 19 Dec 2021 20:08:27 +0000 (14:08 -0600)]
Add README as symlink to README.md
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Serge Hallyn [Sun, 19 Dec 2021 17:27:44 +0000 (11:27 -0600)]
Merge pull request #461 from edneville/441_passwd_message
passwd -l should not say that it changes expiry
ed neville [Fri, 17 Dec 2021 22:59:46 +0000 (22:59 +0000)]
passwd -l should not say that it changes expiry
Closes #441
Serge Hallyn [Fri, 17 Dec 2021 14:41:26 +0000 (08:41 -0600)]
Merge pull request #458 from edneville/434_usermod_home_dir_trailing_slash
Remove tailing slash on home dir
Serge Hallyn [Fri, 17 Dec 2021 14:33:47 +0000 (08:33 -0600)]
Merge pull request #455 from alejandro-colomar/master
usermod: Remove special case for ""
ed neville [Fri, 17 Dec 2021 11:30:57 +0000 (11:30 +0000)]
Remove tailing slash on home dir
Closes #434
Signed-off-by: ed neville <ed@s5h.net>
Serge Hallyn [Wed, 15 Dec 2021 15:22:19 +0000 (09:22 -0600)]
Merge pull request #456 from stoeckmann/chld
Verify default SIGCHLD handling.
Tobias Stoeckmann [Sat, 23 Oct 2021 13:36:00 +0000 (15:36 +0200)]
Verify default SIGCHLD handling.
The SIGCHLD handler could have been ignored by parent process.
Make sure that we have default handling activated.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Serge Hallyn [Tue, 14 Dec 2021 14:04:29 +0000 (08:04 -0600)]
Merge pull request #421 from AZaugg/issue337
Adding new switch -rG to usermod
Alejandro Colomar [Tue, 14 Dec 2021 11:40:06 +0000 (12:40 +0100)]
usermod: Remove special case for ""
That special case is already handled by the called function: strtoday()
so we can simplify the calling code.
Link: <https://github.com/shadow-maint/shadow/issues/454>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Andy Zaugg [Thu, 23 Sep 2021 03:29:09 +0000 (20:29 -0700)]
Adding new option -rG to usermod
Adding a new switch -rG, which provides a similar feature set to
-aG, allowing a person to list exactly what groups to remove a
user from.
https://github.com/shadow-maint/shadow/issues/337
Serge Hallyn [Fri, 10 Dec 2021 15:43:12 +0000 (09:43 -0600)]
Merge pull request #452 from
20100074 /fix-typo-in-is
Fixed typo in login.defs
Serge Hallyn [Fri, 10 Dec 2021 15:37:02 +0000 (09:37 -0600)]
Merge pull request #453 from ikerexxe/getsubids_h
man: getsubids define -h
Iker Pedrosa [Fri, 10 Dec 2021 15:14:13 +0000 (16:14 +0100)]
man: getsubids define -h
Define -h option behaviour in getsubids man page.
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Serge Hallyn [Tue, 7 Dec 2021 14:58:03 +0000 (08:58 -0600)]
Merge pull request #449 from hallyn/2021-11-27/libsubid-symbols
2021 11 27/libsubid symbols
KOSHIKAWA Kenichi [Sun, 5 Dec 2021 16:41:17 +0000 (01:41 +0900)]
fixed typo in login.defs
Serge Hallyn [Sun, 5 Dec 2021 14:05:06 +0000 (08:05 -0600)]
Merge pull request #408 from bjorn-fischer/ambient_caps
Add support for ambient capabilities
Björn Fischer [Wed, 8 Sep 2021 13:03:36 +0000 (15:03 +0200)]
Call pam_end() after fork in child code path
This conforms to PAM documentation and it is needed to support
ambient capabilities with PAM + libcap-2.58+.
Signed-off-by: Björn Fischer <bf@CeBiTec.Uni-Bielefeld.DE>
Serge Hallyn [Sun, 5 Dec 2021 13:57:39 +0000 (07:57 -0600)]
Show libsubid api version in subid.h
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Serge Hallyn [Sun, 5 Dec 2021 04:26:51 +0000 (22:26 -0600)]
Merge pull request #231 from gjzkrug/useradd-maildir-fix
Removed hard-coded default mail spool in useradd
Serge Hallyn [Sun, 5 Dec 2021 04:21:37 +0000 (22:21 -0600)]
Merge pull request #450 from lnussel/master
useradd: assume uid 0 == root as fallback
Serge Hallyn [Sun, 5 Dec 2021 04:20:23 +0000 (22:20 -0600)]
Update email address for Julie Haugh
Ludwig Nussel [Tue, 30 Nov 2021 16:14:14 +0000 (17:14 +0100)]
useradd: assume uid 0 == root as fallback
In absence of /etc/passwd, eg when bootstrapping a chroot, resolving
uid 0 to a name may not work. Therefore just assume "root".
Serge Hallyn [Sat, 27 Nov 2021 16:49:03 +0000 (10:49 -0600)]
Change the subid export symbols
Rename libsubid symbols to all be prefixed with subid_.
Don't export anything but the subid_*.
Closes #443
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Serge Hallyn [Sat, 27 Nov 2021 17:11:04 +0000 (11:11 -0600)]
undo accidental autogen.sh commit: enable-shared
Signed-off-by: Serge Hallyn <serge@hallyn.com>
Serge Hallyn [Sat, 27 Nov 2021 15:37:19 +0000 (09:37 -0600)]
Merge pull request #447 from ikerexxe/documentation
README: update content and format
Iker Pedrosa [Fri, 19 Nov 2021 11:22:05 +0000 (12:22 +0100)]
README: update content and format
* Change to markdown format
* Include an introduction
* Remove the commit mailing list from the contacts
* Add the IRC channel to the contacts
* Move 'S/Key' section to doc/README.skey
* Move authors and maintainers to AUTHORS.md
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Serge Hallyn [Mon, 22 Nov 2021 13:33:57 +0000 (07:33 -0600)]
Merge pull request #440 from stoeckmann/vipw
Improve child error handling
Serge Hallyn [Mon, 22 Nov 2021 13:32:32 +0000 (07:32 -0600)]
Merge pull request #446 from ikerexxe/spw_free
lib: check NULL before freeing passwd data
Iker Pedrosa [Thu, 18 Nov 2021 15:48:26 +0000 (16:48 +0100)]
lib: check NULL before freeing passwd data
Add an additional NULL check condition in spw_free() and pw_free() to
avoid freeing an already empty pointer.
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Serge Hallyn [Thu, 18 Nov 2021 16:30:46 +0000 (10:30 -0600)]
Merge pull request #435 from freedge/groupdelcore
groupdel: fix SIGSEGV when passwd does not exist
Serge Hallyn [Thu, 18 Nov 2021 13:32:10 +0000 (07:32 -0600)]
Merge pull request #436 from ikerexxe/getsubids
getsubids: system binary for user's sub*ids
Iker Pedrosa [Wed, 10 Nov 2021 09:04:12 +0000 (10:04 +0100)]
README: add myself to the contributors list
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Iker Pedrosa [Wed, 10 Nov 2021 08:54:59 +0000 (09:54 +0100)]
getsubids: system binary for user's sub*ids
Rename list_subid_ranges to getsubids to provide a system binary to
check the sub*ids of a user. The intention is to provide this binary
with any distribution that includes the subid feature, so that system
administrators can check the subid ranges of a given user.
Finally, add a man page to explain the behaviour of getsubids.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=
1980780
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Serge Hallyn [Wed, 17 Nov 2021 14:18:13 +0000 (08:18 -0600)]
Merge pull request #437 from ikerexxe/newgrp_segfault
newgrp: fix segmentation fault
Serge Hallyn [Wed, 17 Nov 2021 14:17:34 +0000 (08:17 -0600)]
Merge pull request #439 from ikerexxe/useradd_skel_fix
useradd: change SELinux labels for home files
Serge Hallyn [Wed, 17 Nov 2021 14:15:04 +0000 (08:15 -0600)]
Merge pull request #442 from rbalint/fix-no-passwd-help
Fix typo in passwd --help's Norvegian translation
Serge Hallyn [Wed, 17 Nov 2021 14:14:22 +0000 (08:14 -0600)]
Merge pull request #445 from ikerexxe/pwck_segfault
pwck: fix segfault when calling fprintf()
Iker Pedrosa [Mon, 15 Nov 2021 11:40:15 +0000 (12:40 +0100)]
pwck: fix segfault when calling fprintf()
As shadow_logfd variable is not set at the beginning of the program if
something fails and fprintf() is called a segmentation fault happens.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=
2021339
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Balint Reczey [Sun, 14 Nov 2021 11:50:53 +0000 (12:50 +0100)]
Fix typo in passwd --help's Norvegian translation
Thanks to Tollef Fog Heen for the bug report at https://bugs.debian.org/949862
Tobias Stoeckmann [Sun, 14 Nov 2021 11:01:32 +0000 (12:01 +0100)]
Improve child error handling
Always set SIGCHLD handler to default, even if the caller of vipw has
set SIGCHLD to ignore. If SIGCHLD is ignored no zombie processes would
be created, which in turn could mean that kill is called with an already
recycled pid.
Proof of Concept:
1. Compile nochld:
--
#include <signal.h>
#include <unistd.h>
int main(void) {
char *argv[] = { "vipw", NULL };
signal(SIGCHLD, SIG_IGN);
execvp("vipw", argv);
return 1;
}
--
2. Run nochld
3. Suspend child vi, which suspends vipw too:
`kill -STOP childpid`
4. Kill vi:
`kill -9 childpid`
5. You can see with ps that childpid is no zombie but disappeared
6. Bring vipw back into foreground
`fg`
The kill call sends SIGCONT to "childpid" which in turn could have been
already recycled for another process.
This is definitely not a vulnerability. It would take super user
operations, at which point an attacker would have already elevated
permissions.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Iker Pedrosa [Fri, 12 Nov 2021 14:23:30 +0000 (15:23 +0100)]
useradd: change SELinux labels for home files
Change SELinux labels for files copied from the skeleton directory to
the home directory.
This could cause gnome's graphical user adding to fail without copying
the full skeleton files.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=
2022658
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
Iker Pedrosa [Wed, 10 Nov 2021 11:02:04 +0000 (12:02 +0100)]
newgrp: fix segmentation fault
Fix segmentation fault in newgrp when xgetspnam() returns a NULL value
that is immediately freed.
The error was committed in
https://github.com/shadow-maint/shadow/commit/
e65cc6aebcb4132fa413f00a905216a5b35b3d57
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=
2019553
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
François Rigault [Mon, 1 Nov 2021 12:54:25 +0000 (13:54 +0100)]
groupdel: fix SIGSEGV when passwd does not exist
When using groupdel with a prefix, groupdel will attempt to read a
passwd file to look for any user in the group. When the file does not
exist it cores with segmentation fault.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=
1986111
Serge Hallyn [Sun, 31 Oct 2021 17:36:03 +0000 (12:36 -0500)]
Merge pull request #423 from lrh2000/su-fix-sigkill
su: Fix never alarmed SIGKILL when session terminates
Serge Hallyn [Sat, 30 Oct 2021 16:02:12 +0000 (11:02 -0500)]
Merge pull request #432 from galaxy4public/tcb-missing-chmod
Add missing chmod() for shadowtcb_move()
Serge Hallyn [Sat, 30 Oct 2021 14:34:55 +0000 (09:34 -0500)]
Merge pull request #433 from stoeckmann/hushed
Handle malformed lines in hushlogins file.
Tobias Stoeckmann [Fri, 29 Oct 2021 17:44:46 +0000 (19:44 +0200)]
Handle malformed lines in hushlogins file.
If a line in hushlogins file, e.g. /etc/hushlogins, starts with
'\0', then current code performs an out of boundary write.
If the line lacks a newline at the end, then another character is
overridden.
With strcspn both cases are solved.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
(GalaxyMaster) [Thu, 28 Oct 2021 00:16:59 +0000 (11:16 +1100)]
Add missing chmod()
During shadowtcb_move() the directory is temporarily changed to be
owned by root:root with permissions 0700. After the change is done,
the ownership and permissions were supposed to be restored. The
call for chown() was there, but the chmod() call was missing. This
resulted in the broken TCB functionality. The added chmod() fixes
the issue.
Serge Hallyn [Wed, 27 Oct 2021 13:31:23 +0000 (08:31 -0500)]
Merge pull request #430 from galaxy4public/libsubid-static
Fixes the linking issues when libsubid is static and linked to
(GalaxyMaster) [Wed, 27 Oct 2021 09:14:42 +0000 (20:14 +1100)]
Fixes the linking issues when libsubid is static and linked to
binaries that also define the Prog and shadow_logfd variables.
Serge Hallyn [Wed, 27 Oct 2021 01:08:21 +0000 (20:08 -0500)]
Merge pull request #422 from ikerexxe/home_selinux_user
Create the home and mail directories with SELinux user label
Serge Hallyn [Mon, 25 Oct 2021 19:26:37 +0000 (14:26 -0500)]
Add Christian Brauner to SECURITY.md
Signed-off-by: Serge Hallyn <serge@hallyn.com>