[debian-edu-commits] debian-edu/ 11/30: Use gettent to get gdm/kdm uid as getpwname does not work with ldap users
Alexander Alemayhu
ccscanf-guest at moszumanska.debian.org
Mon Jun 9 20:30:30 UTC 2014
This is an automated email from the git hooks/post-receive script.
ccscanf-guest pushed a commit to branch master
in repository killer.
commit fc6e62a17c406cd44faa7e1b9e23d508a4dfdb85
Author: José L. Redrejo Rodríguez <jredrejo at edu.juntaextremadura.net>
Date: Thu Feb 28 13:14:10 2008 +0000
Use gettent to get gdm/kdm uid as getpwname does not work with ldap users
---
debian/changelog | 8 ++++++++
debian/patches/x-console.dpatch | 27 +++++++++++++++------------
2 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index f6c580f..7f8036a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+killer (0.90-4) UNRELEASED; urgency=low
+
+ [ José L. Redrejo Rodríguez ]
+ * Use getent to get the uid as getpwname does not work correctly with
+ ldap authenticated users.
+
+ -- José L. Redrejo Rodríguez <jredrejo at debian.org> Thu, 28 Feb 2008 13:57:26 +0100
+
killer (0.90-3) unstable; urgency=low
[ Petter Reinholdtsen ]
diff --git a/debian/patches/x-console.dpatch b/debian/patches/x-console.dpatch
index 0a8deac..f513490 100644
--- a/debian/patches/x-console.dpatch
+++ b/debian/patches/x-console.dpatch
@@ -2,6 +2,7 @@
Detect kdm and gdm logins as console users.
In that case jump over the initializeTty routine.
+Using getent to get the uid to be able to work with ldap users.
This is example output from who in this case:
% who
@@ -15,8 +16,8 @@ gdmuser tty7 2008-02-14 20:21 (:0)
@DPATCH@
--- killer-0.90~/killer 2008-02-26 10:44:58.000000000 +0100
-+++ killer-0.90/killer 2008-02-26 10:45:40.000000000 +0100
-@@ -876,10 +876,16 @@
++++ killer-0.90/killer 2008-02-28 13:52:20.000000000 +0100
+@@ -876,10 +876,18 @@
while ( <W> ) {
chop;
@parts = split(/[ \t]+/);
@@ -24,16 +25,18 @@ gdmuser tty7 2008-02-14 20:21 (:0)
- $consoleuser = $parts[0];
- }
- $self->initializeTty($parts[1], stat("/dev/" . $parts[1]));
-+ if ( $parts[1] eq 'console'
-+ || $parts[1] eq ':0' # kdm
-+ || $parts[1] =~ '^tty\d$' # gdm
-+ ) {
-+ $consoleuser = $parts[0];
-+ $tty2idletime{$parts[1]}=0;
-+ push (@{$user2ttys{$consoleuser}}, $parts[1]);
-+ } else {
-+ $self->initializeTty($parts[1], stat("/dev/" . $parts[1]));
-+ }
++ if ( $parts[1] eq 'console'
++ || $parts[1] eq ':0' # kdm
++ || $parts[1] =~ '^tty\d$' # gdm
++ ) {
++ $consoleuser = $parts[0];
++ $tty2idletime{$parts[1]}=0;
++ my $user = `getent passwd|grep $consoleuser|cut -f3 -d:`;
++ chomp($user);
++ push (@{$user2ttys{$user}}, $parts[1]);
++ } else {
++ $self->initializeTty($parts[1], stat("/dev/" . $parts[1]));
++ }
}
close(W);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/killer.git
More information about the debian-edu-commits
mailing list