diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2002-09-16 04:34:47 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2002-09-16 04:34:47 +0000 |
commit | 14effbc95a77287bc0a9664d55ba66702da6b02d (patch) | |
tree | 2f9e2014cb557d3d4a04c9ff1c98d135cfc83036 /bin/systrace/policy.c | |
parent | 86a3a5aded910e8d60f3526d5269cb0fd9b02db9 (diff) |
periodically save policies that have been modified. from provos
>here is a diff that will cause systrace to periodically save policies
>that have been modified. Useful if you run systrace on an xterm and
>kill it accidently. Or other applications like opera that are long
>running and can cause weird crashes.
Diffstat (limited to 'bin/systrace/policy.c')
-rw-r--r-- | bin/systrace/policy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/systrace/policy.c b/bin/systrace/policy.c index fbbb1e9e98c..1b846c80d7b 100644 --- a/bin/systrace/policy.c +++ b/bin/systrace/policy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: policy.c,v 1.17 2002/09/06 22:56:21 deraadt Exp $ */ +/* $OpenBSD: policy.c,v 1.18 2002/09/16 04:34:46 itojun Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -567,6 +567,8 @@ systrace_dumppolicy(void) if (systrace_writepolicy(policy) == -1) fprintf(stderr, "Failed to write policy for %s\n", policy->name); + else + policy->flags &= ~POLICY_CHANGED; } return (0); |