| @@ 118-124 (lines=7) @@ | ||
| 115 | if ($this->group === null && isset(Daemon::$config->group->value)) { |
|
| 116 | $this->group = Daemon::$config->group->value; |
|
| 117 | } |
|
| 118 | if ($this->group !== null) { |
|
| 119 | if (!@chgrp($this->path, $this->group)) { |
|
| 120 | unlink($this->path); |
|
| 121 | Daemon::log('Couldn\'t change group of the socket \'' . $this->path . '\' to \'' . $this->group . '\'.'); |
|
| 122 | return false; |
|
| 123 | } |
|
| 124 | } |
|
| 125 | if ($this->user === null && !empty($this->uri['user'])) { |
|
| 126 | $this->user = $this->uri['user']; |
|
| 127 | } |
|
| @@ 131-137 (lines=7) @@ | ||
| 128 | if ($this->user === null && isset(Daemon::$config->user->value)) { |
|
| 129 | $this->user = Daemon::$config->user->value; |
|
| 130 | } |
|
| 131 | if ($this->user !== null) { |
|
| 132 | if (!@chown($this->path, $this->user)) { |
|
| 133 | unlink($this->path); |
|
| 134 | Daemon::log('Couldn\'t change owner of the socket \'' . $this->path . '\' to \'' . $this->user . '\'.'); |
|
| 135 | return false; |
|
| 136 | } |
|
| 137 | } |
|
| 138 | return true; |
|
| 139 | } |
|
| 140 | } |
|