Added filemode check

This commit is contained in:
Michiel Broek 2004-11-26 20:36:23 +00:00
parent 1500b2a7c2
commit cbae1f9189
2 changed files with 12 additions and 0 deletions

View File

@ -58,6 +58,10 @@ v0.71.0 27-Oct-2004
mbnewusr:
Rewrote terminal i/o.
mbfile:
In mbfile check added a check for the filemode of the real file
in the download area, if it's not 0644 it will be corrected.
mbsetup:
In file transfers edit, removed switches for batch and bidirect
protocols, added a switch for internal protocols.

View File

@ -460,6 +460,14 @@ void CheckArea(long Area)
iErrors++;
Update = TRUE;
}
if (stat(newdir, &stb) == 0) {
if (stb.st_mode != 0100644) {
if (chmod(newdir, 0644) == 0) {
Syslog('!', "Fixed filemode area %ld, file %s", Area, fdb.LName);
iErrors++;
}
}
}
Marker();
if (Update) {
if (mbsedb_LockFDB(fdb_area, 30)) {