Beispiel #1
0
 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());
 }
Beispiel #2
0
        public slevel(subcap s, char c)
        {
            if (c == 'C')
                clas = s.retclasc();
            if (c == 'M' || c == 'S')
                clas = s.retclasm();

            comp = s.retcomp();
        }
Beispiel #3
0
 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);
 }
Beispiel #4
0
 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());
     }
 }
Beispiel #5
0
        public slevel(subcap s, char c)
        {
            if (c == 'C')
            {
                clas = s.retclasc();
            }
            if (c == 'M' || c == 'S')
            {
                clas = s.retclasm();
            }

            comp = s.retcomp();
        }
Beispiel #6
0
 public accesstate(subcap s, objc o, List <subcap.acces> a)
 {
     sb = s;
     ob = o;
     ac = a;
 }
Beispiel #7
0
 public accesstate(subcap s, objc o, List<subcap.acces> a)
 {
     sb = s;
     ob = o;
     ac = a;
 }
Beispiel #8
0
 public void addsbj(subcap s)
 {
     sbj.Add(s);
     sbj[sbj.Count - 1].initobj(obj.Count);
 }
Beispiel #9
0
 public void addperm(subcap sb, objc ob, subcap.acces dr)
 {
     sbj.Find(it => it == sb).addcapI(obj.IndexOf(ob), dr);
 }
Beispiel #10
0
 public void addperm(string sb, string ob, subcap.acces dr)
 {
     sbj[sbjindex(sb)].addcapI(objindex(ob), dr);
 }
Beispiel #11
0
 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);
 }
Beispiel #12
0
 public void setperm(subcap sb, objc ob, List<subcap.acces> ac)
 {
     sbj.Find(it => it == sb).setcapI(obj.IndexOf(ob), ac);
 }
Beispiel #13
0
 public void setperm(string sb, string ob, subcap.acces dr)
 {
     List<subcap.acces> ac = new List<subcap.acces>();
     ac.Add(dr);
     sbj[sbjindex(sb)].setcapI(objindex(ob), ac);
 }
Beispiel #14
0
 public List<subcap.acces> retperm(subcap sb, objc ob)
 {
     return sbj.Find(it => it == sb).retcapI(obj.IndexOf(ob));
 }
Beispiel #15
0
 public void remsbj(subcap s)
 {
     sbj.Remove(s);
 }