Lines 64-70
Link Here
|
64 |
} |
64 |
} |
65 |
} |
65 |
} |
66 |
else { |
66 |
else { |
67 |
// cerr << "(kvutils) " << "mkdir(" << tdir_rep << ") failed" << endl; |
67 |
cerr << "(kvutils) " << "mkdir(" << tdir_rep << ") failed" << endl; |
68 |
valid_rep = false; |
68 |
valid_rep = false; |
69 |
} |
69 |
} |
70 |
} |
70 |
} |
Lines 97-128
Link Here
|
97 |
|
97 |
|
98 |
if (statbuf.st_uid != geteuid()) { |
98 |
if (statbuf.st_uid != geteuid()) { |
99 |
valid_rep = false; |
99 |
valid_rep = false; |
100 |
// cerr << "(kvutils) " << "st_uid doesn't match." << endl; |
100 |
cerr << "(kvutils) " << "st_uid doesn't match." << endl; |
101 |
} |
101 |
} |
102 |
|
102 |
|
103 |
if (statbuf.st_gid != getegid()) { |
103 |
//if (statbuf.st_gid != getegid()) { |
104 |
valid_rep = false; |
104 |
//valid_rep = false; |
105 |
// cerr << "(kvutils) " << "st_gid doesn't match." << endl; |
105 |
//cerr << "(kvutils) " << "st_gid doesn't match." << endl; |
106 |
} |
106 |
//} |
107 |
|
107 |
|
108 |
if (!S_ISDIR(statbuf.st_mode)) { |
108 |
if (!S_ISDIR(statbuf.st_mode)) { |
109 |
valid_rep = false; |
109 |
valid_rep = false; |
110 |
// cerr << "(kvutils) " << "st_mode - not a directory." << endl; |
110 |
cerr << "(kvutils) " << "st_mode - not a directory." << endl; |
111 |
} |
111 |
} |
112 |
|
112 |
|
113 |
if (S_ISLNK(statbuf.st_mode)) { |
113 |
if (S_ISLNK(statbuf.st_mode)) { |
114 |
valid_rep = false; |
114 |
valid_rep = false; |
115 |
// cerr << "(kvutils) " << "st_mode - a symbolic link." << endl; |
115 |
cerr << "(kvutils) " << "st_mode - a symbolic link." << endl; |
116 |
} |
116 |
} |
117 |
|
117 |
|
118 |
if ((statbuf.st_mode & S_IRWXG) > 0) { |
118 |
if ((statbuf.st_mode & S_IRWXG) > 0) { |
119 |
valid_rep = false; |
119 |
valid_rep = false; |
120 |
// cerr << "(kvutils) " << "st_mode - group has access." << endl; |
120 |
cerr << "(kvutils) " << "st_mode - group has access." << endl; |
121 |
} |
121 |
} |
122 |
|
122 |
|
123 |
if ((statbuf.st_mode & S_IRWXO) > 0) { |
123 |
if ((statbuf.st_mode & S_IRWXO) > 0) { |
124 |
valid_rep = false; |
124 |
valid_rep = false; |
125 |
// cerr << "(kvutils) " << "st_mode - others have access." << endl; |
125 |
cerr << "(kvutils) " << "st_mode - others have access." << endl; |
126 |
} |
126 |
} |
127 |
} |
127 |
} |
128 |
|
128 |
|