Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

chirp_acl.h

00001 /*
00002 Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
00003 Copyright (C) 2005- The University of Notre Dame
00004 This software is distributed under a BSD-style license.
00005 See the file COPYING for details.
00006 */
00007 #ifndef CHIRP_ACL_H
00008 #define CHIRP_ACL_H
00009 
00010 #include <stdio.h>
00011 
00012 #define CHIRP_ACL_BASE_NAME ".__acl"
00013 #define CHIRP_ACL_BASE_LENGTH (strlen(CHIRP_ACL_BASE_NAME))
00014 
00015 #define CHIRP_ACL_READ           (1<<0)
00016 #define CHIRP_ACL_WRITE          (1<<1)
00017 #define CHIRP_ACL_LIST           (1<<2)
00018 #define CHIRP_ACL_DELETE         (1<<3)
00019 #define CHIRP_ACL_ADMIN          (1<<4)
00020 #define CHIRP_ACL_EXECUTE        (1<<5)
00021 #define CHIRP_ACL_PUT            (1<<6)
00022 #define CHIRP_ACL_RESERVE_READ   (1<<7)
00023 #define CHIRP_ACL_RESERVE_WRITE  (1<<8)
00024 #define CHIRP_ACL_RESERVE_LIST   (1<<9)
00025 #define CHIRP_ACL_RESERVE_DELETE (1<<10)
00026 #define CHIRP_ACL_RESERVE_PUT    (1<<11)
00027 #define CHIRP_ACL_RESERVE_ADMIN  (1<<12)
00028 #define CHIRP_ACL_RESERVE_RESERVE (1<<13)
00029 #define CHIRP_ACL_RESERVE_EXECUTE (1<<14)
00030 #define CHIRP_ACL_RESERVE         (1<<15)
00031 #define CHIRP_ACL_ALL             (~0)
00032 
00033 int          chirp_acl_check( const char *filename, const char *subject, int flags );
00034 int          chirp_acl_check_dir( const char *dirname, const char *subject, int flags );
00035 int          chirp_acl_check_link( const char *linkname, const char *subject, int flags );
00036 
00037 int          chirp_acl_set( const char *filename, const char *subject, int flags, int reset_acl );
00038 
00039 FILE *       chirp_acl_open( const char *filename );
00040 int          chirp_acl_read( FILE *aclfile, char *subject, int *flags );
00041 void         chirp_acl_close( FILE *aclfile);
00042 
00043 const char * chirp_acl_flags_to_text( int flags );
00044 int          chirp_acl_text_to_flags( const char *text );
00045 int          chirp_acl_from_access_flags( int flags );
00046 int          chirp_acl_from_open_flags( int flags );
00047 
00048 void         chirp_acl_force_readonly();
00049 void         chirp_acl_timeout_set( int t );
00050 int          chirp_acl_timeout_get();
00051 void         chirp_acl_default( const char *aclpath );
00052 
00053 int          chirp_acl_init_root( const char *path );
00054 int          chirp_acl_init_copy( const char *path );
00055 int          chirp_acl_init_reserve( const char *path, const char *subject );
00056 
00057 #endif

Generated on Fri Jun 5 11:10:53 2009 for cctools by  doxygen 1.3.9.1