Re: [arch-dev-public] Changes to postgresql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Thu, Oct 11, 2012 at 03:43:20PM +0300, Marti Raudsepp wrote:
> On Thu, Oct 11, 2012 at 2:26 PM, Thomas Bächler <thomas@xxxxxxxxxxxxx> wrote:
> > 1)
> > postgresql expects its configuration files in /usr/etc/postgresql/. It
> > doesn't install any files there by default, so namcap doesn't notice -
> > however, you can copy the sample files from /usr/share/postgresql to
> > this location. This must be fixed by appending --sysconfdir=/etc to the
> > configure options.
> 
> I think you're wrong about this. PostgreSQL, by default, does not
> store config files in /etc (or sysconfdir) at all. Configuration files
> are stored along with everything else in PGDATA
> (/var/lib/postgres/data)...
> 
> % sudo -u postgres strace -eopen postgres -D /var/lib/postgres/data
> 2>/tmp/strace.out
> [...]
> ^C
> % egrep '(etc|conf)' /tmp/strace.out
> 
> open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
> open("/var/lib/postgres/data/postgresql.conf", O_RDONLY) = 3
> open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
> open("/etc/host.conf", O_RDONLY|O_CLOEXEC) = 3
> open("/etc/resolv.conf", O_RDONLY|O_CLOEXEC) = 3
> open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
> open("/etc/hosts", O_RDONLY|O_CLOEXEC)  = 3
> open("/etc/gai.conf", O_RDONLY|O_CLOEXEC) = 3
> open("/etc/hosts", O_RDONLY|O_CLOEXEC)  = 8
> open("/var/lib/postgres/data/pg_hba.conf", O_RDONLY) = 9
> open("/var/lib/postgres/data/pg_ident.conf", O_RDONLY) = 9
> 
> No attempted accesses to /usr/etc.
> 
> Regards,
> Marti

lack of evidence in an strace doesn't absolve the wrong config flag.

$ strings /usr/sbin/postgres | grep -F /usr/etc
FILE:/usr/etc/postgresql/krb5.keytab
/usr/etc/postgresql

Feel free to scan any other binary shipped with postgres. Pretty much
all of them refer to /usr/etc/postgresql.

d


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux