MBSE BBS file permissions auto update added
This commit is contained in:
parent
568008a5e3
commit
dfaee3d490
@ -4269,6 +4269,8 @@ v0.33.19 26-Oct-2001
|
||||
Added support for xinetd configuration.
|
||||
Changed distribution test for Mandrake.
|
||||
Changed to recognize the e-smith server based on RedHat.
|
||||
If system runs xinetd instead of inetd, the configuration for
|
||||
xinetd is updated with info for mbsebbs.
|
||||
|
||||
installinit.sh:
|
||||
Changed to recognize the e-smith server based on RedHat.
|
||||
@ -4400,6 +4402,7 @@ v0.33.19 26-Oct-2001
|
||||
with execute.
|
||||
During startup the username is tried from the environment
|
||||
variables LOGNAME and USER.
|
||||
Added some automatic file permission corrections.
|
||||
|
||||
mbnewusr:
|
||||
New program, run by user bbs. This is only to register a new
|
||||
|
@ -68,6 +68,7 @@ int ChkFiles()
|
||||
sDataFile = calloc(PATH_MAX, sizeof(char));
|
||||
temp = calloc(PATH_MAX, sizeof(char));
|
||||
sprintf(sDataFile, "%s/etc/sysinfo.data", getenv("MBSE_ROOT"));
|
||||
chmod(sDataFile, 0660);
|
||||
|
||||
/*
|
||||
* Check if users.data exists, if not create a new one.
|
||||
@ -180,8 +181,8 @@ void SaveLastCallers()
|
||||
Syslog('+', "Created new lastcall.data");
|
||||
}
|
||||
fclose(pGLC);
|
||||
chmod(sFileName, 0660);
|
||||
}
|
||||
chmod(sFileName, 0660);
|
||||
|
||||
if ((pGLC = fopen(sFileName,"a+")) == NULL) {
|
||||
WriteError("$Can't open %s", sFileName);
|
||||
|
@ -75,6 +75,10 @@ void GetLastUser(void)
|
||||
|
||||
sDataFile = calloc(PATH_MAX, sizeof(char));
|
||||
sprintf(sDataFile, "%s/etc/sysinfo.data", getenv("MBSE_ROOT"));
|
||||
/*
|
||||
* Fix security in case it is wrong.
|
||||
*/
|
||||
chmod(sDataFile, 0660);
|
||||
|
||||
if((pCallerLog = fopen(sDataFile, "r+")) == NULL)
|
||||
WriteError("GetLastUser: Can't open file: %s", sDataFile);
|
||||
|
Reference in New Issue
Block a user