nekral-guest
67b9c423fe
Avoid variables with the name of a type.
2007-12-29 14:52:35 +00:00
nekral-guest
b040f047fd
Avoid assignments in comparisons.
2007-12-29 14:48:33 +00:00
nekral-guest
8c4efbb8ce
Avoid implicit brackets and re-indent.
2007-12-29 14:34:39 +00:00
nekral-guest
9923513271
Before pam_end(), the return value of the previous
...
pam API was already checked. No need to validate it again.
2007-12-29 14:17:06 +00:00
nekral-guest
60a422b284
newusers cleanups
...
main() split in new functions: process_flags(), check_flags(), check_perms(),
open_files(), and close_files().
2007-12-29 14:11:54 +00:00
nekral-guest
3c890a55d8
Avoid assignments in comparisons.
2007-12-29 11:34:31 +00:00
nekral-guest
a7cbfedc85
* Avoid implicit brackets.
...
* Avoid implicit conversion to booleans.
2007-12-29 11:06:35 +00:00
nekral-guest
2d771a97b7
Remove dead code. It was probably put here to add more
...
information to the audit_logger.
2007-12-29 10:50:03 +00:00
nekral-guest
6ca79a36b0
Avoid using a variable with the same name as a type.
2007-12-29 10:47:04 +00:00
nekral-guest
388dcee3e4
chage cleanups
...
* src/chage.c: Before pam_end(), the return value of the previous
pam API was already checked. No need to validate it again.
* src/chage.c: main() split in new functions: process_flags(),
check_flags(), check_perms(), open_files(), and close_files().
2007-12-29 10:42:25 +00:00
nekral-guest
8563319b8b
* src/chgpasswd.c: Avoid assignments in comparisons.
...
* src/chgpasswd.c: Avoid implicit brackets.
* src/chgpasswd.c: Fix comments to match chgpasswd (group instead of
user's passwords are changed).
Fix the previous ChangeLog entries regarding chgpasswd.
2007-12-28 23:14:59 +00:00
nekral-guest
28cd038c35
Same changes as for chpasswd:
...
* src/chpasswd.c: main() split in process_flags(), check_flags(),
check_perms(), open_files(), and close_files().
2007-12-28 22:54:35 +00:00
nekral-guest
8dc959ea1f
Avoid implicit brackets.
2007-12-28 22:34:14 +00:00
nekral-guest
908e2cbcc7
Avoid assignments in comparisons.
2007-12-28 22:24:02 +00:00
nekral-guest
b9eec1ea49
Other new functions: open_files(), close_files().
...
This force flushing the password database after the password file is unlocked.
2007-12-28 22:18:55 +00:00
nekral-guest
566b357f99
New functions: process_flags(), check_flags(),
...
check_perms(). Split out of main().
2007-12-28 22:05:51 +00:00
nekral-guest
dc1dccd9e2
Before pam_end(), the return value of the previous
...
pam API was already checked. No need to validate it again.
2007-12-28 21:29:06 +00:00
nekral-guest
8dc4ca297c
New function check_flags(). Split the validation of
...
options and arguments out of process_flags.
2007-12-28 21:04:04 +00:00
nekral-guest
605a338216
(main, check_perms): New function check_perms().
...
Split the validation of the user's permissions out of main()
2007-12-28 20:46:24 +00:00
nekral-guest
6d09b4ce4d
(main): Before pam_end(), the return value of the previous pam API was already
...
checked. No need to validate it again.
2007-12-28 20:40:59 +00:00
nekral-guest
ffa34c5afd
(process_flags): prefer fail_exit to exit. This avoid
...
an explicit call to audit_logger().
2007-12-28 19:15:14 +00:00
nekral-guest
b4f6b853f8
* process_args renamed process_flags
...
* Add the options checks in process_flags (group_name, group ID uniqueness)
* Add the parameters' names in the prototypes.
2007-12-28 11:22:27 +00:00
nekral-guest
cc1f6c10be
Split the processing of options out of main().
2007-12-28 10:41:22 +00:00
nekral-guest
08e09354b2
find_new_gid is never called when an
...
GID is specified with -g. Simplify find_new_gid accordingly.
2007-12-28 10:30:39 +00:00
nekral-guest
0b6b9fe090
typo cleared/clearer
2007-12-28 10:20:02 +00:00
nekral-guest
83b546beef
(find_new_gid): If oflg is set, gflg is also set.
...
Use (!gflg), which is cleared than (!gflg || !oflg).
2007-12-28 10:19:21 +00:00
nekral-guest
b4071939e0
A group with the specified name cannot exist at that time in find_new_gid.
...
Remove the check.
2007-12-28 10:15:42 +00:00
nekral-guest
0a4424ef00
Avoid implict brackets.
2007-12-28 10:12:09 +00:00
nekral-guest
18a654d13b
When compiled without AUDIT support, if the return code was E_SUCCESS,
...
fail_exit() wouldn't have exited. Fix the scope of #idef WITH_AUDIT.
2007-12-28 09:39:22 +00:00
nekral-guest
6987e6f12a
Avoid implicit conversions to booleans.
2007-12-28 00:03:26 +00:00
nekral-guest
7f5a4e15c6
Avoid implicit brackets.
2007-12-27 23:40:00 +00:00
nekral-guest
6bc43fea06
Document selinux_file_context.
2007-12-27 23:32:47 +00:00
nekral-guest
cc4b37f65c
Avoid assignment in comparisons.
2007-12-27 23:30:36 +00:00
nekral-guest
dfb6416a5b
libmisc/copydir.c cleanup
...
* libmisc/copydir.c: Split copy_tree() in more maintainable functions:
copy_entry(), copy_dir(), copy_symlink(), copy_hardlink(),
copy_special(), and copy_file().
* libmisc/copydir.c: -1 is used to indicate an error, directly set err
to -1, instead of incrementing it, and checking if not nul at the
end.
2007-12-27 23:23:51 +00:00
nekral-guest
bfa8ef3e75
Avoid implicit conversions to booleans.
2007-12-27 21:56:45 +00:00
nekral-guest
b58df6280d
Avoid assignment in comparisons.
2007-12-27 21:43:29 +00:00
nekral-guest
a77eb6b49d
Avoid implicit brackets.
2007-12-27 21:28:50 +00:00
nekral-guest
c919701466
Simplify gpasswd's main():
...
Also split check_flags() out of main().
2007-12-27 21:19:57 +00:00
nekral-guest
c81bf3e06f
Simplify gpasswd's main():
...
Split also get_group() and change_passwd() out of main().
2007-12-27 21:04:22 +00:00
nekral-guest
586181bf71
Simplify gpasswd's main():
...
New function: check_perms(). Split out of main() to simplify main().
2007-12-27 19:08:31 +00:00
nekral-guest
55d581d041
Simplify gpasswd's main():
...
New functions: open_files(), close_files(), update_group(). Split out
from main() to simplify this (too) big function.
2007-12-27 18:52:40 +00:00
nekral-guest
f429f3e38d
Simplify gpasswd's main():
...
New function: process_flags(). Split the processing of options out of main().
2007-12-27 18:27:57 +00:00
nekral-guest
7b05484494
gpasswd cleanup
...
* src/gpasswd.c: Add argument name to the internal function
prototypes.
* src/gpasswd.c: Document global variables.
2007-12-27 17:36:08 +00:00
nekral-guest
5714adb090
Recommend editing the shadowed (resp. regular) file if the regular (resp.
...
shadowed) file was edited.
2007-12-26 23:43:55 +00:00
nekral-guest
ac7693ef7b
End of the previous changelog entry...
2007-12-26 23:17:27 +00:00
nekral-guest
5cbc86b7d9
Merge Debian's patch 451_login_PATH
...
* NEWS, libmisc/setupenv.c: Export PATH according to ENV_PATH and
ENV_SUPATH, as for su. This impacts login.
* man/login.1.xml: PATH and SUPATH are now used both when PAM support
is disabled and enabled.
2007-12-26 23:15:43 +00:00
nekral-guest
b44a6c316d
If started as init, login and sulogin need to start a new session.
2007-12-26 22:36:54 +00:00
nekral-guest
f5461ff01e
Merge Debian's patch 408_passwd_check_arguments
...
* NEWS, src/passwd.c: Make sure that no more than one username
argument was provided.
2007-12-26 22:17:13 +00:00
nekral-guest
3a48f0954c
Merge Debian's patch 412_lastlog_-u_numerical_range
...
* NEWS, src/lastlog.c, man/lastlog.8.xml: Accept numerical user, or
ranges with the -u option.
* TODO: The same change should be done on faillog.
2007-12-26 21:54:04 +00:00
nekral-guest
fd970ab62c
Merge Debian's patch 466_fflush-prompt
...
* libmisc/Makefile.am, lib/prototypes.h, libmisc/yesno.c, src/grpck.c,
src/pwck.c: move yes_or_no() from grpck/pwck to a separate
libmisc/yesno.c (with a read_only argument).
* libmisc/fields.c, libmisc/yesno.c: Make sure stdout is flushed before
reading the user's answer.
2007-12-26 16:50:38 +00:00