Feeds

freedesktop.org

Friday 12 October 2012

In the last two weeks, I took some time to review patches submitted for cups-pk-helper and desktop-file-utils, and worked a bit on the code. This means new releases, which keeps me on track for the "two releases a year" schedule followed for those software :-)

cups-pk-helper 0.2.3 0.2.4

It is recommended to update to the 0.2.3 version of cups-pk-helper, due to a security flaw in the old code (CVE-2012-4510). I found it while fixing a compiler warning about a return value being ignored; re-reading that old code, I realized that it was, hrm, not really solid, that it was not checking permissions, and that it could actually be abused to overwrite any file (among other issues)... Thankfully, this can only be exploited if the user explicitly approves the action since it's protected with polkit authentication (using the admin password). So this is not as severe as it could have been. I want to thank Sebastian Krahmer from the SUSE Security Team, who was really helpful in reviewing my iterative fixes.

The other changes are build-time compatibility with cups 1.6, some additional paranoid processing of the input we get via dbus, and updated translations (thanks to transifex).

Update: the 0.2.3 tarball had a small bug when detecting the cups version, try 0.2.4 instead ;-)

desktop-file-utils 0.21

The 0.21 release of desktop-file-utils is mainly about an update of the validator to deal with several recent (and not so recent) changes in the XDG Menu specification: a main category is not required anymore (although still recommended if one main category makes sense for the application), Science is now a main category, and new categories have been registered (including the Spirituality one, that has been discussed years ago).

The validator now also correctly handles the new values for the AutostartCondition field used by GNOME 3, and features some experimental hints in the output for .desktop files that could possibly be improved. Those hints are experimental since I'm unsure if they will really help, or just annoy people (note that they can be ignored with the --no-hints option). At the moment, they only deal with categories, but I guess it shouldn't be hard to find more hints to add (such as hey, you're missing an icon!).

Of course, while working on desktop-file-utils, I took a look at some patches and issues that were recently discussed on the xdg mailing list, and pushed some changes to the menu specification. I'm a bit sad about the fact that nearly nobody is actively working on most specs (blaming myself too, since I look at patches/issues only a few times a year) and that feedback about the proposed changes is rare (these days, I'd say getting two or more people to approve a change is an exception). It'd be great to have a few people step up and bring new energy to this effort!

Saturday 16 October 2010

A few months ago, after talking about this for a while, I finally did a git migration of various XDG specifications (autostart, basedir, desktop-entry, menu and systemtray). It was a test migration, so I only published this in a personal repository on freedesktop.org. And I quickly became busy with other things.

I finally pushed this repository to xdg/xdg-specs on Thursday. It's a shame it took so long, especially since some people were waiting for it. But it's done. So what's next? I'll see if we can import a few more specifications in there, but I'll also look at improving the website, and how it's generated. It might make sense to re-use what was done for library.gnome.org here.

Oh, and it's also a good opportunity to start fixing some long-standing issues with some specifications :-) I have some list of improvements I'd like to see, but do not hesitate to share some of the annoyances you experience with the specifications!

Monday 15 March 2010

A few weeks ago, I migrated desktop-file-utils from CVS to git, but after pushing it, I realized I could have done the migration in a slightly better way. Ouch. Enters one hero, Tollef: he was kind enough to allow me to kill the old git repository and start from scratch. This means desktop-file-utils finally lives in git. Woohoo!

It enabled me to commit various patches I had done locally in the meantime (I really didn't want to use CVS again, so I was waiting for git ;-)), and then to release desktop-file-utils 0.16. It's the first release since February 2008! Two years without a tarball is quite bad, especially since there were fixes waiting in CVS. But everything is good again, and we should now be back on track, with more frequent releases.

There are a bunch of changes in this release, including improved checks when validating a .desktop file. Of course, there's always the risk that this will result in files that are now invalid while they used to be marked as valid, but the new future error type of warnings should mitigate this. The other good news is that there's only one enhancement request opened in bugzilla, and I'm not even sure there's something we can do about it. But I'm confident you've already find a bug, so don't forget to file it ;-)

It all looks perfect, doesn't it? Well, there's one big thing missing, though: a regression suite. I still can't believe that we're releasing a validator for .desktop files without a regression suite, and I'm convinced there have been regressions in the past (or even in this release) that went unnoticed. I'd really love to have a few people help create tons of .desktop files that would stress the validator and make sure it validates what the specification says. It's an easy way to contribute: it just requires free time and understanding of the specification. Please contact me if you want to give it a try!

Friday 19 February 2010

It looks like I succeeded in never promoting cups-pk-helper... Let me try to fix this so that more distributions start to look at it :-)

One year and a half ago, for openSUSE 11.1, we wanted to make it easy to configure printers. So naturally, we integrated system-config-printer since it works well, is well-maintained, and is adopted by other distributions. However, the security team didn't want to make the default cups configuration too permissive (for good reasons), and it resulted in lots of root password prompts by default, which is not so cool for end-users. And we thought: So if we don't want to make the whole cups configuration permissive, maybe we could have a mechanism to have fine-grained privileges... There's this cool little project called PolicyKit that could help. This is how cups-pk-helper was born.

We could of course have tried to push this solution in cups itself, and to be honest, this is what would make most sense. However it would have required much more effort: nobody wants a patch that wouldn't get accepted by the cups team, and the cups team would certainly require this feature to work in a way that would make it implementable on other operating systems. And I didn't feel ready for such a battle.

So I went ahead with the small helper, and after a few hours of hacking in September 2008, there was already some working code and a patch to make system-config-printer use this. A few bugs later, it all went in openSUSE. At some point, Tim Waugh accepted the system-config-printer and Fedora also started using cups-pk-helper. This is also when Marek Kasik started working on cups-pk-helper, implementing some additional features.

So what kind of fine-grained privileges do we offer? There are actions for editing local printers, remote printers, classes, jobs you own, or jobs you don't own, as well as simpler actions like the one to enable a printer (something you might want to allow without allowing the edition of a printer), or a low-level action that can be used to upload/download a file to/from the cups configuration. We're trying to be relatively flexible, while still limiting the actions to what we believe is really useful. What we have right now looks relatively reasonable, but it's certainly also wrong in some ways. We just need feedback to know how it's wrong ;-)

To make it easy to integrate cups-pk-helper in system-config-printer, the D-Bus API is based to a large extent on the pycups one. The good news is that the API makes sense, so it's no big deal; but we could possibly diverge a bit if needed. So if you're working on another tool to configure printers, don't hesitate to look at the D-Bus API and send comments on what is missing there for you.

Oh, and of course, in openSUSE, we still require the root password for all those fine-grained privileges, but at least this is easily configurable now :-)

Sunday 27 April 2008

So, Richard is giving his talk about PackageKit. But you, know even his talk has majorbugs. Clearly bad. I guess he will argue that it's not his fault, and that's because we went to a typical spanish restaurant on Friday evening. I'm not sure I can talk about this unique experience, though, to be honest. Will doesn't want to share too much details either, but I'm sure Richard will be glad to write about the whole story.

On the constructive side, yesterday, I've been hacking a bit on desktop-file-utils and ironing out the plan to take over the world, err, I mean, the plan to fix many issues with the fd.o specs. Hopefully, everything will go smooth.