]> gitweb.fluxo.info Git - puppet-tftp.git/commitdiff
let tftpd-hpa change the uid and gid of the process
authorMehdi Abaakouk <sileht@sileht.net>
Thu, 9 Aug 2012 08:08:33 +0000 (10:08 +0200)
committerMehdi Abaakouk <sileht@sileht.net>
Thu, 9 Aug 2012 08:08:33 +0000 (10:08 +0200)
tftpd-hpa try to change the uid and gid of the process before serving a file
and it can't if xinetd start the process with a user other than root.

This result to this following message and tftp can't serve file
 in.tftpd[17609]: cannot set groups for user nobody

To customise user/group of the running process we need to use -u option

manifests/init.pp

index 4fe22be6d7060107cf352454b413055387008c38..f91763e3360f9d7bb7a3c7625203085bba924607 100644 (file)
@@ -58,9 +58,10 @@ class tftp (
     xinetd::service { 'tftp':
       port        => $port,
       protocol    => 'udp',
-      server_args => "${options} ${directory}",
+      server_args => "${options} -u ${username} ${directory}",
       server      => $binary,
-      user        => $username,
+      user        => 'root',
+      group       => 'root',
       bind        => $address,
       socket_type => 'dgram',
       cps         => '100 2',