Bug 164197 - smsd(comms/smstools3) doesn't read some configurations
Summary: smsd(comms/smstools3) doesn't read some configurations
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Guido Falsi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-16 09:10 UTC by Pavel Timofeev
Modified: 2014-06-25 10:27 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Timofeev 2012-01-16 09:10:08 UTC
I don't know why but smsd daemon doesn't work under dialer group that has been defined in rc script. 

Current ports rc script looks 
# cat /usr/local/etc/rc.d/smsd
..
..

: ${smsd_user="uucp"}
: ${smsd_group="dialer"}

rcvar=`set_rcvar`
pidfile=${smsd_pidfile}
command="/usr/local/bin/smsd"
command_args="-c${smsd_config} -p${smsd_pidfile} -i${smsd_infofile} -l${smsd_logfile} -u${smsd_user} -g${smsd_group}"

run_rc_command "$1"

# service smsd start
# ps ax | grep sms
68327  ??  Ss       0:00.00 /usr/local/bin/smsd -c/usr/local/etc/smsd.conf -p/var/run/smsd/smsd.pid -i/var/run/smsd/smsd.working -l/var/log/smsd/smsd.log -uuucp -gdialer
68328  ??  S        0:00.00 /usr/local/bin/smsd -c/usr/local/etc/smsd.conf -p/var/run/smsd/smsd.pid -i/var/run/smsd/smsd.working -l/var/log/smsd/smsd.log -uuucp -gdialer
68330   0  R+       0:00.00 grep sms


]# tail  /var/log/smsd/smsd.log
2012-01-16 13:02:43,2, smsd: Smsd mainprocess terminated. PID 68327, was started 12-01-16 13:01:48.
2012-01-16 13:05:11,2, smsd: Smsd v3.1.14 started.
2012-01-16 13:05:11,2, smsd: Running as uucp:uucp.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-01-16 09:10:18 UTC
Responsible Changed
From-To: freebsd-ports-bugs->mm

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Martin Matuska freebsd_committer freebsd_triage 2012-09-04 07:44:09 UTC
Responsible Changed
From-To: mm->ports

I no longer maintain this port, put PR back to pool.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2012-09-11 06:43:57 UTC
State Changed
From-To: open->open

Canonicalize assignment. 


Comment 4 Mark Linimon freebsd_committer freebsd_triage 2012-09-11 06:43:57 UTC
Responsible Changed
From-To: ports->freebsd-ports-bugs
Comment 5 Stefan Walter freebsd_committer freebsd_triage 2013-05-01 09:15:17 UTC
Hi Pavel,

unfortunately, there hasn't been any activity with your problem report for
comms/smstools3 (see [1]) for quite a while. In the meantime, the port has
been updated and modified multiple times. What is the state of things
here? Are you still seeing the problem you reported with an up-to-date
ports tree, or should this PR be closed?

Best regards,
Stefan

[1]: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/164197
Comment 6 Stefan Walter freebsd_committer freebsd_triage 2013-05-01 09:15:40 UTC
State Changed
From-To: open->feedback

Awaiting maintainer's feedback. 


Comment 7 Stefan Walter freebsd_committer freebsd_triage 2013-05-01 09:15:40 UTC
Responsible Changed
From-To: freebsd-ports-bugs->stefan

Track this while waiting for maintainer's feedback.
Comment 8 Stefan Walter freebsd_committer freebsd_triage 2013-05-01 09:45:40 UTC
For the record - submitter has replied:

Pavel Timofeev, 01.05.13, 10:38h CEST:

> Hi! Thanks for your attention!
> Well, I'll check it in the next few days.
Comment 9 Pavel Timofeev 2013-05-01 12:50:17 UTC
Nothing changed. It runs as uucp:uucp.

2013/5/1 Stefan Walter <stefan@freebsd.org>:
> Hi Pavel,
>
> unfortunately, there hasn't been any activity with your problem report for
> comms/smstools3 (see [1]) for quite a while. In the meantime, the port has
> been updated and modified multiple times. What is the state of things
> here? Are you still seeing the problem you reported with an up-to-date
> ports tree, or should this PR be closed?
>
> Best regards,
> Stefan
>
> [1]: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/164197
Comment 10 Pavel Timofeev 2013-05-01 13:01:39 UTC
Addition info.
In rc.d script we can see uucp:dialer which is IMO right user:group
under FreeBSD for this software.
[root@timp ~]# grep ': ${smsd_[u|g]' /usr/local/etc/rc.d/smsd
: ${smsd_user="uucp"}
: ${smsd_group="dialer"}

In log we see uucp:uucp
[root@timp ~]# grep 'Running as' /var/log/smsd/smsd.log
2013-05-01 15:49:12,2, smsd: Running as uucp:uucp.

Procstat tells about uucp:uucp
[root@timp ~]# procstat -e 42350
  PID COMM             ENVIRONMENT
42350 smsd             VENDOR=amd LOGNAME=uucp PAGER=more
OSTYPE=FreeBSD MACHTYPE=x86_64
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin://bin
EDITOR=vi HOST=timp REMOTEHOST=172.16.254.14 PWD=/ GROUP=uucp
USER=uucp HOME=/ HOSTTYPE=FreeBSD BLOCKSIZE=K RC_PID=42340 SHLVL=1
[root@timp ~]# procstat -s 42350
  PID COMM              EUID  RUID SVUID  EGID  RGID SVGID UMASK FLAGS GROUPS
42350 smsd                66    66    66    66    66    66   022 -     66


2013/5/1 Stefan Walter <stefan@freebsd.org>:
> Hi Pavel,
>
> unfortunately, there hasn't been any activity with your problem report for
> comms/smstools3 (see [1]) for quite a while. In the meantime, the port has
> been updated and modified multiple times. What is the state of things
> here? Are you still seeing the problem you reported with an up-to-date
> ports tree, or should this PR be closed?
>
> Best regards,
> Stefan
>
> [1]: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/164197
Comment 11 Stefan Walter freebsd_committer freebsd_triage 2013-06-15 22:28:05 UTC
State Changed
From-To: feedback->open

Feeback received. 


Comment 12 Stefan Walter freebsd_committer freebsd_triage 2013-06-15 22:28:05 UTC
Responsible Changed
From-To: stefan->freebsd-ports-bugs

Return to pool as I currently do not have the time to work on this.
Comment 13 Guido Falsi freebsd_committer freebsd_triage 2013-10-22 15:45:49 UTC
Responsible Changed
From-To: freebsd-ports-bugs->madpilot

I'll take it.
Comment 14 Guido Falsi freebsd_committer freebsd_triage 2013-10-22 16:01:37 UTC
Hi,

I just committed a few changes/updates to the smstools3 port and took 
maintainership for it.

I have analyzed your report, here is what I found out:

In the program code in src/smsd.c line 6482, near the start of the 
main() function I found this comment:

// 3.1.7: If group was given, add that to the group access list 
(previously was set to only group).

And it looks to me the code below actually does this, there is also some 
debugging code below you can run by removing the ifdefs around it to 
print the list of groups.

So the software intentionally does not change the primary group of the 
process(which is what gets printed in the log file), but just adds the 
configured group to the list of groups of the process.

If you agree with my analysis I'd like to close this PR as solved.

Thanks!

-- 
Guido Falsi <madpilot@FreeBSD.org>
Comment 15 Guido Falsi freebsd_committer freebsd_triage 2013-10-22 16:02:37 UTC
State Changed
From-To: open->feedback

Ask for submitter permission to close PR.
Comment 16 Pavel Timofeev 2013-10-23 08:06:55 UTC
Bad news =( Ok, you can close it.
Comment 17 Guido Falsi freebsd_committer freebsd_triage 2013-10-24 09:09:59 UTC
State Changed
From-To: feedback->closed

The behaviour is intentional from upstream code.
Comment 18 Pavel Timofeev 2014-06-25 10:27:15 UTC
I've found actual problem.
It's desribed here https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191361