42e72c418d
* libmisc/loginprompt.c: Prefer snprintf to sprintf, even if a small context indicates no issues.
nekral-guest
2009-04-24 22:27:58 +00:00
37eec13774
* src/faillog.c: Remove function calls from within assert().
nekral-guest
2009-04-24 22:27:09 +00:00
f28f5f3af4
* libmisc/mail.c: Ignore the return value of puts(). * libmisc/mail.c: Prefer snprintf to sprintf, even if a small context indicates no issues.
nekral-guest
2009-04-24 22:22:57 +00:00
6e357e14fc
* lib/commonio.c, lib/commonio.h, lib/groupio.c, lib/groupio.h, lib/pwio.c, lib/pwio.h, lib/shadowio.c, lib/shadowio.h: Added splint annotations. The *_locate() and *_next() functions currently return an observer. As the structure are often modified by the caller, it could maybe be changed to exposed later. (and non-const).
nekral-guest
2009-04-23 21:19:02 +00:00
d0d01ffb00
* lib/pwauth.c: Use a boolean for wipe_clear_pass and use_skey. * lib/pwauth.c: Added splint annotations. * lib/pwauth.c: Added brackets and parenthesis. * lib/pwauth.c: Avoid assignments in comparisons. * lib/pwauth.c: Avoid implicit conversion of pointers or characters to booleans.
nekral-guest
2009-04-23 20:46:01 +00:00
916977c5bb
* src/groupmod.c: Cast ID to ulongs and use ulong formats for IDs.
nekral-guest
2009-04-23 20:39:29 +00:00
af8ff8c1ca
* src/newgrp.c: Added splint annotations. * src/newgrp.c: audit_buf is only used in newgrp. Make it static. * src/newgrp.c: Ignore the return value of fputs(). * src/newgrp.c: Use exit(EXIT_FAILURE) instead of exit(1).
nekral-guest
2009-04-23 20:37:00 +00:00
3d2f164dca
* libmisc/pwdcheck.c (passwd_check): The progname is not used. * libmisc/pwdcheck.c: Ignore the return value of sleep(). * libmisc/pwdcheck.c: Use exit(EXIT_FAILURE) instead of exit(1).
nekral-guest
2009-04-23 20:17:02 +00:00
c357e94283
* libmisc/setupenv.c: Avoid assignments in comparisons. * libmisc/setupenv.c: Added brackets and parenthesis. * libmisc/setupenv.c: Ignore the return value of fclose (file opened read-only) * libmisc/setupenv.c: Ignore the return value of puts(). * libmisc/setupenv.c:Avoid implicit conversion of pointers to booleans.
nekral-guest
2009-04-23 17:45:42 +00:00
956d68c870
* libmisc/loginprompt.c: Use exit(EXIT_FAILURE) instead of exit(1). * libmisc/loginprompt.c: Avoid implicit conversion of pointers to booleans. * libmisc/loginprompt.c: Ignore return value of putc().
nekral-guest
2009-04-23 17:34:46 +00:00
61ebff6d97
* libmisc/env.c, libmisc/age.c: Added splint annotations. * libmisc/age.c: Added brackets and parenthesis. * libmisc/age.c: Ignore the return value of fclose (file opened read-only) * libmisc/age.c: Ignore puts() return value. * libmisc/age.c: Use exit(EXIT_FAILURE) instead of exit(1). * libmisc/age.c: Avoid assignments in comparisons.
nekral-guest
2009-04-23 17:33:21 +00:00
0c6159650d
* lib/get_gid.c: gidstr should not be NULL, but the check was meant to make sure it is not empty. * lib/get_uid.c: Likewise.
nekral-guest
2009-04-23 11:46:06 +00:00
7b562d96b3
* src/faillog.c: Added splint annotations. * src/faillog.c: Cast ID to ulongs and use ulong formats for IDs. * src/faillog.c: Ignore fflush() return value. * src/faillog.c: Added parenthesis.
nekral-guest
2009-04-23 11:23:53 +00:00
87e15d7b82
* src/lastlog.c: Use EXIT_FAILURE / EXIT_SUCCESS for exit() * src/lastlog.c: Added splint annotations. * src/lastlog.c: Avoid global pwent. * src/lastlog.c: Cast ID to ulongs and use ulong formats for IDs. * src/lastlog.c: Avoid assignment in comparisons. * src/lastlog.c: Ignore fclose() return value since the file is only opened for reading.
nekral-guest
2009-04-23 11:21:01 +00:00
b0db85bc04
* libmisc/find_new_gid.c: Use booleans instead of char fo used_gids. * libmisc/find_new_gid.c: Use getdef_ulong and cast to git_t to get GID values. * libmisc/find_new_gid.c: Use UL as a prefix for ulong values. * libmisc/find_new_uid.c: Likewise.
nekral-guest
2009-04-23 11:16:38 +00:00
cbd90eed74
* libmisc/yesno.c: Ignore the return value of puts.
nekral-guest
2009-04-23 11:14:56 +00:00
35f0a2e951
* libmisc/age.c: Use exit(EXIT_FAILURE) instead of exit(1). * libmisc/age.c: The return value of execl() is not used.
nekral-guest
2009-04-23 11:14:18 +00:00
614c79defc
* libmisc/xgetXXbyYY.c, libmisc/myname.c, libmisc/getgr_nam_gid.c, libmisc/salt.c, libmisc/list.c, libmisc/cleanup.c, src/login.c, lib/getdef.h, lib/groupio.c, lib/getlong.c, lib/gshadow_.h, lib/sgroupio.c, lib/shadowio.c, lib/pwio.c, lib/commonio.h, lib/fputsx.c, lib/prototypes.h: Added splint annotations. * lib/groupio.c: Avoid implicit conversion of pointers to booleans. * lib/groupio.c: Free allocated buffers in case of failure.
nekral-guest
2009-04-23 09:57:03 +00:00
620ee81b7e
* libmisc/utmp.c: Only set ut_time and ut_tv if gettimeofday() succeeds.
nekral-guest
2009-04-22 21:06:13 +00:00
e76a5df932
* libmisc/utmp.c: Fix the check for empty host in prepare_utmp() and prepare_utmpx().
nekral-guest
2009-04-22 21:04:16 +00:00
7fb1063ccd
* libmisc/utmp.c: The ut argument of prepare_utmp() might be NULL. ut_id needs to be forged in that case.
nekral-guest
2009-04-22 21:02:46 +00:00
811288df64
* libmisc/utmp.c: Removed old documentation of setutmp().
nekral-guest
2009-04-22 21:00:18 +00:00
31906409c8
* libmisc/utmp.c: Use xmalloc() rather than malloc().
nekral-guest
2009-04-22 20:59:23 +00:00
b05783da32
* libmisc/utmp.c: The name returned by ttyame() needs to be copied locally.
nekral-guest
2009-04-22 20:57:29 +00:00
c55311aa6d
* src/login.c: After login_prompt(), do not check for unset username, but for empty username.
nekral-guest
2009-04-22 20:46:49 +00:00
3704745289
* lib/defines.h: Define USER_NAME_MAX_LENGTH, based on utmp and default to 32. * libmisc/chkname.c: Use USER_NAME_MAX_LENGTH. * src/login.c: Use USER_NAME_MAX_LENGTH instead of the default 32. username also needs to be bigger than USER_NAME_MAX_LENGTH because it has to be nul-terminated.
nekral-guest
2009-04-22 20:42:48 +00:00
eae8b63d4f
* src/login.c: Use xmalloc() instead of malloc().
nekral-guest
2009-04-22 20:21:17 +00:00
349efcb0a6
* src/login.c: Ignore the return value of puts(), fputs(), strftime().
nekral-guest
2009-04-22 20:17:11 +00:00
46d697cded
* src/login.c: timeout, delay, and retries should be unsigned. * src/login.c: Ignore the return value of alarm() and sleep().
nekral-guest
2009-04-22 20:15:21 +00:00
53e0ff91d3
* src/login.c: If we cannot get the terminal configuration, do not change the terminal configuration. setup_tty() is just a best effort configuration of the terminal. * src/login.c: Ignore failures when setting the terminal configuration. * src/login.c: Fail if the ERASECHAR or KILLCHAR configurations are not compatible with a cc_t type.
nekral-guest
2009-04-22 20:12:06 +00:00
a362a68f53
* src/login.c: utent might be NULL after get_current_utmp().
nekral-guest
2009-04-22 20:07:34 +00:00
332a50c273
* src/login.c: Removed temp_shell. No more used. * src/login.c: lastlog is only used #ifndef USE_PAM * src/login.c: Rename lastlog to ll to avoid name clash with the lastlog type.
nekral-guest
2009-04-22 20:03:26 +00:00
790dbb07fc
* src/login.c: Added update_utmp() to group the prepare_utmp and setutmp (and the utmpx versions).
nekral-guest
2009-04-22 19:58:39 +00:00
f59a69f4b6
* src/login.c: Do not include netdb.h. gethostbyname() is no more called from within login.c. Also UT_ADDR does not exist anymore.
nekral-guest
2009-04-22 19:54:28 +00:00
efcbbc3d74
* src/login.c: Check if login is run with effective root privileges. This should be more helpful to users than a failure to find an utmp entry or failure to access a file.
nekral-guest
2009-04-21 22:46:01 +00:00
82c1a583f8
* libmisc/utmp.c: Reworked. Get rid of Linux specific stuff. Get rid of global utent/utxent variables. Only reuse the ut_id and maybe the ut_host fields from utmp. * lib/prototypes.h, libmisc/utmp.c: Removed checkutmp(), setutmp(), setutmpx(). * lib/prototypes.h, libmisc/utmp.c: Added get_current_utmp(), prepare_utmp(), prepare_utmpx(), setutmp(), setutmpx(). * libmisc/utmp.c (is_my_tty): Only compare the name of the utmp line with ttyname(). (No stat of the two terminals to compare the devices). * libmisc/utmp.c: Use getaddrinfo() to get the address of the host. * configure.in: Check for getaddrinfo(). * configure.in: Use AC_CHECK_MEMBERS to check for the existence of fields in the utmp/utmpx structures. * configure.in: Reject systems with utmpx support but no ut_id field in utmp. This could be fixed later if needed. * src/login.c: Use the new utmp functions. This also simplifies the failtmp() handling. * src/login.c: passwd_free() renamed to pw_free() and shadow_free() renamed to spw_free()
nekral-guest
2009-04-21 22:39:14 +00:00
fcfa81283e
* NEWS, configure.in: Enable --enable-account-tools-setuid by default for PAM builds, as it used to be before the introduction of this option.
nekral-guest
2009-04-21 22:22:08 +00:00
fba5cad820
* etc/pam.d/Makefile.am: Distribute all pam.d files, even if ACCT_TOOLS_SETUID is not enabled.
nekral-guest
2009-04-21 22:16:17 +00:00
5bdf239a66
* lib/shadowmem.c: Added spw_free(). * lib/shadowio.c: Use spw_free() for shadow_free(). * lib/groupmem.c: Added gr_free(). * lib/groupio.c: Use gr_free() for group_free(). * lib/pwmem.c: Include define.h before prototypes.h * lib/pwmem.c: Added pw_free(). * lib/pwio.c: Use pw_free() for passwd_free(). * lib/sgroupio.c: Added sgr_free(). * lib/sgroupio.c: Use sgr_free() for gshadow_free(). * lib/prototypes.h: Added gr_free(), pw_free(), sgr_free(), spw_free().
nekral-guest
2009-04-21 22:14:10 +00:00
408a30f0ba
* libmisc/shell.c: Add brackets and parenthesis. * libmisc/shell.c: Avoid assignments in comparisons. * libmisc/shell.c: Re-indent.
nekral-guest
2009-04-21 22:07:35 +00:00
c8f45eda53
* lib/defines.h: Added MIN and MAX macros. * libmisc/salt.c: Removed MIN and MAX macros.
nekral-guest
2009-04-21 22:06:09 +00:00
2ba18ea4a9
Fix typo ( ) and fix a compilation warning (wrong const).
nekral-guest
2009-04-21 22:03:33 +00:00
18fdfee274
* src/login.c: Get rid of pwent. pwd is sufficient as long as it is always coming from xgetpwnam. There is no need to copy pwd to pwent, this was not a good idea anyway as the strings from pwd were not duplicated. * src/login.c: Always free the pwd and spwd structure when we retrieve a new one. This will clear the password of the previous user from the memory. * src/login.c: user_passwd is used to keep point to the password of the user being authenticated. * src/login.c: (non PAM) Fail if the user's entry cannot be found after the user updated her password (if expire() requested an update). * src/login.c: If the user does not exist on the system, there is no need to build a pwd structure (with shell).
nekral-guest
2009-04-20 13:29:15 +00:00
a6ac4dda75
* src/login.c: ttytype already checks for TTYTYPE_FILE and TERM. Just call ttytype.
nekral-guest
2009-04-20 13:12:09 +00:00
c694843da5
* src/login.c: Open the PAM session before pam_setcred and before initgroups. This is more consistent with rfc86.0.
nekral-guest
2009-04-20 12:54:17 +00:00
70e1a5c9b6
* src/login.c: Added parameter to check_nologin. This will help getting rid of the global pwent variable.
nekral-guest
2009-04-20 12:33:01 +00:00
61c1d100dc
* src/login.c: Added comments. * src/login.c: Close the user and group files before dropping root privileges.
nekral-guest
2009-04-20 12:27:27 +00:00
3508f7dccc
* src/login.c: We do not need to keep the old umask. Discard the umask() return value.
nekral-guest
2009-04-20 12:17:38 +00:00
d4158bdf77
* src/login.c: We do not need to keep the old umask. Discard the umask() return value.
nekral-guest
2009-04-20 12:16:07 +00:00
1bcf2ffb59
* libmisc/hushed.c, lib/prototypes.h, src/login.c: Change the hushed() prototype to take a username instead of a passwd structure in argument. The passwd entry is retrieved withing hushed().
nekral-guest
2009-04-20 11:48:59 +00:00
22fbd774dc
* libmisc/failure.h, libmisc/failure.c, src/login.c: Added username as first parameter of failtmp to avoid issues with non-null terminated ut_user, unavailability of ut_user, incomplete username (that should not happen currently).
nekral-guest
2009-04-20 11:39:16 +00:00
a87e747049
* libmisc/failure.h, libmisc/failure.c, src/login.c: Added username as first parameter of failtmp to avoid issues with non-null terminated ut_user, unavailability of ut_user, incomplete username (that should not happen currently).
nekral-guest
2009-04-20 11:37:41 +00:00
f3bea401e9
* libmisc/ttytype.c: Add brackets and parenthesis. * libmisc/ttytype.c: Avoid assignments in comparisons.
nekral-guest
2009-04-20 11:31:05 +00:00
2ce68e8aec
* lib/pwio.c, lib/shadowio.c, lib/groupio.c, lib/sgroupio.c: Fill the password fields with zeros before they are freed.
nekral-guest
2009-04-20 11:29:17 +00:00
bf66861e3f
* po/ko.po: Updated Korean translation.
nekral-guest
2009-04-19 16:26:17 +00:00
131e95ffaf
* NEWS, src/login.c: Also check if the authentication token of the user has to be updated in case the user was already authenticated.
nekral-guest
2009-04-19 16:22:17 +00:00
ca10b825c7
* src/login.c: fflg is already restricted to root. Move pam_acct_mgmt(), in case of fflg, earlier. This is equivalent and simplifies the code.
nekral-guest
2009-04-19 16:09:00 +00:00
2ed05e548b
* libmisc/utmp.c: Always call endutent or endutxent when setutent or setutxent were used.
nekral-guest
2009-04-19 15:28:38 +00:00
8156c3b0be
* src/login.c: Added comment to make sure PAM_RHOST or PAM_TTY do not get set to unsanitized values.
nekral-guest
2009-04-19 13:33:24 +00:00
d2a822fe39
* libmisc/utmp.c: Do not trust the current utmp entry's ut_line. Always set ut_line based on ttyname(0).
nekral-guest
2009-04-17 21:25:30 +00:00
5298ac3dd9
* NEWS, src/login.c: Do not trust the current utmp entry's ut_line to set PAM_TTY.
nekral-guest
2009-04-17 20:40:26 +00:00
239bb04b18
Fixed nb.po format and added info about the update.
nekral-guest
2009-04-15 21:29:00 +00:00
4d2bee2e23
* NEWS, src/userdel.c: Fixed SE Linux support. semanage should be called at the end. * src/useradd.c: Always call selinux_update_mapping() (i.e. semanage), not only when -Z is used.
nekral-guest
2009-04-15 21:14:08 +00:00
70d9bc6233
libmisc/system.c was contributed by Dan Walsh.
nekral-guest
2009-04-15 17:42:34 +00:00
5fa86c2b42
* NEW, src/vipw.c: SE Linux: Set the default context to the context of the file being edited. This ensures that the backup file inherit from the file's context.
nekral-guest
2009-04-15 17:42:27 +00:00
02cfa1e96e
Added tests for IDs set to -1 long username for gpasswd and system users with newusers.
nekral-guest
2009-04-14 22:26:30 +00:00
a8586cbce7
Added one TODO item for usermod.
nekral-guest
2009-04-14 22:19:17 +00:00
acc3423c96
* man/usermod.8.xml: There are no default values for --inactive and --gid. If the options are no provided, the original values are not changed.
nekral-guest
2009-04-14 22:19:11 +00:00