Age | Commit message (Collapse) | Author | Files | Lines |
|
Oracle Parfait static analyser points out it wasn't clear if cast or
arithmetic operation in arguments at lines 410, 416, 431, & 433 was
intended to be done first, so we'll make it explicit.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Found by using:
codespell --builtin clear,rare,usage,informal,code,names
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
A new 'inpColor' resource is added for that.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
"Use -no-undefined to assure libtool that the library has no unresolved symbols
at link time, so that libtool will build a shared library on platforms that
require that all symbols are resolved when the library is linked."
With a recent libtool (since 2.4.5 or so), "can't build <target> shared library
unless -no-undefined is specified" is an error, rather than a warning, if
./configure'd --enable-shared.
http://tinderbox.x.org/builds/2015-02-22-0009/logs/app-xdm/#build
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
|
|
Fixes clang warning:
format specifies type 'int' but the argument has type 'unsigned long'
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Starting with glibc 2.17 (eglibc 2.17), crypt() fails with EINVAL
(w/ NULL return) if the salt violates specifications. Additionally,
on FIPS-140 enabled Linux systems, DES/MD5-encrypted passwords
passed to crypt() fail with EPERM (w/ NULL return).
If using glibc's crypt(), check return value to avoid a possible
NULL pointer dereference.
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Notes:
Fixes CVE-2013-2179
|
|
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
|
|
XmuCvtStringToXftColor uses XRenderParseColor, so require xrender for
the xft option, and link against it.
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Can't fix all the warnings, due to the Xt API, but can fix a bunch.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Performed with:
find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
find * -type f | xargs perl -i -p -e 's{^[ ]+\t}{\t}'
git diff -w & git diff -b show no diffs from this change
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Relies on username going out of scope to discard the pointer returned by
pam_get_item that pam_end frees at the bottom of the loop.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
The first time a failed login message was syslogged it had the right
username, but subsequent ones kept reusing that pointer, even though
PAM had freed it and it may have been reused and filled with something
else, resulting in garbage user names for the later login failures.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Assign allow_null_passwd and allow_root_login variables' values before call to
pam_authenticate()
https://bugs.freedesktop.org/show_bug.cgi?id=13455
Based on a fix suggested by: Tim Shumakov <ars_1@mail.ru>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
|
|
Solaris PAM & auditing insist this is a device file that can be found in
the filesystem, so we can't use the display name (":0") like we've
been doing (and continue to do on other OS'es).
Fixes Solaris bug 6960231:
xdm login fails with: pam_unix_cred: cannot load ttyname with c2audit loaded
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Refactor code assuming compiler is smart enough to optimize out any
that reduce to + 0 or - 0 if building without XPM defined.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Regression introduced by f8585c60831a8e5ddebce18bdd7e78d217a822c5
broke bounds checking for text displayed in input fields.
Since this makes each TEXT_WIDTH value only be used once, just use
them directly instead of storing the result in a variable.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Stop hardcoding it to '*'. Allows setting a resource with no value to
to advance the cursor without drawing text (as was previously the default).
Resolves https://bugs.freedesktop.org/show_bug.cgi?id=32794
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
The Realize function names one of its arguments valueMask, and the
valueMask variable in the inner scope is just used as a static set
of mask flags, so just pass them directly to the function to reduce
confusion and clear the gcc -Wshadow warning:
Login.c: In function `Realize':
Login.c:1901: warning: declaration of 'valueMask' shadows a parameter
Login.c:1871: warning: shadowed declaration is here
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Resolves these warnings from gcc -Wshadow:
greet.c: In function `InitGreet':
greet.c:244: warning: declaration of 'dpy' shadows a global declaration
greet.c:146: warning: shadowed declaration is here
greet.c: In function `CloseGreet':
greet.c:326: warning: declaration of 'dpy' shadows a global declaration
greet.c:146: warning: shadowed declaration is here
greet.c: At top level:
greet.c:431: warning: declaration of 'dpy' shadows a global declaration
greet.c:146: warning: shadowed declaration is here
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
|
|
They provide interfaces to multiple executables
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
Using AC_CHECK_FUNCS defines HAVE_xxx macro in config.h following
a consistent naming convention.
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
It does not depend on module configuration.
It should not mixed with flags required by dependencies.
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
There is no evidence that the static version is needed since monolith
as hinted by the comment in configure.ac.
The greeter code is now all managed by the greeter Makefile.
The configure option enable-dynamic-greeter no longer needed.
GREET_USER_STATIC is no longer needed.
GREET_LIB is still needed in greet.h as it is compiled with
both session.c for xdm execuatable and greeter shared lib.
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
http://bugs.freedesktop.org/show_bug.cgi?id=25112
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
Based on patch suggested by Bjoern A. Zeeb <bzeeb+patch@zabbadoz.net>
to fix http://bugs.freedesktop.org/show_bug.cgi?id=10522
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
The behaviour can be controlled via 'xlogin*echoPasswd' option
in Xresource file. The default option value is 'false'.
Signed-off-by: Georgy A. Shepelev <shepelev.georgy@googlemail.com>
Tested-by: Georgy A. Shepelev <shepelev.georgy@googlemail.com>
[Reformatted to match existing code style by Alan Coopersmith]
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
When PAM rejects a login attempt, the "username" variable remains
uninitialized, which results to garbage being syslogged instead of
login name. Explicit initialization helps to avoid this issue.
Fixes FreeDesktop Bug #26015 <https://bugs.freedesktop.org/show_bug.cgi?id=26015>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
The comment promised 'compatibility until at least R4', so we're 20 years
past due for removing this.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
|
|
Before this change, openlog(3) used to be called by greeter which could
be built as a dynamically loadable plugin. In the latter case, the
ident string passed to openlog(3) resides in a dynamically mapped
memory region that is unmapped later when the plugin is unloaded.
This can cause fatal problems in some environments. For example, in
any GNU/Linux system with PAM support enabled an implicit syslog(3)
call made by a PAM module after plugin unload causes attempt to access
already unmapped memory, followed by instant crash.
It is a common practice to call openlog(3) before the first syslog(3)
call, including implicit calls that could be made e.g. by PAM.
Also, openlog(3) LOG_ODELAY flag is redundant.
Fixes ALT Linux Bug #22362 <https://bugzilla.altlinux.org/show_bug.cgi?id=22362>
Fixes FreeDesktop Bug #24589 <https://bugs.freedesktop.org/show_bug.cgi?id=24589>
Reported-by: Martin Mokrejš <mmokrejs@ribosome.natur.cuni.cz>
Reported-by: Denis Kirienko <dk@altlinux.org>
Patch-by: Oleg Zenin <tt@compas.ihep.su>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
Using common defaults will reduce errors and maintenance.
Only the very small or inexistent custom section need periodic maintenance
when the structure of the component changes. Do not edit defaults.
|
|
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525596
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
Signed-off-by: Georgy A. Shepelev <shepelev.georgy@googlemail.com>
Tested-by: Georgy A. Shepelev <shepelev.georgy@googlemail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
Also move CWARNFLAGS addition to CFLAGS from configure.ac to Makefile.am's
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
Check to see if username is filled in before calling FailedError, and
fill it in if it's not.
Call FailedError before calling pam_end, so we don't reference a username
that may have been freed already.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
|
|
Also strip trailing whitespace to make git happier.
While many lines are changes, "git diff -w" shows no changes other
than pure whitespace.
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
|
|
This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, corrects
make distcheck and most gcc 4.3 and sparse warnings. Remaining
warning is due to passing read or write as function pointers in
the format ssize_t (*)(int, void *, size_t), as it is const for
write, but not for read.
|
|
Also use LOG_AUTHPRIV by default, if that exists.
|