diff options
author | Angelo Arrifano <miknix@gentoo.org> | 2010-07-23 11:38:00 +0000 |
---|---|---|
committer | Angelo Arrifano <miknix@gentoo.org> | 2010-07-23 11:38:00 +0000 |
commit | ba79f191de828ce9c54a63e10d5467e3982be8aa (patch) | |
tree | 4cafdc6c5948d86e070a8a90b3ca6cd117e97346 | |
parent | amd64 stable, bug #312843 (diff) | |
download | gentoo-2-ba79f191de828ce9c54a63e10d5467e3982be8aa.tar.gz gentoo-2-ba79f191de828ce9c54a63e10d5467e3982be8aa.tar.bz2 gentoo-2-ba79f191de828ce9c54a63e10d5467e3982be8aa.zip |
Apply patch to select correct min UID/GID for users. Hardcoded values
were 100/100 while Gentoo uses 1000/1000. See bug 312743
(Portage version: 2.1.8.3/cvs/Linux x86_64)
-rw-r--r-- | gpe-base/gpe-login/ChangeLog | 10 | ||||
-rw-r--r-- | gpe-base/gpe-login/files/gpe-login-min-uid.patch | 75 | ||||
-rw-r--r-- | gpe-base/gpe-login/gpe-login-0.95-r4.ebuild (renamed from gpe-base/gpe-login/gpe-login-0.95-r3.ebuild) | 12 |
3 files changed, 95 insertions, 2 deletions
diff --git a/gpe-base/gpe-login/ChangeLog b/gpe-base/gpe-login/ChangeLog index cc40ba9fe40a..e06f3b7d9edb 100644 --- a/gpe-base/gpe-login/ChangeLog +++ b/gpe-base/gpe-login/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for gpe-base/gpe-login # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/gpe-base/gpe-login/ChangeLog,v 1.8 2010/02/13 11:58:49 miknix Exp $ +# $Header: /var/cvsroot/gentoo-x86/gpe-base/gpe-login/ChangeLog,v 1.9 2010/07/23 11:37:59 miknix Exp $ + +*gpe-login-0.95-r4 (23 Jul 2010) + + 23 Jul 2010; Angelo Arrifano <miknix@gentoo.org> + -gpe-login-0.95-r3.ebuild, +gpe-login-0.95-r4.ebuild, + +files/gpe-login-min-uid.patch: + Apply patch to select correct min UID/GID for users. Hardcoded values + were 100/100 while Gentoo uses 1000/1000. See #312743 13 Feb 2010; Angelo Arrifano <miknix@gentoo.org> -files/gentoo-badge2.png, gpe-login-0.95-r3.ebuild, +files/windowmanager.xsessiond-gentoo: diff --git a/gpe-base/gpe-login/files/gpe-login-min-uid.patch b/gpe-base/gpe-login/files/gpe-login-min-uid.patch new file mode 100644 index 000000000000..26ece3226611 --- /dev/null +++ b/gpe-base/gpe-login/files/gpe-login-min-uid.patch @@ -0,0 +1,75 @@ +diff -Naurp gpe-login-0.95/configure.ac gpe-login-0.95.orig/configure.ac +--- gpe-login-0.95/configure.ac 2008-08-13 18:12:22.000000000 +0000 ++++ gpe-login-0.95.orig/configure.ac 2010-04-02 03:38:59.000000000 +0000 +@@ -4,11 +4,34 @@ AC_PREREQ(2.59) + AC_INIT(gpe-login,0.95,gpe-list@linuxtogo.org) + AC_CONFIG_SRCDIR([gpe-login.c]) + AM_INIT_AUTOMAKE([foreign dist-bzip2]) ++AM_CONFIG_HEADER([config.h:config.h.in]) + + AC_PROG_CC + AC_STDC_HEADERS + AC_PROG_INSTALL + ++AC_ARG_WITH([min-valid-uid], ++ [AS_HELP_STRING([--with-min-valid-uid=N], ++ [Set the minimal UID for valid users (default: 100).])], ++ [], ++ [with_min_valid_uid=100]) ++ ++AS_IF([test "x$with_min_valid_uid" != "x"], [ ++ AC_DEFINE_UNQUOTED([MIN_UID], [$with_min_valid_uid], ++ [Minimal UID for valid users.]) ++]) ++ ++AC_ARG_WITH([min-valid-gid], ++ [AS_HELP_STRING([--with-min-valid-gid=N], ++ [Set the minimal GID for valid users (default: 100).])], ++ [], ++ [with_min_valid_gid=100]) ++ ++AS_IF([test "x$with_min_valid_gid" != "x"], [ ++ AC_DEFINE_UNQUOTED([MIN_GID], [$with_min_valid_gid], ++ [Minimal GID for valid users.]) ++]) ++ + + DEP_MODULES="glib-2.0 >= 2.2 libgpewidget" + DEP_MODULES_LOCK="x11" +diff -Naurp gpe-login-0.95/gpe-login.c gpe-login-0.95.orig/gpe-login.c +--- gpe-login-0.95/gpe-login.c 2010-04-02 03:41:41.000000000 +0000 ++++ gpe-login-0.95.orig/gpe-login.c 2010-04-02 03:40:35.000000000 +0000 +@@ -44,6 +44,13 @@ + #include <gpe/spacing.h> + #include <gpe/translabel.h> + ++#ifdef HAVE_CONFIG_H ++#include <config.h> ++#else ++#define MIN_GID 100 ++#define MIN_UID 100 ++#endif /* HAVE_CONFIG_H */ ++ + #include "gpe-ownerinfo.h" + + #define _(x) gettext(x) +@@ -348,7 +355,7 @@ slurp_passwd (GtkWidget *menu) + && strcmp (pw->pw_passwd, "*")) + root_password_set = TRUE; + +- if (pw->pw_uid < 100 || pw->pw_uid >= 65534) ++ if (pw->pw_uid < MIN_UID || pw->pw_uid >= 65534) + continue; + + have_users = TRUE; +@@ -717,8 +724,8 @@ enter_newuser_callback (GtkWidget *widge + char salt[2]; + char buf[256]; + char home[80]; +- gid_t gid = 100; +- uid_t uid = 100; ++ gid_t gid = MIN_UID; ++ uid_t uid = MIN_GID; + FILE *fp; + + username = gtk_entry_get_text (GTK_ENTRY (entry_username)); diff --git a/gpe-base/gpe-login/gpe-login-0.95-r3.ebuild b/gpe-base/gpe-login/gpe-login-0.95-r4.ebuild index e5feb47e1c1b..f620b45857d5 100644 --- a/gpe-base/gpe-login/gpe-login-0.95-r3.ebuild +++ b/gpe-base/gpe-login/gpe-login-0.95-r4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/gpe-base/gpe-login/gpe-login-0.95-r3.ebuild,v 1.2 2010/02/13 11:58:49 miknix Exp $ +# $Header: /var/cvsroot/gentoo-x86/gpe-base/gpe-login/gpe-login-0.95-r4.ebuild,v 1.1 2010/07/23 11:37:59 miknix Exp $ GPE_TARBALL_SUFFIX="bz2" inherit gpe eutils autotools @@ -14,6 +14,11 @@ SLOT="0" KEYWORDS="~arm ~amd64 ~x86" IUSE="branding" +# Options for gpe-login-min-uid.patch +GPECONF="${GPECONF} +--with-min-valid-uid=1000 +--with-min-valid-gid=1000" + DEPEND="${DEPEND} gpe-base/libgpewidget" RDEPEND="${RDEPEND} ${DEPEND} x11-misc/xkbd @@ -45,6 +50,11 @@ src_unpack() { # the X11/Xinit.d path epatch "${FILESDIR}/${P}-cleanup.patch" + # Patch to allow filtering system accounts from login window, + # cortesy of yvasilev: #312743 + # This should be merged with upstream at some point. + epatch "${FILESDIR}/${PN}-min-uid.patch" + eautoreconf } |