Как заключить в тюрьму пользователя Linux

Вы можете использовать re.sub с шаблоном негативного взгляда:

import re
lines = ['x  = vR32_ALEX - vR33_ALAN; \n',
 'y = vR33_ALAN; \n']
for line in lines:
    print(re.sub(r'(?<!- )vR33_ALAN', 'vR33_ALAN*c', line), end='')

. Вывод:

x  = vR32_ALEX - vR33_ALAN; 
y = vR33_ALAN*c; 
.
5
задан Andrei Serdeliuc ॐ 7 May 2009 в 07:03
поделиться

3 ответа

A Google search on "openssh jail" led me to SSHjail for openSSH. If your client uses ssh/scp to access the said servers, this might be what you are looking for.

7
ответ дан 18 December 2019 в 09:53
поделиться

If you really want to go to that extreme, SE Linux (or any other mandatory access control) is a definite improvement of the default unix permissions.

1
ответ дан 18 December 2019 в 09:53
поделиться

Важно отметить, что chroot (2) не предназначен для целей безопасности. Избежать chroot тюрьмы невероятно легко. Дополнительные сведения см. В статье о злоупотреблении chroot .

3
ответ дан 18 December 2019 в 09:53
поделиться
Другие вопросы по тегам:

Похожие вопросы: