Title: | dec_mls_plus |
Moderator: | SMURF::BAT |
Created: | Mon Nov 29 1993 |
Last Modified: | Thu Jun 05 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 534 |
Total number of notes: | 2544 |
More on the problem with output redirection from cron. This is MLS+ V3.1A with patch kit form 19 Nov 96. When redirecting output from a script called from crontab, the output does not go to the file that the output is being redirected to, The following procedure produced no output to the ".lis" files. When called directly from a decterm window, there is output. audit_tool -o -B -e login -e open:0:1 /audit/auditlog.simba.129* > \ /home/major/audit/simba.129.lis lpr /home/major/audit/simba.129.lis #rm /home/major/audit/simba.129.lis cp /audit/auditlog.simba.129 /audit/saved/auditlog.simba.$1 *rm /audit/auditlog.simba.129 audit_tool -o -B -e login -e open:0:1 /audit/auditlog.simba.130* > \ /home/major/audit/simba.130.lis lpr /home/major/audit/simba.130.lis #rm /home/major/audit/simba.130.lis cp /audit/auditlog.simba.130 /audit/saved/auditlog.simba.$1 *rm /audit/auditlog.simba.130 audit_tool -o -B -e login -e open:0:1 /audit/auditlog.simba.131* > \ /home/major/audit/simba.131.lis lpr /home/major/audit/simba.131.lis #rm /home/major/audit/simba.131.lis cp /audit/auditlog.simba.131 /audit/saved/auditlog.simba.$1 *rm /audit/auditlog.simba.131 rm /audit/*.hdr Also, when running audit_tool, sometimes not all output goes to the file indicated by the redirection symbol ">".
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
467.1 | I'm assuming cron runs jobs at syslo | SMURF::BAT | Segui la tua beatitudine | Fri Mar 28 1997 14:40 | 28 |
Hi Martin, I'm answering the easiest one first (the one to which I think I can guess the answer without having to go read code or play with the system :-) -- of course, I could be wrong... so watch out!) audit_tool was modified to comply with ITSEC requirement about dominance somewhere in some patch to V3.1A. When you run audit_tool, even if you are root running with allowmacaccess priv, your process SL must dominate the SL of the data that it is going to write to standard out, or it won't write anything to stdout. When you put a job in crontab, it is run by cron at syslo by default. Since you are putting the job in crontab and not making it an at job, then you should be able to use the "epa" command to run audit_tool at syshi SL, e.g., try: /tcb/bin/epa -s syshi '/usr/sbin/audit_tool /var/audit/auditlog.n > /tmp/foo' or whatever. I would assume that the rest of the context (luid, uid, IL, etc.) would be 'root') | |||||
467.2 | update - solved | RHETT::MOORE | Tue Apr 01 1997 16:08 | 9 | |
They used the suggestion about epa and got it all working, though (according to the Digital rep) "it took a little work to get awk to recognize the string". (I didn't ask for more details on this, as it's working.) We can consider this one closed. Thanks, Martin |