Hello. Andrew Blaich wrote: > Here's a question, why is there this round about way of retrieving the > path of the task? Wouldn't it be slightly more efficient to store it > explicitly as character array within the task_struct ?
I don't know the reason. But I guess that (1) Printing the pathname of current process had been seldom needed. There is task_struct->comm member which stores the name of current process. (2) The pathname of current process can change while the process is running. Unlike Windows, we can move location of/delete the pathname of a program which is running. So, storing the pathname at the execve() time of the current process might return nonexistent pathname. (But TOMOYO Linux stores it in task_struct->security member for tracking and controlling process invocation history.) - To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html