public void addobj(string s) { objc o = new objc(s); obj.Add(o); foreach (var it in sbj) it.initobj(1); }
public void testWrite(subcap sb, objc ob) { if ((new accesstate(sb, ob, mat.retperm(sb, ob)).canWrite(mat)) == false) Console.WriteLine("NO, SUBJECT {0} CANNOT PERFORM WRITE ON {1}", sb.retn(), ob.retn()); else Console.WriteLine("YES, SUBJECT {0} CAN PERFORM WRITE ON {1}", sb.retn(), ob.retn()); }
public void addperm(subcap sb, objc ob, char c) { if (c == 'W') addperm(sb, ob, subcap.acces.write); if (c == 'A') addperm(sb, ob, subcap.acces.append); if (c == 'R') addperm(sb, ob, subcap.acces.read); if (c == 'E') addperm(sb, ob, subcap.acces.exec); }
public void testExec(subcap sb, objc ob) { if ((new accesstate(sb, ob, mat.retperm(sb, ob)).canExec(mat)) == false) { Console.WriteLine("NO, SUBJECT {0} CANNOT PERFORM EXECUTE ON {1}", sb.retn(), ob.retn()); } else { Console.WriteLine("YES, SUBJECT {0} CAN PERFORM EXECUTE ON {1}", sb.retn(), ob.retn()); } }
public accesstate(subcap s, objc o, List <subcap.acces> a) { sb = s; ob = o; ac = a; }
public slevel(objc o) { clas = o.retclas(); comp = o.retcomp(); }
public accesstate(subcap s, objc o, List<subcap.acces> a) { sb = s; ob = o; ac = a; }
public void addperm(subcap sb, objc ob, subcap.acces dr) { sbj.Find(it => it == sb).addcapI(obj.IndexOf(ob), dr); }
public void addobj(objc o) { obj.Add(o); foreach (var it in sbj) it.initobj(1); }
public void setperm(subcap sb, objc ob, subcap.acces dr) { List<subcap.acces> ac = new List<subcap.acces>(); ac.Add(dr); sbj.Find(it => it == sb).setcapI(obj.IndexOf(ob), ac); }
public void setperm(subcap sb, objc ob, List<subcap.acces> ac) { sbj.Find(it => it == sb).setcapI(obj.IndexOf(ob), ac); }
public List<subcap.acces> retperm(subcap sb, objc ob) { return sbj.Find(it => it == sb).retcapI(obj.IndexOf(ob)); }
public void remobj(objc o) { int x = obj.IndexOf(o); obj.Remove(o); foreach (var it in sbj) it.remob(x); }