summaryrefslogtreecommitdiff
path: root/usr.bin/revoke
diff options
context:
space:
mode:
authorelad <elad@NetBSD.org>2006-10-07 08:48:03 +0000
committerelad <elad@NetBSD.org>2006-10-07 08:48:03 +0000
commitfd79a15577989798338463dccbfdbf92c798ba80 (patch)
treeb7aa063569c597903ba739647ab8e2236f141800 /usr.bin/revoke
parentef1caed8bea062632fbf9f64247e9bd19de6e987 (diff)
PR/18126: jnilsson at ludd dot luth dot se: add the revoke program
I have commited a different version than in the PR, it lacks a license but if it warrants one we can stick the TNF standard on it. It's just a main() routine that calls revoke(2).
Diffstat (limited to 'usr.bin/revoke')
-rw-r--r--usr.bin/revoke/Makefile7
-rw-r--r--usr.bin/revoke/revoke.830
-rw-r--r--usr.bin/revoke/revoke.c19
3 files changed, 56 insertions, 0 deletions
diff --git a/usr.bin/revoke/Makefile b/usr.bin/revoke/Makefile
new file mode 100644
index 00000000000..2a8e3ca5f66
--- /dev/null
+++ b/usr.bin/revoke/Makefile
@@ -0,0 +1,7 @@
+# $NetBSD: Makefile,v 1.1 2006/10/07 08:48:03 elad Exp $
+
+PROG= revoke
+MAN= revoke.8
+WARNS?= 4
+
+.include <bsd.prog.mk>
diff --git a/usr.bin/revoke/revoke.8 b/usr.bin/revoke/revoke.8
new file mode 100644
index 00000000000..11ceaae0ae9
--- /dev/null
+++ b/usr.bin/revoke/revoke.8
@@ -0,0 +1,30 @@
+.\" $NetBSD: revoke.8,v 1.1 2006/10/07 08:48:03 elad Exp $
+.Dd October 7, 2006
+.Dt REVOKE 8
+.Os
+.Sh NAME
+.Nm revoke
+.Nd
+call
+.Xr revoke 2
+.Sh SYNOPSIS
+.Nm
+.Ar file
+.Sh DESCRIPTION
+The
+.Nm
+utility performs the system call
+.Fn revoke file .
+.Pp
+.Ar file
+must be the pathname of an existing file.
+.Sh EXIT STATUS
+The
+.Nm
+utility returns
+.Dq EXIT_SUCCESS
+on success and
+.Dq EXIT_FAILURE
+if an error occurs.
+.Sh SEE ALSO
+.Xr revoke 2
diff --git a/usr.bin/revoke/revoke.c b/usr.bin/revoke/revoke.c
new file mode 100644
index 00000000000..5d5a42ee904
--- /dev/null
+++ b/usr.bin/revoke/revoke.c
@@ -0,0 +1,19 @@
+/* $NetBSD: revoke.c,v 1.1 2006/10/07 08:48:03 elad Exp $ */
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <err.h>
+
+int
+main(int argc, char *argv[])
+{
+ if (argc != 2)
+ errx(EXIT_FAILURE, "usage: %s <file>", getprogname());
+
+ if (revoke(argv[1]) != 0)
+ err(EXIT_FAILURE, "revoke(%s)", argv[1]);
+
+ return EXIT_SUCCESS;
+}