source: trunk/athena/bin/attach/atconvert.c @ 12707

Revision 12707, 1.3 KB checked in by danw, 26 years ago (diff)
attachtab converstion program
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
18static const char rcsid[] = "$Id: atconvert.c,v 1.1 1999-03-19 16:35:09 danw Exp $";
19
20#include <stdio.h>
21
22#include <locker.h>
23
24int main(int argc, char **argv)
25{
26  locker_context context;
27
28  if (argc != 2)
29    {
30      fprintf(stderr, "Usage: atconvert filename\n");
31      exit(1);
32    }
33
34  if (getuid() != 0)
35    {
36      fprintf(stderr, "You must be root to run this program.\n");
37      exit(1);
38    }
39
40  if (locker_init(&context, 0, NULL, NULL))
41    exit(1);
42  locker_convert_attachtab(context, argv[1]);
43  locker_end(context);
44
45  return 0;
46}
Note: See TracBrowser for help on using the repository browser.