Откуда UID / GID процесса, если не от указателя кредита процесса?

Используйте вместо него только sed :

MyCmd | sed 's/^.*id:/\t&/'

Будет соответствовать id: и ввести вкладку в начале совпадающих строк.

Пример:

% sed 's/^foo/\t&/' <<<'foobar' 
    foobar
4
30.06.2018, 23:32
1 ответ

Задачи не имеют struct cred. У них есть два структурных кредита:

 * A task has two security pointers.  task->real_cred points to the objective
 * context that defines that task's actual details.  The objective part of this
 * context is used whenever that task is acted upon.
 *
 * task->cred points to the subjective context that defines the details of how
 * that task is going to act upon another object.  This may be overridden
 * temporarily to point to another security context, but normally points to the
 * same context as task->real_cred.

Я проверил, какой /procвам показывает, но вы, наверное, догадываетесь :-П.

(См. fs/proc/, используя https://elixir.bootlin.com. Файл «status» procfs определен в fs/proc/base.c.)

3
27.01.2020, 20:57

Теги

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