diff --git a/tool/setup_uid.c b/tool/setup_uid.c index d9f32e9..7500b8d 100644 --- a/tool/setup_uid.c +++ b/tool/setup_uid.c @@ -38,6 +38,18 @@ bool check_user(char *filename, char *username, unsigned long *new_start) { } void insert_user(char *filename, char *username, unsigned long start) { + /* + * Insert the user into uid file + * It will setup the next start uid automatically + * == it will change /etc/subuid or /etc/subgid == + * + * Args: + * filename (char *): means the uid file (subuid or subgid). + * username (char *): the user who run this excutable file. + * new_start (unsigned long ): it's a value, means the next start uid + * Return: + * No + */ FILE *fp = fopen(filename, "a"); if (fp == NULL) {