1. 26 Feb, 2008 1 commit
    • Holger Macht's avatar
      avoid reliance on DT_REG so we work on reiserfs as well · 0b59d3e7
      Holger Macht authored
      
      
      (with minor fixes from davidz for avoiding memory leaks)
      
      Recently I wondered why PolicyKit (especially polkit-auth) does not work
      on my system. While debugging, I noticed that the corresponding code works
      in my home directory, but not in the root filesystem.
      
      readdir() and its d_type are the culprits. Quoting the readdir manpage:
      
      [...]
      Other than Linux, the d_type field is available mainly only on BSD
      systems.  This field makes it possible to avoid the expense of calling
      stat() if further actions depend on the type of the file.
      [...]
      
      Filesystems may fill DT_UNKNOWN into this field, which reiserfs does, so
      call stat instead, which always does the right thing.
      Signed-off-by: Holger Macht's avatarHolger Macht <hmacht@suse.de>
      0b59d3e7
  2. 29 Nov, 2007 2 commits
  3. 28 Nov, 2007 1 commit
  4. 12 Nov, 2007 1 commit
  5. 11 Nov, 2007 1 commit
  6. 10 Nov, 2007 1 commit
    • David Zeuthen's avatar
      split utility bits into a private statically linked library · cd68aa0a
      David Zeuthen authored
      getting closer...
      
      $ grep glib *.c
      polkit-authorization.c:#include <glib.h>
      polkit-authorization-db.c:#include <glib.h>
      polkit-authorization-db-dummy.c:#include <glib.h>
      polkit-config.c:#include <glib.h>
      polkit-context.c:#include <glib.h>
      polkit-sysdeps.c:#include <glib.h>
      cd68aa0a
  7. 08 Nov, 2007 2 commits
  8. 29 Oct, 2007 2 commits
  9. 22 Oct, 2007 1 commit
  10. 21 Oct, 2007 1 commit
  11. 24 Aug, 2007 3 commits
  12. 21 Aug, 2007 1 commit
    • David Zeuthen's avatar
      gracefully handle bad config/policy files, drop polkit-reload-config, syslog · 07b101ec
      David Zeuthen authored
       - don't abort/malfunction if the /etc/PolicyKit/PolicyKit.conf
         configuration file is malformed; simply just continue as normal
         but return 'no' to every question asked. Also use syslog(3) to
         report this to the system log
      
       - if a .policy file is malformed, simply skip it and still include
         other well-formed .policy files. Use syslog(3) to report if indeed
         a .policy file is malformed.
      
       - drop /var/lib/PolicyKit/reload and rely on inotify to detect changes to
         - /etc/PolicyKit/PolicyKit.conf
         - Policy files in /usr/share/PolicyKit/policy
         - privileges in /var/lib/PolicyKit and /var/run/PolicyKit
      
      As a result, changes made to /etc/PolicyKit/PolicyKit.conf (typically
      an admin edits this file) and .policy files (typically these can
      change on package upgrades) in /usr/share/PolicyKit/policy are
      instantly picked up.
      07b101ec
  13. 23 Apr, 2007 1 commit
  14. 17 Apr, 2007 1 commit
  15. 09 Apr, 2007 1 commit
    • David Zeuthen's avatar
      remove all usage of glib from the header files · 192f04ce
      David Zeuthen authored
      This paves the way for getting rid of a glib dependency; when and if
      that happens is to be determined; right now it just doesn't make a lot
      of sense to reimplement GKeyFile, GSList, GHashTable, g_spawn_sync and
      other useful routines. But it might make sense if we want to get the
      message bus daemon to link with libpolkit so you e.g. can say
      
       <policy polkit="acme-frobnicate">
         <allow send_interface="com.acme.Frobnicator"
       </policy>
      
      to allow a caller on the system message bus to access that interface
      if, and only if, he can do the "acme-frobnicate" action according to
      PolicyKit.
      192f04ce
  16. 08 Apr, 2007 2 commits