Merge pull request #405 from a1346054/master

Minor cleanups
This commit is contained in:
Serge Hallyn 2021-09-13 10:57:38 -05:00 committed by GitHub
commit 0e0101043b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
44 changed files with 178 additions and 187 deletions

View File

@ -1311,7 +1311,7 @@
This means that fred's password is valid, it was last changed on
03/04/96, it can be changed at any time, it expires after 60 days,
fred will not be warned, and and the account won't be disabled when
fred will not be warned, and the account won't be disabled when
the password expires.
This simply means that if fred logs in after the password expires, he
@ -1487,7 +1487,7 @@
If a user logs into a line that is listed in /etc/dialups, and his
shell is listed in the file /etc/d_passwd he will be allowed access
only by suppling the correct password.
only by supplying the correct password.
Another useful purpose for using dial-up passwords might be to setup a
line that only allows a certain type of connect (perhaps a PPP or UUCP

View File

@ -63,4 +63,3 @@ To completely disable limits for a user, a single dash (-) will do.
Also, please note that all limit settings are set PER LOGIN. They are
not global, nor are they permanent. Perhaps global limits will come, but
for now this will have to do ;)

View File

@ -37,4 +37,3 @@ New ideas to add to this list are welcome, too. --marekm
per-user configuration, to be executed with run-parts. Some hooks should
be executed at package install time for existing users, likewise for
package removal and possibly modification. (Debian Bug#36019)

View File

@ -1,4 +1,4 @@
<HEAD>
<head>
<title>shadow - Welcome</title>
</head>
<body>

View File

@ -465,7 +465,6 @@ USERGROUPS_ENAB yes
# Set to "yes" to prevent for all accounts
# Set to "superuser" to prevent for UID 0 / root (default)
# Set to "no" to not prevent for any account (dangerous, historical default)
PREVENT_NO_AUTH superuser
#

View File

@ -45,8 +45,8 @@
struct faillog {
short fail_cnt; /* failures since last success */
short fail_max; /* failures before turning account off */
char fail_line[12]; /* last failure occured here */
time_t fail_time; /* last failure occured then */
char fail_line[12]; /* last failure occurred here */
time_t fail_time; /* last failure occurred then */
/*
* If nonzero, the account will be re-enabled if there are no
* failures for fail_locktime seconds since last failure.

View File

@ -127,7 +127,7 @@ int pw_auth (const char *cipher,
#ifdef SKEY
/*
* If the user has an S/KEY entry show them the pertinent info
* and then we can try validating the created cyphertext and the SKEY.
* and then we can try validating the created ciphertext and the SKEY.
* If there is no SKEY information we default to not using SKEY.
*/

View File

@ -224,7 +224,7 @@ static const struct subordinate_range *find_range(struct commonio_db *db,
/* Get UID of the username we are looking for */
pwd = getpwnam(owner);
if (NULL == pwd) {
/* Username not defined in /etc/passwd, or error occured during lookup */
/* Username not defined in /etc/passwd, or error occurred during lookup */
return NULL;
}
owner_uid = pwd->pw_uid;
@ -847,7 +847,7 @@ static int append_uids(uid_t **uids, const char *owner, int n)
} else {
struct passwd *pwd = getpwnam(owner);
if (NULL == pwd) {
/* Username not defined in /etc/passwd, or error occured during lookup */
/* Username not defined in /etc/passwd, or error occurred during lookup */
free(*uids);
*uids = NULL;
return -1;

View File

@ -202,7 +202,7 @@ static int check_logins (const char *name, const char *maxlogins)
return 0;
}
/* Function setup_user_limits - checks/set limits for the curent login
/* Function setup_user_limits - checks/set limits for the current login
* Original idea from Joel Katz's lshell. Ported to shadow-login
* by Cristian Gafton - gafton@sorosis.ro
*

View File

@ -370,7 +370,6 @@ static struct ulong_range getulong_range(const char *str)
result.last = (unsigned long int)last;
out:
return result;
}
struct ulong_range_list_entry {

View File

@ -6,7 +6,7 @@ You should run it on a chroot, or on a secured dedicated system.
To test a Debian system:
$ mkdir sid-chroot
$ sudo debootstrap sid sid-chroot/ http://ftp.fr.debian.org/debian/
$ sudo debootstrap sid sid-chroot/ http://deb.debian.org/debian/
edit or copy a sources.list
$ sudo cp /etc/apt/sources.list sid-chroot/etc/apt/
edit or copy a resolv.conf
@ -17,5 +17,3 @@ edit or copy a resolv.conf
# aptitude update
# aptitude install expect
# cd /dev ; mknod --mode=666 /dev/ptmx c 5 2

View File

@ -51,10 +51,10 @@ echo "-: test failed"
# Empty the complete log.
> testsuite.log
find ${build_path} -name "*.gcda" -delete
find "${build_path}" -name "*.gcda" -delete
run_test ./su/01/su_root.test
run_test ./su/01/su_user.test
find ${build_path} -name "*.gcda" -exec chmod a+rw {} \;
find "${build_path}" -name "*.gcda" -exec chmod a+rw {} \;
run_test ./su/02/env_FOO-options_--login
run_test ./su/02/env_FOO-options_--login_bash
run_test ./su/02/env_FOO-options_--preserve-environment
@ -121,7 +121,7 @@ run_test ./su/11_su_sulog_failure/su.test
run_test ./su/12_su_child_failure/su.test
run_test ./su/13_su_child_success/su.test
run_test ./chage/01/run
find ${build_path} -name "*.gcda" -exec chmod a+rw {} \;
find "${build_path}" -name "*.gcda" -exec chmod a+rw {} \;
run_test ./chage/02/run
run_test ./chage/03_chsh_usage/chage.test
run_test ./chage/04_chsh_usage_invalid_option/chage.test
@ -1221,7 +1221,7 @@ run_test ./passwd/22_passwd_usage/passwd.test
run_test ./login/01_login_prompt/login.test
run_test ./login/02_login_user/login.test
run_test ./login/03_login_check_tty/login.test
find ${build_path} -name "*.gcda" -exec chmod a+rw {} \;
find "${build_path}" -name "*.gcda" -exec chmod a+rw {} \;
run_test ./subids/01_useradd_no_subids/useradd.test
run_test ./subids/02_useradd_with_subids/useradd.test
run_test ./subids/03_useradd_no_subgid/useradd.test
@ -1301,9 +1301,8 @@ echo
echo "$succeeded test(s) passed"
echo "$failed test(s) failed"
echo "log written in 'testsuite.log'"
if [ "$failed" != "0" ]
if [ "$failed" != 0 ]
then
echo "the following tests failed:"
echo $failed_tests
echo "$failed_tests"
fi

View File

@ -16,8 +16,8 @@ failed_tests=""
run_test()
{
find $build_path -name "*.gcda" -delete
find $build_path -name "*.gcno" | while read f
find "$build_path" -name "*.gcda" -delete
find "$build_path" -name "*.gcno" | while read f
do
g=${f%gcno}gcda
touch $g
@ -1320,9 +1320,8 @@ echo
echo "$succeeded test(s) passed"
echo "$failed test(s) failed"
echo "log written in 'testsuite.log'"
if [ "$failed" != "0" ]
if [ "$failed" != 0 ]
then
echo "the following tests failed:"
echo $failed_tests
echo "$failed_tests"
fi

View File

@ -51,10 +51,10 @@ echo "-: test failed"
# Empty the complete log.
> testsuite.log
find ${build_path} -name "*.gcda" -delete
find "${build_path}" -name "*.gcda" -delete
run_test ./su/01/su_root.test
run_test ./su/01/su_user.test
find ${build_path} -name "*.gcda" -exec chmod a+rw {} \;
find "${build_path}" -name "*.gcda" -exec chmod a+rw {} \;
run_test ./su/02/env_FOO-options_--login
run_test ./su/02/env_FOO-options_--login_bash
run_test ./su/02/env_FOO-options_--preserve-environment
@ -133,9 +133,8 @@ echo
echo "$succeeded test(s) passed"
echo "$failed test(s) failed"
echo "log written in 'testsuite.log'"
if [ "$failed" != "0" ]
if [ "$failed" != 0 ]
then
echo "the following tests failed:"
echo $failed_tests
echo "$failed_tests"
fi