Revision 12710,
1.3 KB
checked in by ghudson, 26 years ago
(diff) |
Add necessary includes.
|
Line | |
---|
1 | /* Copyright 1998 by the Massachusetts Institute of Technology. |
---|
2 | * |
---|
3 | * Permission to use, copy, modify, and distribute this |
---|
4 | * software and its documentation for any purpose and without |
---|
5 | * fee is hereby granted, provided that the above copyright |
---|
6 | * notice appear in all copies and that both that copyright |
---|
7 | * notice and this permission notice appear in supporting |
---|
8 | * documentation, and that the name of M.I.T. not be used in |
---|
9 | * advertising or publicity pertaining to distribution of the |
---|
10 | * software without specific, written prior permission. |
---|
11 | * M.I.T. makes no representations about the suitability of |
---|
12 | * this software for any purpose. It is provided "as is" |
---|
13 | * without express or implied warranty. |
---|
14 | */ |
---|
15 | |
---|
16 | /* Program to convert an old attachtab into a new one. */ |
---|
17 | |
---|
18 | static const char rcsid[] = "$Id: atconvert.c,v 1.2 1999-03-20 17:16:46 ghudson Exp $"; |
---|
19 | |
---|
20 | #include <stdio.h> |
---|
21 | #include <stdlib.h> |
---|
22 | #include <unistd.h> |
---|
23 | |
---|
24 | #include <locker.h> |
---|
25 | |
---|
26 | int main(int argc, char **argv) |
---|
27 | { |
---|
28 | locker_context context; |
---|
29 | |
---|
30 | if (argc != 2) |
---|
31 | { |
---|
32 | fprintf(stderr, "Usage: atconvert filename\n"); |
---|
33 | exit(1); |
---|
34 | } |
---|
35 | |
---|
36 | if (getuid() != 0) |
---|
37 | { |
---|
38 | fprintf(stderr, "You must be root to run this program.\n"); |
---|
39 | exit(1); |
---|
40 | } |
---|
41 | |
---|
42 | if (locker_init(&context, 0, NULL, NULL)) |
---|
43 | exit(1); |
---|
44 | locker_convert_attachtab(context, argv[1]); |
---|
45 | locker_end(context); |
---|
46 | |
---|
47 | return 0; |
---|
48 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.