9 #include "unifiltergen.h" 10 #include "wvstringtable.h" 32 enum Level { USER = 0, GROUP, WORLD };
35 enum Type { READ = 0, WRITE, EXEC };
60 {
return getperm(path, cred, READ); }
62 {
return getperm(path, cred, WRITE); }
64 {
return getperm(path, cred, EXEC); }
68 void setread(
const UniConfKey &path, Level level,
bool read)
69 { setperm(path, level, READ, read); }
70 void setwrite(
const UniConfKey &path, Level level,
bool write)
71 { setperm(path, level, WRITE, write); }
72 void setexec(
const UniConfKey &path, Level level,
bool exec)
73 { setperm(path, level, EXEC, exec); }
75 void setperm(
const UniConfKey &path, Level level, Type type,
bool val);
81 void chmod(
const UniConfKey &path,
unsigned int owner,
unsigned int group,
88 bool getoneperm(
const UniConfKey &path, Level level, Type type);
92 #endif // __UNIPERMGEN_H A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
Represents a UniConf key which is a path in a hierarchy structured much like the traditional Unix fil...
An abstract data container that backs a UniConf tree.
void setowner(const UniConfKey &path, WvStringParm owner)
get and set the owner for a path
void setgroup(const UniConfKey &path, WvStringParm group)
get and set the group for a path
virtual void flush_buffers()
Flushes any commitment/notification buffers .
A UniConfGen that delegates all requests to an inner generator.
void chmod(const UniConfKey &path, unsigned int owner, unsigned int group, unsigned int world)
Set permissions for path using Unix style chmod (with the second form, be sure to use octal) ...
WvString is an implementation of a simple and efficient printable-string class.
UniPermGen wraps a tree encoding Unix-style permissions, and provides an API for setting and checking...
bool getread(const UniConfKey &path, const Credentials &cred)
Return true if a user with the given credentials is allowed to read/write/exec the given path...