projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a91e4e5
)
pam: fix up tty if it is actually a display
author
Lennart Poettering
<lennart@poettering.net>
Fri, 24 Jun 2011 21:51:49 +0000
(23:51 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 24 Jun 2011 21:51:49 +0000
(23:51 +0200)
src/pam-module.c
patch
|
blob
|
history
diff --git
a/src/pam-module.c
b/src/pam-module.c
index
eba59f6
..
1658348
100644
(file)
--- a/
src/pam-module.c
+++ b/
src/pam-module.c
@@
-382,6
+382,16
@@
_public_ PAM_EXTERN int pam_sm_open_session(
remote_host = strempty(remote_host);
seat = strempty(seat);
+ if (strchr(tty, ':')) {
+ /* A tty with a colon is usually an X11 display, place
+ * there to show up in utmp. We rearrange things and
+ * don't pretend that an X display was a tty */
+
+ if (isempty(display))
+ display = tty;
+ tty = NULL;
+ }
+
type = !isempty(display) ? "x11" :
!isempty(tty) ? "tty" : "other";