#19823: dnsmasq-full fails to start with DNSSEC (cannot create timestamp file
/etc/dnsmasq.time: Permission denied)
-----------------------+------------------------
  Reporter:  andersk   |      Owner:  developers
      Type:  defect    |     Status:  new
  Priority:  normal    |  Milestone:
 Component:  packages  |    Version:  Trunk
Resolution:            |   Keywords:
-----------------------+------------------------

Comment (by andersk):

 I hacked up the initscript to run `dnsmasq` inside `strace`, and found
 that `stat64("/etc/dnsmasq.time", &statbuf)` is failing with `EACCES`.

 {{{
 21766 getuid()                          = 0
 21766 setgroups(0, [])                  = 0
 21766 setgid(65534)                     = 0
 21766 capset({_LINUX_CAPABILITY_VERSION_3, 0},
 {CAP_SETUID|CAP_NET_ADMIN|CAP_NET_RAW,
 CAP_SETUID|CAP_NET_ADMIN|CAP_NET_RAW,
 CAP_SETUID|CAP_NET_ADMIN|CAP_NET_RAW}) = 0
 21766 prctl(PR_SET_KEEPCAPS, 1)         = 0
 21766 setuid(65534)                     = 0
 21766 capset({_LINUX_CAPABILITY_VERSION_3, 0}, {CAP_NET_ADMIN|CAP_NET_RAW,
 CAP_NET_ADMIN|CAP_NET_RAW, 0}) = 0
 21766 time([1433995000])                = 1433995000
 21766 open("/etc/TZ", O_RDONLY)         = -1 EACCES (Permission denied)
 21766 write(13, "<30>Jun 11 03:56:40 dnsmasq[2176"..., 74) = -1 ENOTCONN
 (Transport endpoint is not connected)
 21766 connect(13, {sa_family=AF_LOCAL, sun_path="/dev/log"}, 110) = 0
 21766 write(13, "<30>Jun 11 03:56:40 dnsmasq[2176"..., 74) = 74
 21766 time([1433995000])                = 1433995000
 21766 open("/etc/TZ", O_RDONLY)         = -1 EACCES (Permission denied)
 21766 write(13, "<30>Jun 11 03:56:40 dnsmasq[2176"..., 171) = 171
 21766 time([1433995000])                = 1433995000
 21766 open("/etc/TZ", O_RDONLY)         = -1 EACCES (Permission denied)
 21766 write(13, "<30>Jun 11 03:56:40 dnsmasq[2176"..., 72) = 72
 21766 time(NULL)                        = 1433995000
 21766 stat64("/proc/self/exe", {st_mode=S_IFREG|0755, st_size=176040,
 ...}) = 0
 21766 stat64("/etc/dnsmasq.time", 0x7ff65cc8) = -1 EACCES (Permission
 denied)
 21766 write(2, "\n", 1)                 = 1
 21766 write(2, "dnsmasq", 7)            = 7
 21766 write(2, ": ", 2)                 = 2
 21766 write(2, "cannot create timestamp file ", 29) = 29
 21766 write(2, "/etc/dnsmasq.time", 17) = 17
 21766 write(2, ": ", 2)                 = 2
 21766 write(2, "Permission denied", 17) = 17
 21766 write(2, "\n", 1)                 = 1
 }}}

 I can’t figure out why.  `sudo -u '#65534' stat -L /etc/dnsmasq.time`
 makes the same syscall and works fine.

--
Ticket URL: <https://dev.openwrt.org/ticket/19823#comment:1>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to