%external %routine new snoop(%string (255) s) %record %format finff(%string (11) fname, %integer sp12, kbytes, %byte %integer arch, codes, cct, ownp, eep, use, codes2, ssbyte, flags, pool, dayno, sp31) %external %integer %function %spec dfsys(%string (6) user, %integer %name fsys) %external %integer %function %spec dsfi(%string (6) user, %integer fsys, type, set, addr) %external %integer %function %spec dfilenames(%string (6) user, %record (finff) %array %name inf, %integer %name fileno, maxrec, nfiles, %integer fsys, type) %external %string (15) %function %spec interrupt %system %string (255) %function %spec itos(%integer i) %system %routine %spec phex(%integer i) %own %integer found=0 %string (255) %function itos2(%integer i) %string (255) s s = itos(i) s = " ".s %while length(s) < 2 %result = s %end %routine ff(%string (6) user) %record (finff) %array finf(0:5) %integer fileno, maxrec, nfiles, flag, fsys, i, privs %string (31) surname fileno = 0 maxrec = 5 nfiles = 5 fsys = - 1 privs = 0 surname = "" flag = dfsys(user, fsys) %return %if flag # 0 flag = dfilenames(user, finf, fileno, maxrec, nfiles, fsys, 0) %return %if maxrec <= 2 flag = dsfi(user, fsys, 18, 0, addr(surname)) ! %return %if flag # 0 %if flag = 0 %then flag = dsfi(user, fsys, 38, 0, addr(privs)) found = found + 1 %if found = 1 %then printstring(" USER SURNAME FSYS NFILES PRIVS ") surname = surname." " %while length(surname) < 31 printstring(user." ".surname." ".itos2(fsys)." ".itos2(nfiles)) %if privs # 0 %then spaces(5) %and phex(privs) newline %end %string (4) grp %string (6) user %string (2) no user <- interrupt %integer i grp <- s %if length(grp) # 4 %then printstring("invalid params") %and %return %for i = 0, 1, 99 %cycle no = itos2(i) no = "0".no %if length(no) < 2 user = grp.no ff(user) %if interrupt # "" %then printstring("Snooping at ".user) %and newline %repeat %if found = 0 %then printstring("No") %else printstring(itos(found)) %if found # 1 %then printstring(" users have") %else %c printstring(" user has") printstring(" permitted files to you from group ".grp) newline %end %end %of %file