diff options
author | 2016-06-06 10:15:01 -0400 | |
---|---|---|
committer | 2016-06-06 10:15:01 -0400 | |
commit | c5ed2af102d72be6aa4edc473f50278013b10241 (patch) | |
tree | cb7c527a40893f5b9785e03df0eb0c44e2dd54c0 | |
parent | appimage fixes (diff) | |
download | firejail-c5ed2af102d72be6aa4edc473f50278013b10241.tar.gz firejail-c5ed2af102d72be6aa4edc473f50278013b10241.tar.zst firejail-c5ed2af102d72be6aa4edc473f50278013b10241.zip |
fixed /etc/skel problem
-rw-r--r-- | src/firejail/fs_home.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/firejail/fs_home.c b/src/firejail/fs_home.c index d4a16da0a..b12d8bb76 100644 --- a/src/firejail/fs_home.c +++ b/src/firejail/fs_home.c | |||
@@ -41,10 +41,6 @@ static void skel(const char *homedir, uid_t u, gid_t g) { | |||
41 | if (stat(fname, &s) == 0) | 41 | if (stat(fname, &s) == 0) |
42 | return; | 42 | return; |
43 | if (stat("/etc/skel/.zshrc", &s) == 0) { | 43 | if (stat("/etc/skel/.zshrc", &s) == 0) { |
44 | if (is_link("/etc/skel/.zshrc")) { | ||
45 | fprintf(stderr, "Error: invalid /etc/skel/.zshrc file\n"); | ||
46 | exit(1); | ||
47 | } | ||
48 | if (copy_file("/etc/skel/.zshrc", fname) == 0) { | 44 | if (copy_file("/etc/skel/.zshrc", fname) == 0) { |
49 | if (chown(fname, u, g) == -1) | 45 | if (chown(fname, u, g) == -1) |
50 | errExit("chown"); | 46 | errExit("chown"); |
@@ -75,10 +71,6 @@ static void skel(const char *homedir, uid_t u, gid_t g) { | |||
75 | if (stat(fname, &s) == 0) | 71 | if (stat(fname, &s) == 0) |
76 | return; | 72 | return; |
77 | if (stat("/etc/skel/.cshrc", &s) == 0) { | 73 | if (stat("/etc/skel/.cshrc", &s) == 0) { |
78 | if (is_link("/etc/skel/.cshrc")) { | ||
79 | fprintf(stderr, "Error: invalid /etc/skel/.cshrc file\n"); | ||
80 | exit(1); | ||
81 | } | ||
82 | if (copy_file("/etc/skel/.cshrc", fname) == 0) { | 74 | if (copy_file("/etc/skel/.cshrc", fname) == 0) { |
83 | if (chown(fname, u, g) == -1) | 75 | if (chown(fname, u, g) == -1) |
84 | errExit("chown"); | 76 | errExit("chown"); |
@@ -110,10 +102,6 @@ static void skel(const char *homedir, uid_t u, gid_t g) { | |||
110 | if (stat(fname, &s) == 0) | 102 | if (stat(fname, &s) == 0) |
111 | return; | 103 | return; |
112 | if (stat("/etc/skel/.bashrc", &s) == 0) { | 104 | if (stat("/etc/skel/.bashrc", &s) == 0) { |
113 | if (is_link("/etc/skel/.bashrc")) { | ||
114 | fprintf(stderr, "Error: invalid /etc/skel/.bashrc file\n"); | ||
115 | exit(1); | ||
116 | } | ||
117 | if (copy_file("/etc/skel/.bashrc", fname) == 0) { | 105 | if (copy_file("/etc/skel/.bashrc", fname) == 0) { |
118 | /* coverity[toctou] */ | 106 | /* coverity[toctou] */ |
119 | if (chown(fname, u, g) == -1) | 107 | if (chown(fname, u, g) == -1) |