summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-03-19lint: option -rdynamic is not valid for the lint programHEADmasterGaetan Nadon1-1/+1
Use xdm_LIBS instead. Tested on Solaris. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-03-16Reject PAM conversation calls after login dialog is closedAlan Coopersmith1-0/+7
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>
2010-03-16Make sure username is not NULL when calling syslog from FailedLogin()Alan Coopersmith1-1/+6
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-03-16Bug #25066: exec sessregJohannes Dewender1-1/+1
Sessreg saves the pid of the calling process in utmp. If this process is terminated the session is implicitly deleted. Xstartup is called and the process id is gone right when the script is done so the session is closed right away. Using "exec" will save the pid of the master process of this login. Signed-off-by: Johannes Dewender <xorg@JonnyJD.net> Tested-by: Johannes Dewender <xorg@JonnyJD.net> Acked-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-03-15Move m4 macros to m4 subdir as automake/libtool recommendAlan Coopersmith4-0/+7
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-03-15Replace hardcoded NAMELEN of 14 for ancient SysV with MAXNAMELENAlan Coopersmith1-2/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-03-15echo_passwd should key off PAM no-echo state, not prompt positionAlan Coopersmith1-4/+4
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-03-15xdm: add documentation of the "EchoPasswd" option to the man pageGeorgy A. Shepelev1-0/+4
Signed-off-by: Georgy A. Shepelev <shepelev.georgy@googlemail.com>
2010-03-15Adding an option to show stars instead of the password itself.Georgy A. Shepelev4-10/+54
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>
2010-01-15Update Sun license notices to current X.Org standard formAlan Coopersmith7-120/+135
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-12greeter: fix logging of failed login attemptsDmitry V. Levin1-1/+1
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>
2010-01-12Raise xorg-macros requirement to 1.4Alan Coopersmith1-2/+2
Needed since the changes in a4a8f7b83afc9a46bc989c0eeb528a46b3a1db5d depend on the INSTALL file delivered in xorg-macros 1.4 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-12Remove workaround for X11R3 server bugAlan Coopersmith1-14/+2
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>
2010-01-12rewrite StorePid()Branden Robinson1-47/+48
Update StorePid() function to use Matthieu Herrb's changes that refuse to open an existing pid file, and take more care with the size of the Pid_t type. Matthieu Herrb rewrote the StorePid() function based on my changes; he made it more careful with the size of Pid_t, and treats an existing pid file as a failure. I then made some more changes: use _SysErrorMsg() instead of strerror(), and don't assume that the process id we write to the pidFile is 5 digits. Forward-ported by David Nusinow, Eugene Konev and Julien Cristau. Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2010-01-12xdm: add SELinux supportManoj Srivastava2-0/+73
Initial patch submitted in Debian bug#233551. Forward-ported to modular X by Eugene Konev (changes: remove Imakefile hunks, add --with-selinux flag to configure.ac). Updated to latest SE Linux code by Russell Coker 3rd Aug 2008, with bugfix from Julien Cristau (Debian bug#493524). Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2010-01-12Improve logging of xdm's script handlingBranden Robinson1-13/+20
* Make execution of the session program an informational log message (with LogInfo()), not a Debug() message. * Ensure that source()d scripts (Xreset, Xsetup, Xstartup) can be fopen()ed before invoking runAndWait() on them. If they can, LogInfo() the fact. If they cannot, LogInfo() that, too, and use _SysErrorMsg() to report why fopen() failed. * Make source() complain using Debug() when it is given a null pointer in its file argument. * For clarity, make source() return from only one location. Also see Debian bug #219311. Forward ported by Eugene Konev. Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2010-01-12improve error loggingBranden Robinson1-12/+21
Make several LogError() and Debug() messages more informative. Change LogError() invocations to use _SysErrorMsg() where errno might be set (and not clobbered by intermediate calls). Also make LogError() the first thing we do after an error condition in those cases. Forward-ported by Julien Cristau <jcristau@debian.org>. Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2010-01-12Always attempt to write data to the auth fileBranden Robinson1-0/+34
Actually attempt to write data to the auth file in SaveServerAuthorizations(); that way we detect problems like ENOSPC (full filesystem, user over quota) early enough to do something about it. (See Debian #217505, #253480) Forward-ported by Julien Cristau <jcristau@debian.org>. Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2010-01-12Change openFiles() to avoid race-based symlink attacks.Branden Robinson1-1/+21
Forward-ported by Julien Cristau <jcristau@debian.org>. Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2010-01-12downgrade an error to info messageBranden Robinson1-2/+11
During normal xdm shutdown, killed local X servers can be zombies; this is not an error. Forward-ported by David Nusinow, Eugene Konev and Julien Cristau Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2010-01-12Call openlog(3) earlyDmitry V. Levin2-3/+13
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>
2009-12-19configure.ac: use backticks rather than $() for cmd subsGaetan Nadon1-1/+1
Use "$PKG_CONFIG" rather than hard coded "pkg-config" Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2009-11-30XDM: Add support for clients that sent ipv4 addresses to a dual-stacked hostChristoph Bartoschek1-3/+20
If a client sends an ipv4 address to a dual-stacked xdm that is bound to a ipv6 socket in a forward request, then the packet was silently discarded. Now the address is encapsulated as a ipv4-mapped address and a response is send back. Signed-off-by: Adam Jackson <ajax@redhat.com>
2009-11-29configure.ac: restore correct order for XORG_DEFAULT_OPTIONSGaetan Nadon1-1/+1
It must be following AC_USE_SYSTEM_EXTENSION
2009-11-26Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILESGaetan Nadon1-0/+1
Now that the INSTALL file is generated. Allows running make maintainer-clean.
2009-10-28INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206Gaetan Nadon4-3/+6
Add missing INSTALL file. Use standard GNU file on building tarball README may have been updated Remove AUTHORS file as it is empty and no content available yet. Remove NEWS file as it is empty and no content available yet.
2009-10-27Deploy the new XORG_DEFAULT_OPTIONS #24242Gaetan Nadon1-3/+4
This macro aggregate a number of existing macros that sets commmon X.Org components configuration options. It shields the configuration file from future changes.
2009-10-26Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432Gaetan Nadon1-2/+1
ChangeLog filename is known to Automake and requires no further coding in the makefile.
2009-10-22.gitignore: use common defaults with custom section # 24239Gaetan Nadon4-24/+72
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.
2009-09-24Correct default greeterLib path in man pageAlan Coopersmith2-1/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-09-22Debian bug 525596: "Login incorrect" only partially cleared on next loginMartin Dickopp1-2/+2
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525596 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-09-22The whole widget borders width could not be set to zero.Georgy A. Shepelev1-2/+2
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>
2009-09-22Make parent authdir if needed at startupAlan Coopersmith1-21/+47
Allows setting authdir to /var/run/xdm Also refactor directory creation code for less duplication Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-09-22Create piddir if needed on startupAlan Coopersmith1-0/+22
Allows setting piddir to /var/run/xdm/ Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-09-18Version bump: 1.1.9xdm-1.1.9Alan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-09-17Fill in COPYING fileAlan Coopersmith1-8/+167
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-09-17Log errors when failing to make authentication dirs/filesAlan Coopersmith1-1/+13
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-09-17Refactor & constify error logging codeAlan Coopersmith4-80/+71
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-09-17Unrecognized argument errors shouldn't print xdm error header repeatedlyAlan Coopersmith3-2/+18
Add LogAppend function to append to previous LogError/LogInfo without repeating the xdm error message header. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-09-11Replace -D_XOPEN_SOURCE & -D_BSD_SOURCE with AC_USE_SYSTEM_EXTENSIONSAlan Coopersmith1-3/+4
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Julien Cristau <jcristau@debian.org>
2009-09-11Add support for AM_SILENT_RULES for building files with cppAlan Coopersmith4-3/+13
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-09-11Update to using xorg-macros 1.3, including XORG_DEFAULT_OPTIONSAlan Coopersmith3-15/+12
Also move CWARNFLAGS addition to CFLAGS from configure.ac to Makefile.am's Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-08-18Treat all 127.0.0.0/8 addresses as localhostAlan Coopersmith1-3/+1
Similar fix to http://bugs.freedesktop.org/show_bug.cgi?id=23329 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-07-29Set utmp/wtmp paths via configure instead of hardcoding themAlan Coopersmith5-5/+46
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-07-28Truncate pid file before writing new pid to itAlan Coopersmith1-0/+1
Prevents trailing garbage in the file if the new pid has fewer digits than the previous pid. (Originally reported against Solaris dtlogin as Sun bug 6627150) Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-07-28Continue processing Xaccess after unresolvable host entry foundAlan Coopersmith1-1/+2
If there is an unresolvable host entry in Xaccess file, XDMCP access from the hosts whose entries are specified after the unresolvable host in Xaccess were rejected. (Originally reported against dtlogin as Solaris bug 6259901.) Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-07-28Do a better job of getting user name for failed login log when using PAMAlan Coopersmith1-1/+10
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>
2009-07-20xdm compile failed due to asprintf()Jeff Chua1-1/+1
xdm no longer compiles due to recent commit 56a14b8a1f4d3aa883485b794c818581b8f07cd8 that changed to use asprintf(). There is an additional right-bracket that causes the problem. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-07-17Add RemovePid() function, and register it with atexit()Branden Robinson1-0/+17
Debian bug#213076 Forward-ported by David Nusinow, Eugene Konev and Julien Cristau.
2009-07-17Use xdm's _SysErrorMsg() function instead of strerror()Branden Robinson2-4/+4