View Issue Details

IDProjectCategoryView StatusLast Update
0005623GNUnetutil librarypublic2019-05-12 13:29
Reporterschanzen Assigned Toschanzen  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version0.11.0 
Fixed in Version0.11.4 
Summary0005623: File exansion does wierd stuff
DescriptionI think something is wrong with expansion see below.
Steps To Reproduce$ gnunet-config -s arm
CONFIG = ~/.config/gnunet.conf
GLOBAL_PREFIX =
UNIX_MATCH_GID = YES
UNIX_MATCH_UID = YES
UNIXPATH = $GNUNET_USER_RUNTIME_DIR/gnunet-service-arm.sock
ACCEPT_FROM6 = ::1;
ACCEPT_FROM = 127.0.0.1;
BINARY = gnunet-service-arm
HOSTNAME = localhost


$ gnunet-config -f -s arm
CONFIG = /Users/schanzen/.config/gnunet.conf
GLOBAL_PREFIX = /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/
UNIX_MATCH_GID = /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/YES
UNIX_MATCH_UID = /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/YES
UNIXPATH = /var/folders/mq/603h69c166s4szrpmtxmz16rkwr0f0/T//gnunet-schanzen-runtime//gnunet-service-arm.sock
ACCEPT_FROM6 = /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/::1;
ACCEPT_FROM = /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/127.0.0.1;
BINARY = /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/gnunet-service-arm
HOSTNAME = /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/localhost
TagsNo tags attached.

Activities

Christian Grothoff

2019-03-02 18:10

manager   ~0014121

Check your environment variables and look at the [paths] section (util.conf). I doubt there is a real issue here, likely just some odd environment settings.

schanzen

2019-03-02 18:51

administrator   ~0014122

Nope. All normal (fresh installation) And I mean what am I looking for?
Why would

UNIX_MATCH_GID = YES

_ever_ be prepended with anything??

schanzen

2019-03-02 18:52

administrator   ~0014123

Oh btw it prepends my $PWD.

nikita

2019-03-03 10:30

developer   ~0014127

I can confirm this, $pwd prepended everywhere put in the UNIXPATH.
This is 0.11.0 release, current pkgsrc installation

schanzen

2019-03-03 11:02

administrator   ~0014128

Last edited: 2019-03-03 11:09

Found it. The bug is in gnunet-config:88.

@grothoff: _This: is why I strongly urge you to add braces always and configure your editor to properly indent (Not tabs at all or tabstop = 2).
I am pretty sure this is not the bahavior you intended.

EDIT: The problem is different, but I still stand by the above!

schanzen

2019-03-03 11:08

administrator   ~0014129

The problem is quite stupid.
-f interprets _every_ item as a filename and does expansion. We do not have a mechanism to detect the type of config option...

schanzen

2019-03-03 11:15

administrator   ~0014130

I suggest that for GNUNET_STRINGS_filename_expand ()
we disable the relative path expansion (615ff) or make it optional via switch.
Is there any reasonable use case for this?

schanzen

2019-03-03 11:57

administrator   ~0014131

Also I think an empty GLOBAL_PREFIX is not supposed to mean $PWD. And this one actually _is_ a filename/dirname so we must call expand on it...

Christian Grothoff

2019-03-05 14:02

manager   ~0014147

I'm OK with disabling relative path expansion. If you do so, please mention it in ChangeLog.

schanzen

2019-03-12 10:18

administrator   ~0014188

I am fine with adding a better description to the flag.

schanzen

2019-03-12 10:27

administrator   ~0014189

Changed in 717ea75196137ff4263bb0c724534588632a8c23

schanzen

2019-05-02 14:27

administrator   ~0014369

Closing this.

Issue History

Date Modified Username Field Change
2019-03-02 17:18 schanzen New Issue
2019-03-02 18:10 Christian Grothoff Note Added: 0014121
2019-03-02 18:10 Christian Grothoff Assigned To => schanzen
2019-03-02 18:10 Christian Grothoff Status new => feedback
2019-03-02 18:51 schanzen Note Added: 0014122
2019-03-02 18:52 schanzen Note Added: 0014123
2019-03-03 10:30 nikita Note Added: 0014127
2019-03-03 11:02 schanzen Note Added: 0014128
2019-03-03 11:08 schanzen Note Added: 0014129
2019-03-03 11:09 schanzen Note Edited: 0014128
2019-03-03 11:15 schanzen Note Added: 0014130
2019-03-03 11:57 schanzen Note Added: 0014131
2019-03-05 14:02 Christian Grothoff Note Added: 0014147
2019-03-12 10:18 schanzen Note Added: 0014188
2019-03-12 10:27 schanzen Note Added: 0014189
2019-05-02 14:27 schanzen Status feedback => resolved
2019-05-02 14:27 schanzen Resolution open => fixed
2019-05-02 14:27 schanzen Fixed in Version => 0.11.4
2019-05-02 14:27 schanzen Note Added: 0014369
2019-05-12 13:29 Christian Grothoff Status resolved => closed