Skip to content

PGPASSFILE on Windows can't work #940

@Radranic

Description

@Radranic

It seems the implementation from #75 can't work on windows due to some file permissions limitations in go.

Line 204 of conn.go checks permissions to ensure there is no group/other permissions set (also should it be 077 instead of 0x77?).

Unfortunately due to windows not supporting unix permissions the permissions are always have all the user/group/other bits set to the same values. Relevant source

While ideally the windows permission mapping would be fixed, it would be nice if this worked in the mean time. I'm not sure what the exact expected behavior is given we can't check the bits correctly, but I can make a PR if I know what the goal (aside from working) is.

Also if someone more familiar with unix permision bits could verify the 0x77 vs 077?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions