This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Possible bug: d does not seem to read ~/.d.conf

On 10 August 2007 16:22, Thorsten Kampe wrote:

> The problem (/my/ problem and maybe Ronald's) is that d reads the home
> directory from /etc/passwd and not from the environment variable
> $HOME. In my setup these differ.

  Is that even valid?  Hmmm.  Posix does say:
    The system shall initialize this variable at the time of login to be a pathname of the user's home directory. See <pwd.h>.  "

but then again, it also says:
"   3.192 Home Directory
The directory specified by the HOME environment variable.  "

and also:
    Determine the pathname of the user's home directory. The contents of HOME are used in tilde expansion as described in Tilde Expansion. This volume of IEEE Std 1003.1-2001 specifies the effects of this variable only for systems supporting the User Portability Utilities option.  "

although that last one was revised in Issue 6:

"  In the ENVIRONMENT VARIABLES section, the text "user's home directory" is updated to "directory referred to by the HOME environment variable".  "

> In my opinion $HOME should take precedence over the home directory set
> in /etc/passwd.

  I think it's kind of ambiguous.  The 'd' man page specifically refers to ".d.conf in the user's home directory", as opposed to "~/.d.conf"; I think those two definitions are allowed to diverge, from what I quoted above.  The spec is unclear: how can you initialise HOME from "the user's home directory", if whatever the user's home directory is is only defined in terms of the contents of $HOME, without reference to field #6 in /etc/passwd?  That would be a circular reference to uninitialised data, that would!

Can't think of a witty .sigline today....

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]