nekral-guest
8dc959ea1f
Avoid implicit brackets.
2007-12-28 22:34:14 +00:00
nekral-guest
f54464bcf6
Re-indent.
2007-12-28 22:31:45 +00:00
nekral-guest
05651a338e
Re-indent.
2007-12-28 22:30:02 +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
147c37789a
Re-indent.
2007-12-28 20:35:05 +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
da37da30e1
I forgot the initialization of group_id in find_new_gid().
2007-12-28 19:08:33 +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
b8650378c1
Document the new functions.
2007-12-28 00:35:41 +00:00
nekral-guest
9a9a9c0414
Other cleanups and documentation.
...
Do the checks, then build the filenames. Do not mix both.
2007-12-28 00:23:33 +00:00
nekral-guest
523392dc0b
Stop at the first error.
2007-12-28 00:08:16 +00:00
nekral-guest
ed1dd1bb99
Avoid assignement in comparison.
2007-12-28 00:04:46 +00:00
nekral-guest
6987e6f12a
Avoid implicit conversions to booleans.
2007-12-28 00:03:26 +00:00
nekral-guest
9c79c77de4
Avoid implicit casts.
2007-12-27 23:41:36 +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
641d73ab83
Document check_list's return value.
2007-12-27 21:30:12 +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
b77cef01a9
Re-indent.
2007-12-26 21:56:47 +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
nekral-guest
e663c696c2
su's arguments are now reordered. If needed, use -- to separate su's
...
options from the shell's options.
2007-12-26 15:10:48 +00:00