aboutsummaryrefslogtreecommitdiffstats
path: root/src/faudit/files.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/faudit/files.c')
-rw-r--r--src/faudit/files.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/faudit/files.c b/src/faudit/files.c
index 46256f5f0..aa5b3aafb 100644
--- a/src/faudit/files.c
+++ b/src/faudit/files.c
@@ -26,7 +26,7 @@ static char *homedir = NULL;
26 26
27static void check_home_file(const char *name) { 27static void check_home_file(const char *name) {
28 assert(homedir); 28 assert(homedir);
29 29
30 char *fname; 30 char *fname;
31 if (asprintf(&fname, "%s/%s", homedir, name) == -1) 31 if (asprintf(&fname, "%s/%s", homedir, name) == -1)
32 errExit("asprintf"); 32 errExit("asprintf");
@@ -37,7 +37,7 @@ static void check_home_file(const char *name) {
37 } 37 }
38 else 38 else
39 printf("GOOD: I cannot access files in %s directory.\n", fname); 39 printf("GOOD: I cannot access files in %s directory.\n", fname);
40 40
41 free(fname); 41 free(fname);
42} 42}
43 43
@@ -47,14 +47,14 @@ void files_test(void) {
47 fprintf(stderr, "Error: cannot retrieve user account information\n"); 47 fprintf(stderr, "Error: cannot retrieve user account information\n");
48 return; 48 return;
49 } 49 }
50 50
51 username = strdup(pw->pw_name); 51 username = strdup(pw->pw_name);
52 if (!username) 52 if (!username)
53 errExit("strdup"); 53 errExit("strdup");
54 homedir = strdup(pw->pw_dir); 54 homedir = strdup(pw->pw_dir);
55 if (!homedir) 55 if (!homedir)
56 errExit("strdup"); 56 errExit("strdup");
57 57
58 // check access to .ssh directory 58 // check access to .ssh directory
59 check_home_file(".ssh"); 59 check_home_file(".ssh");
60 60
@@ -66,10 +66,10 @@ void files_test(void) {
66 66
67 // check access to Chromium browser directory 67 // check access to Chromium browser directory
68 check_home_file(".config/chromium"); 68 check_home_file(".config/chromium");
69 69
70 // check access to Debian Icedove directory 70 // check access to Debian Icedove directory
71 check_home_file(".icedove"); 71 check_home_file(".icedove");
72 72
73 // check access to Thunderbird directory 73 // check access to Thunderbird directory
74 check_home_file(".thunderbird"); 74 check_home_file(".thunderbird");
75} 75}