diff options
Diffstat (limited to 'src/instcheck.c')
-rw-r--r-- | src/instcheck.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/instcheck.c b/src/instcheck.c index 126ad11..c42eebf 100644 --- a/src/instcheck.c +++ b/src/instcheck.c @@ -7,11 +7,10 @@ #include "hier.h" -extern void hier(); - #define WHO "instcheck" -void perm(char *prefix1, char *prefix2, char *prefix3, char *file, int type, int uid, int gid, int mode) +static void perm( + char *prefix1, char *prefix2, char *prefix3, char *file, int type, int uid, int gid, int mode) { struct stat st; @@ -33,31 +32,31 @@ void perm(char *prefix1, char *prefix2, char *prefix3, char *file, int type, int logmsg(WHO, 0, WARN, B("file has wrong type: ", prefix1, prefix2, prefix3, file)); } -void h(char *home, int uid, int gid, int mode) +void h(const char *home, int uid, int gid, int mode) { perm("", "", "", home, S_IFDIR, uid, gid, mode); } -void d(char *home, char *subdir, int uid, int gid, int mode) +void d(const char *home, char *subdir, int uid, int gid, int mode) { if (chdir(home) == -1) logmsg(WHO, 111, FATAL, B("unable to switch to: ", home)); perm("", home, "/", subdir, S_IFDIR, uid, gid, mode); } -void p(char *home, char *fifo, int uid, int gid, int mode) +void p(const char *home, char *fifo, int uid, int gid, int mode) { if (chdir(home) == -1) logmsg(WHO, 111, FATAL, B("unable to switch to: ", home)); perm("", home, "/", fifo, S_IFIFO, uid, gid, mode); } -void c(char *home, char *subdir, char *file, int uid, int gid, int mode) +void c(const char *home, char *subdir, char *file, int uid, int gid, int mode) { if (chdir(home) == -1) logmsg(WHO, 111, FATAL, B("unable to switch to: ", home)); if (chdir(subdir) == -1) logmsg(WHO, 111, FATAL, B("unable to switch to: ", home, "/", subdir)); perm(".../", subdir, "/", file, S_IFREG, uid, gid, mode); } -void z(char *home, char *file, int len, int uid, int gid, int mode) +void z(const char *home, char *file, int len, int uid, int gid, int mode) { if (chdir(home) == -1) logmsg(WHO, 111, FATAL, B("unable to switch to: ", home)); perm("", home, "/", file, S_IFREG, uid, gid, mode); |