|
From: | Hans Yperman |
Subject: | parallel: Error: $XDG_CONFIG_DIRS can only contain [-a-z0-9_+,.%:/= ]. |
Date: | Tue, 17 Dec 2024 19:13:56 +0000 |
Hi,
Recent Ubuntus have the option to log in using active directory and sssd/realmd. One consequence is my username containing the @ character as AD names are shaped username@domain, and hence so do my home folder and a few environment variables. I expected this
to cause mayhem, but everything seems to work nicely. Except GNU parallel breaks because it has a whitelist for some environment variables, and @ isnt included.
I assume the code in file parallel line 2925 is to blame. I did a quick test by adding it to the latest download, and that indeed fixes it.
sub test_safe_chars {
my $var = shift;
if($ENV{$var} =~ m{^[-a-z0-9_+,.%:/= ]*$}is) {
# OK
} else {
unsafe_warn("\$$var can only contain [-a-z0-9_+,.%:/= ].");
}
}
I see no character limitations in the XDG spec:
I don't know what characters are valid in a username. The 2nd response from stackoverflow gives a whitelist from POSIX, but parallel already supports more:
The realmd documentation for default-home shows it will by default contain an @
Thanks in advance for looking into this. And of course, thanks for the parallel tool which has served me very well.
Some command line commands for demonstration:
$ parallel
parallel: Error: $XDG_CONFIG_DIRS can only contain [-a-z0-9_+,.%:/= ].
$ XDG_CONFIG_DIRS= parallel
parallel: Warning: Input is read from the terminal. You are either an expert
[SNIP]
$ parallel --version
GNU parallel 20231122
Copyright (C) 2007-2023 Ole Tange, http://ole.tange.dk and Free Software
Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
[SNIP]
$ echo $XDG_CONFIG_DIRS
/home/hans.yperman@vliz.be/.config/kdedefaults:/etc/xdg/xdg-plasma:/etc/xdg
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.1 LTS
Release: 24.04
Codename: noble
|
[Prev in Thread] | Current Thread | [Next in Thread] |