f2ae6a42a4
Remove code conditional on USE_TERMIO
...
The definition for this macro was removed in a previous commit.
Reported-by: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
5669b34891
Assume socket(2) exists
...
It is required by POSIX.1-2001.
Link: <https://github.com/shadow-maint/shadow/pull/600 >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
3d32dd05bb
Assume inet_ntoa(3) exists
...
It is required by POSIX.1-2001.
Link: <https://github.com/shadow-maint/shadow/pull/600 >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
0e0c55aeca
Assume F_* and SEEK_* macros are defined
...
They are required by POSIX.1-2001.
Link: <https://github.com/shadow-maint/shadow/pull/600 >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
9dfa71f71c
Remove code conditional on S_SPLINT_S
...
I don't know for sure what that is, but it's redefining setlocale(3)
and LC_ALL, which is are defined by C99, so it's supect of being some
variety of an extinct dynosaur. Maybe related to the Dodo.
Link: <https://github.com/shadow-maint/shadow/pull/600 >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
143e346dd5
Assume strdup(3) exists
...
It is required by POSIX.1-2001.
Link: <https://github.com/shadow-maint/shadow/pull/600 >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
56e989ccf7
Assume strcasecmp(3) exists
...
It is required by POSIX.1-2001.
Link: <https://github.com/shadow-maint/shadow/pull/600 >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
06f4acee99
Assume rmdir(2) exists
...
It is required by POSIX.1-2001.
Link: <https://github.com/shadow-maint/shadow/pull/600 >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
dfc93b35cc
Assume mkdir(2) exists
...
It is required by POSIX.1-2001.
Link: <https://github.com/shadow-maint/shadow/pull/600 >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
61299d69ad
Assume B[0-9]* macros are defined
...
All of the macros we're using are required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
f51c6838ac
Assume SIGTTOU is defined
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
307502d8b5
Assume SIGTSTP is defined
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
74c8015730
Assume RLIMIT_STACK is defined
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
c916715a6c
Assume RLIMIT_NOFILE is defined
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
5ebf28c999
Assume RLIMIT_FSIZE is defined
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
91adf3b8bb
Assume RLIMIT_DATA is defined
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
891d8dbedd
Assume RLIMIT_CPU is defined
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
7a4906fc75
Assume RLIMIT_AS is defined
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
e1a39e1dfc
Assume RLIMIT_CORE is defined
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
cbc363f671
Assume getgrgid_r(3) exists
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
88eb38f4ab
Assume getgrnam_r(3) exists
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
e5e5df1966
Assume getpwuid_r(3) exists
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
e788001977
Assume getpwnam_r(3) exists
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
a082a3975f
Assume fsync(2) exists
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
e71c23586a
Assume fchown(2) exists
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
9c86e07067
Assume fchmod(2) exists
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
55c62b663f
Assume l64a(3) exists
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
48391fb862
Assume <netdb.h> exists
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
b76d9b540a
Remove preprocessor conditionals that are always true
...
Since the last commit, LIMITS is always defined. Remove the dummy
macro, and all conditionals on it.
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
9d695340b4
Assume <sys/resource.h> exists
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
cdaa04e460
Remove uses of ulimit(3)
...
The function is obsolete. It is recommended to use getrlimit(2) instead
(see the manual page for ulimit(3) or the POSIX manual for it). Since
getrlimit(2) is required by POSIX.1-2001, we can rely on it.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
0527fa677b
Add indentation to heavy use of preprocessor conditionals
...
This clarifies which code is under which conditions,
for further clenaup.
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
7b1fc83e9b
Remove unused check for <utime.h>
...
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
eecd021c04
Remove unused check for <syslog.h>
...
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
5777e583cd
Assume <termios.h> exists
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
b47aa1e9aa
Assume <utmpx.h> exists
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
85d2688d62
Remove unused check for <sys/time.h>
...
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
578f286215
Assume <unistd.h> exists
...
It is required by POSIX.1-2001.
Cc: Christian Göttsche <cgzones@googlemail.com >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
28e565aa83
Remove unused check for <fcntl.h>
...
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-15 16:22:05 -06:00
d7baafb2eb
Assume strstr(3) exists
...
ISO C99 requires strstr(3).
Link: <https://github.com/shadow-maint/shadow/pull/600 >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-12 09:16:43 +01:00
0793782d31
Assume snprintf(3) exists
...
ISO C99 requires snprintf(3).
Link: <https://github.com/shadow-maint/shadow/pull/600 >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-12 09:16:43 +01:00
7d3213741e
Assume rename(2) exists
...
ISO C99 requires rename(2).
Link: <https://github.com/shadow-maint/shadow/pull/600 >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-12 09:16:43 +01:00
9d8c3df93c
Assume NULL exists
...
ISO C99 requires NULL.
Link: <https://github.com/shadow-maint/shadow/pull/600 >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-12 09:16:43 +01:00
3a32f5278d
Assume strerror(3) exists
...
ISO C99 requires strerror(3).
Link: <https://github.com/shadow-maint/shadow/pull/600 >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-12 09:16:43 +01:00
5e8df2b2b5
Assume fputs(3) exists
...
ISO C99 requires fputs(3).
Link: <https://github.com/shadow-maint/shadow/pull/600 >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-12 09:16:43 +01:00
c26b682381
Assume <locale.h> exists
...
ISO C99 requires <locale.h>.
Other files in the project already include <locale.h> unconditionally,
so it's reasonable to assume that it is always available.
Link: <https://github.com/shadow-maint/shadow/pull/600 >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-12 09:16:43 +01:00
d34c834ea8
Remove unused check for <limits.h>
...
Link: <https://github.com/shadow-maint/shadow/pull/600 >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-12 09:16:43 +01:00
1eaa30756e
Assume <errno.h> exists
...
ISO C99 requires <errno.h>.
Many files in the project already include <errno.h> unconditionally,
so it's reasonable to assume that it is always available.
Link: <https://github.com/shadow-maint/shadow/pull/600 >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-12 09:16:43 +01:00
c4d9dcacc9
Assume <stdbool.h> exists
...
ISO C99 requires <stdbool.h>.
Many files in the project already include <stdbool.h> unconditionally,
so it's reasonable to assume that it is always available.
Link: <https://github.com/shadow-maint/shadow/pull/600 >
Cc: Christian Göttsche <cgzones@googlemail.com >
Cc: Iker Pedrosa <ipedrosa@redhat.com >
Cc: Mike Frysinger <vapier@gentoo.org >
Signed-off-by: Alejandro Colomar <alx@kernel.org >
2022-12-12 09:16:43 +01:00
ed6c505312
Add '62_usermod_remove_supplementary_groups' test case to test runner scripts (run_some)
2022-12-11 10:58:37 -06:00