[28309] 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:41:22 2014

Date: Sun, 6 Jul 2014 12:41:14 -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.1407061239040.9845@infinite-loop.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed



On Sun, 6 Jul 2014, Benjamin Kaduk wrote:

> I think a little more paranoid shell quoting may be needed in these new
> files.  (Though, maybe Anders will tell me I'm wrong.)
>
> On Mon, 16 Jun 2014, Jonathan D Reed wrote:
>
>> https://github.com/mit-athena/dconf-config/commit/bdde42c7ba8495a6acf96e2b834e2f560546b468
>> commit bdde42c7ba8495a6acf96e2b834e2f560546b468
>> Author: Jonathan Reed <jdreed@mit.edu>
>> Date:   Mon Jun 16 15:42:56 2014 -0400
>>
>>    Initial check-in of dconf-config
>> 
>> diff --git a/debian/10debathena-copy-dconf b/debian/10debathena-copy-dconf
>> new file mode 100644
>> index 0000000..adfd58c
>> --- /dev/null
>> +++ b/debian/10debathena-copy-dconf
>> +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'?
>
>> +}
>> +
>> +ATHENA_DCONF_PROFILE=/etc/dconf/profile/athena_user
>> +PROFILE_DIR=${XDG_CONFIG_HOME:-"$HOME/.config"}/dconf
>
> What ensures that the expansion of XDG_CONFIG_HOME contains no whitespace?
>
>> +if [ -f "$ATHENA_DCONF_PROFILE" ] && \
>> +    [ "$DEBATHENA_HOME_TYPE" = afs ] && \
> [...]
>> 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.

Er, actually, generate_dconf_user.sh is gone (removed in 9549cd39 because 
it didn't work).  The equivalent code is now in the Makefile, but I will 
add sanity checking there.

-Jon

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