Moved security access test to lib
This commit is contained in:
@@ -414,25 +414,3 @@ char *GLCdateyy()
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Security Access Check
|
||||
*/
|
||||
int Access(securityrec us, securityrec ref)
|
||||
{
|
||||
Syslog('B', "User %5d %08lx %08lx", us.level, us.flags, ~us.flags);
|
||||
Syslog('B', "Ref. %5d %08lx %08lx", ref.level, ref.flags, ref.notflags);
|
||||
|
||||
if (us.level < ref.level)
|
||||
return FALSE;
|
||||
|
||||
if ((ref.notflags & ~us.flags) != ref.notflags)
|
||||
return FALSE;
|
||||
|
||||
if ((ref.flags & us.flags) != ref.flags)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -13,6 +13,5 @@ void CheckDir(char *); /* Check and create directory */
|
||||
void FindMBSE(void); /* Load Configuration file in memory */
|
||||
char *GLCdateyy(void); /* Returns current date DD-Mmm-YYYY */
|
||||
char *GetMonth(int); /* Returns Mmm */
|
||||
int Access(securityrec, securityrec); /* Check security access */
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user