1. 04 Dec, 2018 1 commit
    • Zbigniew Jędrzejewski-Szmek's avatar
      Allow negative uids/gids in PolkitUnixUser and Group objects · 7c8c3abd
      Zbigniew Jędrzejewski-Szmek authored
      (uid_t) -1 is still used as placeholder to mean "unset". This is OK, since
      there should be no users with such number, see
      https://systemd.io/UIDS-GIDS#special-linux-uids.
      
      (uid_t) -1 is used as the default value in class initialization.
      
      When a user or group above INT32_MAX is created, the numeric uid or
      gid wraps around to negative when the value is assigned to gint, and
      polkit gets confused. Let's accept such gids, except for -1.
      
      A nicer fix would be to change the underlying type to e.g. uint32 to
      not have negative values. But this cannot be done without breaking the
      API, so likely new functions will have to be added (a
      polkit_unix_user_new variant that takes a unsigned, and the same for
      _group_new, _set_uid, _get_uid, _set_gid, _get_gid, etc.). This will
      require a bigger patch.
      
      Fixes polkit/polkit#74.
      7c8c3abd
  2. 17 Feb, 2011 1 commit
  3. 09 Aug, 2010 2 commits
  4. 12 Aug, 2009 2 commits
    • David Zeuthen's avatar
      Generate GI gir and typelibs for libpolkit-gobject-1 · a7aacbb5
      David Zeuthen authored
      This includes changing from POSIX types (uid_t, gid_t, pid_t) to
      gint. Won't affect much since the size is the same. And we want this
      anyway since it is needed to build the library on non-POSIX platforms.
      a7aacbb5
    • Joe Clarke's avatar
      Bug 23093 – FreeBSD portability fixes · de9453f4
      Joe Clarke authored
      There are a few issues with building polkit-0.93 on FreeBSD:
      
       * No clearenv() function on FreeBSD
      
       * While FreeBSD has a /proc, it is deprecated, and kinfo_proc should
         be used instead.
      
       * FreeBSD's printf() functions do not support the %m notation.  This
         is only supported for syslog().
      
        * You can't call GINT_TO_POINTER() on a 64-bit value, as this will
          break on 64-bit OSes.
      
      The attached patch fixes these problems.  First, a check for
      clearenv() is added to configure.  Second, I moved the check for
      process uid to polkit/polkitunixprocess.c.  This may not be ideal, but
      it seems to fit, and reduces code duplication.  Third, I replaces all
      %m with %s ... g_strerror (errno).  Finally, I replaced
      GINT_TO_POINTER() with GSIZE_TO_POINTER.
      Signed-off-by: 's avatarDavid Zeuthen <davidz@redhat.com>
      de9453f4
  5. 08 Jun, 2009 1 commit
  6. 19 Jan, 2009 2 commits
  7. 12 Jan, 2009 1 commit
  8. 07 Jan, 2009 2 commits