Bug 33551 - Init script starts searchd under root user
Summary: Init script starts searchd under root user
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: sphinx (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Anton Farygin
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-15 12:34 MSK by Nikolay A. Fetisov
Modified: 2017-06-16 09:43 MSK (History)
1 user (show)

See Also:


Attachments
Fix init script to run searchd under _sphinx user (532 bytes, patch)
2017-06-15 12:34 MSK, Nikolay A. Fetisov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolay A. Fetisov 2017-06-15 12:34:20 MSK
Created attachment 7109 [details]
Fix init script to run searchd under _sphinx user

Для sphinx-2.2.11 init-script запускает searchd от root'а - 
хотя предполагается использование учётной записи _sphinx.

Сам searchd понижать привилегии не умеет, а stop/status в init-скрипте,
как и работа indexer'а, предполает работу searchd под _sphinx.

Патч приложен.
Comment 1 Repository Robot 2017-06-15 14:52:11 MSK
sphinx-2.2.11-alt3.S1 -> sisyphus:

Thu Jun 15 2017 Anton Farygin <rider@altlinux.ru> 2.2.11-alt3.S1
- fix for searchd process uid (closes: #33551)
Comment 2 Nikolay A. Fetisov 2017-06-16 09:00:39 MSK
Правка в 7.1.6-alt2 решает вопрос с запуском searchd от пользователя,
но теперь searchd не может создать PID-file в /var/run по очевидным причинам.

В патче также правился PIDFILE на /var/run/sphinx - этот каталог уже есть
в пакете, и с возможностью записи туда от _sphinx. 

Т.е., теперь searchd запускается от _sphinx, но
service searchd status,  service searchd stop и пр. не рабочие.
Comment 3 Repository Robot 2017-06-16 09:43:37 MSK
sphinx-2.2.11-alt4.S1 -> sisyphus:

Fri Jun 16 2017 Anton Farygin <rider@altlinux.ru> 2.2.11-alt4.S1
- pidfile location fixed (closes: #33551)