nbsmtp looks for config file in the wrong place

Bug #265019 reported by pieter_dt
2
Affects Status Importance Assigned to Milestone
nbsmtp (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: nbsmtp

On hardy nbsmtp out of the box comes with a config file in /etc: /etc/nbsmtprc
but it fails to read it during execution, and instead looks for /usr/etc/nbsmtprc

From strace it can be seen to be looking in the wrong place:
brk(0) = 0x804e000
brk(0x806f000) = 0x806f000
open("/usr/etc/nbsmtprc", O_RDONLY) = -1 ENOENT (No such file or directory)

no attempts are seen to open /etc/nbsmtprc

Revision history for this message
David Frey (dpfrey) wrote :

I also discovered that nbsmtp wasn't reading my /etc/nbsmtprc file. I looked at the nbsmtprc source a bit and found this block of code at line 67 of fileconfig.c:

asprintf(&local_tmp_buf,"%s/nbsmtprc",SYSCONFDIR);

I'm not really sure what defines SYSCONFDIR, but a little bit of searching uncovered a few suspicious lines in the configure file:

bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'

If ${prefix} is empty then datadir=/share, but if ${prefix} is "/usr", then sysconfdir=/usr/etc. It seems like the latter case is what is happening.

Hopefully someone who knows a little bit more about Linux applications and package building can translate this information into a fix.

Revision history for this message
Brian Murray (brian-murray) wrote :

This package has been removed from the archive in Lucid and subsequently I am setting this bug's status to Won't Fix. Please submit any bugs about other packages that you may experience in the future.

Changed in nbsmtp (Ubuntu):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.