]> git.ipfire.org Git - thirdparty/shadow.git/log
thirdparty/shadow.git
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

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

5 years agoMerge pull request #245 from hallyn/2020-04-17/libmisc
Christian Brauner [Sat, 18 Apr 2020 10:32:38 +0000 (12:32 +0200)] 
Merge pull request #245 from hallyn/2020-04-17/libmisc

remove unused and misleading 'owner' argument from find_new_sub*

5 years agoremove unused and misleading 'owner' argument from find_new_sub* 245/head
Serge Hallyn [Fri, 17 Apr 2020 21:31:56 +0000 (16:31 -0500)] 
remove unused and misleading 'owner' argument from find_new_sub*

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
5 years agoFix hurd build 244/head
Samuel Thibault [Fri, 17 Apr 2020 19:50:48 +0000 (21:50 +0200)] 
Fix hurd build

Do not include <sys/prctl.h> we don't have <sys/capability.h>, we don't
need prctl in that case anyway.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
5 years agoMerge pull request #243 from blueskycs2c/uid-pr
Serge Hallyn [Thu, 16 Apr 2020 16:48:21 +0000 (11:48 -0500)] 
Merge pull request #243 from blueskycs2c/uid-pr

print a warning from useradd if -u is used with uid number outside ra…

5 years agoprint a warning from useradd if -u is used with uid number outside range. 243/head
blueskycs2c [Sat, 11 Apr 2020 14:45:54 +0000 (22:45 +0800)] 
print a warning from useradd if -u is used with uid number outside range.

5 years agoMerge pull request #242 from topimiettinen/login-defs-modernize
Christian Brauner [Fri, 10 Apr 2020 14:58:29 +0000 (16:58 +0200)] 
Merge pull request #242 from topimiettinen/login-defs-modernize

login.defs: warn about weak choices

5 years agologin.defs: warn about weak choices 242/head
Topi Miettinen [Fri, 10 Apr 2020 11:09:55 +0000 (14:09 +0300)] 
login.defs: warn about weak choices

According to crypt(5), MD5 and DES should not be used for new
hashes. Also the default number of SHA rounds chosen by libc is orders
of magnitude too low for modern hardware. Let's warn the users about
weak choices.

Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
5 years agouseradd: check only local groups with -G option 237/head
ikerexxe [Mon, 30 Mar 2020 07:08:23 +0000 (09:08 +0200)] 
useradd: check only local groups with -G option

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

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

5 years agousermod: check only local groups with -G option
ikerexxe [Fri, 27 Mar 2020 13:23:02 +0000 (14:23 +0100)] 
usermod: check only local groups with -G option

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

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

5 years agoMerge pull request #236 from jsoref/with-an
Serge Hallyn [Sat, 21 Mar 2020 03:30:16 +0000 (22:30 -0500)] 
Merge pull request #236 from jsoref/with-an

spelling: with-an

5 years agoMerge pull request #232 from eagleoflqj/master
Serge Hallyn [Sat, 21 Mar 2020 03:29:55 +0000 (22:29 -0500)] 
Merge pull request #232 from eagleoflqj/master

fix typo 登陆->登录

5 years agoMerge pull request #226 from ikerexxe/dev1
Serge Hallyn [Fri, 20 Mar 2020 22:45:37 +0000 (17:45 -0500)] 
Merge pull request #226 from ikerexxe/dev1

useradd: clarify the useradd -d parameter behavior in man page

5 years agouseradd: clarify the useradd -d parameter behavior in man page 226/head
ikerexxe [Wed, 4 Mar 2020 13:50:04 +0000 (14:50 +0100)] 
useradd: clarify the useradd -d parameter behavior in man page

Explanation: clarify the useradd -d parameter as it does create directory HOME_DIR if it doesn't exit.

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

Changelog: [serge] minor tweak to the text

5 years agospelling: with-an 236/head
Josh Soref [Tue, 17 Mar 2020 21:09:26 +0000 (17:09 -0400)] 
spelling: with-an

5 years agofix typo 登陆->登录 232/head
eagleoflqj [Wed, 11 Mar 2020 22:51:02 +0000 (18:51 -0400)] 
fix typo 登陆->登录

5 years agoMerge pull request #229 from edneville/130_segfaults_on_strftime
Serge Hallyn [Mon, 9 Mar 2020 18:17:11 +0000 (13:17 -0500)] 
Merge pull request #229 from edneville/130_segfaults_on_strftime

Fix segfault on strftime

5 years agoReplacing exit with return 229/head
ed [Mon, 9 Mar 2020 18:01:32 +0000 (18:01 +0000)] 
Replacing exit with return

5 years agoMerge pull request #228 from blueskycs2c/br1
Serge Hallyn [Mon, 9 Mar 2020 16:05:27 +0000 (11:05 -0500)] 
Merge pull request #228 from blueskycs2c/br1

fix #223comment at #endif does not match condition of #if

5 years agoMerge pull request #230 from Frans-Spiesschaert/new_dutch_po_branch
Serge Hallyn [Mon, 9 Mar 2020 16:00:45 +0000 (11:00 -0500)] 
Merge pull request #230 from Frans-Spiesschaert/new_dutch_po_branch

updated Dutch translation

5 years agoupdated Dutch translation 230/head
Frans Spiesschaert [Sat, 7 Mar 2020 20:55:53 +0000 (21:55 +0100)] 
updated Dutch translation

5 years agoFix segfault when time is unreadable
ed@s5h.net [Sat, 7 Mar 2020 16:49:17 +0000 (16:49 +0000)] 
Fix segfault when time is unreadable

Adding myself to contributors

Closes #130

5 years agomodify #endif does not match condition of #if in passwd.c 228/head
blueskycs2c [Thu, 5 Mar 2020 02:51:39 +0000 (10:51 +0800)] 
modify #endif does not match condition of #if in passwd.c

5 years agoman/Makefile.am: add HOME_MODE.xml
Serge Hallyn [Thu, 27 Feb 2020 01:41:54 +0000 (19:41 -0600)] 
man/Makefile.am:  add HOME_MODE.xml

Closes #217

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
5 years agoMerge pull request #219 from infinnovation-dev/master
Serge Hallyn [Thu, 27 Feb 2020 01:34:13 +0000 (19:34 -0600)] 
Merge pull request #219 from infinnovation-dev/master

libmisc: Accept --root=path and --prefix=path option syntax

5 years agoMerge pull request #215 from imba-tjd/patch-1
Serge Hallyn [Thu, 27 Feb 2020 00:13:54 +0000 (18:13 -0600)] 
Merge pull request #215 from imba-tjd/patch-1

man(zh_CN): fix typo 现实 -> 显示

5 years agoMerge pull request #216 from ikerexxe/master
Serge Hallyn [Mon, 24 Feb 2020 00:00:23 +0000 (18:00 -0600)] 
Merge pull request #216 from ikerexxe/master

useradd: doesn't generate /var/spool/mail/$USER with the proper SELinux user identity

5 years agouseradd: generate /var/spool/mail/$USER with the proper SELinux user identity 216/head
ikerexxe [Wed, 5 Feb 2020 14:04:39 +0000 (15:04 +0100)] 
useradd: generate /var/spool/mail/$USER with the proper SELinux user identity

Explanation: use set_selinux_file_context() and reset_selinux_file_context() for create_mail() just as is done for create_home()

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

5 years agolibmisc: Accept --root=path and --prefix=path option syntax 219/head
Colin Hogben [Fri, 7 Feb 2020 21:57:12 +0000 (21:57 +0000)] 
libmisc: Accept --root=path and --prefix=path option syntax

Recognise --root=path in addition to --root path (and similarly for
--prefix) to match the syntax accepted by getopt_long.

Fixes #218

5 years agoman(zh_CN): fix typo 现实 -> 显示 215/head
谭九鼎 [Mon, 3 Feb 2020 14:02:16 +0000 (22:02 +0800)] 
man(zh_CN): fix typo 现实 -> 显示

5 years agoconfigure.ac: release 4.8.1 4.8.1
Serge Hallyn [Thu, 23 Jan 2020 20:38:22 +0000 (14:38 -0600)] 
configure.ac: release 4.8.1

This is mainly to revert the --sbindir/--bindir commit which broke some
distros

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
5 years agoupdate changelog
Serge Hallyn [Thu, 23 Jan 2020 20:37:42 +0000 (14:37 -0600)] 
update changelog

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
5 years agoMerge pull request #212 from t8m/in-subuid-mapping
Serge Hallyn [Thu, 23 Jan 2020 15:15:04 +0000 (09:15 -0600)] 
Merge pull request #212 from t8m/in-subuid-mapping

Do not mistake a regular user process for a namespaced one

5 years agoDo not mistake a regular user process for a namespaced one 212/head
Tomas Mraz [Mon, 20 Jan 2020 12:58:07 +0000 (13:58 +0100)] 
Do not mistake a regular user process for a namespaced one

In case there is a regular user with a process running on a system
with uid falling into a namespaced uid range of another user.
The user with the colliding namespaced uid range will not be
allowed to be deleted without forcing the action with -f.

The user_busy() is adjusted to check whether the suspected process
is really a namespaced process in a different namespace.

5 years agoMerge pull request #210 from t8m/shell-check
Serge Hallyn [Mon, 20 Jan 2020 15:04:51 +0000 (07:04 -0800)] 
Merge pull request #210 from t8m/shell-check

Make the check for non-executable shell only a warning.

5 years agoMerge pull request #211 from Frans-Spiesschaert/master
Serge Hallyn [Mon, 20 Jan 2020 14:57:13 +0000 (06:57 -0800)] 
Merge pull request #211 from Frans-Spiesschaert/master

updated po file for Dutch

5 years agopo/nl.po 211/head
Frans-Spiesschaert [Thu, 16 Jan 2020 20:08:32 +0000 (21:08 +0100)] 
po/nl.po

updated Dutch translation for shadow version 4.8 (pot file from 2019-12-01).
I updated the translation for Debian
and on request of the Debian package maintainer Bálint Réczey I am creating this pull request

5 years agoMake the check for non-executable shell only a warning. 210/head
Tomas Mraz [Thu, 16 Jan 2020 11:55:30 +0000 (12:55 +0100)] 
Make the check for non-executable shell only a warning.

Although it is a good idea to check for an inadvertent typo
in the shell name it is possible that the shell might not be present
on the system yet when the user is added.

5 years agoMerge pull request #209 from Duncaen/home-mode
Serge Hallyn [Sun, 12 Jan 2020 15:39:13 +0000 (09:39 -0600)] 
Merge pull request #209 from Duncaen/home-mode

add new HOME_MODE login.defs(5) option

5 years agoadd new HOME_MODE login.defs(5) option 209/head
Duncan Overbruck [Sat, 11 Jan 2020 21:19:37 +0000 (22:19 +0100)] 
add new HOME_MODE login.defs(5) option

This option can be used to set a separate mode for useradd(8) and
newusers(8) to create the home directories with.
If this option is not set, the current behavior of using UMASK
or the default umask is preserved.

There are many distributions that set UMASK to 077 by default just
to create home directories not readable by others and use things like
/etc/profile, bashrc or sudo configuration files to set a less
restrictive
umask. This has always resulted in bug reports because it is hard
to follow as users tend to change files like bashrc and are not about
setting the umask to counteract the umask set in /etc/login.defs.

A recent change in sudo has also resulted in many bug reports about
this. sudo now tries to respect the umask set by pam modules and on
systems where pam does not set a umask, the login.defs UMASK value is
used.

5 years agosilence more compiler warnings
Serge Hallyn [Sun, 12 Jan 2020 14:20:50 +0000 (08:20 -0600)] 
silence more compiler warnings

And don't reuse the cp variable for two different purposes.

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
5 years agoRevert "add new HOME_MODE login.defs(5) option"
Serge Hallyn [Sun, 12 Jan 2020 13:56:19 +0000 (07:56 -0600)] 
Revert "add new HOME_MODE login.defs(5) option"

Missing file

This reverts commit a847899b521b0df0665e442845bcff23407d9ea0.

5 years agosilence compiler warnings
Serge Hallyn [Sun, 12 Jan 2020 13:31:26 +0000 (07:31 -0600)] 
silence compiler warnings

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
5 years agoman: add missing author entries
Serge Hallyn [Sun, 12 Jan 2020 13:24:04 +0000 (07:24 -0600)] 
man: add missing author entries

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
5 years agoMerge pull request #204 from edneville/198_user_add_tty_logging
Serge Hallyn [Sun, 12 Jan 2020 13:19:18 +0000 (07:19 -0600)] 
Merge pull request #204 from edneville/198_user_add_tty_logging

Adding tty logging to the useradd command

5 years agoAdding tty logging to the useradd command 204/head
ed [Wed, 18 Dec 2019 20:53:58 +0000 (20:53 +0000)] 
Adding tty logging to the useradd command

This commit adds a from= field to the end of the useradd log entry.
Casting user_name to tallylog_reset to silence a compiler warning.

Changelog: Fixing tabs
Changelog: Changing function prototype to const char* to match user_name declaration.

5 years agoMerge pull request #208 from Duncaen/umask-home
Serge Hallyn [Sat, 11 Jan 2020 22:20:13 +0000 (16:20 -0600)] 
Merge pull request #208 from Duncaen/umask-home

add new UMASK_HOME login.defs option

5 years agoadd new HOME_MODE login.defs(5) option 208/head
Duncan Overbruck [Sat, 11 Jan 2020 21:19:37 +0000 (22:19 +0100)] 
add new HOME_MODE login.defs(5) option

This option can be used to set a separate mode for useradd(8) and
newusers(8) to create the home directories with.
If this option is not set, the current behavior of using UMASK
or the default umask is preserved.

There are many distributions that set UMASK to 077 by default just
to create home directories not readable by others and use things like
/etc/profile, bashrc or sudo configuration files to set a less
restrictive
umask. This has always resulted in bug reports because it is hard
to follow as users tend to change files like bashrc and are not about
setting the umask to counteract the umask set in /etc/login.defs.

A recent change in sudo has also resulted in many bug reports about
this. sudo now tries to respect the umask set by pam modules and on
systems where pam does not set a umask, the login.defs UMASK value is
used.

5 years agoUpdate README to point to new alioth list urls
Serge Hallyn [Sat, 11 Jan 2020 20:50:55 +0000 (14:50 -0600)] 
Update README to point to new alioth list urls

Closes #195.

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
5 years agoMerge pull request #206 from edneville/123_log_ssh_original_command_in_nologin
Serge Hallyn [Sat, 11 Jan 2020 20:47:57 +0000 (14:47 -0600)] 
Merge pull request #206 from edneville/123_log_ssh_original_command_in_nologin

Adding logging of SSH_ORIGINAL_COMMAND to nologin.

5 years agoAdding logging of SSH_ORIGINAL_COMMAND to nologin. 206/head
ed [Thu, 26 Dec 2019 13:17:11 +0000 (13:17 +0000)] 
Adding logging of SSH_ORIGINAL_COMMAND to nologin.

If SSH_ORIGINAL_COMMAND is set, it will be added to the syslog entry.

Closes #123.

Changelog: (SEH squashed commit): Fixing indentation
Changelog: (SEH) break up long line

5 years agoadd changelog entry about account-tools-setuid
Serge Hallyn [Fri, 20 Dec 2019 06:14:13 +0000 (00:14 -0600)] 
add changelog entry about account-tools-setuid

Signed-off-by: Serge Hallyn <shallyn@cisco.com>
5 years agoMerge pull request #205 from Blub/2019-12-19/bail-on-error-in-for-loops
Serge Hallyn [Fri, 20 Dec 2019 06:08:32 +0000 (00:08 -0600)] 
Merge pull request #205 from Blub/2019-12-19/bail-on-error-in-for-loops

Makefile: bail out on error in for-loops

5 years agoMerge pull request #199 from falconindy/master
Serge Hallyn [Fri, 20 Dec 2019 06:07:23 +0000 (00:07 -0600)] 
Merge pull request #199 from falconindy/master

Don't auto-enable ACCT_TOOLS_SETUID if PAM is detected

5 years agoMerge pull request #201 from michaelweiser/groupmems-man
Serge Hallyn [Thu, 19 Dec 2019 20:49:45 +0000 (14:49 -0600)] 
Merge pull request #201 from michaelweiser/groupmems-man

man: Don't suggest making groupmems user-writeable

5 years agoMakefile: bail out on error in for-loops 205/head
Wolfgang Bumiller [Thu, 19 Dec 2019 17:54:30 +0000 (18:54 +0100)] 
Makefile: bail out on error in for-loops

`make` runs each line in a shell and bails out on error,
however, the shell is not started with `-e`, so commands in
`for` loops can fail without the error actually causing
`make` to bail out with a failure status.

For instance, the following make snippet will end
successfully, printing 'SUCCESS', despite the first `chmod`
failing:

    all:
        touch a b
        for i in a-missing-file a b; do \
            chmod 666 $$i; \
        done
        @echo SUCCESS

To prevent wrong paths in install scripts from remaining
unnoticed, let's activate `set -e` in the `for` loop
subshells.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agoMerge pull request #203 from Rushi98/master
Christian Brauner [Wed, 18 Dec 2019 10:46:20 +0000 (11:46 +0100)] 
Merge pull request #203 from Rushi98/master

Deduplicate usermod manual (fixes #202)

5 years agoDeduplicate usermod manual (fixes #202) 203/head
Rushikesh Jogdand [Wed, 18 Dec 2019 05:50:40 +0000 (11:20 +0530)] 
Deduplicate usermod manual (fixes #202)

Changelog:
1) modified:   man/usermod.8.xml
   Removed duplicate "badnames" options entry.

5 years agoman: Don't suggest making groupmems user-writeable 201/head
Michael Weiser [Tue, 17 Dec 2019 20:13:07 +0000 (21:13 +0100)] 
man: Don't suggest making groupmems user-writeable

Suggesting mode 2770 is dangerous because it makes the binary writeable
by all members of the owning group which is supposed to be normal
end-users. Suggest 2710 instead as is usual for s[ug]id binaries,
allowing execution but neither reading nor writing.

Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
5 years agoMerge pull request #200 from jubalh/sel1
Christian Brauner [Tue, 17 Dec 2019 12:43:56 +0000 (13:43 +0100)] 
Merge pull request #200 from jubalh/sel1

selinux: include stdio

5 years agoselinux: include stdio 200/head
Michael Vetter [Tue, 17 Dec 2019 12:40:47 +0000 (13:40 +0100)] 
selinux: include stdio

We use fprintf(), stderr etc, so we should include stdio.h.

5 years agoDon't auto-enable ACCT_TOOLS_SETUID if PAM is detected 199/head
Dave Reisner [Mon, 16 Dec 2019 19:11:23 +0000 (14:11 -0500)] 
Don't auto-enable ACCT_TOOLS_SETUID if PAM is detected

Here's a sad story:

70971457 is merged into shadow, allowing newgidmap/newuidmap to be
installed with file caps rather than setuid.
* https://bugs.archlinux.org/task/63248 is filed to take advantage of
this.
* The arch maintainer of the 'shadow' package notices that this doesn't
work, and submits a pull request to fix this in shadow.
edf7547ad5 is merged, fixing the post install hooks.

The problem here is that distros have been building shadow with PAM for
O(years), but the install hooks have silently failed due to the
combination of the directory mismatch (suidubins vs suidsbins) and later
success with setuid'ing newgidmap/newuidmap.

With the install hooks fixed, those of us (Arch[1] and Gentoo[2] so far)
who never built shadow explicitly with --enable-account-tools-setuid are
now getting setuid account tools, and don't have PAM configuration
suitable for use with setuid account management tools.

It's entirely unclear to me why you'd want this, but I assume there's
some reason out there for it existing. Regardless, setuid binaries are
dangerous and shouldn't be enabled by default without good reason.

[1] https://bugs.archlinux.org/task/64836
[2] https://bugs.gentoo.org/702252

5 years agoMerge pull request #197 from chutz/revert-bindir-sbindir-change
Serge Hallyn [Mon, 2 Dec 2019 02:28:21 +0000 (20:28 -0600)] 
Merge pull request #197 from chutz/revert-bindir-sbindir-change

Revert "Honor --sbindir and --bindir for binary installation"

5 years agoRevert "Honor --sbindir and --bindir for binary installation" 197/head
Patrick McLean [Sun, 1 Dec 2019 21:59:52 +0000 (13:59 -0800)] 
Revert "Honor --sbindir and --bindir for binary installation"

This reverts commit e293aa9cfca0619a63616af75532637dab60d49d.

See https://github.com/shadow-maint/shadow/issues/196

Some distros still care about `/bin` vs `/usr/bin`. This commit makes
it so all binaries are always installed to `/bin`/`/sbin`. The only way to
restore the previous behaviour of installing some binaries to
`/usr/bin`/`/usr/sbin` is to revert the patch.