docs: add comment
This commit is contained in:
parent
91d9a3e66b
commit
fe27808a65
@ -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) {
|
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");
|
FILE *fp = fopen(filename, "a");
|
||||||
|
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user