Hello community, here is the log from the commit of package gnome-cups-manager checked in at Wed May 24 02:43:45 CEST 2006. -------- --- GNOME/gnome-cups-manager/gnome-cups-manager.changes 2006-05-17 15:58:12.000000000 +0200 +++ gnome-cups-manager/gnome-cups-manager.changes 2006-05-23 22:58:50.000000000 +0200 @@ -1,0 +2,6 @@ +Tue May 23 22:58:09 CEST 2006 - joeshaw@suse.de + +- Add a patch to allow users who are in the lp group to administer + printers. (bnc #162615) + +------------------------------------------------------------------- New: ---- gnome-cups-manager-suse-lp-group.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gnome-cups-manager.spec ++++++ --- /var/tmp/diff_new_pack.uXTUpx/_old 2006-05-24 02:43:24.000000000 +0200 +++ /var/tmp/diff_new_pack.uXTUpx/_new 2006-05-24 02:43:24.000000000 +0200 @@ -13,7 +13,7 @@ Name: gnome-cups-manager BuildRequires: cups cups-devel gcc-c++ gnome-common gnutls-devel intltool krb5-devel libglade2-devel libgnomecups-devel libgnomeprintui-devel libgnomeui-devel libsmbclient libsmbclient-devel libwnck-devel mDNSResponder-devel perl-XML-Parser update-desktop-files Version: 0.32cvs20060120 -Release: 34 +Release: 36 URL: http://www.gnome.org/ Group: System/GUI/GNOME License: GPL @@ -27,6 +27,7 @@ Patch3: smb-uri-parser-fix.patch Patch4: autodetect-usb-printers.patch Patch5: bnc-6238.patch +Patch6: gnome-cups-manager-suse-lp-group.patch Autoreqprov: on Requires: gnome-icon-theme BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -54,6 +55,7 @@ %patch3 -p0 %patch4 -p1 %patch5 +%patch6 %build rename no nb po/no.* @@ -104,6 +106,9 @@ /opt/gnome/include/libgnomecups-1/libgnomecups/* %changelog -n gnome-cups-manager +* Tue May 23 2006 - joeshaw@suse.de +- Add a patch to allow users who are in the lp group to administer + printers. (bnc #162615) * Fri May 12 2006 - fejj@suse.de - Added bnc-6238.patch to the build to allow users to install gzipped prinetr driver files. ++++++ gnome-cups-manager-suse-lp-group.patch ++++++ ? gnome-cups-manager-suse-lp-group.patch ? icons/emblem-default.icon ? icons/emblem-paused.icon Index: libgnomecups/gnome-cups-permission.c =================================================================== RCS file: /cvs/gnome/gnome-cups-manager/libgnomecups/gnome-cups-permission.c,v retrieving revision 1.3 diff -u -p -u -r1.3 gnome-cups-permission.c --- libgnomecups/gnome-cups-permission.c 19 Jan 2006 15:33:04 -0000 1.3 +++ libgnomecups/gnome-cups-permission.c 23 May 2006 20:57:49 -0000 @@ -27,6 +27,8 @@ #include <glib/gi18n.h> #include <unistd.h> #include <sys/types.h> +#include <grp.h> +#include <pwd.h> #include <string.h> static char *gnome_cups_app_path = NULL; @@ -34,7 +36,36 @@ static char *gnome_cups_app_path = NULL; gboolean gnome_cups_can_admin () { - return (geteuid () == 0); + uid_t euid; + struct group *gr; + int i; + + euid = geteuid (); + + if (euid == 0) + return TRUE; + + /* + * SUSE runs cups with the lp user, and allows access to users in + * the lp group + */ + gr = getgrnam ("lp"); + + if (gr == NULL) { + g_warning ("Unable to find lp group"); + return FALSE; + } + + for (i = 0; gr->gr_mem [i] != NULL; i++) { + struct passwd *pw; + + pw = getpwnam (gr->gr_mem [i]); + + if (pw != NULL && pw->pw_uid == euid) + return TRUE; + } + + return FALSE; } void ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de