nekral-guest
bb00d1630a
* src/lastlog.c: Replace atoi() by getulong().
2009-04-28 19:25:15 +00:00
nekral-guest
a5188d2f05
* libmisc/failure.h: Replace HAVE_UTMPX_H by USE_UTMPX.
2009-04-28 19:19:33 +00:00
nekral-guest
6547cbda6f
* libmisc/rlogin.c: Replace atoi() by getulong().
2009-04-28 19:17:21 +00:00
nekral-guest
79919f184c
* libmisc/failure.c: Replace HAVE_UTMPX_H by USE_UTMPX.
2009-04-28 19:14:50 +00:00
nekral-guest
e6b23e1431
* libmisc/chkname.c: Do not include <utmp.h> and <utmpx.h>. There
...
are no more needed.
2009-04-28 19:14:05 +00:00
nekral-guest
b0c0a94c66
* libmisc/limits.c: Replace strtol() by getlong().
...
* libmisc/limits.c: Replace HAVE_UTMPX_H by USE_UTMPX.
2009-04-28 19:12:48 +00:00
nekral-guest
76b51939aa
* man/groupmod.8.xml, man/usermod.8.xml, man/groupadd.8.xml,
...
man/useradd.8.xml: Added note to warn about insecurity in using
--password.
* man/groupmod.8.xml: Removed not regarding default if --password
is not used. This was a cut&paste from groupadd.8.xml.
* man/passwd.1.xml: Split some paragraphs.
* man/passwd.1.xml: Recommend other encryption methods than DES.
2009-04-27 20:29:43 +00:00
nekral-guest
91fc51387c
* src/login.c: Move update_utmp() after the PID or session ID
...
changed in order to get more accurate data in UTMP. This also
fixes "exec login" when login in installed setuid.
2009-04-27 20:25:23 +00:00
nekral-guest
009125484e
* src/login.c: Reuse a string and avoid an untranslated message
...
"Login incorrect".
2009-04-27 20:21:48 +00:00
nekral-guest
8112a12521
* src/login.c: Replace HAVE_UTMPX_H by USE_UTMPX.
...
* src/login.c: Avoid name clash between global variables and the
update_utmp() arguments.
2009-04-27 20:20:37 +00:00
nekral-guest
69307a1f2b
* src/groupadd.c, lib/commonio.c, lib/groupio.c: Added missing
...
include of <assert.h>
2009-04-27 20:18:00 +00:00
nekral-guest
e68e07d095
* src/groupadd.c: Added missing include of <assert.h>
2009-04-27 20:16:04 +00:00
nekral-guest
851245107d
* lib/prototypes.h: Replace HAVE_UTMPX_H by USE_UTMPX.
...
* lib/prototypes.h, libmisc/log.c: Added splint annotations.
* libmisc/log.c: Added SYSLOG warning when lseek fails (should not
happen).
2009-04-27 20:15:09 +00:00
nekral-guest
e88d1f5803
* libmisc/mail.c, libmisc/copydir.c: Added missing include of
...
<assert.h>
2009-04-27 20:09:18 +00:00
nekral-guest
988f7334ad
* libmisc/env.c: Added assertions on the snprintf results.
2009-04-27 20:07:59 +00:00
nekral-guest
80fd2969c9
* libmisc/utmp.c: Replace HAVE_UTMPX_H by USE_UTMPX.
...
* libmisc/utmp.c: Removed old comment on HAVE_STRUCT_UTMP_UT_ID
and UTMPX support.
2009-04-27 20:06:25 +00:00
nekral-guest
13b74243a6
* NEWS, configure.in: Added configure option --enable-utmpx,
...
disabled by default. This defines USE_UTMPX, which should be used
instead of HAVE_UTMPX_H.
2009-04-27 20:03:48 +00:00
nekral-guest
c7035dbe9c
* man/po/fr.po: Fix typo.
2009-04-27 19:56:34 +00:00
nekral-guest
8f78169a52
* src/newgrp.c: Close the databases before changing the UDI and
...
GID.
2009-04-26 17:11:38 +00:00
nekral-guest
5766499b85
* libmisc/myname.c: Updated splint annotations.
2009-04-26 17:10:49 +00:00
nekral-guest
4fd672c5b9
* lib/commonio.c: Added splint annotations.
...
* lib/commonio.c: old_context should be local to commonio_close(),
not global.
2009-04-26 16:48:51 +00:00
nekral-guest
fca3b5cdc9
* src/passwd.c: Do not freecon strings duplicated with strdup.
...
Also avoid allocation of memory.
* src/passwd.c: Use SYSLOG instead of syslog.
2009-04-26 16:44:54 +00:00
bubulle
8fa9bedcf7
Updated Czech translation
2009-04-26 12:26:10 +00:00
nekral-guest
71f7f777ec
* lib/commonio.c: Do not assumes eptr is always notnull.
...
Updated splint annotations.
2009-04-25 13:41:52 +00:00
nekral-guest
4c1d96e8e0
* lib/commonio.h, lib/commonio.c: Added splint annotations.
2009-04-25 12:43:27 +00:00
nekral-guest
f9bd143012
* NEWS, po/pt.po: Updated Portuguese translation.
2009-04-25 11:06:35 +00:00
nekral-guest
98e42fa944
* libmisc/copydir.c: Added splint annotations.
...
* libmisc/copydir.c: Added assert to help splint.
* libmisc/copydir.c: Free allocated structures in cas of failure.
* libmisc/copydir.c: Avoid implicit conversion of pointers to
booleans.
* libmisc/copydir.c: Use buffers of size PATH_MAX instead of 1024
for filenames.
* libmisc/copydir.c: Use fchmod and fchown to change the mode of
the opened file.
* libmisc/copydir.c: Indicate the mode to open(), even if we chmod
later.
2009-04-24 23:41:28 +00:00
nekral-guest
ab6c366668
* lib/prototypes.h: Added prototypes of getulong() and get_pid().
...
* lib/prototypes.h: Added splint annotations.
2009-04-24 23:35:57 +00:00
nekral-guest
fc656ad7bd
* lib/commonio.c: Use get_pid() instead of strtol.
...
* lib/commonio.c: Replace an int by a size_t.
2009-04-24 23:35:01 +00:00
nekral-guest
1353c71054
* lib/commonio.h: Added splint annotations.
2009-04-24 23:33:47 +00:00
nekral-guest
566fbac1ef
* lib/sgroupio.c: Free allocated structures on failure.
...
* lib/sgroupio.c: Added splint annotations.
2009-04-24 23:32:52 +00:00
nekral-guest
496002abc9
* lib/Makefile.am, lib/get_pid.c, lib/getulong.c: Added get_pid()
...
and getulong().
2009-04-24 23:28:15 +00:00
nekral-guest
e8dd48ac09
* lib/getlong.c: Do not check for NULL string but empty string.
2009-04-24 23:27:12 +00:00
nekral-guest
08b4253001
* lib/groupio.c: Updated splint annotations.
...
* lib/groupio.c: Added assert to help splint.
2009-04-24 23:26:31 +00:00
nekral-guest
1a87c69854
* src/useradd.c: Check assumptions on snprintf().
...
* src/useradd.c: Replace peror by an strerror and avoid an
intermediate buffer.
* src/useradd.c: Save errno between the failure and the report by
perror/strerror.
* src/useradd.c: Prefer xmalloc to malloc.
2009-04-24 23:23:51 +00:00
nekral-guest
861773bf77
* src/lastlog.c: Remove function calls from within assert().
2009-04-24 23:05:29 +00:00
nekral-guest
01e88bda16
* libmisc/obscure.c: Change some int to size_t.
2009-04-24 23:04:27 +00:00
nekral-guest
5e45ac1688
* libmisc/console.c: Use a less disturbing construct for splint.
2009-04-24 23:03:14 +00:00
nekral-guest
10396f9536
* libmisc/limits.c: Parse the limits, umask, nice, maxlogin, file
...
limit with getlog() / getulong(). This also means, in case of
non-PAM enabled systems, that the umask specified on the GECOS
fields should start with a 0 if specified in octal. (it used to be
force to octal). Do the appropriate cast and range checking.
2009-04-24 22:56:42 +00:00
nekral-guest
0c571784a3
* libmisc/salt.c: In case gettimeofday() fails, get some entropy
...
from the PID.
2009-04-24 22:49:20 +00:00
nekral-guest
7646230de2
* libmisc/setupenv.c: Prefer snprintf to sprintf, even if a small
...
context indicates no issues.
* libmisc/setupenv.c: Avoid implicit conversion of pointers to
booleans.
2009-04-24 22:46:06 +00:00
nekral-guest
42e72c418d
* libmisc/loginprompt.c: Prefer snprintf to sprintf, even if a
...
small context indicates no issues.
2009-04-24 22:27:58 +00:00
nekral-guest
37eec13774
* src/faillog.c: Remove function calls from within assert().
2009-04-24 22:27:09 +00:00
nekral-guest
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.
2009-04-24 22:22:57 +00:00
nekral-guest
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).
2009-04-23 21:19:02 +00:00
nekral-guest
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.
2009-04-23 20:46:01 +00:00
nekral-guest
916977c5bb
* src/groupmod.c: Cast ID to ulongs and use ulong formats for IDs.
2009-04-23 20:39:29 +00:00
nekral-guest
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).
2009-04-23 20:37:00 +00:00
nekral-guest
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).
2009-04-23 20:17:02 +00:00
nekral-guest
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.
2009-04-23 17:45:42 +00:00
nekral-guest
7f165aab7f
* libmisc/find_new_gid.c, libmisc/find_new_uid.c,
...
libmisc/isexpired.c, src/groupadd.c, lib/pwauth.h, lib/groupmem.c,
lib/shadowmem.c, lib/pwmem.c, lib/prototypes.h: Added splint
annotations.
2009-04-23 17:43:27 +00:00
nekral-guest
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().
2009-04-23 17:34:46 +00:00
nekral-guest
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.
2009-04-23 17:33:21 +00:00
nekral-guest
0b1397b33b
* lib/fputsx.c, lib/gshadow.c, lib/commonio.h: Added splint
...
annotations.
2009-04-23 11:54:30 +00:00
nekral-guest
a121b9b659
* lib/gshadow.c, lib/commonio.h: Added splint annotations.
2009-04-23 11:53:55 +00:00
nekral-guest
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.
2009-04-23 11:46:06 +00:00
nekral-guest
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.
2009-04-23 11:23:53 +00:00
nekral-guest
988ec76cf8
* src/grpck.c: Ignore puts return value.
...
* src/grpck.c: Avoid variable format string.
2009-04-23 11:21:57 +00:00
nekral-guest
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.
2009-04-23 11:21:01 +00:00
nekral-guest
77c1b2a369
* src/newgrp.c: Added assertion to guide splint (and me).
2009-04-23 11:17:22 +00:00
nekral-guest
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.
2009-04-23 11:16:38 +00:00
nekral-guest
cbd90eed74
* libmisc/yesno.c: Ignore the return value of puts.
2009-04-23 11:14:56 +00:00
nekral-guest
35f0a2e951
* libmisc/age.c: Use exit(EXIT_FAILURE) instead of exit(1).
...
* libmisc/age.c: The return value of execl() is not used.
2009-04-23 11:14:18 +00:00
nekral-guest
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.
2009-04-23 09:57:03 +00:00
nekral-guest
fe29344b33
* lib/defines.h: Added splint definitions to replace <locale.h>
2009-04-22 21:22:32 +00:00
nekral-guest
2c0f3ef707
* libmisc/utmp.c, libmisc/age.c, libmisc/shell.c, lib/groupio.c,
...
lib/groupio.h, lib/sgroupio.c, lib/sgroupio.h, lib/shadowio.c,
lib/pwio.c, lib/commonio.c, lib/shadowio.h, lib/pwio.h,
lib/commonio.h, lib/prototypes.h: Added splint annotations.
2009-04-22 21:21:14 +00:00
nekral-guest
aebddca35d
* libmisc/utmp.c: Added splint annotations.
2009-04-22 21:07:33 +00:00
nekral-guest
620ee81b7e
* libmisc/utmp.c: Only set ut_time and ut_tv if gettimeofday()
...
succeeds.
2009-04-22 21:06:13 +00:00
nekral-guest
e76a5df932
* libmisc/utmp.c: Fix the check for empty host in prepare_utmp()
...
and prepare_utmpx().
2009-04-22 21:04:16 +00:00
nekral-guest
7fb1063ccd
* libmisc/utmp.c: The ut argument of prepare_utmp() might be NULL.
...
ut_id needs to be forged in that case.
2009-04-22 21:02:46 +00:00
nekral-guest
811288df64
* libmisc/utmp.c: Removed old documentation of setutmp().
2009-04-22 21:00:18 +00:00
nekral-guest
31906409c8
* libmisc/utmp.c: Use xmalloc() rather than malloc().
2009-04-22 20:59:23 +00:00
nekral-guest
b05783da32
* libmisc/utmp.c: The name returned by ttyame() needs to be copied
...
locally.
2009-04-22 20:57:29 +00:00
nekral-guest
54302f6006
* src/login.c: Added splint annotations.
2009-04-22 20:53:15 +00:00
nekral-guest
2a32262725
* src/login.c: Added assert()s for NULL (or ! NULL) username, and
...
pwd. This helps splint.
2009-04-22 20:51:13 +00:00
nekral-guest
c55311aa6d
* src/login.c: After login_prompt(), do not check for unset
...
username, but for empty username.
2009-04-22 20:46:49 +00:00
nekral-guest
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.
2009-04-22 20:42:48 +00:00
nekral-guest
eae8b63d4f
* src/login.c: Use xmalloc() instead of malloc().
2009-04-22 20:21:17 +00:00
nekral-guest
349efcb0a6
* src/login.c: Ignore the return value of puts(), fputs(),
...
strftime().
2009-04-22 20:17:11 +00:00
nekral-guest
46d697cded
* src/login.c: timeout, delay, and retries should be unsigned.
...
* src/login.c: Ignore the return value of alarm() and sleep().
2009-04-22 20:15:21 +00:00
nekral-guest
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.
2009-04-22 20:12:06 +00:00
nekral-guest
a362a68f53
* src/login.c: utent might be NULL after get_current_utmp().
2009-04-22 20:07:34 +00:00
nekral-guest
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.
2009-04-22 20:03:26 +00:00
nekral-guest
790dbb07fc
* src/login.c: Added update_utmp() to group the prepare_utmp and
...
setutmp (and the utmpx versions).
2009-04-22 19:58:39 +00:00
nekral-guest
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.
2009-04-22 19:54:28 +00:00
nekral-guest
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.
2009-04-21 22:46:01 +00:00
nekral-guest
a0503bc3a1
Added previous commit changelog.
2009-04-21 22:39:52 +00:00
nekral-guest
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.
2009-04-21 22:22:08 +00:00
nekral-guest
fba5cad820
* etc/pam.d/Makefile.am: Distribute all pam.d files, even if
...
ACCT_TOOLS_SETUID is not enabled.
2009-04-21 22:16:17 +00:00
nekral-guest
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().
2009-04-21 22:14:10 +00:00
nekral-guest
408a30f0ba
* libmisc/shell.c: Add brackets and parenthesis.
...
* libmisc/shell.c: Avoid assignments in comparisons.
* libmisc/shell.c: Re-indent.
2009-04-21 22:07:35 +00:00
nekral-guest
c8f45eda53
* lib/defines.h: Added MIN and MAX macros.
...
* libmisc/salt.c: Removed MIN and MAX macros.
2009-04-21 22:06:09 +00:00
nekral-guest
5ad0d896f1
Added more comments to the changelog entry.
2009-04-20 14:06:06 +00:00
nekral-guest
9efd6a53d2
* NEWS, src/lastlog.c: Fix regression causing empty reports.
2009-04-20 14:04:48 +00:00
nekral-guest
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).
2009-04-20 13:29:15 +00:00
nekral-guest
a6ac4dda75
* src/login.c: ttytype already checks for TTYTYPE_FILE and TERM.
...
Just call ttytype.
2009-04-20 13:12:09 +00:00
nekral-guest
c694843da5
* src/login.c: Open the PAM session before pam_setcred and before
...
initgroups. This is more consistent with rfc86.0.
2009-04-20 12:54:17 +00:00
nekral-guest
432faba3e1
* src/login.c: Added helper functions get_pam_user() and
...
get_failent_user().
2009-04-20 12:47:04 +00:00
nekral-guest
70e1a5c9b6
* src/login.c: Added parameter to check_nologin. This will help
...
getting rid of the global pwent variable.
2009-04-20 12:33:01 +00:00
nekral-guest
61c1d100dc
* src/login.c: Added comments.
...
* src/login.c: Close the user and group files before dropping root
privileges.
2009-04-20 12:27:27 +00:00