platform/upstream/polkit.git
11 years agobuild: Fix .gir generation for parallel make
Ryan Lortie [Tue, 13 Nov 2012 16:50:14 +0000 (11:50 -0500)]
build: Fix .gir generation for parallel make

As per the intructions in the introspection Makefile, we should have a
line declaring a dependency between the .gir and .la files.

https://bugs.freedesktop.org/show_bug.cgi?id=57077

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoPolkitAgent: Avoid crashing if initializing the server object fails
Adam Jackson [Tue, 9 Oct 2012 18:08:24 +0000 (14:08 -0400)]
PolkitAgent: Avoid crashing if initializing the server object fails

Note that otherwise we return a freed server object.  Since later in
polkit_agent_listener_register_with_options we check against NULL to
determine failure, this makes for sad times later when we call
server_free() on it again.

https://bugs.freedesktop.org/show_bug.cgi?id=55776

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoFall back to authenticating as uid 0 if the list of admin identities is empty
David Zeuthen [Tue, 18 Sep 2012 18:47:06 +0000 (14:47 -0400)]
Fall back to authenticating as uid 0 if the list of admin identities is empty

For example, this can happen if the wheel group has no members. This
was reported in Red Hat bug 834494, see

 https://bugzilla.redhat.com/show_bug.cgi?id=834494

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoPost-release version bump to 0.108
David Zeuthen [Wed, 11 Jul 2012 17:34:11 +0000 (13:34 -0400)]
Post-release version bump to 0.108

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate NEWS for release 0.107
David Zeuthen [Wed, 11 Jul 2012 17:30:18 +0000 (13:30 -0400)]
Update NEWS for release

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agopkexec: add support for argv1 annotation and mention shebang-wrappers
David Zeuthen [Wed, 11 Jul 2012 16:58:06 +0000 (12:58 -0400)]
pkexec: add support for argv1 annotation and mention shebang-wrappers

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoIntroduce a polkit.Result enumeration for authorization rules
David Zeuthen [Fri, 6 Jul 2012 14:19:45 +0000 (10:19 -0400)]
Introduce a polkit.Result enumeration for authorization rules

This way an authorization rule can do this

 return polkit.Result.YES;

which is slightly nicer than

 return "yes";

https://bugs.freedesktop.org/show_bug.cgi?id=50983

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoNuke --enable-verbose flag
David Zeuthen [Fri, 6 Jul 2012 13:55:37 +0000 (09:55 -0400)]
Nuke --enable-verbose flag

It doesn't do anything. This was pointed out in

 https://bugs.freedesktop.org/show_bug.cgi?id=51470

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoNuke leftover polkit-backend-1.pc file
David Zeuthen [Fri, 6 Jul 2012 13:53:42 +0000 (09:53 -0400)]
Nuke leftover polkit-backend-1.pc file

This was reported in https://bugs.freedesktop.org/show_bug.cgi?id=51466

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoTry harder to look up the right localization
Matthias Clasen [Thu, 28 Jun 2012 00:28:00 +0000 (20:28 -0400)]
Try harder to look up the right localization

The code for looking up localized strings for action descriptions
was manually trying to break locale names into pieces, but didn't
get it right for e.g. zh_CN.utf-8. Instead, use the GLib function
g_get_locale_variants(), which handles this (and more). This fixes
the translation problem reported in
https://bugzilla.gnome.org/show_bug.cgi?id=665497

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate guidance on situations where there is no polkit authority
David Zeuthen [Fri, 8 Jun 2012 17:38:53 +0000 (13:38 -0400)]
Update guidance on situations where there is no polkit authority

Now that GDBusProxy does something reasonable for a masked systemd
service, see

 https://bugzilla.gnome.org/show_bug.cgi?id=677718

construction of the PolkitAuthority object does not fail anymore. That
doesn't mean the authority is available, though, so mention that users
should check the result of the CheckAuthorization() call as well. Or
in the case of PolkitAuthority, that the error is not a POLKIT_ERROR.

This is actually a nice feature, it means that if you unmask
polkit.service then mechanisms using PolkitAuthority will start using
it without a restart.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoPost-release version bump to 0.107
David Zeuthen [Thu, 7 Jun 2012 18:02:32 +0000 (14:02 -0400)]
Post-release version bump to 0.107

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate NEWS for release 0.106
David Zeuthen [Thu, 7 Jun 2012 17:57:48 +0000 (13:57 -0400)]
Update NEWS for release

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agodocs: add a "make sure your app works when there's no polkitd(8)" note
David Zeuthen [Thu, 7 Jun 2012 15:43:20 +0000 (11:43 -0400)]
docs: add a "make sure your app works when there's no polkitd(8)" note

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMention the implications of returning *_keep in an authorization rule
David Zeuthen [Thu, 7 Jun 2012 14:35:07 +0000 (10:35 -0400)]
Mention the implications of returning *_keep in an authorization rule

Pointed out by Dan Williams <dcbw@redhat.com> on IRC.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoMake it work when using ConsoleKit instead of libsystemd-login
David Zeuthen [Wed, 6 Jun 2012 18:32:26 +0000 (14:32 -0400)]
Make it work when using ConsoleKit instead of libsystemd-login

... although it would be nicer to just rip out the CK bits and simply
hard-require libsystemd-login instead - it should work just fine on
non-systemd systems, same way systemd-udev works fine there.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoagenthelper-pam: Fix newline-trimming code
Colin Walters [Wed, 6 Jun 2012 13:05:14 +0000 (09:05 -0400)]
agenthelper-pam: Fix newline-trimming code

First, we were using == instead of =, as the author probably intended.
But after changing that, we're now assigning to const memory.  Fix
that by writing to a temporary string buffer.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoautogen.sh: Fix check for libtool (we only need libtoolize)
Colin Walters [Sun, 29 Jan 2012 21:22:51 +0000 (16:22 -0500)]
autogen.sh: Fix check for libtool (we only need libtoolize)

A pre-built libtool copy may not be installed on all systems; all
we need is libtoolize.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agobuild: Check for mozjs185, not libjs
Colin Walters [Wed, 6 Jun 2012 11:21:42 +0000 (07:21 -0400)]
build: Check for mozjs185, not libjs

libjs is a Fedora-specific invention; mozjs185.pc lives in the
upstream tarball.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoState that authorization rules must not rely on SpiderMonkey features
David Zeuthen [Mon, 4 Jun 2012 17:40:45 +0000 (13:40 -0400)]
State that authorization rules must not rely on SpiderMonkey features

... e.g. we reserve the right to switch out the JS engine.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoSmall updates to the "Writing polkit applications" chapter
David Zeuthen [Mon, 4 Jun 2012 17:24:39 +0000 (13:24 -0400)]
Small updates to the "Writing polkit applications" chapter

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoUpdate pkexec(1) man page with example
David Zeuthen [Mon, 4 Jun 2012 16:34:22 +0000 (12:34 -0400)]
Update pkexec(1) man page with example

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoUpdate links to udisks docs
David Zeuthen [Mon, 4 Jun 2012 16:32:09 +0000 (12:32 -0400)]
Update links to udisks docs

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoRewrite the "Writing polkit applications" chapter
David Zeuthen [Fri, 25 May 2012 21:12:17 +0000 (17:12 -0400)]
Rewrite the "Writing polkit applications" chapter

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoLog when the name org.fd.PolicyKit1 has been acquired
David Zeuthen [Fri, 25 May 2012 17:37:49 +0000 (13:37 -0400)]
Log when the name org.fd.PolicyKit1 has been acquired

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoRun polkitd as an unprivileged user
David Zeuthen [Fri, 25 May 2012 16:40:42 +0000 (12:40 -0400)]
Run polkitd as an unprivileged user

There's really no reason to run all this code as uid 0.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoRemove unused DBUS_GLIB_* and GIO_* variables
David Zeuthen [Fri, 25 May 2012 15:20:05 +0000 (11:20 -0400)]
Remove unused DBUS_GLIB_* and GIO_* variables

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoEnsure polkitd is rebuilt if libpolkit-backend-1.la changes
David Zeuthen [Fri, 25 May 2012 15:12:26 +0000 (11:12 -0400)]
Ensure polkitd is rebuilt if libpolkit-backend-1.la changes

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoMove polkitd into src/polkitbackend
David Zeuthen [Fri, 25 May 2012 15:09:02 +0000 (11:09 -0400)]
Move polkitd into src/polkitbackend

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoUse g_unix_signal_add() from GLib 2.30
David Zeuthen [Fri, 25 May 2012 15:02:15 +0000 (11:02 -0400)]
Use g_unix_signal_add() from GLib 2.30

... instead of the one I wrote myself.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoClarify pkexec(1) variables
David Zeuthen [Thu, 24 May 2012 19:50:59 +0000 (15:50 -0400)]
Clarify pkexec(1) variables

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoCombine action and details parameters
David Zeuthen [Thu, 24 May 2012 18:51:46 +0000 (14:51 -0400)]
Combine action and details parameters

This also removes the ability to change detail parameters which is
actually a good thing. If we later need a way to change the
authentication message, we can always add something like
polkit.addAuthenticationMessageRule() so the user can register a
function returning a string.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoUse a condition variable to signal that runaway killer thread is ready
David Zeuthen [Thu, 24 May 2012 15:39:57 +0000 (11:39 -0400)]
Use a condition variable to signal that runaway killer thread is ready

... instead of the unsafe g_thread_yield() busy-wait loop.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoTerminate runaway scripts
David Zeuthen [Thu, 24 May 2012 15:26:34 +0000 (11:26 -0400)]
Terminate runaway scripts

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoUse "rules", not "scripts" to refer to files in rules.d
David Zeuthen [Wed, 23 May 2012 21:57:55 +0000 (17:57 -0400)]
Use "rules", not "scripts" to refer to files in rules.d

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoPass expanded identity list to the AuthenticationSession
David Zeuthen [Wed, 23 May 2012 21:44:43 +0000 (17:44 -0400)]
Pass expanded identity list to the AuthenticationSession

... otherwise it things like admin-identities being set to
["unix-group:session"] won't work.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAdd default rules
David Zeuthen [Wed, 23 May 2012 21:30:51 +0000 (17:30 -0400)]
Add default rules

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoStore private binaries in /usr/lib/polkit-1 instead of /usr/libexec
David Zeuthen [Wed, 23 May 2012 21:11:29 +0000 (17:11 -0400)]
Store private binaries in /usr/lib/polkit-1 instead of /usr/libexec

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoMention systemd(1) in the polkitd(8) man page
David Zeuthen [Wed, 23 May 2012 20:49:20 +0000 (16:49 -0400)]
Mention systemd(1) in the polkitd(8) man page

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoNuke polkitbackend library, localauthority backend and extension system
David Zeuthen [Wed, 23 May 2012 20:39:25 +0000 (16:39 -0400)]
Nuke polkitbackend library, localauthority backend and extension system

Any backend can now be implemented in JavaScript (if so desired) so we
don't need any of this any more.

Note that the libpolkitbackend library was never declared stable (the
preprocessor symbol POLKIT_BACKEND_I_KNOW_API_IS_SUBJECT_TO_CHANGE had
to be defined) so removing it is not an API/ABI break.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAdd a systemd .service file
David Zeuthen [Wed, 23 May 2012 20:16:20 +0000 (16:16 -0400)]
Add a systemd .service file

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoFix distcheck
David Zeuthen [Wed, 23 May 2012 19:58:15 +0000 (15:58 -0400)]
Fix distcheck

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoRename --enable-systemd to --enable-libsystemd-login
David Zeuthen [Wed, 23 May 2012 19:53:35 +0000 (15:53 -0400)]
Rename --enable-systemd to --enable-libsystemd-login

It's useful to be more specific because we also want an option to
install a systemd .service file which you may not want even if you are
using libsystemd-login...

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAdd real-world example featuring udisks2 and the drive.* variables it passes
David Zeuthen [Wed, 23 May 2012 18:12:38 +0000 (14:12 -0400)]
Add real-world example featuring udisks2 and the drive.* variables it passes

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoMake polkit_details_insert() remove the key if passed value is NULL
David Zeuthen [Wed, 23 May 2012 17:37:21 +0000 (13:37 -0400)]
Make polkit_details_insert() remove the key if passed value is NULL

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoUse <variablelist> instead of <informaltable> for Subject attributes
David Zeuthen [Wed, 23 May 2012 16:57:34 +0000 (12:57 -0400)]
Use <variablelist> instead of <informaltable> for Subject attributes

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoMention details["polkit.message"] and add an example using details
David Zeuthen [Wed, 23 May 2012 16:51:19 +0000 (12:51 -0400)]
Mention details["polkit.message"] and add an example using details

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoFix a couple typos in the docs
David Zeuthen [Wed, 23 May 2012 16:14:44 +0000 (12:14 -0400)]
Fix a couple typos in the docs

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoFix speling
David Zeuthen [Tue, 22 May 2012 19:45:06 +0000 (15:45 -0400)]
Fix speling

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agopolkitd: add reference to polkit(8) from its man page
David Zeuthen [Tue, 22 May 2012 18:18:19 +0000 (14:18 -0400)]
polkitd: add reference to polkit(8) from its man page

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoClarify docs a bit
David Zeuthen [Tue, 22 May 2012 18:00:36 +0000 (14:00 -0400)]
Clarify docs a bit

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agodocs: update SEE ALSO to make each man page point to all other man pages
David Zeuthen [Tue, 22 May 2012 17:51:18 +0000 (13:51 -0400)]
docs: update SEE ALSO to make each man page point to all other man pages

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agodocs: enclose local <citerefentry> in <link> to make links work
David Zeuthen [Tue, 22 May 2012 17:47:32 +0000 (13:47 -0400)]
docs: enclose local <citerefentry> in <link> to make links work

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoUpdate docs
David Zeuthen [Tue, 22 May 2012 17:38:51 +0000 (13:38 -0400)]
Update docs

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoCreate rules.d directories
David Zeuthen [Tue, 22 May 2012 13:57:20 +0000 (09:57 -0400)]
Create rules.d directories

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAdd test-cases and 10 second timeout for polkit.spawn()
David Zeuthen [Mon, 21 May 2012 18:38:49 +0000 (14:38 -0400)]
Add test-cases and 10 second timeout for polkit.spawn()

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoMention unix-netgroup:xyz as a valid return value in addAdminRule() functions
David Zeuthen [Mon, 21 May 2012 17:56:11 +0000 (13:56 -0400)]
Mention unix-netgroup:xyz as a valid return value in addAdminRule() functions

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoMinor doc fixes
David Zeuthen [Mon, 21 May 2012 17:54:35 +0000 (13:54 -0400)]
Minor doc fixes

Nuke the has_prefix() helper, it's just confusing.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAdd netgroup support
David Zeuthen [Mon, 21 May 2012 17:42:43 +0000 (13:42 -0400)]
Add netgroup support

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoTest that subject.isInGroup() works
David Zeuthen [Mon, 21 May 2012 16:29:01 +0000 (12:29 -0400)]
Test that subject.isInGroup() works

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAdd test cases for evaluation order
David Zeuthen [Mon, 21 May 2012 16:15:10 +0000 (12:15 -0400)]
Add test cases for evaluation order

In fact, this test uncovered that we were evaluating the rules in the
wrong order. Fix this.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agodocs: emphasize that registered functions may actually never be called
David Zeuthen [Mon, 21 May 2012 15:30:24 +0000 (11:30 -0400)]
docs: emphasize that registered functions may actually never be called

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoUse addRule() and addAdminRule()
David Zeuthen [Mon, 21 May 2012 15:03:50 +0000 (11:03 -0400)]
Use addRule() and addAdminRule()

... as the man page already says.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAlso load rules from /usr/share/polkit/rules.d
David Zeuthen [Mon, 21 May 2012 14:45:08 +0000 (10:45 -0400)]
Also load rules from /usr/share/polkit/rules.d

... in addition to /etc/polkit/rules.d.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agodocs: clarify how rules files work
David Zeuthen [Mon, 21 May 2012 14:17:19 +0000 (10:17 -0400)]
docs: clarify how rules files work

After feedback from Matthias Clasen <mclasen@redhat.com>.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAlso add an example of polkit.spawn() to polkit(8) man page
David Zeuthen [Sun, 20 May 2012 19:04:03 +0000 (15:04 -0400)]
Also add an example of polkit.spawn() to polkit(8) man page

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agodocs: add AUTHORIZATION RULES section to the polkit(8) man page
David Zeuthen [Sun, 20 May 2012 18:55:56 +0000 (14:55 -0400)]
docs: add AUTHORIZATION RULES section to the polkit(8) man page

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoDon't include command-line in spawning error messages
David Zeuthen [Sat, 19 May 2012 00:27:56 +0000 (20:27 -0400)]
Don't include command-line in spawning error messages

We don't even know it and it's not worth reconstructing it.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoMake polkit.spawn() take an array of arguments instead of a command-line
David Zeuthen [Sat, 19 May 2012 00:18:01 +0000 (20:18 -0400)]
Make polkit.spawn() take an array of arguments instead of a command-line

Much safer and easier this way.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAdd polkit.spawn() to spawn external programs
David Zeuthen [Fri, 18 May 2012 23:57:50 +0000 (19:57 -0400)]
Add polkit.spawn() to spawn external programs

... and also add polkit.quote() for quoting arguments when
constructing the command-line.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoMake it possible for JS code to change details
David Zeuthen [Fri, 18 May 2012 21:23:18 +0000 (17:23 -0400)]
Make it possible for JS code to change details

For example, to set the authentication message, a JS function can
simply do

 details["polkit.message"] = "Hey dude, XYZ, I need your password";

This can also be used to pass data back to the mechanism.

To make this work properly, we also introduce a slight change: the
a{ss} passed back to the mechanism (part of the AuthorizationResult
structure) will be initialized with the a{ss} the app passed itself in
the CheckAuthorization() call.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoReformat init.js and also avoid quoting non-string properties in toString()
David Zeuthen [Fri, 18 May 2012 20:04:12 +0000 (16:04 -0400)]
Reformat init.js and also avoid quoting non-string properties in toString()

Otherwise it's hard to tell whether 'true' is a string or a boolean...

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoEmit ::Changed signal after reloading rules
David Zeuthen [Fri, 18 May 2012 19:35:51 +0000 (15:35 -0400)]
Emit ::Changed signal after reloading rules

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoCollect garbage
David Zeuthen [Fri, 18 May 2012 19:34:50 +0000 (15:34 -0400)]
Collect garbage

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAdd a couple of more error checks
David Zeuthen [Fri, 18 May 2012 19:30:48 +0000 (15:30 -0400)]
Add a couple of more error checks

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoClean up code a bit
David Zeuthen [Fri, 18 May 2012 19:24:30 +0000 (15:24 -0400)]
Clean up code a bit

Also, move init code into init.js instead of using a C string for
it...

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoPass details to JS functions and simplify how Subject instances are constructed
David Zeuthen [Fri, 18 May 2012 16:01:44 +0000 (12:01 -0400)]
Pass details to JS functions and simplify how Subject instances are constructed

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoInclude seat and session in Subject object
David Zeuthen [Fri, 18 May 2012 04:09:02 +0000 (00:09 -0400)]
Include seat and session in Subject object

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAdd experimental authority backend using JavaScript rule files
David Zeuthen [Fri, 18 May 2012 03:27:58 +0000 (23:27 -0400)]
Add experimental authority backend using JavaScript rule files

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoPost-release version bump to 0.106
David Zeuthen [Tue, 24 Apr 2012 16:48:27 +0000 (12:48 -0400)]
Post-release version bump to 0.106

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoUpdate NEWS for release 0.105
David Zeuthen [Tue, 24 Apr 2012 16:46:24 +0000 (12:46 -0400)]
Update NEWS for release

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAdd Makefile rules for signing and publishing releases and docs
David Zeuthen [Tue, 24 Apr 2012 16:39:27 +0000 (12:39 -0400)]
Add Makefile rules for signing and publishing releases and docs

Also mention in README how the authenticity of releases can be
verified.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoUpdate the docs to use 'polkit' (instead of 'PolicyKit') as the name
David Zeuthen [Tue, 24 Apr 2012 16:25:11 +0000 (12:25 -0400)]
Update the docs to use 'polkit' (instead of 'PolicyKit') as the name

... as much as possible.

Also remove the license on the docs and the FSF's address.

Also point to http://www.freedesktop.org/software/polkit/docs/latest/
as that is going to be where docs are stored, going forward.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoMention pkttyagent(1) in "Writing PolicyKit applications" chapter
David Zeuthen [Tue, 24 Apr 2012 16:11:13 +0000 (12:11 -0400)]
Mention pkttyagent(1) in "Writing PolicyKit applications" chapter

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoFix type in docs
David Zeuthen [Thu, 12 Apr 2012 18:45:07 +0000 (14:45 -0400)]
Fix type in docs

It's RegisterAuthenticationAgentWithOptions, not just
RegisterAuthenticationAgent.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoMake it possible to influence agent registration with an a{sv} parameter
David Zeuthen [Thu, 12 Apr 2012 17:54:27 +0000 (13:54 -0400)]
Make it possible to influence agent registration with an a{sv} parameter

Additionally, add a "fallback" option. Also add support in this in the
pkttyagent(1) program.

This slightly breaks libpolkit-backend API by adding a GVariant* param
to one of the class vfuncs... but that API is already declared
unstable so that's fine.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAdd pkttyagent(1) helper
David Zeuthen [Wed, 11 Apr 2012 17:15:48 +0000 (13:15 -0400)]
Add pkttyagent(1) helper

This came up while working on

 https://bugzilla.redhat.com/show_bug.cgi?id=804088

and is useful for example if it's not suitable or appropriate to link
against the polkit libraries.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoPolkitAgentSession: Don't leak file descriptors
David Zeuthen [Thu, 8 Mar 2012 20:36:30 +0000 (15:36 -0500)]
PolkitAgentSession: Don't leak file descriptors

This was reported here

 https://bugzilla.gnome.org/show_bug.cgi?id=671486

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoPolkitUnixSession: Actually return TRUE if a session exists
David Zeuthen [Mon, 6 Feb 2012 16:26:06 +0000 (11:26 -0500)]
PolkitUnixSession: Actually return TRUE if a session exists

Also, don't treat the integer returned by sd_session_get_uid() as a
boolean because that's just confusing.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoPolkitUnixSession: Set error if we cannot find a session for the given pid
David Zeuthen [Mon, 6 Feb 2012 16:24:53 +0000 (11:24 -0500)]
PolkitUnixSession: Set error if we cannot find a session for the given pid

Also, don't treat the integer returned by sd_pid_get_session() as a
boolean because that's just confusing. Also, don't confuse memory
supposed to be freed by g_free() and free(3) with each other. See

 https://bugzilla.redhat.com/show_bug.cgi?id=787222

for more details.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoVarious builddir != srcdir fixes
Ryan Lortie [Sat, 7 Jan 2012 06:40:01 +0000 (01:40 -0500)]
Various builddir != srcdir fixes

Fix autogen.sh to work when run from the builddir.

Also: switch over to using the gobject-introspection Makefile (which is
out-of-tree safe) instead of hardcoding our own version.

https://bugs.freedesktop.org/show_bug.cgi?id=44599

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoPost-release version bump
David Zeuthen [Tue, 3 Jan 2012 17:04:27 +0000 (12:04 -0500)]
Post-release version bump

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoUpdate NEWS for release 0.104
David Zeuthen [Tue, 3 Jan 2012 16:58:51 +0000 (11:58 -0500)]
Update NEWS for release

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoDetect whether systemd is available and default to use if so
David Zeuthen [Tue, 3 Jan 2012 16:29:37 +0000 (11:29 -0500)]
Detect whether systemd is available and default to use if so

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoAdd optional systemd support
Matthias Clasen [Tue, 20 Dec 2011 03:37:05 +0000 (22:37 -0500)]
Add optional systemd support

When configured with --enable-systemd, this patch makes
polkit use systemd for session tracking instead of ConsoleKit.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoBug 43610 - Add netgroup support
Nikki VonHollen [Tue, 20 Dec 2011 23:11:23 +0000 (15:11 -0800)]
Bug 43610 - Add netgroup support

https://bugs.freedesktop.org/show_bug.cgi?id=43610

Added netgroup support and additional unit tests with MockLibc support.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoBug 43608 – Add unit tests
Nikki VonHollen [Tue, 20 Dec 2011 16:10:17 +0000 (11:10 -0500)]
Bug 43608 – Add unit tests

https://bugs.freedesktop.org/show_bug.cgi?id=43608

Basic unittest support and a few tests. Adds basic unit tests for:

PolkitIdentity, PolkitUnixUser, PolkitUnixGroup,
PolkitBackendLocalAuthorizationStore, and PolkitBackendLocalAuthority.

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoPost-release version bump to 0.104
David Zeuthen [Tue, 6 Dec 2011 15:50:06 +0000 (10:50 -0500)]
Post-release version bump to 0.104

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoFix typo 0.103
David Zeuthen [Tue, 6 Dec 2011 15:47:29 +0000 (10:47 -0500)]
Fix typo

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoUpdate NEWS for release
David Zeuthen [Tue, 6 Dec 2011 15:36:54 +0000 (10:36 -0500)]
Update NEWS for release

Signed-off-by: David Zeuthen <davidz@redhat.com>