This commit is contained in:
gandc committed 2025-02-23 01:01:17 +03:00
1 parent 573887adce
commit 3e202bc314
2 files changed
+17

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
#include "users.h"
#include <stdio.h>
#include <stdlib.h>
#include <pwd.h>
void list_users(FILE *output) {
struct passwd *pw;
while ((pw = getpwent()) != NULL) {
fprintf(output, "%s: %s\n", pw->pw_name, pw->pw_dir);
}
endpwent();
}
+5
View File
@@ -0,0 +1,5 @@
#ifndef USERS_H
#define USERS_H
#include <stdio.h>
void list_users(FILE *output);
#endif