Hello community, here is the log from the commit of package resmgr checked in at Fri Aug 25 18:38:13 CEST 2006. -------- --- resmgr/resmgr.changes 2006-08-15 11:11:33.000000000 +0200 +++ resmgr/resmgr.changes 2006-08-25 16:23:50.000000000 +0200 @@ -1,0 +2,6 @@ +Fri Aug 25 16:23:17 CEST 2006 - lnussel@suse.de + +- update to current SVN integrating all patches +- add hack for polkit (#199815) + +------------------------------------------------------------------- Old: ---- resmgr-0.9.8_SVNr75.tar.bz2 resmgr-build.diff resmgr-r76.diff resmgr-r78.diff resmgr-r79.diff New: ---- resmgr-0.9.8_SVNr93.tar.bz2 resmgr-polkithack.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ resmgr.spec ++++++ --- /var/tmp/diff_new_pack.uuAC75/_old 2006-08-25 18:37:50.000000000 +0200 +++ /var/tmp/diff_new_pack.uuAC75/_new 2006-08-25 18:37:50.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package resmgr (Version 0.9.8_SVNr75) +# spec file for package resmgr (Version 0.9.8_SVNr93) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -14,16 +14,13 @@ BuildRequires: libacl-devel pam-devel License: GPL Group: System/Daemons -Version: 0.9.8_SVNr75 -Release: 19 +Version: 0.9.8_SVNr93 +Release: 1 Summary: A program to allow arbitrary access to device files Source: resmgr-%{version}.tar.bz2 Source1: resmgr.init Source2: resmgr-doc.desktop -Patch: resmgr-r76.diff -Patch1: resmgr-r78.diff -Patch2: resmgr-r79.diff -Patch3: resmgr-build.diff +Patch: resmgr-polkithack.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build Provides: libresmgr.so.0.9.8 # if you know a better way for that provides feel free to fix it @@ -52,9 +49,6 @@ %prep %setup %patch -p0 -%patch1 -p0 -%patch2 -p0 -%patch3 -p0 %build CFLAGS="%{optflags}" \ @@ -127,6 +121,9 @@ %dir /var/run/resmgr/classes %changelog -n resmgr +* Fri Aug 25 2006 - lnussel@suse.de +- update to current SVN integrating all patches +- add hack for polkit (#199815) * Tue Aug 15 2006 - meissner@suse.de - fixed build due to changed kernel headers. * Fri Jun 16 2006 - lnussel@suse.de ++++++ resmgr-0.9.8_SVNr75.tar.bz2 -> resmgr-0.9.8_SVNr93.tar.bz2 ++++++ ++++ 6833 lines of diff (skipped) ++++++ resmgr-polkithack.diff ++++++ Index: src/utils.c =================================================================== --- src/utils.c (Revision 92) +++ src/utils.c (Arbeitskopie) @@ -392,3 +392,45 @@ } return 0; } + +/** FIXME + * evil nasty polkit hack for 10.2 alpha4 (#199815) + * taken from pam-polkit-console + * */ +#define POLKITD_PID_FILE "/var/run/polkit/pid" + +void polkit_hack(const char* tty, const char* username, int add) +{ + char buf[4096]; + FILE *f; + + if(!tty || !username) + return; + + snprintf(buf, sizeof(buf), "/var/run/polkit-console/%s_%s", tty, username); + + if(add) + { + int fd; + fd = open(buf, O_RDWR|O_CREAT|O_EXCL, 0600); + if(fd != -1) + close(fd); + } + else + unlink(buf); + + f = fopen (POLKITD_PID_FILE, "r"); + if (f != NULL) { + if (fgets (buf, sizeof (buf), f) != NULL && buf[0] != '\0' && buf[0] != '\n') { + pid_t pid; + char *p; + + pid = strtol (buf, &p, 10); + if ((*p == '\0') || (*p == '\n')) + { + kill (pid, SIGUSR1); + } + } + fclose (f); + } +} Index: src/utils.h =================================================================== --- src/utils.h (Revision 92) +++ src/utils.h (Arbeitskopie) @@ -23,4 +23,6 @@ extern int res_touch(const char* path); extern int res_mkdir(const char* path); +void polkit_hack(const char* tty, const char* username, int add); + #endif /* UTILS_H */ Index: src/session.c =================================================================== --- src/session.c (Revision 92) +++ src/session.c (Arbeitskopie) @@ -38,6 +38,9 @@ res_state_session_create(id, user->name); + /* FIXME */ + polkit_hack(id, user->name, 1); + user->nsessions++; user->refcnt++; @@ -75,6 +78,7 @@ return 0; } *ptr = sess->next; + polkit_hack(id, sess->user->name, 0); _session_free(sess); } else { ptr = &sess->next; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org