[28308] in Source-Commits

home help back first fref pref prev next nref lref last post

Re: dconf-config commit: Initial check-in of dconf-config

daemon@ATHENA.MIT.EDU (Jonathan Reed)
Sun Jul 6 12:23:16 2014

Date: Sun, 6 Jul 2014 12:23:08 -0400 (EDT)
From: Jonathan Reed <jdreed@MIT.EDU>
To: Benjamin Kaduk <kaduk@MIT.EDU>
cc: source-commits@MIT.EDU
In-Reply-To: <alpine.GSO.1.10.1407061103260.17412@multics.mit.edu>
Message-ID: <alpine.DEB.2.02.1407061220240.9845@infinite-loop.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed



>> +get_user_dconf_profile() {
>> +    profile=
>> +    if [ -f "/etc/dconf/profile/user" ]; then
>> +	profile=$(awk -F: '/^user-db/ { print $2}' /etc/dconf/profile/user)
>> +    fi
>> +    USER_PROFILE="${profile:-user}"
>
> These quotes don't do much if word-splitting was already performed when 
> setting the value of 'profile'?

Correct.  I put them in there for paranoia's sake, but I'll quote 
"profile" too.  Note that anything except [\w+] is an invalid profile 
name (and dconf will simply ignore it).

>> +PROFILE_DIR=${XDG_CONFIG_HOME:-"$HOME/.config"}/dconf
>
> What ensures that the expansion of XDG_CONFIG_HOME contains no whitespace?

"Good question."  I will quote harder.

>> diff --git a/debian/generate_dconf_user.sh b/debian/generate_dconf_user.sh
>> new file mode 100755
>> index 0000000..736b8a5
>> --- /dev/null
>> +++ b/debian/generate_dconf_user.sh
>> @@ -0,0 +1,13 @@
>> +#!/bin/sh
>> +
>> +user_db="user"
>> +codename=$(lsb_release -sc 2>/dev/null)
>
> Paranoid quoting would also quote this expansion, I think.

I believe LSB requires codenames to not contain spaces.  (Which is why the 
codename for RHEL is CamelCase.)  I'm happy to quote anyway though.


home help back first fref pref prev next nref lref last post