diff options
| author | manuel <manuel@mausz.at> | 2024-11-28 13:32:32 +0100 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2024-11-28 13:32:32 +0100 |
| commit | ec29722d8b6b90d1a0368542a5de991599e30adc (patch) | |
| tree | 5b5919c30f822ef83d3ce6f34998baeaacd17d14 | |
| parent | a8ea6ba381e79e4198338f5721bbaa3679da5cb9 (diff) | |
| download | qmail-ec29722d8b6b90d1a0368542a5de991599e30adc.tar.gz qmail-ec29722d8b6b90d1a0368542a5de991599e30adc.tar.bz2 qmail-ec29722d8b6b90d1a0368542a5de991599e30adc.zip | |
Fix `implicit declaration of function` in install-big/hier
| -rw-r--r-- | Makefile | 6 | ||||
| -rw-r--r-- | hier.c | 1 | ||||
| -rw-r--r-- | install-big.c | 1 | ||||
| -rw-r--r-- | install.c | 37 | ||||
| -rw-r--r-- | install.h | 12 |
5 files changed, 23 insertions, 34 deletions
| @@ -722,7 +722,7 @@ compile hfield.c hfield.h | |||
| 722 | ./compile hfield.c | 722 | ./compile hfield.c |
| 723 | 723 | ||
| 724 | hier.o: \ | 724 | hier.o: \ |
| 725 | compile hier.c auto_qmail.h auto_split.h auto_uids.h fmt.h fifo.h | 725 | compile hier.c auto_qmail.h auto_split.h auto_uids.h fmt.h fifo.h install.h |
| 726 | ./compile hier.c | 726 | ./compile hier.c |
| 727 | 727 | ||
| 728 | home: \ | 728 | home: \ |
| @@ -774,12 +774,12 @@ auto_uids.o strerr.a substdio.a open.a error.a str.a fs.a | |||
| 774 | 774 | ||
| 775 | install-big.o: \ | 775 | install-big.o: \ |
| 776 | compile install-big.c auto_qmail.h auto_split.h auto_uids.h fmt.h \ | 776 | compile install-big.c auto_qmail.h auto_split.h auto_uids.h fmt.h \ |
| 777 | fifo.h | 777 | fifo.h install.h |
| 778 | ./compile install-big.c | 778 | ./compile install-big.c |
| 779 | 779 | ||
| 780 | install.o: \ | 780 | install.o: \ |
| 781 | compile install.c substdio.h strerr.h error.h open.h readwrite.h \ | 781 | compile install.c substdio.h strerr.h error.h open.h readwrite.h \ |
| 782 | exit.h | 782 | exit.h install.h |
| 783 | ./compile install.c | 783 | ./compile install.c |
| 784 | 784 | ||
| 785 | instcheck: \ | 785 | instcheck: \ |
| @@ -3,6 +3,7 @@ | |||
| 3 | #include "auto_uids.h" | 3 | #include "auto_uids.h" |
| 4 | #include "fmt.h" | 4 | #include "fmt.h" |
| 5 | #include "fifo.h" | 5 | #include "fifo.h" |
| 6 | #include "install.h" | ||
| 6 | 7 | ||
| 7 | char buf[100 + FMT_ULONG]; | 8 | char buf[100 + FMT_ULONG]; |
| 8 | 9 | ||
diff --git a/install-big.c b/install-big.c index a058ad2..d9c9f9b 100644 --- a/install-big.c +++ b/install-big.c | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | #include "auto_uids.h" | 3 | #include "auto_uids.h" |
| 4 | #include "fmt.h" | 4 | #include "fmt.h" |
| 5 | #include "fifo.h" | 5 | #include "fifo.h" |
| 6 | #include "install.h" | ||
| 6 | 7 | ||
| 7 | char buf[100 + FMT_ULONG]; | 8 | char buf[100 + FMT_ULONG]; |
| 8 | 9 | ||
| @@ -1,5 +1,6 @@ | |||
| 1 | #include <sys/stat.h> | 1 | #include <sys/stat.h> |
| 2 | #include <unistd.h> | 2 | #include <unistd.h> |
| 3 | #include "install.h" | ||
| 3 | #include "substdio.h" | 4 | #include "substdio.h" |
| 4 | #include "strerr.h" | 5 | #include "strerr.h" |
| 5 | #include "error.h" | 6 | #include "error.h" |
| @@ -13,11 +14,7 @@ extern void hier(); | |||
| 13 | 14 | ||
| 14 | int fdsourcedir = -1; | 15 | int fdsourcedir = -1; |
| 15 | 16 | ||
| 16 | void h(home,uid,gid,mode) | 17 | void h(const char *home, uid_t uid, gid_t gid, mode_t mode) |
| 17 | char *home; | ||
| 18 | int uid; | ||
| 19 | int gid; | ||
| 20 | int mode; | ||
| 21 | { | 18 | { |
| 22 | if (mkdir(home,0700) == -1) | 19 | if (mkdir(home,0700) == -1) |
| 23 | if (errno != error_exist) | 20 | if (errno != error_exist) |
| @@ -28,12 +25,7 @@ int mode; | |||
| 28 | strerr_die4sys(111,FATAL,"unable to chmod ",home,": "); | 25 | strerr_die4sys(111,FATAL,"unable to chmod ",home,": "); |
| 29 | } | 26 | } |
| 30 | 27 | ||
| 31 | void d(home,subdir,uid,gid,mode) | 28 | void d(const char *home, const char *subdir, uid_t uid, gid_t gid, mode_t mode) |
| 32 | char *home; | ||
| 33 | char *subdir; | ||
| 34 | int uid; | ||
| 35 | int gid; | ||
| 36 | int mode; | ||
| 37 | { | 29 | { |
| 38 | if (chdir(home) == -1) | 30 | if (chdir(home) == -1) |
| 39 | strerr_die4sys(111,FATAL,"unable to switch to ",home,": "); | 31 | strerr_die4sys(111,FATAL,"unable to switch to ",home,": "); |
| @@ -46,12 +38,7 @@ int mode; | |||
| 46 | strerr_die6sys(111,FATAL,"unable to chmod ",home,"/",subdir,": "); | 38 | strerr_die6sys(111,FATAL,"unable to chmod ",home,"/",subdir,": "); |
| 47 | } | 39 | } |
| 48 | 40 | ||
| 49 | void p(home,fifo,uid,gid,mode) | 41 | void p(const char *home, const char *fifo, uid_t uid, gid_t gid, mode_t mode) |
| 50 | char *home; | ||
| 51 | char *fifo; | ||
| 52 | int uid; | ||
| 53 | int gid; | ||
| 54 | int mode; | ||
| 55 | { | 42 | { |
| 56 | if (chdir(home) == -1) | 43 | if (chdir(home) == -1) |
| 57 | strerr_die4sys(111,FATAL,"unable to switch to ",home,": "); | 44 | strerr_die4sys(111,FATAL,"unable to switch to ",home,": "); |
| @@ -69,13 +56,7 @@ char outbuf[SUBSTDIO_OUTSIZE]; | |||
| 69 | substdio ssin; | 56 | substdio ssin; |
| 70 | substdio ssout; | 57 | substdio ssout; |
| 71 | 58 | ||
| 72 | void c(home,subdir,file,uid,gid,mode) | 59 | void c(const char *home, const char *subdir, const char *file, uid_t uid, gid_t gid, mode_t mode) |
| 73 | char *home; | ||
| 74 | char *subdir; | ||
| 75 | char *file; | ||
| 76 | int uid; | ||
| 77 | int gid; | ||
| 78 | int mode; | ||
| 79 | { | 60 | { |
| 80 | int fdin; | 61 | int fdin; |
| 81 | int fdout; | 62 | int fdout; |
| @@ -119,13 +100,7 @@ int mode; | |||
| 119 | strerr_die6sys(111,FATAL,"unable to chmod .../",subdir,"/",file,": "); | 100 | strerr_die6sys(111,FATAL,"unable to chmod .../",subdir,"/",file,": "); |
| 120 | } | 101 | } |
| 121 | 102 | ||
| 122 | void z(home,file,len,uid,gid,mode) | 103 | void z(const char *home, const char *file, size_t len, uid_t uid, gid_t gid, mode_t mode) |
| 123 | char *home; | ||
| 124 | char *file; | ||
| 125 | int len; | ||
| 126 | int uid; | ||
| 127 | int gid; | ||
| 128 | int mode; | ||
| 129 | { | 104 | { |
| 130 | int fdout; | 105 | int fdout; |
| 131 | 106 | ||
diff --git a/install.h b/install.h new file mode 100644 index 0000000..861be9b --- /dev/null +++ b/install.h | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #ifndef install_h | ||
| 2 | #define install_h | ||
| 3 | |||
| 4 | #include <sys/types.h> | ||
| 5 | |||
| 6 | void h(const char *home, uid_t uid, gid_t gid, mode_t mode); | ||
| 7 | void d(const char *home, const char *subdir, uid_t uid, gid_t gid, mode_t mode); | ||
| 8 | void p(const char *home, const char *fifo, uid_t uid, gid_t gid, mode_t mode); | ||
| 9 | void c(const char *home, const char *subdir, const char *file, uid_t uid, gid_t gid, mode_t mode); | ||
| 10 | void z(const char *home, const char *file, size_t len, uid_t uid, gid_t gid, mode_t mode); | ||
| 11 | |||
| 12 | #endif | ||
