diff options
author | Jackie Huang <jackie.huang@windriver.com> | 2017-06-23 13:36:44 +0800 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2017-06-28 10:29:36 -0400 |
commit | 4267eede662006f54694d6062ceea98835b99dd6 (patch) | |
tree | 6f5b0091428d1d86519b5653afbc876f58922c66 /meta-networking | |
parent | 7d5f8acc42305040d5387f3773e1f78d01c6ec01 (diff) | |
download | meta-openembedded-4267eede662006f54694d6062ceea98835b99dd6.tar.gz |
rdist: add new recipe
rdist is a remote file distribution client and server.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking')
17 files changed, 2913 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bb-build.patch b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bb-build.patch new file mode 100644 index 000000000..c95eaf8f5 --- /dev/null +++ b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bb-build.patch | |||
@@ -0,0 +1,75 @@ | |||
1 | From 244861e2c9bb9cc44f4bd246964ba850a7cf1216 Mon Sep 17 00:00:00 2001 | ||
2 | From: Xin Ouyang <Xin.Ouyang@windriver.com> | ||
3 | Date: Tue, 15 May 2012 15:06:43 +0800 | ||
4 | Subject: [PATCH] rdist: bitbake build | ||
5 | |||
6 | Upstream-Status: Inappropriate [OE specific] | ||
7 | |||
8 | --- | ||
9 | Makefile.local | 8 ++++---- | ||
10 | doc/Makefile.real | 4 +++- | ||
11 | src/Makefile.real | 1 + | ||
12 | 3 files changed, 8 insertions(+), 5 deletions(-) | ||
13 | |||
14 | diff --git a/Makefile.local b/Makefile.local | ||
15 | index 26092b2..389cb84 100644 | ||
16 | --- a/Makefile.local | ||
17 | +++ b/Makefile.local | ||
18 | @@ -14,7 +14,7 @@ | ||
19 | # BIN_DIR variable, you would uncomment the following line | ||
20 | # or add your own line. | ||
21 | # | ||
22 | -#BIN_DIR = /usr/bin | ||
23 | +BIN_DIR = ${DESTDIR}/${bindir} | ||
24 | |||
25 | # | ||
26 | # Add any local definitions you want pass to the compiler to DEFS_LOCAL | ||
27 | @@ -46,13 +46,13 @@ LIBS_LOCAL = | ||
28 | # Set a site specific install program to use. Must support BSD style | ||
29 | # install(1) arguments. | ||
30 | # | ||
31 | -#INSTALL = install | ||
32 | +INSTALL = install | ||
33 | |||
34 | # | ||
35 | # Site specific Man Page configuration. | ||
36 | # | ||
37 | -#MAN_1_DIR = /usr/local/man/man1 | ||
38 | -#MAN_8_DIR = /usr/local/man/man8 | ||
39 | +MAN_1_DIR = ${DESTDIR}/${mandir}/man1 | ||
40 | +MAN_8_DIR = ${DESTDIR}/${mandir}/man8 | ||
41 | #MAN_OWNER = bin | ||
42 | #MAN_GROUP = bin | ||
43 | #MAN_MODE = 644 | ||
44 | diff --git a/doc/Makefile.real b/doc/Makefile.real | ||
45 | index 42cabec..e32c30b 100644 | ||
46 | --- a/doc/Makefile.real | ||
47 | +++ b/doc/Makefile.real | ||
48 | @@ -16,9 +16,11 @@ all: | ||
49 | |||
50 | doc: | ||
51 | |||
52 | -install: | ||
53 | +install: install.man | ||
54 | |||
55 | install.man: rdist.man rdistd.man | ||
56 | + test -d ${MAN_1_DIR} || ${INSTALL} -d ${MAN_1_DIR} | ||
57 | + test -d ${MAN_8_DIR} || ${INSTALL} -d ${MAN_8_DIR} | ||
58 | ${INSTALL} ${INSTALL_ARGS} rdist.man ${CLIENT_DEST} | ||
59 | ${INSTALL} ${INSTALL_ARGS} rdistd.man ${SERVER_DEST} | ||
60 | |||
61 | diff --git a/src/Makefile.real b/src/Makefile.real | ||
62 | index 02179e4..9ec551d 100644 | ||
63 | --- a/src/Makefile.real | ||
64 | +++ b/src/Makefile.real | ||
65 | @@ -52,6 +52,7 @@ clean: | ||
66 | $(COMMONOBJS) $(MISSINGOBJS) | ||
67 | |||
68 | install: | ||
69 | + test -d $(BIN_DIR) || $(INSTALL) -d $(BIN_DIR) | ||
70 | $(INSTALL) ${IN_ARGS} -o $(BIN_OWNER) -m ${RDIST_MODE} \ | ||
71 | $(CLIENT_BIN) $(BIN_DIR)/$(CLIENT) | ||
72 | $(INSTALL) ${IN_ARGS} -o ${BIN_OWNER} -m ${RDISTD_MODE} \ | ||
73 | -- | ||
74 | 1.7.5.4 | ||
75 | |||
diff --git a/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bison.patch b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bison.patch new file mode 100644 index 000000000..435491221 --- /dev/null +++ b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-bison.patch | |||
@@ -0,0 +1,147 @@ | |||
1 | Upstream-Status: Inappropriate [1] | ||
2 | |||
3 | [1] Not the author, the patch is from: | ||
4 | http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm | ||
5 | |||
6 | --- rdist-6.1.5/src/gram.y.bison 1998-11-10 05:10:42.000000000 +0100 | ||
7 | +++ rdist-6.1.5/src/gram.y 2003-06-04 16:02:19.000000000 +0200 | ||
8 | @@ -90,10 +90,10 @@ | ||
9 | struct namelist *namel; | ||
10 | } | ||
11 | |||
12 | -%type <optval> OPTION, options | ||
13 | -%type <string> NAME, STRING | ||
14 | -%type <subcmd> INSTALL, NOTIFY, EXCEPT, PATTERN, SPECIAL, CMDSPECIAL, cmdlist, cmd | ||
15 | -%type <namel> namelist, names, opt_namelist nlist | ||
16 | +%type <optval> OPTION options | ||
17 | +%type <string> NAME STRING | ||
18 | +%type <subcmd> INSTALL NOTIFY EXCEPT PATTERN SPECIAL CMDSPECIAL cmdlist cmd | ||
19 | +%type <namel> namelist names opt_namelist nlist | ||
20 | |||
21 | %% | ||
22 | |||
23 | @@ -101,19 +101,19 @@ | ||
24 | | file command | ||
25 | ; | ||
26 | |||
27 | -command: NAME '=' namelist = { | ||
28 | +command: NAME '=' namelist { | ||
29 | (void) lookup($1, INSERT, $3); | ||
30 | } | ||
31 | - | namelist ARROW namelist cmdlist = { | ||
32 | + | namelist ARROW namelist cmdlist { | ||
33 | insert((char *)NULL, $1, $3, $4); | ||
34 | } | ||
35 | - | NAME COLON namelist ARROW namelist cmdlist = { | ||
36 | + | NAME COLON namelist ARROW namelist cmdlist { | ||
37 | insert($1, $3, $5, $6); | ||
38 | } | ||
39 | - | namelist DCOLON NAME cmdlist = { | ||
40 | + | namelist DCOLON NAME cmdlist { | ||
41 | append((char *)NULL, $1, $3, $4); | ||
42 | } | ||
43 | - | NAME COLON namelist DCOLON NAME cmdlist = { | ||
44 | + | NAME COLON namelist DCOLON NAME cmdlist { | ||
45 | append($1, $3, $5, $6); | ||
46 | } | ||
47 | | error | ||
48 | @@ -133,10 +133,10 @@ | ||
49 | } | ||
50 | ; | ||
51 | |||
52 | -nlist: NAME = { | ||
53 | +nlist: NAME { | ||
54 | $$ = makenl($1); | ||
55 | } | ||
56 | - | '(' names ')' = { | ||
57 | + | '(' names ')' { | ||
58 | $$ = $2; | ||
59 | } | ||
60 | ; | ||
61 | @@ -144,7 +144,7 @@ | ||
62 | names: /* VOID */ { | ||
63 | $$ = last_n = NULL; | ||
64 | } | ||
65 | - | names NAME = { | ||
66 | + | names NAME { | ||
67 | if (last_n == NULL) | ||
68 | $$ = last_n = makenl($2); | ||
69 | else { | ||
70 | @@ -158,7 +158,7 @@ | ||
71 | cmdlist: /* VOID */ { | ||
72 | $$ = last_sc = NULL; | ||
73 | } | ||
74 | - | cmdlist cmd = { | ||
75 | + | cmdlist cmd { | ||
76 | if (last_sc == NULL) | ||
77 | $$ = last_sc = $2; | ||
78 | else { | ||
79 | @@ -169,7 +169,7 @@ | ||
80 | } | ||
81 | ; | ||
82 | |||
83 | -cmd: INSTALL options opt_namelist ';' = { | ||
84 | +cmd: INSTALL options opt_namelist ';' { | ||
85 | register struct namelist *nl; | ||
86 | |||
87 | $1->sc_options = $2 | options; | ||
88 | @@ -185,17 +185,17 @@ | ||
89 | } | ||
90 | $$ = $1; | ||
91 | } | ||
92 | - | NOTIFY namelist ';' = { | ||
93 | + | NOTIFY namelist ';' { | ||
94 | if ($2 != NULL) | ||
95 | $1->sc_args = expand($2, E_VARS); | ||
96 | $$ = $1; | ||
97 | } | ||
98 | - | EXCEPT namelist ';' = { | ||
99 | + | EXCEPT namelist ';' { | ||
100 | if ($2 != NULL) | ||
101 | $1->sc_args = expand($2, E_ALL); | ||
102 | $$ = $1; | ||
103 | } | ||
104 | - | PATTERN namelist ';' = { | ||
105 | + | PATTERN namelist ';' { | ||
106 | struct namelist *nl; | ||
107 | char *cp, *re_comp(); | ||
108 | |||
109 | @@ -205,13 +205,13 @@ | ||
110 | $1->sc_args = expand($2, E_VARS); | ||
111 | $$ = $1; | ||
112 | } | ||
113 | - | SPECIAL opt_namelist STRING ';' = { | ||
114 | + | SPECIAL opt_namelist STRING ';' { | ||
115 | if ($2 != NULL) | ||
116 | $1->sc_args = expand($2, E_ALL); | ||
117 | $1->sc_name = $3; | ||
118 | $$ = $1; | ||
119 | } | ||
120 | - | CMDSPECIAL opt_namelist STRING ';' = { | ||
121 | + | CMDSPECIAL opt_namelist STRING ';' { | ||
122 | if ($2 != NULL) | ||
123 | $1->sc_args = expand($2, E_ALL); | ||
124 | $1->sc_name = $3; | ||
125 | @@ -219,18 +219,18 @@ | ||
126 | } | ||
127 | ; | ||
128 | |||
129 | -options: /* VOID */ = { | ||
130 | +options: /* VOID */ { | ||
131 | $$ = 0; | ||
132 | } | ||
133 | - | options OPTION = { | ||
134 | + | options OPTION { | ||
135 | $$ |= $2; | ||
136 | } | ||
137 | ; | ||
138 | |||
139 | -opt_namelist: /* VOID */ = { | ||
140 | +opt_namelist: /* VOID */ { | ||
141 | $$ = NULL; | ||
142 | } | ||
143 | - | namelist = { | ||
144 | + | namelist { | ||
145 | $$ = $1; | ||
146 | } | ||
147 | ; | ||
diff --git a/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-cleanup.patch b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-cleanup.patch new file mode 100644 index 000000000..ed3d7f1b3 --- /dev/null +++ b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-cleanup.patch | |||
@@ -0,0 +1,2087 @@ | |||
1 | Upstream-Status: Inappropriate [1] | ||
2 | |||
3 | [1] Not the author, the patch is from: | ||
4 | http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm | ||
5 | |||
6 | --- rdist-6.1.5/src/gram.y.cleanup 2003-12-17 11:38:16.000000000 +0100 | ||
7 | +++ rdist-6.1.5/src/gram.y 2003-12-17 11:38:16.000000000 +0100 | ||
8 | @@ -40,7 +40,7 @@ | ||
9 | * SUCH DAMAGE. | ||
10 | */ | ||
11 | |||
12 | -#ifndef lint | ||
13 | +#if 0 | ||
14 | static char RCSid[] = | ||
15 | "$Id: gram.y,v 6.30 1998/11/10 04:10:42 mcooper Exp $"; | ||
16 | |||
17 | @@ -170,7 +170,7 @@ | ||
18 | ; | ||
19 | |||
20 | cmd: INSTALL options opt_namelist ';' { | ||
21 | - register struct namelist *nl; | ||
22 | + struct namelist *nl; | ||
23 | |||
24 | $1->sc_options = $2 | options; | ||
25 | if ($3 != NULL) { | ||
26 | @@ -240,11 +240,11 @@ | ||
27 | int yylineno = 1; | ||
28 | extern FILE *fin; | ||
29 | |||
30 | -yylex() | ||
31 | +int yylex() | ||
32 | { | ||
33 | static char yytext[INMAX]; | ||
34 | - register int c; | ||
35 | - register char *cp1, *cp2; | ||
36 | + int c; | ||
37 | + char *cp1, *cp2; | ||
38 | static char quotechars[] = "[]{}*?$"; | ||
39 | |||
40 | again: | ||
41 | @@ -409,8 +409,8 @@ | ||
42 | * some of the characters we use. | ||
43 | */ | ||
44 | extern int any(c, str) | ||
45 | - register int c; | ||
46 | - register char *str; | ||
47 | + int c; | ||
48 | + char *str; | ||
49 | { | ||
50 | while (*str) | ||
51 | if (c == *str++) | ||
52 | @@ -421,13 +421,14 @@ | ||
53 | /* | ||
54 | * Insert or append ARROW command to list of hosts to be updated. | ||
55 | */ | ||
56 | +void | ||
57 | insert(label, files, hosts, subcmds) | ||
58 | char *label; | ||
59 | struct namelist *files, *hosts; | ||
60 | struct subcmd *subcmds; | ||
61 | { | ||
62 | - register struct cmd *c, *prev, *nc; | ||
63 | - register struct namelist *h, *lasth; | ||
64 | + struct cmd *c, *prev, *nc; | ||
65 | + struct namelist *h, *lasth; | ||
66 | |||
67 | debugmsg(DM_CALL, "insert(%s, %x, %x, %x) start, files = %s", | ||
68 | label == NULL ? "(null)" : label, | ||
69 | @@ -475,13 +476,14 @@ | ||
70 | * Append DCOLON command to the end of the command list since these are always | ||
71 | * executed in the order they appear in the distfile. | ||
72 | */ | ||
73 | +void | ||
74 | append(label, files, stamp, subcmds) | ||
75 | char *label; | ||
76 | struct namelist *files; | ||
77 | char *stamp; | ||
78 | struct subcmd *subcmds; | ||
79 | { | ||
80 | - register struct cmd *c; | ||
81 | + struct cmd *c; | ||
82 | |||
83 | c = ALLOC(cmd); | ||
84 | c->c_type = DCOLON; | ||
85 | @@ -501,6 +503,7 @@ | ||
86 | /* | ||
87 | * Error printing routine in parser. | ||
88 | */ | ||
89 | +void | ||
90 | yyerror(s) | ||
91 | char *s; | ||
92 | { | ||
93 | @@ -530,7 +533,7 @@ | ||
94 | makenl(name) | ||
95 | char *name; | ||
96 | { | ||
97 | - register struct namelist *nl; | ||
98 | + struct namelist *nl; | ||
99 | |||
100 | debugmsg(DM_CALL, "makenl(%s)", name == NULL ? "null" : name); | ||
101 | |||
102 | @@ -627,7 +630,7 @@ | ||
103 | makesubcmd(type) | ||
104 | int type; | ||
105 | { | ||
106 | - register struct subcmd *sc; | ||
107 | + struct subcmd *sc; | ||
108 | |||
109 | sc = ALLOC(subcmd); | ||
110 | sc->sc_type = type; | ||
111 | --- rdist-6.1.5/src/rdist.c.cleanup 1998-11-10 05:13:50.000000000 +0100 | ||
112 | +++ rdist-6.1.5/src/rdist.c 2003-12-17 11:38:16.000000000 +0100 | ||
113 | @@ -38,7 +38,7 @@ | ||
114 | * SUCH DAMAGE. | ||
115 | */ | ||
116 | |||
117 | -#ifndef lint | ||
118 | +#if 0 | ||
119 | static char RCSid[] = | ||
120 | "$Id: rdist.c,v 6.66 1998/11/10 04:13:49 mcooper Exp $"; | ||
121 | |||
122 | @@ -80,7 +80,7 @@ | ||
123 | char *name; | ||
124 | struct namelist **hostlist; | ||
125 | { | ||
126 | - register struct namelist *ptr, *new; | ||
127 | + struct namelist *ptr, *new; | ||
128 | |||
129 | if (!name || !hostlist) | ||
130 | return; | ||
131 | @@ -97,14 +97,15 @@ | ||
132 | *hostlist = new; | ||
133 | } | ||
134 | |||
135 | +int | ||
136 | main(argc, argv, envp) | ||
137 | int argc; | ||
138 | char *argv[]; | ||
139 | char **envp; | ||
140 | { | ||
141 | struct namelist *hostlist = NULL; | ||
142 | - register int x; | ||
143 | - register char *cp; | ||
144 | + int x; | ||
145 | + char *cp; | ||
146 | int cmdargs = 0; | ||
147 | int c; | ||
148 | |||
149 | @@ -114,7 +115,7 @@ | ||
150 | */ | ||
151 | setprogname(argv); | ||
152 | |||
153 | - if (cp = msgparseopts(localmsglist, TRUE)) { | ||
154 | + if ((cp = msgparseopts(localmsglist, TRUE))) { | ||
155 | error("Bad builtin log option (%s): %s.", | ||
156 | localmsglist, cp); | ||
157 | usage(); | ||
158 | @@ -158,7 +159,7 @@ | ||
159 | while ((c = getopt(argc, argv, optchars)) != -1) | ||
160 | switch (c) { | ||
161 | case 'l': | ||
162 | - if (cp = msgparseopts(optarg, TRUE)) { | ||
163 | + if ((cp = msgparseopts(optarg, TRUE))) { | ||
164 | error("Bad log option \"%s\": %s.", optarg,cp); | ||
165 | usage(); | ||
166 | } | ||
167 | @@ -206,7 +207,7 @@ | ||
168 | |||
169 | case 'D': | ||
170 | debug = DM_ALL; | ||
171 | - if (cp = msgparseopts("stdout=all,debug", TRUE)) { | ||
172 | + if ((cp = msgparseopts("stdout=all,debug", TRUE))) { | ||
173 | error("Enable debug messages failed: %s.", cp); | ||
174 | usage(); | ||
175 | } | ||
176 | @@ -245,7 +246,7 @@ | ||
177 | error("No path specified to \"-P\"."); | ||
178 | usage(); | ||
179 | } | ||
180 | - if (cp = searchpath(optarg)) | ||
181 | + if ((cp = searchpath(optarg))) | ||
182 | path_remsh = strdup(cp); | ||
183 | else { | ||
184 | error("No component of path \"%s\" exists.", | ||
185 | @@ -297,7 +298,7 @@ | ||
186 | else { | ||
187 | if (fin == NULL) | ||
188 | fin = opendist(distfile); | ||
189 | - (void) yyparse(); | ||
190 | + yyparse(); | ||
191 | /* | ||
192 | * Need to keep stdin open for child processing later | ||
193 | */ | ||
194 | @@ -348,6 +349,7 @@ | ||
195 | /* | ||
196 | * Print usage message and exit. | ||
197 | */ | ||
198 | +void | ||
199 | usage() | ||
200 | { | ||
201 | char *sopts = "cDFnv"; | ||
202 | @@ -379,12 +381,13 @@ | ||
203 | /* | ||
204 | * rcp like interface for distributing files. | ||
205 | */ | ||
206 | +void | ||
207 | docmdargs(nargs, args) | ||
208 | int nargs; | ||
209 | char *args[]; | ||
210 | { | ||
211 | - register struct namelist *nl, *prev; | ||
212 | - register char *cp; | ||
213 | + struct namelist *nl, *prev; | ||
214 | + char *cp; | ||
215 | struct namelist *files, *hosts; | ||
216 | struct subcmd *cmds; | ||
217 | char *dest; | ||
218 | @@ -433,10 +436,10 @@ | ||
219 | * Get a list of NAME blocks (mostly for debugging). | ||
220 | */ | ||
221 | extern char *getnlstr(nl) | ||
222 | - register struct namelist *nl; | ||
223 | + struct namelist *nl; | ||
224 | { | ||
225 | static char buf[16384]; | ||
226 | - register int count = 0, len = 0; | ||
227 | + int count = 0, len = 0; | ||
228 | |||
229 | (void) sprintf(buf, "("); | ||
230 | |||
231 | --- rdist-6.1.5/src/client.c.cleanup 2003-12-17 11:38:16.000000000 +0100 | ||
232 | +++ rdist-6.1.5/src/client.c 2003-12-17 11:38:16.000000000 +0100 | ||
233 | @@ -38,7 +38,7 @@ | ||
234 | * SUCH DAMAGE. | ||
235 | */ | ||
236 | |||
237 | -#ifndef lint | ||
238 | +#if 0 | ||
239 | static char RCSid[] = | ||
240 | "$Id: client.c,v 6.82 1998/11/10 04:08:47 mcooper Exp $"; | ||
241 | |||
242 | @@ -84,7 +84,7 @@ | ||
243 | int destdir; | ||
244 | { | ||
245 | extern struct namelist *filelist; | ||
246 | - register char *lname, *cp; | ||
247 | + char *lname, *cp; | ||
248 | static char buff[BUFSIZ]; | ||
249 | int srclen, pathlen; | ||
250 | char *p; | ||
251 | @@ -146,7 +146,7 @@ | ||
252 | struct namelist *list; | ||
253 | char *file; | ||
254 | { | ||
255 | - register struct namelist *nl; | ||
256 | + struct namelist *nl; | ||
257 | |||
258 | for (nl = list; nl != NULL; nl = nl->n_next) | ||
259 | if (strcmp(file, nl->n_name) == 0) | ||
260 | @@ -163,7 +163,7 @@ | ||
261 | char *rname; | ||
262 | int destdir; | ||
263 | { | ||
264 | - register struct subcmd *sc; | ||
265 | + struct subcmd *sc; | ||
266 | extern struct subcmd *subcmds; | ||
267 | char *rfile; | ||
268 | |||
269 | @@ -200,7 +200,7 @@ | ||
270 | { | ||
271 | char *rfile; | ||
272 | struct namelist *new; | ||
273 | - register struct subcmd *sc; | ||
274 | + struct subcmd *sc; | ||
275 | extern struct subcmd *subcmds; | ||
276 | int isokay = 0; | ||
277 | |||
278 | @@ -227,7 +227,7 @@ | ||
279 | */ | ||
280 | static void freecmdspecialfiles() | ||
281 | { | ||
282 | - register struct namelist *ptr, *save; | ||
283 | + struct namelist *ptr, *save; | ||
284 | |||
285 | for (ptr = updfilelist; ptr; ) { | ||
286 | if (ptr->n_name) (void) free(ptr->n_name); | ||
287 | @@ -249,10 +249,8 @@ | ||
288 | char **filev; | ||
289 | opt_t opts; | ||
290 | { | ||
291 | - register struct subcmd *sc; | ||
292 | - register struct namelist *f; | ||
293 | - register char **cpp; | ||
294 | - char *file; | ||
295 | + struct subcmd *sc; | ||
296 | + struct namelist *f; | ||
297 | int first = TRUE; | ||
298 | |||
299 | for (sc = cmd->c_cmds; sc != NULL; sc = sc->sc_next) { | ||
300 | @@ -294,7 +292,7 @@ | ||
301 | int checkfilename(name) | ||
302 | char *name; | ||
303 | { | ||
304 | - register char *cp; | ||
305 | + char *cp; | ||
306 | |||
307 | if (strchr(name, '\n')) { | ||
308 | for (cp = name; *cp; cp++) | ||
309 | @@ -501,7 +499,7 @@ | ||
310 | static int rmchk(opts) | ||
311 | opt_t opts; | ||
312 | { | ||
313 | - register u_char *s; | ||
314 | + u_char *s; | ||
315 | struct stat stb; | ||
316 | int didupdate = 0; | ||
317 | int n; | ||
318 | @@ -618,7 +616,7 @@ | ||
319 | |||
320 | optarget = ptarget; | ||
321 | len = ptarget - target; | ||
322 | - while (dp = readdir(d)) { | ||
323 | + while ((dp = readdir(d))) { | ||
324 | if (!strcmp(dp->d_name, ".") || | ||
325 | !strcmp(dp->d_name, "..")) | ||
326 | continue; | ||
327 | @@ -631,7 +629,7 @@ | ||
328 | if (ptarget[-1] != '/') | ||
329 | *ptarget++ = '/'; | ||
330 | cp = dp->d_name; | ||
331 | - while (*ptarget++ = *cp++) | ||
332 | + while ((*ptarget++ = *cp++)) | ||
333 | ; | ||
334 | ptarget--; | ||
335 | if (sendit(dp->d_name, opts, destdir) > 0) | ||
336 | @@ -770,13 +768,13 @@ | ||
337 | opt_t opts; | ||
338 | struct stat *statp; | ||
339 | { | ||
340 | - register off_t size; | ||
341 | - register time_t mtime; | ||
342 | + off_t size; | ||
343 | + time_t mtime; | ||
344 | unsigned short lmode; | ||
345 | unsigned short rmode; | ||
346 | char *owner = NULL, *group = NULL; | ||
347 | int done, n; | ||
348 | - u_char *cp; | ||
349 | + char *cp; | ||
350 | |||
351 | debugmsg(DM_CALL, "update(%s, 0x%x, 0x%x)\n", rname, opts, statp); | ||
352 | |||
353 | @@ -1035,7 +1033,6 @@ | ||
354 | int destdir; | ||
355 | { | ||
356 | static struct stat stb; | ||
357 | - extern struct subcmd *subcmds; | ||
358 | char *user, *group; | ||
359 | int u, len; | ||
360 | int didupdate = 0; | ||
361 | @@ -1157,7 +1154,7 @@ | ||
362 | (void) unlink(statfile); | ||
363 | #endif | ||
364 | |||
365 | - if (file = getnotifyfile()) | ||
366 | + if ((file = getnotifyfile())) | ||
367 | (void) unlink(file); | ||
368 | } | ||
369 | |||
370 | --- rdist-6.1.5/src/child.c.cleanup 1998-11-10 05:18:57.000000000 +0100 | ||
371 | +++ rdist-6.1.5/src/child.c 2003-12-17 11:38:16.000000000 +0100 | ||
372 | @@ -38,7 +38,7 @@ | ||
373 | * SUCH DAMAGE. | ||
374 | */ | ||
375 | |||
376 | -#ifndef lint | ||
377 | +#if 0 | ||
378 | static char RCSid[] = | ||
379 | "$Id: child.c,v 6.29 1998/11/10 04:18:56 mcooper Exp $"; | ||
380 | |||
381 | @@ -90,7 +90,7 @@ | ||
382 | static void removechild(child) | ||
383 | CHILD *child; | ||
384 | { | ||
385 | - register CHILD *pc, *prevpc; | ||
386 | + CHILD *pc, *prevpc; | ||
387 | |||
388 | debugmsg(DM_CALL, "removechild(%s, %d, %d) start", | ||
389 | child->c_name, child->c_pid, child->c_readfd); | ||
390 | @@ -148,7 +148,7 @@ | ||
391 | static CHILD *copychild(child) | ||
392 | CHILD *child; | ||
393 | { | ||
394 | - register CHILD *newc; | ||
395 | + CHILD *newc; | ||
396 | |||
397 | newc = (CHILD *) xmalloc(sizeof(CHILD)); | ||
398 | |||
399 | @@ -167,7 +167,7 @@ | ||
400 | static void addchild(child) | ||
401 | CHILD *child; | ||
402 | { | ||
403 | - register CHILD *pc; | ||
404 | + CHILD *pc; | ||
405 | |||
406 | debugmsg(DM_CALL, "addchild() start\n"); | ||
407 | |||
408 | @@ -280,7 +280,7 @@ | ||
409 | */ | ||
410 | static void reap() | ||
411 | { | ||
412 | - register CHILD *pc; | ||
413 | + CHILD *pc; | ||
414 | int status = 0; | ||
415 | pid_t pid; | ||
416 | |||
417 | @@ -336,7 +336,7 @@ | ||
418 | */ | ||
419 | static void childscan() | ||
420 | { | ||
421 | - register CHILD *pc, *nextpc; | ||
422 | + CHILD *pc, *nextpc; | ||
423 | |||
424 | debugmsg(DM_CALL, "childscan() start"); | ||
425 | |||
426 | @@ -366,8 +366,8 @@ | ||
427 | extern void waitup() | ||
428 | { | ||
429 | #if defined(HAVE_SELECT) | ||
430 | - register int count; | ||
431 | - register CHILD *pc; | ||
432 | + int count; | ||
433 | + CHILD *pc; | ||
434 | fd_set rchildfds; | ||
435 | |||
436 | debugmsg(DM_CALL, "waitup() start\n"); | ||
437 | --- rdist-6.1.5/src/docmd.c.cleanup 2003-12-17 11:38:16.000000000 +0100 | ||
438 | +++ rdist-6.1.5/src/docmd.c 2003-12-17 11:38:16.000000000 +0100 | ||
439 | @@ -38,7 +38,7 @@ | ||
440 | * SUCH DAMAGE. | ||
441 | */ | ||
442 | |||
443 | -#ifndef lint | ||
444 | +#if 0 | ||
445 | static char RCSid[] = | ||
446 | "$Id: docmd.c,v 6.87 1998/11/10 04:08:32 mcooper Exp $"; | ||
447 | |||
448 | @@ -99,10 +99,10 @@ | ||
449 | */ | ||
450 | static void notify(rhost, to, lmod) | ||
451 | char *rhost; | ||
452 | - register struct namelist *to; | ||
453 | + struct namelist *to; | ||
454 | time_t lmod; | ||
455 | { | ||
456 | - register int fd, len; | ||
457 | + int fd, len; | ||
458 | FILE *pf, *popen(); | ||
459 | struct stat stb; | ||
460 | static char buf[BUFSIZ]; | ||
461 | @@ -221,7 +221,7 @@ | ||
462 | struct cmd *cmd; | ||
463 | struct cmd *cmdlist; | ||
464 | { | ||
465 | - register struct cmd *pcmd; | ||
466 | + struct cmd *pcmd; | ||
467 | |||
468 | for (pcmd = cmdlist; pcmd; pcmd = pcmd->c_next) { | ||
469 | checkcmd(pcmd); | ||
470 | @@ -238,7 +238,7 @@ | ||
471 | struct cmd *cmd; | ||
472 | struct cmd *cmdlist; | ||
473 | { | ||
474 | - register struct cmd *pc; | ||
475 | + struct cmd *pc; | ||
476 | |||
477 | if (!cmd) { | ||
478 | debugmsg(DM_MISC, "markfailed() NULL cmd parameter"); | ||
479 | @@ -309,7 +309,7 @@ | ||
480 | static int makeconn(rhost) | ||
481 | char *rhost; | ||
482 | { | ||
483 | - register char *ruser, *cp; | ||
484 | + char *ruser, *cp; | ||
485 | static char *cur_host = NULL; | ||
486 | extern char *locuser; | ||
487 | extern long min_freefiles, min_freespace; | ||
488 | @@ -430,9 +430,9 @@ | ||
489 | struct cmd *cmd; | ||
490 | char **filev; | ||
491 | { | ||
492 | - register struct namelist *f; | ||
493 | - register struct subcmd *sc; | ||
494 | - register char **cpp; | ||
495 | + struct namelist *f; | ||
496 | + struct subcmd *sc; | ||
497 | + char **cpp; | ||
498 | int n, ddir, destdir, opts = options; | ||
499 | struct namelist *files; | ||
500 | struct subcmd *sbcmds; | ||
501 | @@ -567,7 +567,6 @@ | ||
502 | } | ||
503 | } | ||
504 | |||
505 | -done: | ||
506 | /* | ||
507 | * Run any commands for the entire cmd | ||
508 | */ | ||
509 | @@ -584,7 +583,7 @@ | ||
510 | notify(rhost, sc->sc_args, (time_t) 0); | ||
511 | |||
512 | if (!nflag) { | ||
513 | - register struct linkbuf *nextl, *l; | ||
514 | + struct linkbuf *nextl, *l; | ||
515 | |||
516 | for (l = ihead; l != NULL; freelinkinfo(l), l = nextl) { | ||
517 | nextl = l->nextp; | ||
518 | @@ -601,11 +600,12 @@ | ||
519 | setjmp_ok = FALSE; | ||
520 | } | ||
521 | |||
522 | +int | ||
523 | okname(name) | ||
524 | - register char *name; | ||
525 | + char *name; | ||
526 | { | ||
527 | - register char *cp = name; | ||
528 | - register int c, isbad; | ||
529 | + char *cp = name; | ||
530 | + int c, isbad; | ||
531 | |||
532 | for (isbad = FALSE; *cp && !isbad; ++cp) { | ||
533 | c = *cp; | ||
534 | @@ -627,9 +627,9 @@ | ||
535 | struct subcmd *sbcmds; | ||
536 | char **env; | ||
537 | { | ||
538 | - register DIR *d; | ||
539 | - register DIRENTRY *dp; | ||
540 | - register char *cp; | ||
541 | + DIR *d; | ||
542 | + DIRENTRY *dp; | ||
543 | + char *cp; | ||
544 | char *optarget; | ||
545 | int len; | ||
546 | |||
547 | @@ -641,7 +641,7 @@ | ||
548 | } | ||
549 | optarget = ptarget; | ||
550 | len = ptarget - target; | ||
551 | - while (dp = readdir(d)) { | ||
552 | + while ((dp = readdir(d))) { | ||
553 | if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) | ||
554 | continue; | ||
555 | if (len + 1 + (int)strlen(dp->d_name) >= BUFSIZ - 1) { | ||
556 | @@ -651,7 +651,7 @@ | ||
557 | ptarget = optarget; | ||
558 | *ptarget++ = '/'; | ||
559 | cp = dp->d_name; | ||
560 | - while (*ptarget++ = *cp++) | ||
561 | + while ((*ptarget++ = *cp++)) | ||
562 | ; | ||
563 | ptarget--; | ||
564 | cmptime(target, sbcmds, env); | ||
565 | @@ -740,9 +740,9 @@ | ||
566 | struct cmd *cmd; | ||
567 | char **filev; | ||
568 | { | ||
569 | - register struct subcmd *sc; | ||
570 | - register struct namelist *f; | ||
571 | - register char *cp, **cpp; | ||
572 | + struct subcmd *sc; | ||
573 | + struct namelist *f; | ||
574 | + char *cp, **cpp; | ||
575 | struct stat stb; | ||
576 | struct namelist *files = cmd->c_files; | ||
577 | struct subcmd *sbcmds = cmd->c_cmds; | ||
578 | @@ -824,8 +824,8 @@ | ||
579 | extern int except(file) | ||
580 | char *file; | ||
581 | { | ||
582 | - register struct subcmd *sc; | ||
583 | - register struct namelist *nl; | ||
584 | + struct subcmd *sc; | ||
585 | + struct namelist *nl; | ||
586 | |||
587 | debugmsg(DM_CALL, "except(%s)", file); | ||
588 | |||
589 | @@ -918,8 +918,8 @@ | ||
590 | int argc; | ||
591 | char **argv; | ||
592 | { | ||
593 | - register struct namelist *f; | ||
594 | - register int i; | ||
595 | + struct namelist *f; | ||
596 | + int i; | ||
597 | |||
598 | if (argc) { | ||
599 | for (i = 0; i < argc; i++) { | ||
600 | @@ -962,9 +962,9 @@ | ||
601 | int argc; | ||
602 | char **argv; | ||
603 | { | ||
604 | - register struct cmd *c; | ||
605 | - register char *cp; | ||
606 | - register int i; | ||
607 | + struct cmd *c; | ||
608 | + char *cp; | ||
609 | + int i; | ||
610 | |||
611 | (void) signal(SIGHUP, sighandler); | ||
612 | (void) signal(SIGINT, sighandler); | ||
613 | @@ -1032,7 +1032,7 @@ | ||
614 | |||
615 | if (hostlist) { | ||
616 | /* Do specific hosts as specified on command line */ | ||
617 | - register struct namelist *nlptr; | ||
618 | + struct namelist *nlptr; | ||
619 | |||
620 | for (nlptr = hostlist; nlptr; nlptr = nlptr->n_next) | ||
621 | /* | ||
622 | --- rdist-6.1.5/src/distopt.c.cleanup 1998-11-10 05:09:11.000000000 +0100 | ||
623 | +++ rdist-6.1.5/src/distopt.c 2003-12-17 11:38:16.000000000 +0100 | ||
624 | @@ -6,7 +6,7 @@ | ||
625 | * appropriately. | ||
626 | */ | ||
627 | |||
628 | -#ifndef lint | ||
629 | +#if 0 | ||
630 | static char RCSid[] = | ||
631 | "$Id: distopt.c,v 6.12 1998/11/10 04:09:11 mcooper Exp $"; | ||
632 | |||
633 | @@ -55,7 +55,7 @@ | ||
634 | extern DISTOPTINFO *getdistopt(name) | ||
635 | char *name; | ||
636 | { | ||
637 | - register int i; | ||
638 | + int i; | ||
639 | |||
640 | for (i = 0; distoptinfo[i].do_name; ++i) | ||
641 | if (strcasecmp(name, distoptinfo[i].do_name) == 0) | ||
642 | @@ -74,7 +74,7 @@ | ||
643 | opt_t *optptr; | ||
644 | int doerrs; | ||
645 | { | ||
646 | - register char *string, *optstr; | ||
647 | + char *string, *optstr; | ||
648 | DISTOPTINFO *distopt; | ||
649 | int negate; | ||
650 | |||
651 | @@ -93,7 +93,7 @@ | ||
652 | * and the option starts with "no", strip "no" | ||
653 | * from option and retry lookup. | ||
654 | */ | ||
655 | - if (distopt = getdistopt(optstr)) { | ||
656 | + if ((distopt = getdistopt(optstr))) { | ||
657 | FLAG_ON(*optptr, distopt->do_value); | ||
658 | continue; | ||
659 | } | ||
660 | @@ -116,7 +116,7 @@ | ||
661 | */ | ||
662 | extern char *getdistoptlist() | ||
663 | { | ||
664 | - register int i; | ||
665 | + int i; | ||
666 | static char buf[1024]; | ||
667 | |||
668 | for (i = 0, buf[0] = CNULL; distoptinfo[i].do_name; ++i) { | ||
669 | @@ -138,7 +138,7 @@ | ||
670 | extern char *getondistoptlist(opts) | ||
671 | opt_t opts; | ||
672 | { | ||
673 | - register int i; | ||
674 | + int i; | ||
675 | static char buf[1024]; | ||
676 | |||
677 | for (i = 0, buf[0] = CNULL; distoptinfo[i].do_name; ++i) { | ||
678 | --- rdist-6.1.5/src/expand.c.cleanup 1998-11-10 05:09:31.000000000 +0100 | ||
679 | +++ rdist-6.1.5/src/expand.c 2003-12-17 11:38:16.000000000 +0100 | ||
680 | @@ -38,7 +38,7 @@ | ||
681 | * SUCH DAMAGE. | ||
682 | */ | ||
683 | |||
684 | -#ifndef lint | ||
685 | +#if 0 | ||
686 | static char RCSid[] = | ||
687 | "$Id: expand.c,v 6.19 1998/11/10 04:09:31 mcooper Exp $"; | ||
688 | |||
689 | @@ -81,9 +81,9 @@ | ||
690 | sizeof(*sortbase), argcmp), sortbase = &eargv[eargc] | ||
691 | |||
692 | static void Cat(s1, s2) /* quote in s1 and s2 */ | ||
693 | - register u_char *s1, *s2; | ||
694 | + u_char *s1, *s2; | ||
695 | { | ||
696 | - register char *cp; | ||
697 | + char *cp; | ||
698 | int len = strlen((char *)s1) + strlen((char *)s2) + 2; | ||
699 | |||
700 | if ((eargc + 1) >= MAXEARGS) { | ||
701 | @@ -97,12 +97,12 @@ | ||
702 | do { | ||
703 | if (*s1 == QUOTECHAR) | ||
704 | s1++; | ||
705 | - } while (*cp++ = *s1++); | ||
706 | + } while ((*cp++ = *s1++)); | ||
707 | cp--; | ||
708 | do { | ||
709 | if (*s2 == QUOTECHAR) | ||
710 | s2++; | ||
711 | - } while (*cp++ = *s2++); | ||
712 | + } while ((*cp++ = *s2++)); | ||
713 | } | ||
714 | |||
715 | static void addpath(c) | ||
716 | @@ -131,8 +131,8 @@ | ||
717 | struct namelist *list; | ||
718 | int wh; | ||
719 | { | ||
720 | - register struct namelist *nl, *prev; | ||
721 | - register int n; | ||
722 | + struct namelist *nl, *prev; | ||
723 | + int n; | ||
724 | char pathbuf[BUFSIZ]; | ||
725 | |||
726 | if (debug) | ||
727 | @@ -182,7 +182,7 @@ | ||
728 | u_char *str; | ||
729 | int ch; | ||
730 | { | ||
731 | - register u_char *cp; | ||
732 | + u_char *cp; | ||
733 | |||
734 | for (cp = str; cp && *cp != CNULL; ++cp) | ||
735 | if (ch == *cp) | ||
736 | @@ -194,8 +194,8 @@ | ||
737 | void expstr(s) | ||
738 | u_char *s; | ||
739 | { | ||
740 | - register u_char *cp, *cp1; | ||
741 | - register struct namelist *tp; | ||
742 | + u_char *cp, *cp1; | ||
743 | + struct namelist *tp; | ||
744 | u_char *tail; | ||
745 | u_char ebuf[BUFSIZ]; | ||
746 | u_char varbuff[BUFSIZ]; | ||
747 | @@ -302,7 +302,7 @@ | ||
748 | cp1 = (u_char *)pw->pw_dir; | ||
749 | s = cp; | ||
750 | } | ||
751 | - for (cp = (u_char *)path; *cp++ = *cp1++; ) | ||
752 | + for (cp = (u_char *)path; (*cp++ = *cp1++); ) | ||
753 | ; | ||
754 | tpathp = pathp = (char *)cp - 1; | ||
755 | } else { | ||
756 | @@ -326,7 +326,7 @@ | ||
757 | sort(); | ||
758 | } | ||
759 | |||
760 | -static | ||
761 | +static int | ||
762 | argcmp(a1, a2) | ||
763 | char **a1, **a2; | ||
764 | { | ||
765 | @@ -341,8 +341,8 @@ | ||
766 | void expsh(s) /* quote in s */ | ||
767 | u_char *s; | ||
768 | { | ||
769 | - register u_char *cp, *oldcp; | ||
770 | - register char *spathp; | ||
771 | + u_char *cp, *oldcp; | ||
772 | + char *spathp; | ||
773 | struct stat stb; | ||
774 | |||
775 | spathp = pathp; | ||
776 | @@ -380,7 +380,7 @@ | ||
777 | char *pattern; | ||
778 | { | ||
779 | struct stat stb; | ||
780 | - register DIRENTRY *dp; | ||
781 | + DIRENTRY *dp; | ||
782 | DIR *dirp; | ||
783 | |||
784 | dirp = opendir(path); | ||
785 | @@ -417,11 +417,12 @@ | ||
786 | yyerror(path); | ||
787 | } | ||
788 | |||
789 | +int | ||
790 | execbrc(p, s) /* quote in p */ | ||
791 | u_char *p, *s; | ||
792 | { | ||
793 | u_char restbuf[BUFSIZ + 2]; | ||
794 | - register u_char *pe, *pm, *pl; | ||
795 | + u_char *pe, *pm, *pl; | ||
796 | int brclev = 0; | ||
797 | u_char *lm, savec; | ||
798 | char *spathp; | ||
799 | @@ -507,11 +508,12 @@ | ||
800 | return (0); | ||
801 | } | ||
802 | |||
803 | +int | ||
804 | match(s, p) /* quote in p */ | ||
805 | char *s, *p; | ||
806 | { | ||
807 | - register int c; | ||
808 | - register char *sentp; | ||
809 | + int c; | ||
810 | + char *sentp; | ||
811 | char sexpany = expany; | ||
812 | |||
813 | if (*s == '.' && *p != '.') | ||
814 | @@ -524,11 +526,12 @@ | ||
815 | return (c); | ||
816 | } | ||
817 | |||
818 | +int | ||
819 | amatch(s, p) /* quote in p */ | ||
820 | - register char *s; | ||
821 | - register u_char *p; | ||
822 | + char *s; | ||
823 | + u_char *p; | ||
824 | { | ||
825 | - register int scc; | ||
826 | + int scc; | ||
827 | int ok, lc; | ||
828 | char *spathp; | ||
829 | struct stat stb; | ||
830 | @@ -545,7 +548,7 @@ | ||
831 | case '[': | ||
832 | ok = 0; | ||
833 | lc = 077777; | ||
834 | - while (cc = *p++) { | ||
835 | + while ((cc = *p++)) { | ||
836 | if (cc == ']') { | ||
837 | if (ok) | ||
838 | break; | ||
839 | @@ -599,7 +602,7 @@ | ||
840 | while (*s) | ||
841 | addpath(*s++); | ||
842 | addpath('/'); | ||
843 | - if (stat(path, &stb) == 0 && S_ISDIR(stb.st_mode)) | ||
844 | + if (stat(path, &stb) == 0 && S_ISDIR(stb.st_mode)) { | ||
845 | if (*p == CNULL) { | ||
846 | if (which & E_TILDE) | ||
847 | Cat((u_char *)path, | ||
848 | @@ -609,6 +612,7 @@ | ||
849 | (u_char *)tpathp); | ||
850 | } else | ||
851 | expsh(p); | ||
852 | + } | ||
853 | pathp = spathp; | ||
854 | *pathp = CNULL; | ||
855 | return (0); | ||
856 | --- rdist-6.1.5/src/lookup.c.cleanup 1998-11-10 05:12:56.000000000 +0100 | ||
857 | +++ rdist-6.1.5/src/lookup.c 2003-12-17 11:38:16.000000000 +0100 | ||
858 | @@ -38,7 +38,7 @@ | ||
859 | * SUCH DAMAGE. | ||
860 | */ | ||
861 | |||
862 | -#ifndef lint | ||
863 | +#if 0 | ||
864 | static char RCSid[] = | ||
865 | "$Id: lookup.c,v 6.9 1998/11/10 04:12:56 mcooper Exp $"; | ||
866 | |||
867 | @@ -68,11 +68,12 @@ | ||
868 | /* | ||
869 | * Define a variable from a command line argument. | ||
870 | */ | ||
871 | +void | ||
872 | define(name) | ||
873 | char *name; | ||
874 | { | ||
875 | - register char *cp, *s; | ||
876 | - register struct namelist *nl; | ||
877 | + char *cp, *s; | ||
878 | + struct namelist *nl; | ||
879 | struct namelist *value; | ||
880 | |||
881 | debugmsg(DM_CALL, "define(%s)", name); | ||
882 | @@ -137,9 +138,9 @@ | ||
883 | int action; | ||
884 | struct namelist *value; | ||
885 | { | ||
886 | - register unsigned n; | ||
887 | - register char *cp; | ||
888 | - register struct syment *s; | ||
889 | + unsigned n; | ||
890 | + char *cp; | ||
891 | + struct syment *s; | ||
892 | char ebuf[BUFSIZ]; | ||
893 | |||
894 | debugmsg(DM_CALL, "lookup(%s, %d, %x)", name, action, value); | ||
895 | --- rdist-6.1.5/src/isexec.c.cleanup 1998-11-10 05:11:42.000000000 +0100 | ||
896 | +++ rdist-6.1.5/src/isexec.c 2003-12-17 11:38:16.000000000 +0100 | ||
897 | @@ -37,7 +37,7 @@ | ||
898 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
899 | * SUCH DAMAGE. | ||
900 | */ | ||
901 | -#ifndef lint | ||
902 | +#if 0 | ||
903 | static char RCSid[] = | ||
904 | "$Id: isexec.c,v 6.22 1998/11/10 04:11:42 mcooper Exp $"; | ||
905 | |||
906 | --- rdist-6.1.5/src/signal.c.cleanup 1998-11-10 05:16:13.000000000 +0100 | ||
907 | +++ rdist-6.1.5/src/signal.c 2003-12-17 11:38:16.000000000 +0100 | ||
908 | @@ -38,7 +38,7 @@ | ||
909 | * SUCH DAMAGE. | ||
910 | */ | ||
911 | |||
912 | -#ifndef lint | ||
913 | +#if 0 | ||
914 | static char RCSid[] = | ||
915 | "$Id: signal.c,v 6.2 1998/11/10 04:16:13 mcooper Exp $"; | ||
916 | |||
917 | --- rdist-6.1.5/src/rshrcmd.c.cleanup 1998-11-10 05:15:07.000000000 +0100 | ||
918 | +++ rdist-6.1.5/src/rshrcmd.c 2003-12-17 11:38:16.000000000 +0100 | ||
919 | @@ -10,7 +10,7 @@ | ||
920 | * Chris Siebenmann <cks@utcc.utoronto.ca>. | ||
921 | */ | ||
922 | |||
923 | -#ifndef lint | ||
924 | +#if 0 | ||
925 | static char RCSid[] = | ||
926 | "$Id: rshrcmd.c,v 1.9 1998/11/10 04:15:07 mcooper Exp $"; | ||
927 | |||
928 | @@ -34,6 +34,7 @@ | ||
929 | * program in place of a direct rcmd() function call so as to | ||
930 | * avoid having to be root. | ||
931 | */ | ||
932 | +int | ||
933 | rshrcmd(ahost, port, luser, ruser, cmd, fd2p) | ||
934 | char **ahost; | ||
935 | u_short port; | ||
936 | @@ -108,6 +109,7 @@ | ||
937 | (void) wait(0); | ||
938 | return sp[0]; | ||
939 | } | ||
940 | + return -1; | ||
941 | /*NOTREACHED*/ | ||
942 | } | ||
943 | |||
944 | --- rdist-6.1.5/src/common.c.cleanup 1998-11-10 05:09:01.000000000 +0100 | ||
945 | +++ rdist-6.1.5/src/common.c 2003-12-17 11:38:16.000000000 +0100 | ||
946 | @@ -38,7 +38,7 @@ | ||
947 | * SUCH DAMAGE. | ||
948 | */ | ||
949 | |||
950 | -#ifndef lint | ||
951 | +#if 0 | ||
952 | static char RCSid[] = | ||
953 | "$Id: common.c,v 6.84 1998/11/10 04:09:01 mcooper Exp $"; | ||
954 | |||
955 | @@ -87,14 +87,14 @@ | ||
956 | /* | ||
957 | * Front end to write() that handles partial write() requests. | ||
958 | */ | ||
959 | -extern WRITE_RETURN_T xwrite(fd, buf, len) | ||
960 | +WRITE_RETURN_T xwrite(fd, buf, len) | ||
961 | int fd; | ||
962 | void *buf; | ||
963 | WRITE_AMT_T len; | ||
964 | { | ||
965 | WRITE_AMT_T nleft = len; | ||
966 | WRITE_RETURN_T nwritten; | ||
967 | - register char *ptr = buf; | ||
968 | + char *ptr = buf; | ||
969 | |||
970 | while (nleft > 0) { | ||
971 | if ((nwritten = write(fd, ptr, nleft)) <= 0) { | ||
972 | @@ -110,14 +110,14 @@ | ||
973 | /* | ||
974 | * Set program name | ||
975 | */ | ||
976 | -extern void setprogname(argv) | ||
977 | +void setprogname(argv) | ||
978 | char **argv; | ||
979 | { | ||
980 | - register char *cp; | ||
981 | + char *cp; | ||
982 | |||
983 | if (!progname) { | ||
984 | progname = strdup(argv[0]); | ||
985 | - if (cp = strrchr(progname, '/')) | ||
986 | + if ((cp = strrchr(progname, '/'))) | ||
987 | progname = cp + 1; | ||
988 | } | ||
989 | } | ||
990 | @@ -125,14 +125,14 @@ | ||
991 | /* | ||
992 | * Do run-time initialization | ||
993 | */ | ||
994 | -extern int init(argc, argv, envp) | ||
995 | +int init(argc, argv, envp) | ||
996 | /*ARGSUSED*/ | ||
997 | int argc; | ||
998 | char **argv; | ||
999 | char **envp; | ||
1000 | { | ||
1001 | - register int i; | ||
1002 | - register char *cp; | ||
1003 | + int i; | ||
1004 | + char *cp; | ||
1005 | |||
1006 | if (!isserver) | ||
1007 | (void) signal(SIGSEGV, sighandler); | ||
1008 | @@ -182,7 +182,7 @@ | ||
1009 | /* | ||
1010 | * Finish things up before ending. | ||
1011 | */ | ||
1012 | -extern void finish() | ||
1013 | +void finish() | ||
1014 | { | ||
1015 | extern jmp_buf finish_jmpbuf; | ||
1016 | |||
1017 | @@ -216,7 +216,7 @@ | ||
1018 | /* | ||
1019 | * Handle lost connections | ||
1020 | */ | ||
1021 | -extern void lostconn() | ||
1022 | +void lostconn() | ||
1023 | { | ||
1024 | /* Prevent looping */ | ||
1025 | (void) signal(SIGPIPE, SIG_IGN); | ||
1026 | @@ -232,7 +232,7 @@ | ||
1027 | /* | ||
1028 | * Do a core dump | ||
1029 | */ | ||
1030 | -extern void coredump() | ||
1031 | +void coredump() | ||
1032 | { | ||
1033 | error("Segmentation violation - dumping core [PID = %d, %s]", | ||
1034 | getpid(), | ||
1035 | @@ -245,7 +245,7 @@ | ||
1036 | /* | ||
1037 | * General signal handler | ||
1038 | */ | ||
1039 | -extern void sighandler(sig) | ||
1040 | +void sighandler(sig) | ||
1041 | int sig; | ||
1042 | { | ||
1043 | debugmsg(DM_CALL, "sighandler() received signal %d\n", sig); | ||
1044 | @@ -325,7 +325,7 @@ | ||
1045 | /* | ||
1046 | * Stdarg frontend to sendcmdmsg() | ||
1047 | */ | ||
1048 | -extern int sendcmd(char cmd, char *fmt, ...) | ||
1049 | +int sendcmd(char cmd, char *fmt, ...) | ||
1050 | { | ||
1051 | static char buf[BUFSIZ]; | ||
1052 | va_list args; | ||
1053 | @@ -345,7 +345,7 @@ | ||
1054 | /* | ||
1055 | * Varargs frontend to sendcmdmsg() | ||
1056 | */ | ||
1057 | -extern int sendcmd(va_alist) | ||
1058 | +int sendcmd(va_alist) | ||
1059 | va_dcl | ||
1060 | { | ||
1061 | static char buf[BUFSIZ]; | ||
1062 | @@ -372,7 +372,7 @@ | ||
1063 | * Stupid frontend to sendcmdmsg() | ||
1064 | */ | ||
1065 | /*VARARGS2*/ | ||
1066 | -extern int sendcmd(cmd, fmt, a1, a2, a3, a4, a5, a6, a7, a8) | ||
1067 | +int sendcmd(cmd, fmt, a1, a2, a3, a4, a5, a6, a7, a8) | ||
1068 | char cmd; | ||
1069 | char *fmt; | ||
1070 | { | ||
1071 | @@ -433,13 +433,13 @@ | ||
1072 | * errors, call cleanup() or lostconn(). In other words, unless | ||
1073 | * the third argument is nonzero, this routine never returns failure. | ||
1074 | */ | ||
1075 | -extern int remline(buffer, space, doclean) | ||
1076 | - register u_char *buffer; | ||
1077 | +int remline(buffer, space, doclean) | ||
1078 | + u_char *buffer; | ||
1079 | int space; | ||
1080 | int doclean; | ||
1081 | { | ||
1082 | - register int c, left = space; | ||
1083 | - register u_char *p = buffer; | ||
1084 | + int c, left = space; | ||
1085 | + u_char *p = buffer; | ||
1086 | |||
1087 | if (rem_r < 0) { | ||
1088 | error("Cannot read remote input: Remote descriptor not open."); | ||
1089 | @@ -494,9 +494,9 @@ | ||
1090 | /* | ||
1091 | * Non-line-oriented remote read. | ||
1092 | */ | ||
1093 | -readrem(p, space) | ||
1094 | +int readrem(p, space) | ||
1095 | char *p; | ||
1096 | - register int space; | ||
1097 | + int space; | ||
1098 | { | ||
1099 | if (remleft <= 0) { | ||
1100 | /* | ||
1101 | @@ -527,7 +527,7 @@ | ||
1102 | /* | ||
1103 | * Get the user name for the uid. | ||
1104 | */ | ||
1105 | -extern char *getusername(uid, file, opts) | ||
1106 | +char *getusername(uid, file, opts) | ||
1107 | UID_T uid; | ||
1108 | char *file; | ||
1109 | opt_t opts; | ||
1110 | @@ -566,7 +566,7 @@ | ||
1111 | /* | ||
1112 | * Get the group name for the gid. | ||
1113 | */ | ||
1114 | -extern char *getgroupname(gid, file, opts) | ||
1115 | +char *getgroupname(gid, file, opts) | ||
1116 | GID_T gid; | ||
1117 | char *file; | ||
1118 | opt_t opts; | ||
1119 | @@ -604,7 +604,7 @@ | ||
1120 | /* | ||
1121 | * Read a response from the remote host. | ||
1122 | */ | ||
1123 | -extern int response() | ||
1124 | +int response() | ||
1125 | { | ||
1126 | static u_char resp[BUFSIZ]; | ||
1127 | u_char *s; | ||
1128 | @@ -646,6 +646,7 @@ | ||
1129 | message(MT_FERROR, "%s", s); | ||
1130 | finish(); | ||
1131 | } | ||
1132 | + return -1; | ||
1133 | /*NOTREACHED*/ | ||
1134 | } | ||
1135 | |||
1136 | @@ -657,11 +658,11 @@ | ||
1137 | * user's home directory path name. Return a pointer in buf to the | ||
1138 | * part corresponding to `file'. | ||
1139 | */ | ||
1140 | -extern char *exptilde(ebuf, file) | ||
1141 | +char *exptilde(ebuf, file) | ||
1142 | char *ebuf; | ||
1143 | - register char *file; | ||
1144 | + char *file; | ||
1145 | { | ||
1146 | - register char *s1, *s2, *s3; | ||
1147 | + char *s1, *s2, *s3; | ||
1148 | extern char *homedir; | ||
1149 | |||
1150 | if (*file != '~') { | ||
1151 | @@ -694,12 +695,12 @@ | ||
1152 | *s3 = '/'; | ||
1153 | s2 = pw->pw_dir; | ||
1154 | } | ||
1155 | - for (s1 = ebuf; *s1++ = *s2++; ) | ||
1156 | + for (s1 = ebuf; (*s1++ = *s2++); ) | ||
1157 | ; | ||
1158 | s2 = --s1; | ||
1159 | if (s3 != NULL) { | ||
1160 | s2++; | ||
1161 | - while (*s1++ = *s3++) | ||
1162 | + while ((*s1++ = *s3++)) | ||
1163 | ; | ||
1164 | } | ||
1165 | return(s2); | ||
1166 | @@ -710,7 +711,7 @@ | ||
1167 | * Set our effective user id to the user running us. | ||
1168 | * This should be the uid we do most of our work as. | ||
1169 | */ | ||
1170 | -extern int becomeuser() | ||
1171 | +int becomeuser() | ||
1172 | { | ||
1173 | int r = 0; | ||
1174 | |||
1175 | @@ -732,7 +733,7 @@ | ||
1176 | /* | ||
1177 | * Set our effective user id to "root" (uid = 0) | ||
1178 | */ | ||
1179 | -extern int becomeroot() | ||
1180 | +int becomeroot() | ||
1181 | { | ||
1182 | int r = 0; | ||
1183 | |||
1184 | @@ -753,7 +754,7 @@ | ||
1185 | /* | ||
1186 | * Set access and modify times of a given file | ||
1187 | */ | ||
1188 | -extern int setfiletime(file, atime, mtime) | ||
1189 | +int setfiletime(file, atime, mtime) | ||
1190 | char *file; | ||
1191 | time_t atime; | ||
1192 | time_t mtime; | ||
1193 | @@ -790,7 +791,7 @@ | ||
1194 | /* | ||
1195 | * Get version info | ||
1196 | */ | ||
1197 | -extern char *getversion() | ||
1198 | +char *getversion() | ||
1199 | { | ||
1200 | static char buff[BUFSIZ]; | ||
1201 | |||
1202 | @@ -811,7 +812,7 @@ | ||
1203 | { | ||
1204 | int fd[2], pid, i; | ||
1205 | int status; | ||
1206 | - register char *cp, *s; | ||
1207 | + char *cp, *s; | ||
1208 | char sbuf[BUFSIZ], buf[BUFSIZ]; | ||
1209 | |||
1210 | if (pipe(fd) < 0) { | ||
1211 | @@ -933,12 +934,12 @@ | ||
1212 | /* | ||
1213 | * Private version of basename() | ||
1214 | */ | ||
1215 | -extern char *xbasename(path) | ||
1216 | +char *xbasename(path) | ||
1217 | char *path; | ||
1218 | { | ||
1219 | - register char *cp; | ||
1220 | + char *cp; | ||
1221 | |||
1222 | - if (cp = strrchr(path, '/')) | ||
1223 | + if ((cp = strrchr(path, '/'))) | ||
1224 | return(cp+1); | ||
1225 | else | ||
1226 | return(path); | ||
1227 | @@ -949,11 +950,11 @@ | ||
1228 | * search until a component of that path is found and | ||
1229 | * return the found file name. | ||
1230 | */ | ||
1231 | -extern char *searchpath(path) | ||
1232 | +char *searchpath(path) | ||
1233 | char *path; | ||
1234 | { | ||
1235 | - register char *cp; | ||
1236 | - register char *file; | ||
1237 | + char *cp; | ||
1238 | + char *file; | ||
1239 | struct stat statbuf; | ||
1240 | |||
1241 | for (; ;) { | ||
1242 | @@ -977,8 +978,7 @@ | ||
1243 | /* | ||
1244 | * Set line buffering. | ||
1245 | */ | ||
1246 | -extern void | ||
1247 | -mysetlinebuf(fp) | ||
1248 | +void mysetlinebuf(fp) | ||
1249 | FILE *fp; | ||
1250 | { | ||
1251 | #if SETBUF_TYPE == SETBUF_SETLINEBUF | ||
1252 | @@ -995,8 +995,7 @@ | ||
1253 | /* | ||
1254 | * Our interface to system call to get a socket pair. | ||
1255 | */ | ||
1256 | -int | ||
1257 | -getsocketpair(domain, type, protocol, sv) | ||
1258 | +int getsocketpair(domain, type, protocol, sv) | ||
1259 | int domain; | ||
1260 | int type; | ||
1261 | int protocol; | ||
1262 | --- rdist-6.1.5/src/message.c.cleanup 1998-11-10 05:13:30.000000000 +0100 | ||
1263 | +++ rdist-6.1.5/src/message.c 2003-12-17 11:38:16.000000000 +0100 | ||
1264 | @@ -38,7 +38,7 @@ | ||
1265 | * SUCH DAMAGE. | ||
1266 | */ | ||
1267 | |||
1268 | -#ifndef lint | ||
1269 | +#if 0 | ||
1270 | static char RCSid[] = | ||
1271 | "$Id: message.c,v 6.25 1998/11/10 04:13:30 mcooper Exp $"; | ||
1272 | |||
1273 | @@ -97,7 +97,7 @@ | ||
1274 | */ | ||
1275 | extern void msgprusage() | ||
1276 | { | ||
1277 | - register int i, x; | ||
1278 | + int i, x; | ||
1279 | |||
1280 | (void) fprintf(stderr, "\nWhere <msgopt> is of form\n"); | ||
1281 | (void) fprintf(stderr, | ||
1282 | @@ -120,7 +120,7 @@ | ||
1283 | */ | ||
1284 | extern void msgprconfig() | ||
1285 | { | ||
1286 | - register int i, x; | ||
1287 | + int i, x; | ||
1288 | static char buf[MSGBUFSIZ]; | ||
1289 | |||
1290 | debugmsg(DM_MISC, "Current message logging config:"); | ||
1291 | @@ -145,7 +145,7 @@ | ||
1292 | static MSGFACILITY *getmsgfac(name) | ||
1293 | char *name; | ||
1294 | { | ||
1295 | - register int i; | ||
1296 | + int i; | ||
1297 | |||
1298 | for (i = 0; msgfacility[i].mf_name; ++i) | ||
1299 | if (strcasecmp(name, msgfacility[i].mf_name) == 0) | ||
1300 | @@ -160,7 +160,7 @@ | ||
1301 | static MSGTYPE *getmsgtype(name) | ||
1302 | char *name; | ||
1303 | { | ||
1304 | - register int i; | ||
1305 | + int i; | ||
1306 | |||
1307 | for (i = 0; msgtypes[i].mt_name; ++i) | ||
1308 | if (strcasecmp(name, msgtypes[i].mt_name) == 0) | ||
1309 | @@ -178,9 +178,9 @@ | ||
1310 | char *str; | ||
1311 | { | ||
1312 | static char ebuf[BUFSIZ]; | ||
1313 | - register char *cp; | ||
1314 | - register char *strptr, *word; | ||
1315 | - register MSGTYPE *mtp; | ||
1316 | + char *cp; | ||
1317 | + char *strptr, *word; | ||
1318 | + MSGTYPE *mtp; | ||
1319 | |||
1320 | /* | ||
1321 | * MF_SYSLOG is the only supported message facility for the server | ||
1322 | @@ -240,11 +240,11 @@ | ||
1323 | msgfac->mf_msgtypes = 0; /* Start from scratch */ | ||
1324 | while (strptr) { | ||
1325 | word = strptr; | ||
1326 | - if (cp = strchr(strptr, ',')) | ||
1327 | + if ((cp = strchr(strptr, ','))) | ||
1328 | *cp++ = CNULL; | ||
1329 | strptr = cp; | ||
1330 | |||
1331 | - if (mtp = getmsgtype(word)) { | ||
1332 | + if ((mtp = getmsgtype(word))) { | ||
1333 | msgfac->mf_msgtypes |= mtp->mt_type; | ||
1334 | /* | ||
1335 | * XXX This is really a kludge until we add real | ||
1336 | @@ -272,8 +272,8 @@ | ||
1337 | int doset; | ||
1338 | { | ||
1339 | static char ebuf[BUFSIZ], msgbuf[MSGBUFSIZ]; | ||
1340 | - register char *cp, *optstr; | ||
1341 | - register char *word; | ||
1342 | + char *cp, *optstr; | ||
1343 | + char *word; | ||
1344 | MSGFACILITY *msgfac; | ||
1345 | |||
1346 | if (msgstr == NULL) | ||
1347 | @@ -308,7 +308,7 @@ | ||
1348 | if (doset) { | ||
1349 | char *mcp; | ||
1350 | |||
1351 | - if (mcp = setmsgtypes(msgfac, cp)) | ||
1352 | + if ((mcp = setmsgtypes(msgfac, cp))) | ||
1353 | return(mcp); | ||
1354 | } | ||
1355 | } | ||
1356 | @@ -462,8 +462,9 @@ | ||
1357 | return; | ||
1358 | |||
1359 | if (!msgfac->mf_fptr) { | ||
1360 | - register char *cp; | ||
1361 | + char *cp; | ||
1362 | char *getenv(); | ||
1363 | + int fd; | ||
1364 | |||
1365 | /* | ||
1366 | * Create and open a new temporary file | ||
1367 | @@ -475,7 +476,10 @@ | ||
1368 | (void) sprintf(tempfile, "%s/%s", cp, _RDIST_TMP); | ||
1369 | |||
1370 | msgfac->mf_filename = tempfile; | ||
1371 | - (void) mktemp(msgfac->mf_filename); | ||
1372 | + fd = mkstemp(msgfac->mf_filename); | ||
1373 | + if (fd < 0) | ||
1374 | + fatalerr("Cannot open notify file for writing: %s: %s.", msgfac->mf_filename, SYSERR); | ||
1375 | + close(fd); | ||
1376 | if ((msgfac->mf_fptr = fopen(msgfac->mf_filename, "w"))==NULL) | ||
1377 | fatalerr("Cannot open notify file for writing: %s: %s.", | ||
1378 | msgfac->mf_filename, SYSERR); | ||
1379 | @@ -515,15 +519,15 @@ | ||
1380 | int flags; | ||
1381 | char *msgbuf; | ||
1382 | { | ||
1383 | - register int i, x; | ||
1384 | - register char *cp; | ||
1385 | + int i, x; | ||
1386 | + char *cp; | ||
1387 | static char mbuf[2048]; | ||
1388 | |||
1389 | if (msgbuf && *msgbuf) { | ||
1390 | /* | ||
1391 | * Ensure no stray newlines are present | ||
1392 | */ | ||
1393 | - if (cp = strchr(msgbuf, '\n')) | ||
1394 | + if ((cp = strchr(msgbuf, '\n'))) | ||
1395 | *cp = CNULL; | ||
1396 | |||
1397 | checkhostname(); | ||
1398 | @@ -863,7 +867,7 @@ | ||
1399 | */ | ||
1400 | extern char *getnotifyfile() | ||
1401 | { | ||
1402 | - register int i; | ||
1403 | + int i; | ||
1404 | |||
1405 | for (i = 0; msgfacility[i].mf_name; i++) | ||
1406 | if (msgfacility[i].mf_msgfac == MF_NOTIFY && | ||
1407 | --- rdist-6.1.5/src/setargs.c.cleanup 2003-12-17 11:38:16.000000000 +0100 | ||
1408 | +++ rdist-6.1.5/src/setargs.c 2003-12-17 11:38:16.000000000 +0100 | ||
1409 | @@ -38,7 +38,7 @@ | ||
1410 | * SUCH DAMAGE. | ||
1411 | */ | ||
1412 | |||
1413 | -#ifndef lint | ||
1414 | +#if 0 | ||
1415 | static char RCSid[] = | ||
1416 | "$Id: setargs.c,v 6.5 1998/11/10 04:15:56 mcooper Exp $"; | ||
1417 | |||
1418 | @@ -66,12 +66,12 @@ | ||
1419 | /* | ||
1420 | * Settup things for using setproctitle() | ||
1421 | */ | ||
1422 | -setargs_settup(argc, argv, envp) | ||
1423 | +void setargs_settup(argc, argv, envp) | ||
1424 | int argc; | ||
1425 | char **argv; | ||
1426 | char **envp; | ||
1427 | { | ||
1428 | - register int i; | ||
1429 | + int i; | ||
1430 | extern char **environ; | ||
1431 | |||
1432 | /* Remember the User Environment */ | ||
1433 | @@ -92,10 +92,10 @@ | ||
1434 | /* | ||
1435 | * Set process title | ||
1436 | */ | ||
1437 | -extern void _setproctitle(msg) | ||
1438 | +void _setproctitle(msg) | ||
1439 | char *msg; | ||
1440 | { | ||
1441 | - register int i; | ||
1442 | + int i; | ||
1443 | char *p; | ||
1444 | |||
1445 | p = Argv[0]; | ||
1446 | @@ -119,7 +119,7 @@ | ||
1447 | /* | ||
1448 | * Varargs front-end to _setproctitle() | ||
1449 | */ | ||
1450 | -extern void setproctitle(va_alist) | ||
1451 | +void setproctitle(va_alist) | ||
1452 | va_dcl | ||
1453 | { | ||
1454 | static char buf[BUFSIZ]; | ||
1455 | @@ -138,7 +138,7 @@ | ||
1456 | /* | ||
1457 | * Stdarg front-end to _setproctitle() | ||
1458 | */ | ||
1459 | -extern void setproctitle(char *fmt, ...) | ||
1460 | +void setproctitle(char *fmt, ...) | ||
1461 | { | ||
1462 | static char buf[BUFSIZ]; | ||
1463 | va_list args; | ||
1464 | @@ -155,7 +155,7 @@ | ||
1465 | * Non-Varargs front-end to _setproctitle() | ||
1466 | */ | ||
1467 | /*VARARGS1*/ | ||
1468 | -extern void setproctitle(fmt, a1, a2, a3, a4, a5, a6) | ||
1469 | +void setproctitle(fmt, a1, a2, a3, a4, a5, a6) | ||
1470 | char *fmt; | ||
1471 | { | ||
1472 | static char buf[BUFSIZ]; | ||
1473 | --- rdist-6.1.5/src/rdistd.c.cleanup 1998-11-10 05:14:06.000000000 +0100 | ||
1474 | +++ rdist-6.1.5/src/rdistd.c 2003-12-17 11:38:16.000000000 +0100 | ||
1475 | @@ -38,7 +38,7 @@ | ||
1476 | * SUCH DAMAGE. | ||
1477 | */ | ||
1478 | |||
1479 | -#ifndef lint | ||
1480 | +#if 0 | ||
1481 | static char RCSid[] = | ||
1482 | "$Id: rdistd.c,v 6.23 1998/11/10 04:14:06 mcooper Exp $"; | ||
1483 | |||
1484 | @@ -53,21 +53,12 @@ | ||
1485 | |||
1486 | #include "defs.h" | ||
1487 | |||
1488 | -/* | ||
1489 | - * Print usage message | ||
1490 | - */ | ||
1491 | -static void usage() | ||
1492 | -{ | ||
1493 | - fprintf(stderr, "usage: %s -S [ -DV ]\n", progname); | ||
1494 | - exit(1); | ||
1495 | -} | ||
1496 | - | ||
1497 | char localmsglist[] = "syslog=ferror"; | ||
1498 | |||
1499 | /* | ||
1500 | * The Beginning | ||
1501 | */ | ||
1502 | -main(argc, argv, envp) | ||
1503 | +int main(argc, argv, envp) | ||
1504 | int argc; | ||
1505 | char **argv; | ||
1506 | char **envp; | ||
1507 | @@ -95,7 +86,8 @@ | ||
1508 | case '?': | ||
1509 | default: | ||
1510 | error("Bad command line option."); | ||
1511 | - usage(); | ||
1512 | + fprintf(stderr, "usage: %s -S [ -DV ]\n", progname); | ||
1513 | + exit(1); | ||
1514 | } | ||
1515 | |||
1516 | if (!isserver) { | ||
1517 | @@ -108,7 +100,7 @@ | ||
1518 | rem_w = fileno(stdout); | ||
1519 | |||
1520 | /* Set logging */ | ||
1521 | - if (cp = msgparseopts(localmsglist, TRUE)) | ||
1522 | + if ((cp = msgparseopts(localmsglist, TRUE))) | ||
1523 | fatalerr("Bad message logging option (%s): %s", | ||
1524 | localmsglist, cp); | ||
1525 | |||
1526 | --- rdist-6.1.5/src/server.c.cleanup 2003-12-17 11:38:16.000000000 +0100 | ||
1527 | +++ rdist-6.1.5/src/server.c 2003-12-17 11:38:16.000000000 +0100 | ||
1528 | @@ -37,7 +37,7 @@ | ||
1529 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
1530 | * SUCH DAMAGE. | ||
1531 | */ | ||
1532 | -#ifndef lint | ||
1533 | +#if 0 | ||
1534 | static char RCSid[] = | ||
1535 | "$Id: server.c,v 6.86 1998/11/10 04:15:31 mcooper Exp $"; | ||
1536 | |||
1537 | @@ -197,7 +197,7 @@ | ||
1538 | static UID_T last_uid = (UID_T)-2; | ||
1539 | static GID_T last_primegid; | ||
1540 | extern char *locuser; | ||
1541 | - register int i; | ||
1542 | + int i; | ||
1543 | UID_T uid; | ||
1544 | GID_T gid; | ||
1545 | GID_T primegid = (GID_T)-2; | ||
1546 | @@ -252,7 +252,7 @@ | ||
1547 | /* | ||
1548 | * Invalid cached values so we need to do a new lookup. | ||
1549 | */ | ||
1550 | - if (gr = mygetgroup(group)) { | ||
1551 | + if ((gr = mygetgroup(group))) { | ||
1552 | last_gid = gid = gr->gr_gid; | ||
1553 | strcpy(last_group, gr->gr_name); | ||
1554 | } else { | ||
1555 | @@ -325,7 +325,7 @@ | ||
1556 | { | ||
1557 | DIR *d; | ||
1558 | static DIRENTRY *dp; | ||
1559 | - register char *cp; | ||
1560 | + char *cp; | ||
1561 | struct stat stb; | ||
1562 | char *optarget; | ||
1563 | int len, failures = 0; | ||
1564 | @@ -362,7 +362,7 @@ | ||
1565 | |||
1566 | optarget = ptarget; | ||
1567 | len = ptarget - target; | ||
1568 | - while (dp = readdir(d)) { | ||
1569 | + while ((dp = readdir(d))) { | ||
1570 | if ((D_NAMLEN(dp) == 1 && dp->d_name[0] == '.') || | ||
1571 | (D_NAMLEN(dp) == 2 && dp->d_name[0] == '.' && | ||
1572 | dp->d_name[1] == '.')) | ||
1573 | @@ -376,7 +376,7 @@ | ||
1574 | ptarget = optarget; | ||
1575 | *ptarget++ = '/'; | ||
1576 | cp = dp->d_name;; | ||
1577 | - while (*ptarget++ = *cp++) | ||
1578 | + while ((*ptarget++ = *cp++)) | ||
1579 | ; | ||
1580 | ptarget--; | ||
1581 | if (lstat(target, &stb) < 0) { | ||
1582 | @@ -414,10 +414,10 @@ | ||
1583 | * for extraneous files and remove them. | ||
1584 | */ | ||
1585 | static void doclean(cp) | ||
1586 | - register char *cp; | ||
1587 | + char *cp; | ||
1588 | { | ||
1589 | DIR *d; | ||
1590 | - register DIRENTRY *dp; | ||
1591 | + DIRENTRY *dp; | ||
1592 | struct stat stb; | ||
1593 | char *optarget, *ep; | ||
1594 | int len; | ||
1595 | @@ -436,7 +436,7 @@ | ||
1596 | |||
1597 | optarget = ptarget; | ||
1598 | len = ptarget - target; | ||
1599 | - while (dp = readdir(d)) { | ||
1600 | + while ((dp = readdir(d))) { | ||
1601 | if ((D_NAMLEN(dp) == 1 && dp->d_name[0] == '.') || | ||
1602 | (D_NAMLEN(dp) == 2 && dp->d_name[0] == '.' && | ||
1603 | dp->d_name[1] == '.')) | ||
1604 | @@ -450,7 +450,7 @@ | ||
1605 | ptarget = optarget; | ||
1606 | *ptarget++ = '/'; | ||
1607 | cp = dp->d_name;; | ||
1608 | - while (*ptarget++ = *cp++) | ||
1609 | + while ((*ptarget++ = *cp++)) | ||
1610 | ; | ||
1611 | ptarget--; | ||
1612 | if (lstat(target, &stb) < 0) { | ||
1613 | @@ -481,7 +481,7 @@ | ||
1614 | * Frontend to doclean(). | ||
1615 | */ | ||
1616 | static void clean(cp) | ||
1617 | - register char *cp; | ||
1618 | + char *cp; | ||
1619 | { | ||
1620 | doclean(cp); | ||
1621 | (void) sendcmd(CC_END, NULL); | ||
1622 | @@ -509,7 +509,7 @@ | ||
1623 | */ | ||
1624 | static void docmdspecial() | ||
1625 | { | ||
1626 | - register char *cp; | ||
1627 | + char *cp; | ||
1628 | char *cmd, *env = NULL; | ||
1629 | int n; | ||
1630 | int len; | ||
1631 | @@ -667,7 +667,7 @@ | ||
1632 | char *name; | ||
1633 | opt_t opts; | ||
1634 | { | ||
1635 | - register char *cp; | ||
1636 | + char *cp; | ||
1637 | struct stat stb; | ||
1638 | int r = -1; | ||
1639 | |||
1640 | @@ -760,7 +760,7 @@ | ||
1641 | { | ||
1642 | int f, wrerr, olderrno, lastwashole = 0, wassparse = 0; | ||
1643 | off_t i; | ||
1644 | - register char *cp; | ||
1645 | + char *cp; | ||
1646 | char *savefile = NULL; | ||
1647 | static struct stat statbuff; | ||
1648 | |||
1649 | @@ -987,7 +987,7 @@ | ||
1650 | char *owner, *group; | ||
1651 | { | ||
1652 | static char lowner[100], lgroup[100]; | ||
1653 | - register char *cp; | ||
1654 | + char *cp; | ||
1655 | struct stat stb; | ||
1656 | int s; | ||
1657 | |||
1658 | @@ -1044,7 +1044,7 @@ | ||
1659 | |||
1660 | o = (owner[0] == ':') ? opts & DO_NUMCHKOWNER : | ||
1661 | opts; | ||
1662 | - if (cp = getusername(stb.st_uid, target, o)) | ||
1663 | + if ((cp = getusername(stb.st_uid, target, o))) | ||
1664 | if (strcmp(owner, cp)) | ||
1665 | (void) strcpy(lowner, cp); | ||
1666 | } | ||
1667 | @@ -1053,7 +1053,7 @@ | ||
1668 | |||
1669 | o = (group[0] == ':') ? opts & DO_NUMCHKGROUP : | ||
1670 | opts; | ||
1671 | - if (cp = getgroupname(stb.st_gid, target, o)) | ||
1672 | + if ((cp = getgroupname(stb.st_gid, target, o))) | ||
1673 | if (strcmp(group, cp)) | ||
1674 | (void) strcpy(lgroup, cp); | ||
1675 | } | ||
1676 | @@ -1107,8 +1107,8 @@ | ||
1677 | if (s < 0) { | ||
1678 | if (errno == ENOENT) { | ||
1679 | if (mkdir(target, mode) == 0 || | ||
1680 | - chkparent(target, opts) == 0 && | ||
1681 | - mkdir(target, mode) == 0) { | ||
1682 | + (chkparent(target, opts) == 0 && | ||
1683 | + mkdir(target, mode) == 0)) { | ||
1684 | message(MT_NOTICE, "%s: mkdir", target); | ||
1685 | (void) fchog(-1, target, owner, group, mode); | ||
1686 | ack(); | ||
1687 | @@ -1304,7 +1304,7 @@ | ||
1688 | static void setconfig(cmd) | ||
1689 | char *cmd; | ||
1690 | { | ||
1691 | - register char *cp = cmd; | ||
1692 | + char *cp = cmd; | ||
1693 | char *estr; | ||
1694 | |||
1695 | switch (*cp++) { | ||
1696 | @@ -1338,7 +1338,7 @@ | ||
1697 | break; | ||
1698 | |||
1699 | case SC_LOGGING: /* Logging options */ | ||
1700 | - if (estr = msgparseopts(cp, TRUE)) { | ||
1701 | + if ((estr = msgparseopts(cp, TRUE))) { | ||
1702 | fatalerr("Bad message option string (%s): %s", | ||
1703 | cp, estr); | ||
1704 | return; | ||
1705 | @@ -1455,7 +1455,7 @@ | ||
1706 | sptarget[catname] = ptarget; | ||
1707 | if (catname++) { | ||
1708 | *ptarget++ = '/'; | ||
1709 | - while (*ptarget++ = *file++) | ||
1710 | + while ((*ptarget++ = *file++)) | ||
1711 | ; | ||
1712 | ptarget--; | ||
1713 | } | ||
1714 | @@ -1463,6 +1463,7 @@ | ||
1715 | /* | ||
1716 | * Create name of temporary file | ||
1717 | */ | ||
1718 | + int fd; | ||
1719 | if (catname && cattarget(file) < 0) { | ||
1720 | error("Cannot set file name."); | ||
1721 | return; | ||
1722 | @@ -1477,7 +1478,12 @@ | ||
1723 | (void) sprintf(new, "%s/%s", target, tempname); | ||
1724 | *file = '/'; | ||
1725 | } | ||
1726 | - (void) mktemp(new); | ||
1727 | + fd = mkstemp(new); | ||
1728 | + if (fd < 0) { | ||
1729 | + error("Cannot set file name."); | ||
1730 | + return; | ||
1731 | + } | ||
1732 | + close(fd); | ||
1733 | } | ||
1734 | |||
1735 | /* | ||
1736 | @@ -1581,8 +1587,8 @@ | ||
1737 | extern void server() | ||
1738 | { | ||
1739 | static char cmdbuf[BUFSIZ]; | ||
1740 | - register char *cp; | ||
1741 | - register int n; | ||
1742 | + char *cp; | ||
1743 | + int n; | ||
1744 | extern jmp_buf finish_jmpbuf; | ||
1745 | |||
1746 | if (setjmp(finish_jmpbuf)) { | ||
1747 | --- rdist-6.1.5/src/filesys.c.cleanup 1998-11-10 05:10:18.000000000 +0100 | ||
1748 | +++ rdist-6.1.5/src/filesys.c 2003-12-17 11:38:16.000000000 +0100 | ||
1749 | @@ -38,7 +38,7 @@ | ||
1750 | * SUCH DAMAGE. | ||
1751 | */ | ||
1752 | |||
1753 | -#ifndef lint | ||
1754 | +#if 0 | ||
1755 | static char RCSid[] = | ||
1756 | "$Id: filesys.c,v 6.25 1998/11/10 04:10:17 mcooper Exp $"; | ||
1757 | |||
1758 | @@ -72,7 +72,7 @@ | ||
1759 | static char last_pathname[MAXPATHLEN]; | ||
1760 | static char file[MAXPATHLEN + 3]; | ||
1761 | static struct stat filestat; | ||
1762 | - register char *p; | ||
1763 | + char *p; | ||
1764 | |||
1765 | /* | ||
1766 | * Mark the statbuf as invalid to start with. | ||
1767 | @@ -125,7 +125,7 @@ | ||
1768 | * Normally we want to change /dir1/dir2/file | ||
1769 | * into "/dir1/dir2/." | ||
1770 | */ | ||
1771 | - if (p = (char *) strrchr(file, '/')) { | ||
1772 | + if ((p = (char *) strrchr(file, '/'))) { | ||
1773 | *++p = '.'; | ||
1774 | *++p = CNULL; | ||
1775 | } else { | ||
1776 | @@ -183,7 +183,7 @@ | ||
1777 | struct stat *filest; | ||
1778 | struct mntinfo *mntinfo; | ||
1779 | { | ||
1780 | - register struct mntinfo *mi; | ||
1781 | + struct mntinfo *mi; | ||
1782 | |||
1783 | for (mi = mntinfo; mi; mi = mi->mi_nxt) { | ||
1784 | if (mi->mi_mnt->me_flags & MEFLAG_IGNORE) | ||
1785 | @@ -202,7 +202,7 @@ | ||
1786 | mntent_t *mnt; | ||
1787 | struct mntinfo *mntinfo; | ||
1788 | { | ||
1789 | - register struct mntinfo *m; | ||
1790 | + struct mntinfo *m; | ||
1791 | |||
1792 | for (m = mntinfo; m; m = m->mi_nxt) | ||
1793 | if (strcmp(m->mi_mnt->me_path, mnt->me_path) == 0) | ||
1794 | @@ -247,7 +247,7 @@ | ||
1795 | } | ||
1796 | |||
1797 | mntinfo = mi; | ||
1798 | - while (mnt = getmountent(mfp)) { | ||
1799 | + while ((mnt = getmountent(mfp))) { | ||
1800 | debugmsg(DM_MISC, "mountent = '%s' (%s)", | ||
1801 | mnt->me_path, mnt->me_type); | ||
1802 | |||
1803 | @@ -308,7 +308,7 @@ | ||
1804 | static struct stat filestat; | ||
1805 | struct stat *pstat; | ||
1806 | struct mntinfo *tmpmi; | ||
1807 | - register mntent_t *mnt; | ||
1808 | + mntent_t *mnt; | ||
1809 | |||
1810 | /* | ||
1811 | * Use the supplied stat buffer if not NULL or our own. | ||
1812 | @@ -330,16 +330,16 @@ | ||
1813 | /* | ||
1814 | * Find the mnt that pathname is on. | ||
1815 | */ | ||
1816 | - if (mnt = findmnt(pstat, mntinfo)) | ||
1817 | + if ((mnt = findmnt(pstat, mntinfo))) | ||
1818 | return(mnt); | ||
1819 | |||
1820 | /* | ||
1821 | * We failed to find correct mnt, so maybe it's a newly | ||
1822 | * mounted filesystem. We rebuild mntinfo and try again. | ||
1823 | */ | ||
1824 | - if (tmpmi = makemntinfo(mntinfo)) { | ||
1825 | + if ((tmpmi = makemntinfo(mntinfo))) { | ||
1826 | mntinfo = tmpmi; | ||
1827 | - if (mnt = findmnt(pstat, mntinfo)) | ||
1828 | + if ((mnt = findmnt(pstat, mntinfo))) | ||
1829 | return(mnt); | ||
1830 | } | ||
1831 | |||
1832 | --- rdist-6.1.5/src/filesys-os.c.cleanup 1998-11-10 05:09:59.000000000 +0100 | ||
1833 | +++ rdist-6.1.5/src/filesys-os.c 2003-12-17 11:38:16.000000000 +0100 | ||
1834 | @@ -38,7 +38,7 @@ | ||
1835 | * SUCH DAMAGE. | ||
1836 | */ | ||
1837 | |||
1838 | -#ifndef lint | ||
1839 | +#if 0 | ||
1840 | static char RCSid[] = | ||
1841 | "$Id: filesys-os.c,v 6.18 1998/11/10 04:09:58 mcooper Exp $"; | ||
1842 | |||
1843 | @@ -314,7 +314,7 @@ | ||
1844 | |||
1845 | bzero((char *)&me, sizeof(mntent_t)); | ||
1846 | |||
1847 | - if (mntent = getmntent(fptr)) { | ||
1848 | + if ((mntent = getmntent(fptr))) { | ||
1849 | me.me_path = mntent->mnt_dir; | ||
1850 | me.me_type = mntent->mnt_type; | ||
1851 | if (mntent->mnt_opts && hasmntopt(mntent, MNTOPT_RO)) | ||
1852 | --- rdist-6.1.5/src/strcasecmp.c.cleanup 1998-11-10 05:16:52.000000000 +0100 | ||
1853 | +++ rdist-6.1.5/src/strcasecmp.c 2003-12-17 11:38:16.000000000 +0100 | ||
1854 | @@ -51,9 +51,9 @@ | ||
1855 | }; | ||
1856 | |||
1857 | strcasecmp(s1, s2) | ||
1858 | - register char *s1, *s2; | ||
1859 | + char *s1, *s2; | ||
1860 | { | ||
1861 | - register char *cm = charmap; | ||
1862 | + char *cm = charmap; | ||
1863 | |||
1864 | while (cm[*s1] == cm[*s2++]) | ||
1865 | if (*s1++ == '\0') | ||
1866 | @@ -62,10 +62,10 @@ | ||
1867 | } | ||
1868 | |||
1869 | strncasecmp(s1, s2, n) | ||
1870 | - register char *s1, *s2; | ||
1871 | - register int n; | ||
1872 | + char *s1, *s2; | ||
1873 | + int n; | ||
1874 | { | ||
1875 | - register char *cm = charmap; | ||
1876 | + char *cm = charmap; | ||
1877 | |||
1878 | while (--n >= 0 && cm[*s1] == cm[*s2++]) | ||
1879 | if (*s1++ == '\0') | ||
1880 | --- rdist-6.1.5/src/strtol.c.cleanup 1994-03-17 00:25:50.000000000 +0100 | ||
1881 | +++ rdist-6.1.5/src/strtol.c 2003-12-17 11:38:16.000000000 +0100 | ||
1882 | @@ -54,13 +54,13 @@ | ||
1883 | strtol(nptr, endptr, base) | ||
1884 | char *nptr; | ||
1885 | char **endptr; | ||
1886 | - register int base; | ||
1887 | + int base; | ||
1888 | { | ||
1889 | - register char *s = nptr; | ||
1890 | - register unsigned long acc; | ||
1891 | - register int c; | ||
1892 | - register unsigned long cutoff; | ||
1893 | - register int neg = 0, any, cutlim; | ||
1894 | + char *s = nptr; | ||
1895 | + unsigned long acc; | ||
1896 | + int c; | ||
1897 | + unsigned long cutoff; | ||
1898 | + int neg = 0, any, cutlim; | ||
1899 | |||
1900 | /* | ||
1901 | * Skip white space and pick up leading +/- sign if any. | ||
1902 | --- rdist-6.1.5/src/regex.c.cleanup 1998-11-10 05:14:28.000000000 +0100 | ||
1903 | +++ rdist-6.1.5/src/regex.c 2003-12-17 11:39:14.000000000 +0100 | ||
1904 | @@ -142,10 +142,8 @@ | ||
1905 | */ | ||
1906 | char * | ||
1907 | re_comp(sp) | ||
1908 | - register char *sp; | ||
1909 | { | ||
1910 | - register int c; | ||
1911 | - register char *ep = expbuf; | ||
1912 | + char *ep = expbuf; | ||
1913 | int cclcnt, numbra = 0; | ||
1914 | char *lastep = 0; | ||
1915 | char bracket[NBRA]; | ||
1916 | @@ -266,10 +264,10 @@ | ||
1917 | */ | ||
1918 | int | ||
1919 | re_exec(p1) | ||
1920 | - register char *p1; | ||
1921 | + char *p1; | ||
1922 | { | ||
1923 | - register char *p2 = expbuf; | ||
1924 | - register int c; | ||
1925 | + char *p2 = expbuf; | ||
1926 | + int c; | ||
1927 | int rv; | ||
1928 | |||
1929 | for (c = 0; c < NBRA; c++) { | ||
1930 | @@ -306,9 +304,9 @@ | ||
1931 | */ | ||
1932 | static int | ||
1933 | advance(lp, ep) | ||
1934 | - register char *lp, *ep; | ||
1935 | + char *lp, *ep; | ||
1936 | { | ||
1937 | - register char *curlp; | ||
1938 | + char *curlp; | ||
1939 | int ct, i; | ||
1940 | int rv; | ||
1941 | |||
1942 | @@ -413,10 +411,10 @@ | ||
1943 | } | ||
1944 | |||
1945 | backref(i, lp) | ||
1946 | - register int i; | ||
1947 | - register char *lp; | ||
1948 | + int i; | ||
1949 | + char *lp; | ||
1950 | { | ||
1951 | - register char *bp; | ||
1952 | + char *bp; | ||
1953 | |||
1954 | bp = braslist[i]; | ||
1955 | while (*bp++ == *lp++) | ||
1956 | @@ -427,10 +425,10 @@ | ||
1957 | |||
1958 | int | ||
1959 | cclass(set, c, af) | ||
1960 | - register char *set, c; | ||
1961 | + char *set, c; | ||
1962 | int af; | ||
1963 | { | ||
1964 | - register int n; | ||
1965 | + int n; | ||
1966 | |||
1967 | if (c == 0) | ||
1968 | return(0); | ||
1969 | --- rdist-6.1.5/include/defs.h.cleanup 2003-12-17 11:38:16.000000000 +0100 | ||
1970 | +++ rdist-6.1.5/include/defs.h 2003-12-17 11:38:16.000000000 +0100 | ||
1971 | @@ -30,11 +30,13 @@ | ||
1972 | #include <grp.h> | ||
1973 | #include <syslog.h> | ||
1974 | #include <setjmp.h> | ||
1975 | +#include <time.h> | ||
1976 | #include <sys/types.h> | ||
1977 | #include <sys/param.h> | ||
1978 | #include <sys/file.h> | ||
1979 | -#include <sys/time.h> | ||
1980 | #include <sys/stat.h> | ||
1981 | +#include <sys/wait.h> | ||
1982 | +#include <sys/socket.h> | ||
1983 | |||
1984 | #include "version.h" | ||
1985 | #include "config-def.h" | ||
1986 | @@ -48,6 +50,9 @@ | ||
1987 | #endif /* yacc */ | ||
1988 | |||
1989 | #include <signal.h> | ||
1990 | +#define _REGEX_RE_COMP | ||
1991 | +#include <regex.h> | ||
1992 | + | ||
1993 | |||
1994 | /* | ||
1995 | * This belongs in os-svr4.h but many SVR4 OS's | ||
1996 | @@ -321,12 +326,11 @@ | ||
1997 | /* | ||
1998 | * Our own declarations. | ||
1999 | */ | ||
2000 | -char *exptilde(); | ||
2001 | char *makestr(); | ||
2002 | char *xcalloc(); | ||
2003 | char *xmalloc(); | ||
2004 | char *xrealloc(); | ||
2005 | -extern char *xbasename(); | ||
2006 | +extern char *exptilde(); | ||
2007 | extern char *getdistoptlist(); | ||
2008 | extern char *getgroupname(); | ||
2009 | extern char *getnlstr(); | ||
2010 | @@ -336,44 +340,75 @@ | ||
2011 | extern char *getversion(); | ||
2012 | extern char *msgparseopts(); | ||
2013 | extern char *searchpath(); | ||
2014 | +extern char *xbasename(); | ||
2015 | +extern int amatch(); | ||
2016 | extern int any(); | ||
2017 | +extern int becomeroot(); | ||
2018 | +extern int becomeuser(); | ||
2019 | +extern int except(); | ||
2020 | +extern int execbrc(); | ||
2021 | +extern int getfilesysinfo(); | ||
2022 | +extern int getsocketpair(); | ||
2023 | extern int init(); | ||
2024 | extern int install(); | ||
2025 | extern int isexec(); | ||
2026 | +extern int is_nfs_mounted(); | ||
2027 | +extern int is_ro_mounted(); | ||
2028 | +extern int is_symlinked(); | ||
2029 | +extern int match(); | ||
2030 | +extern int okname(); | ||
2031 | extern int parsedistopts(); | ||
2032 | +extern int readrem(); | ||
2033 | extern int remline(); | ||
2034 | +extern int response(); | ||
2035 | +extern int rshrcmd(); | ||
2036 | extern int setfiletime(); | ||
2037 | +extern int setnonblocking(); | ||
2038 | extern int spawn(); | ||
2039 | +extern int yylex(); | ||
2040 | +extern int yyparse(); | ||
2041 | extern struct subcmd *makesubcmd(); | ||
2042 | +extern void append(); | ||
2043 | extern void checkhostname(); | ||
2044 | extern void cleanup(); | ||
2045 | extern void complain(); | ||
2046 | +extern void coredump(); | ||
2047 | +extern void define(); | ||
2048 | +extern void docmdargs(); | ||
2049 | extern void docmds(); | ||
2050 | extern void finish(); | ||
2051 | -extern void log(); | ||
2052 | +extern void freelinkinfo(); | ||
2053 | +extern void insert(); | ||
2054 | extern void logmsg(); | ||
2055 | extern void lostconn(); | ||
2056 | extern void markassigned(); | ||
2057 | +extern void msgprconfig(); | ||
2058 | extern void msgprusage(); | ||
2059 | +extern void mysetlinebuf(); | ||
2060 | extern void note(); | ||
2061 | extern void runcmdspecial(); | ||
2062 | extern void runcommand(); | ||
2063 | extern void server(); | ||
2064 | +extern void setargs_settup(); | ||
2065 | extern void setprogname(); | ||
2066 | extern void sighandler(); | ||
2067 | +extern void usage(); | ||
2068 | extern void waitup(); | ||
2069 | +extern void yyerror(); | ||
2070 | +extern WRITE_RETURN_T xwrite(); | ||
2071 | struct namelist *expand(); | ||
2072 | struct namelist *lookup(); | ||
2073 | struct namelist *makenl(); | ||
2074 | -extern WRITE_RETURN_T xwrite(); | ||
2075 | |||
2076 | #if defined(ARG_TYPE) && ARG_TYPE == ARG_STDARG | ||
2077 | +extern int sendcmd(char cmd, char *fmt, ...); | ||
2078 | extern void debugmsg(int, char *, ...); | ||
2079 | extern void error(char *, ...); | ||
2080 | extern void fatalerr(char *, ...); | ||
2081 | extern void message(int, char *, ...); | ||
2082 | extern void setproctitle(char *fmt, ...); | ||
2083 | #else | ||
2084 | +extern int sendcmd(va_alist); | ||
2085 | extern void debugmsg(); | ||
2086 | extern void error(); | ||
2087 | extern void fatalerr(); | ||
diff --git a/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch new file mode 100644 index 000000000..d183d9183 --- /dev/null +++ b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-msgsndnotify-loop.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | Upstream-Status: Inappropriate [1] | ||
2 | |||
3 | [1] Not the author, the patch is from: | ||
4 | http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm | ||
5 | |||
6 | --- rdist-6.1.5/src/message.c.thestokes 2006-04-19 17:30:39.000000000 -0400 | ||
7 | +++ rdist-6.1.5/src/message.c 2006-04-19 17:36:37.000000000 -0400 | ||
8 | @@ -793,15 +793,20 @@ | ||
9 | char *msg; | ||
10 | { | ||
11 | static char buf[MSGBUFSIZ]; | ||
12 | - | ||
13 | - ++nerrs; | ||
14 | - | ||
15 | - if (isserver) | ||
16 | - (void) sprintf(buf, "REMOTE ERROR: %s", msg); | ||
17 | - else | ||
18 | - (void) sprintf(buf, "LOCAL ERROR: %s", msg); | ||
19 | - | ||
20 | - _message(MT_FERROR, buf); | ||
21 | + /* Don't reenter this function. There is a nasty infinite recursion | ||
22 | + case that pops up when msgsndnotify tries to exit. */ | ||
23 | + static int inside=0; | ||
24 | + | ||
25 | + if(inside==0){ | ||
26 | + ++nerrs; | ||
27 | + inside=1; | ||
28 | + | ||
29 | + if (isserver) | ||
30 | + (void) sprintf(buf, "REMOTE ERROR: %s", msg); | ||
31 | + else | ||
32 | + (void) sprintf(buf, "LOCAL ERROR: %s", msg); | ||
33 | + _message(MT_FERROR, buf); | ||
34 | + } | ||
35 | |||
36 | exit(nerrs); | ||
37 | } | ||
diff --git a/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-hardlink.patch b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-hardlink.patch new file mode 100644 index 000000000..baf8e3030 --- /dev/null +++ b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-hardlink.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Upstream-Status: Inappropriate [1] | ||
2 | |||
3 | [1] Not the author, the patch is from: | ||
4 | http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm | ||
5 | |||
6 | --- rdist-6.1.5/src/client.c.hardlink Thu Jun 3 13:56:31 1999 | ||
7 | +++ rdist-6.1.5/src/client.c Thu Jun 3 14:00:06 1999 | ||
8 | @@ -348,7 +348,7 @@ | ||
9 | lp->target = strdup(Tdest); | ||
10 | else | ||
11 | lp->target = NULL; | ||
12 | - if (!lp->pathname || !lp->src || !(Tdest && lp->target)) | ||
13 | + if (!lp->pathname || !lp->src || (Tdest && !lp->target)) | ||
14 | fatalerr("Cannot malloc memory in linkinfo."); | ||
15 | |||
16 | return((struct linkbuf *) NULL); | ||
17 | @@ -370,7 +370,7 @@ | ||
18 | "sendhardlink: rname='%s' pathname='%s' src='%s' target='%s'\n", | ||
19 | rname, lp->pathname, lp->src, lp->target); | ||
20 | |||
21 | - if (*lp->target == CNULL) | ||
22 | + if (lp->target == NULL || *lp->target == CNULL) | ||
23 | (void) sendcmd(C_RECVHARDLINK, "%o %s %s", | ||
24 | opts, lp->pathname, rname); | ||
25 | else { | ||
diff --git a/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-lfs.patch b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-lfs.patch new file mode 100644 index 000000000..3fa8db8cd --- /dev/null +++ b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-lfs.patch | |||
@@ -0,0 +1,142 @@ | |||
1 | Upstream-Status: Inappropriate [1] | ||
2 | |||
3 | [1] Not the author, the patch is from: | ||
4 | http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm | ||
5 | |||
6 | --- rdist-6.1.5/src/client.c.lfs 2003-12-16 23:43:56.000000000 +0100 | ||
7 | +++ rdist-6.1.5/src/client.c 2003-12-16 23:46:56.000000000 +0100 | ||
8 | @@ -414,9 +414,9 @@ | ||
9 | /* | ||
10 | * Send file info | ||
11 | */ | ||
12 | - (void) sendcmd(C_RECVREG, "%o %04o %ld %ld %ld %s %s %s", | ||
13 | + (void) sendcmd(C_RECVREG, "%o %04o %lld %ld %ld %s %s %s", | ||
14 | opts, stb->st_mode & 07777, | ||
15 | - (long) stb->st_size, | ||
16 | + (off_t) stb->st_size, | ||
17 | stb->st_mtime, stb->st_atime, | ||
18 | user, group, rname); | ||
19 | if (response() < 0) { | ||
20 | @@ -424,8 +424,8 @@ | ||
21 | return(-1); | ||
22 | } | ||
23 | |||
24 | - debugmsg(DM_MISC, "Send file '%s' %d bytes\n", | ||
25 | - rname, (long) stb->st_size); | ||
26 | + debugmsg(DM_MISC, "Send file '%s' %lld bytes\n", | ||
27 | + rname, (off_t) stb->st_size); | ||
28 | |||
29 | /* | ||
30 | * Set remote time out alarm handler. | ||
31 | @@ -676,9 +676,9 @@ | ||
32 | /* | ||
33 | * Gather and send basic link info | ||
34 | */ | ||
35 | - (void) sendcmd(C_RECVSYMLINK, "%o %04o %ld %ld %ld %s %s %s", | ||
36 | + (void) sendcmd(C_RECVSYMLINK, "%o %04o %lld %ld %ld %s %s %s", | ||
37 | opts, stb->st_mode & 07777, | ||
38 | - (long) stb->st_size, | ||
39 | + (off_t) stb->st_size, | ||
40 | stb->st_mtime, stb->st_atime, | ||
41 | user, group, rname); | ||
42 | if (response() < 0) | ||
43 | @@ -858,7 +858,7 @@ | ||
44 | /* | ||
45 | * Parse size | ||
46 | */ | ||
47 | - size = strtol(cp, &cp, 10); | ||
48 | + size = strtoll(cp, &cp, 10); | ||
49 | if (*cp++ != ' ') { | ||
50 | error("update: size not delimited"); | ||
51 | return(US_NOTHING); | ||
52 | @@ -910,8 +910,8 @@ | ||
53 | |||
54 | debugmsg(DM_MISC, "update(%s,) local mode %04o remote mode %04o\n", | ||
55 | rname, lmode, rmode); | ||
56 | - debugmsg(DM_MISC, "update(%s,) size %d mtime %d owner '%s' grp '%s'\n", | ||
57 | - rname, (int) size, mtime, owner, group); | ||
58 | + debugmsg(DM_MISC, "update(%s,) size %lld mtime %d owner '%s' grp '%s'\n", | ||
59 | + rname, (off_t) size, mtime, owner, group); | ||
60 | |||
61 | if (statp->st_mtime != mtime) { | ||
62 | if (statp->st_mtime < mtime && IS_ON(opts, DO_YOUNGER)) { | ||
63 | @@ -937,8 +937,8 @@ | ||
64 | } | ||
65 | |||
66 | if (statp->st_size != size) { | ||
67 | - debugmsg(DM_MISC, "size does not match (%d != %d).\n", | ||
68 | - (int) statp->st_size, size); | ||
69 | + debugmsg(DM_MISC, "size does not match (%lld != %lld).\n", | ||
70 | + statp->st_size, size); | ||
71 | return(US_OUTDATE); | ||
72 | } | ||
73 | |||
74 | --- rdist-6.1.5/src/server.c.lfs 1998-11-10 05:15:31.000000000 +0100 | ||
75 | +++ rdist-6.1.5/src/server.c 2003-12-16 23:50:19.000000000 +0100 | ||
76 | @@ -645,8 +645,8 @@ | ||
77 | case S_IFLNK: | ||
78 | case S_IFDIR: | ||
79 | case S_IFREG: | ||
80 | - (void) sendcmd(QC_YES, "%ld %ld %o %s %s", | ||
81 | - (long) stb.st_size, | ||
82 | + (void) sendcmd(QC_YES, "%lld %ld %o %s %s", | ||
83 | + (off_t) stb.st_size, | ||
84 | stb.st_mtime, | ||
85 | stb.st_mode & 07777, | ||
86 | getusername(stb.st_uid, target, options), | ||
87 | @@ -1388,7 +1388,7 @@ | ||
88 | /* | ||
89 | * Get file size | ||
90 | */ | ||
91 | - size = strtol(cp, &cp, 10); | ||
92 | + size = strtoll(cp, &cp, 10); | ||
93 | if (*cp++ != ' ') { | ||
94 | error("recvit: size not delimited"); | ||
95 | return; | ||
96 | @@ -1441,7 +1441,7 @@ | ||
97 | } | ||
98 | |||
99 | debugmsg(DM_MISC, | ||
100 | - "recvit: opts = %04o mode = %04o size = %d mtime = %d", | ||
101 | + "recvit: opts = %04o mode = %04o size = %lld mtime = %d", | ||
102 | opts, mode, size, mtime); | ||
103 | debugmsg(DM_MISC, | ||
104 | "recvit: owner = '%s' group = '%s' file = '%s' catname = %d isdir = %d", | ||
105 | --- rdist-6.1.5/include/defs.h.lfs 2003-12-16 23:43:56.000000000 +0100 | ||
106 | +++ rdist-6.1.5/include/defs.h 2003-12-16 23:43:56.000000000 +0100 | ||
107 | @@ -22,6 +22,8 @@ | ||
108 | #include <stdlib.h> | ||
109 | #endif /* _POSIX_SOURCE */ | ||
110 | #include <stdio.h> | ||
111 | +#include <string.h> | ||
112 | +#include <mntent.h> | ||
113 | #include <ctype.h> | ||
114 | #include <errno.h> | ||
115 | #include <pwd.h> | ||
116 | @@ -317,15 +319,6 @@ | ||
117 | #endif /* USE_STATDB */ | ||
118 | |||
119 | /* | ||
120 | - * System function declarations | ||
121 | - */ | ||
122 | -char *hasmntopt(); | ||
123 | -char *strchr(); | ||
124 | -char *strdup(); | ||
125 | -char *strrchr(); | ||
126 | -char *strtok(); | ||
127 | - | ||
128 | -/* | ||
129 | * Our own declarations. | ||
130 | */ | ||
131 | char *exptilde(); | ||
132 | --- rdist-6.1.5/Makefile.local.lfs 1998-11-10 04:36:31.000000000 +0100 | ||
133 | +++ rdist-6.1.5/Makefile.local 2003-12-16 23:43:56.000000000 +0100 | ||
134 | @@ -20,7 +20,7 @@ | ||
135 | # Add any local definitions you want pass to the compiler to DEFS_LOCAL | ||
136 | # below. This includes those items found in "config/config.h". | ||
137 | # | ||
138 | -#DEFS_LOCAL = -DDIRECT_RCMD | ||
139 | +DEFS_LOCAL = -O2 -g -pipe -Wall -D_POSIX_SOURCE -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 | ||
140 | |||
141 | # | ||
142 | # Add any local libraries that your system might need to LIBS_LOCAL below. | ||
diff --git a/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-links.patch b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-links.patch new file mode 100644 index 000000000..e9994f2c9 --- /dev/null +++ b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-links.patch | |||
@@ -0,0 +1,79 @@ | |||
1 | Upstream-Status: Inappropriate [1] | ||
2 | |||
3 | [1] Not the author, the patch is from: | ||
4 | http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm | ||
5 | |||
6 | --- rdist-6.1.5/src/client.c.links Wed Feb 17 17:46:09 1999 | ||
7 | +++ rdist-6.1.5/src/client.c Wed Feb 17 17:51:15 1999 | ||
8 | @@ -309,6 +309,18 @@ | ||
9 | return(0); | ||
10 | } | ||
11 | |||
12 | +void freelinkinfo(lp) | ||
13 | + struct linkbuf *lp; | ||
14 | +{ | ||
15 | + if (lp->pathname) | ||
16 | + free(lp->pathname); | ||
17 | + if (lp->src) | ||
18 | + free(lp->src); | ||
19 | + if (lp->target) | ||
20 | + free(lp->target); | ||
21 | + free(lp); | ||
22 | +} | ||
23 | + | ||
24 | /* | ||
25 | * Save and retrieve hard link info | ||
26 | */ | ||
27 | @@ -317,6 +329,7 @@ | ||
28 | { | ||
29 | struct linkbuf *lp; | ||
30 | |||
31 | + /* xxx: linear search doesn't scale with many links */ | ||
32 | for (lp = ihead; lp != NULL; lp = lp->nextp) | ||
33 | if (lp->inum == statp->st_ino && lp->devnum == statp->st_dev) { | ||
34 | lp->count--; | ||
35 | @@ -329,12 +342,14 @@ | ||
36 | lp->inum = statp->st_ino; | ||
37 | lp->devnum = statp->st_dev; | ||
38 | lp->count = statp->st_nlink - 1; | ||
39 | - (void) strcpy(lp->pathname, target); | ||
40 | - (void) strcpy(lp->src, source); | ||
41 | + lp->pathname = strdup(target); | ||
42 | + lp->src = strdup(source); | ||
43 | if (Tdest) | ||
44 | - (void) strcpy(lp->target, Tdest); | ||
45 | + lp->target = strdup(Tdest); | ||
46 | else | ||
47 | - *lp->target = CNULL; | ||
48 | + lp->target = NULL; | ||
49 | + if (!lp->pathname || !lp->src || !(Tdest && lp->target)) | ||
50 | + fatalerr("Cannot malloc memory in linkinfo."); | ||
51 | |||
52 | return((struct linkbuf *) NULL); | ||
53 | } | ||
54 | --- rdist-6.1.5/src/docmd.c.links Wed Feb 17 17:51:23 1999 | ||
55 | +++ rdist-6.1.5/src/docmd.c Wed Feb 17 17:52:44 1999 | ||
56 | @@ -586,7 +586,7 @@ | ||
57 | if (!nflag) { | ||
58 | register struct linkbuf *nextl, *l; | ||
59 | |||
60 | - for (l = ihead; l != NULL; free((char *)l), l = nextl) { | ||
61 | + for (l = ihead; l != NULL; freelinkinfo(l), l = nextl) { | ||
62 | nextl = l->nextp; | ||
63 | if (contimedout || IS_ON(opts, DO_IGNLNKS) || | ||
64 | l->count == 0) | ||
65 | --- rdist-6.1.5/include/defs.h.links Wed Feb 17 17:52:58 1999 | ||
66 | +++ rdist-6.1.5/include/defs.h Wed Feb 17 17:53:47 1999 | ||
67 | @@ -276,9 +276,9 @@ | ||
68 | ino_t inum; | ||
69 | dev_t devnum; | ||
70 | int count; | ||
71 | - char pathname[BUFSIZ]; | ||
72 | - char src[BUFSIZ]; | ||
73 | - char target[BUFSIZ]; | ||
74 | + char *pathname; | ||
75 | + char *src; | ||
76 | + char *target; | ||
77 | struct linkbuf *nextp; | ||
78 | }; | ||
79 | |||
diff --git a/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-linux.patch b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-linux.patch new file mode 100644 index 000000000..b56fd38b9 --- /dev/null +++ b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-linux.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | Upstream-Status: Inappropriate [1] | ||
2 | |||
3 | [1] Not the author, the patch is from: | ||
4 | http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm | ||
5 | |||
6 | diff: rdist-6.1.5/config/mf: No such file or directory | ||
7 | --- rdist-6.1.5/config/os-linux.h.linux Mon Nov 9 22:59:59 1998 | ||
8 | +++ rdist-6.1.5/config/os-linux.h Thu Nov 12 14:50:35 1998 | ||
9 | @@ -58,7 +58,7 @@ | ||
10 | /* | ||
11 | * Select the type of executable file format. | ||
12 | */ | ||
13 | -#define EXE_TYPE EXE_AOUT | ||
14 | +#define EXE_TYPE EXE_ELF | ||
15 | |||
16 | /* | ||
17 | * Select the type of statfs() system call (if any). | ||
18 | --- rdist-6.1.5/mf/Makefile.var.linux Tue Nov 10 00:02:11 1998 | ||
19 | +++ rdist-6.1.5/mf/Makefile.var Thu Nov 12 14:50:35 1998 | ||
20 | @@ -67,7 +67,7 @@ | ||
21 | # | ||
22 | # Name of YACC. | ||
23 | # | ||
24 | -#YACC = bison -y | ||
25 | +YACC = bison -y | ||
26 | |||
27 | OPT = -g | ||
28 | RM = rm | ||
diff --git a/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-makefile-add-ldflags.patch b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-makefile-add-ldflags.patch new file mode 100644 index 000000000..cc82e16cc --- /dev/null +++ b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-makefile-add-ldflags.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | Add LDFLAGS variable to Makefile so that extra linker flags can be sent via this variable. | ||
2 | |||
3 | Upstream-Status: Inappropriate [no upstream] | ||
4 | |||
5 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
6 | |||
7 | diff --git a/src/Makefile.real b/src/Makefile.real | ||
8 | index 02179e4..9070974 100644 | ||
9 | --- a/src/Makefile.real | ||
10 | +++ b/src/Makefile.real | ||
11 | @@ -36,10 +36,10 @@ all: src | ||
12 | src: $(CLIENT_BIN) $(SERVER_BIN) | ||
13 | |||
14 | $(SERVER_BIN): $(SERVEROBJS) $(COMMONOBJS) $(MISSINGOBJS) | ||
15 | - $(CC) -o $@ $(SERVEROBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS) | ||
16 | + $(CC) -o $@ $(SERVEROBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS) $(LDFLAGS) | ||
17 | |||
18 | $(CLIENT_BIN): $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS) | ||
19 | - $(CC) -o $@ $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS) | ||
20 | + $(CC) -o $@ $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS) $(LDFLAGS) | ||
21 | |||
22 | $(CLIENTOBJS) $(SERVEROBJS): $(HFILES) y.tab.h | ||
23 | |||
diff --git a/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-maxargs.patch b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-maxargs.patch new file mode 100644 index 000000000..e81639446 --- /dev/null +++ b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-maxargs.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | Upstream-Status: Inappropriate [1] | ||
2 | |||
3 | [1] Not the author, the patch is from:rdist | ||
4 | http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm | ||
5 | |||
6 | --- rdist-6.1.5/src/setargs.c.maxargs 1998-11-10 05:15:56.000000000 +0100 | ||
7 | +++ rdist-6.1.5/src/setargs.c 2003-09-04 14:39:03.000000000 +0200 | ||
8 | @@ -58,7 +58,7 @@ | ||
9 | * Set process argument functions | ||
10 | */ | ||
11 | |||
12 | -#define MAXUSERENVIRON 40 | ||
13 | +#define MAXUSERENVIRON 1024 | ||
14 | char **Argv = NULL; | ||
15 | char *LastArgv = NULL; | ||
16 | char *UserEnviron[MAXUSERENVIRON+1]; | ||
diff --git a/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch new file mode 100644 index 000000000..e49e3e4d1 --- /dev/null +++ b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-mkstemp.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | Upstream-Status: Inappropriate [1] | ||
2 | |||
3 | [1] Not the author, the patch is from: | ||
4 | http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm | ||
5 | |||
6 | --- rdist-6.1.5/src/server.c.mkstemp 2004-05-25 14:29:37.279312752 +0200 | ||
7 | +++ rdist-6.1.5/src/server.c 2004-05-25 14:31:27.050744340 +0200 | ||
8 | @@ -1479,11 +1479,18 @@ | ||
9 | *file = '/'; | ||
10 | } | ||
11 | fd = mkstemp(new); | ||
12 | - if (fd < 0) { | ||
13 | + /* | ||
14 | + * Don't consider it a fatal error if mkstemp() fails | ||
15 | + * because parent directory didn't exist. (Missing | ||
16 | + * parents are created later (in recvfile()) | ||
17 | + */ | ||
18 | + if ((fd < 0) && (errno != ENOENT)) { | ||
19 | error("Cannot set file name."); | ||
20 | return; | ||
21 | + } else if (fd >= 0) { | ||
22 | + close(fd); | ||
23 | + unlink(new); /* Or symlink() will fail */ | ||
24 | } | ||
25 | - close(fd); | ||
26 | } | ||
27 | |||
28 | /* | ||
diff --git a/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-oldpath.patch b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-oldpath.patch new file mode 100644 index 000000000..493b18397 --- /dev/null +++ b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-oldpath.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | Upstream-Status: Inappropriate [1] | ||
2 | |||
3 | [1] Not the author, the patch is from: | ||
4 | http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm | ||
5 | |||
6 | --- rdist-6.1.5/config/config.h.oldpath Tue Nov 10 04:59:48 1998 | ||
7 | +++ rdist-6.1.5/config/config.h Thu Jan 31 17:33:21 2002 | ||
8 | @@ -39,7 +39,7 @@ | ||
9 | * don't have the old rdist, then uncomment the "#undef" line. | ||
10 | */ | ||
11 | #ifndef _PATH_OLDRDIST | ||
12 | -#define _PATH_OLDRDIST "/usr/ucb/oldrdist" /* Enable compat */ | ||
13 | +#define _PATH_OLDRDIST "/usr/bin/oldrdist" /* Enable compat */ | ||
14 | #endif | ||
15 | /*#undef _PATH_OLDRDIST*/ /* Disable compat */ | ||
16 | |||
17 | --- rdist-6.1.5/doc/rdist.man.oldpath Tue Nov 10 06:38:53 1998 | ||
18 | +++ rdist-6.1.5/doc/rdist.man Thu Jan 31 17:36:57 2002 | ||
19 | @@ -170,10 +170,9 @@ | ||
20 | This option will only work if | ||
21 | .I rdist | ||
22 | was compiled with the location of the old rdist | ||
23 | -(usually either | ||
24 | -.I /usr/ucb/oldrdist | ||
25 | -or | ||
26 | -.I /usr/old/rdist) | ||
27 | +(the path | ||
28 | +.I /usr/bin/oldrdist | ||
29 | +is used on Red Hat linux) | ||
30 | and that program is available at run time. | ||
31 | .PP | ||
32 | .I Rdist | ||
33 | @@ -558,7 +557,7 @@ | ||
34 | should be of form | ||
35 | .sp | ||
36 | .RS | ||
37 | -\fIfacility\fB=\fItypes\fB:\fIfacility\fB=\fItypes... | ||
38 | +\fIfacility\fB=\fItypes\fB:\fIfacility\fB=\fItypes...\fR | ||
39 | .RE | ||
40 | .sp | ||
41 | The valid facility names are: | ||
42 | --- rdist-6.1.5/README.oldpath Fri Jul 19 19:24:09 1996 | ||
43 | +++ rdist-6.1.5/README Thu Jan 31 17:33:21 2002 | ||
44 | @@ -65,12 +65,12 @@ | ||
45 | |||
46 | The way the old rdist started a server rdist is to run "rdist | ||
47 | -Server". If the new rdist is run with the "-Server" option, then it | ||
48 | -will exec a copy of the old rdist (usually /usr/old/rdist or | ||
49 | -/usr/ucb/oldrdist). In this way, you get compatibility with hosts | ||
50 | +will exec a copy of the old rdist (the path /usr/bin/oldrdist in Red | ||
51 | +Hat linux). In this way, you get compatibility with hosts | ||
52 | running the old rdist attempting to rdist to a machine running new | ||
53 | rdist. If your host running new rdist wants to rdist to a host | ||
54 | running the old rdist, then it must run the old rdist program | ||
55 | -(/usr/old/rdist or /usr/ucb/oldrdist). | ||
56 | +(/usr/bin/oldrdist in Red Hat linux). | ||
57 | |||
58 | The definition _PATH_OLDRDIST in "config/config.h" controls the | ||
59 | location of the old rdist. If this is not defined, or the defined | ||
diff --git a/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-ssh.patch b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-ssh.patch new file mode 100644 index 000000000..d3982cf41 --- /dev/null +++ b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-ssh.patch | |||
@@ -0,0 +1,14 @@ | |||
1 | Upstream-Status: Inappropriate [1] | ||
2 | |||
3 | [1] Not the author, the patch is from: | ||
4 | http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm | ||
5 | |||
6 | --- rdist-6.1.5/src/rshrcmd.c.dist Tue Dec 12 08:20:56 1995 | ||
7 | +++ rdist-6.1.5/src/rshrcmd.c Wed Dec 11 07:14:13 1996 | ||
8 | @@ -64,5 +64,5 @@ | ||
9 | sp[0]. */ | ||
10 | (void) close(sp[0]); | ||
11 | - if (dup2(sp[1], 0) < 0 || dup2(0,1) < 0 || dup2(0, 2) < 0) { | ||
12 | + if (dup2(sp[1], 0) < 0 || dup2(0,1) < 0) { | ||
13 | error("dup2 failed: %s.", SYSERR); | ||
14 | _exit(255); | ||
diff --git a/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-stat64.patch b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-stat64.patch new file mode 100644 index 000000000..b20953ef3 --- /dev/null +++ b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-stat64.patch | |||
@@ -0,0 +1,85 @@ | |||
1 | Upstream-Status: Inappropriate [1] | ||
2 | |||
3 | [1] Not the author, the patch is from: | ||
4 | http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm | ||
5 | |||
6 | --- rdist-6.1.5/src/filesys.c.stat64 2005-05-04 14:11:03.000000000 +0200 | ||
7 | +++ rdist-6.1.5/src/filesys.c 2005-05-04 14:11:10.000000000 +0200 | ||
8 | @@ -430,8 +430,8 @@ | ||
9 | */ | ||
10 | int getfilesysinfo(file, freespace, freefiles) | ||
11 | char *file; | ||
12 | - long *freespace; | ||
13 | - long *freefiles; | ||
14 | + fsblkcnt_t *freespace; | ||
15 | + fsfilcnt_t *freefiles; | ||
16 | { | ||
17 | #if defined(STATFS_TYPE) | ||
18 | static statfs_t statfsbuf; | ||
19 | --- rdist-6.1.5/src/server.c.stat64 2005-05-04 14:11:23.000000000 +0200 | ||
20 | +++ rdist-6.1.5/src/server.c 2005-05-04 14:20:34.000000000 +0200 | ||
21 | @@ -62,8 +62,8 @@ | ||
22 | int catname = 0; /* cat name to target name */ | ||
23 | char *sptarget[32]; /* stack of saved ptarget's for directories */ | ||
24 | char *fromhost = NULL; /* Client hostname */ | ||
25 | -static long min_freespace = 0; /* Minimium free space on a filesystem */ | ||
26 | -static long min_freefiles = 0; /* Minimium free # files on a filesystem */ | ||
27 | +static fsblkcnt_t min_freespace = 0; /* Minimium free space on a filesystem */ | ||
28 | +static fsfilcnt_t min_freefiles = 0; /* Minimium free # files on a filesystem */ | ||
29 | int oumask; /* Old umask */ | ||
30 | |||
31 | /* | ||
32 | @@ -1326,7 +1326,7 @@ | ||
33 | fatalerr("Expected digit, got '%s'.", cp); | ||
34 | return; | ||
35 | } | ||
36 | - min_freespace = (unsigned long) atoi(cp); | ||
37 | + min_freespace = (fsblkcnt_t) atoll(cp); | ||
38 | break; | ||
39 | |||
40 | case SC_FREEFILES: /* Minimium free files */ | ||
41 | @@ -1334,7 +1334,7 @@ | ||
42 | fatalerr("Expected digit, got '%s'.", cp); | ||
43 | return; | ||
44 | } | ||
45 | - min_freefiles = (unsigned long) atoi(cp); | ||
46 | + min_freefiles = (fsfilcnt_t) atoll(cp); | ||
47 | break; | ||
48 | |||
49 | case SC_LOGGING: /* Logging options */ | ||
50 | @@ -1364,7 +1364,8 @@ | ||
51 | time_t mtime, atime; | ||
52 | char *owner, *group, *file; | ||
53 | char new[MAXPATHLEN]; | ||
54 | - long freespace = -1, freefiles = -1; | ||
55 | + fsfilcnt_t freefiles = -1; | ||
56 | + fsblkcnt_t freespace = -1; | ||
57 | char *cp = cmd; | ||
58 | |||
59 | /* | ||
60 | @@ -1499,7 +1500,7 @@ | ||
61 | */ | ||
62 | if (min_freespace || min_freefiles) { | ||
63 | /* Convert file size to kilobytes */ | ||
64 | - long fsize = (long) (size / 1024); | ||
65 | + fsblkcnt_t fsize = (fsblkcnt_t) (size / 1024); | ||
66 | |||
67 | if (getfilesysinfo(target, &freespace, &freefiles) != 0) | ||
68 | return; | ||
69 | @@ -1511,14 +1512,14 @@ | ||
70 | if (min_freespace && (freespace >= 0) && | ||
71 | (freespace - fsize < min_freespace)) { | ||
72 | error( | ||
73 | - "%s: Not enough free space on filesystem: min %d free %d", | ||
74 | + "%s: Not enough free space on filesystem: min %lld free %lld", | ||
75 | target, min_freespace, freespace); | ||
76 | return; | ||
77 | } | ||
78 | if (min_freefiles && (freefiles >= 0) && | ||
79 | (freefiles - 1 < min_freefiles)) { | ||
80 | error( | ||
81 | - "%s: Not enough free files on filesystem: min %d free %d", | ||
82 | + "%s: Not enough free files on filesystem: min %lld free %lld", | ||
83 | target, min_freefiles, freefiles); | ||
84 | return; | ||
85 | } | ||
diff --git a/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-svr4.patch b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-svr4.patch new file mode 100644 index 000000000..bf73b71e1 --- /dev/null +++ b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-svr4.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | Upstream-Status: Inappropriate [1] | ||
2 | |||
3 | [1] Not the author, the patch is from: | ||
4 | http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm | ||
5 | |||
6 | --- rdist-6.1.5/build/os-type.svr4 2003-12-17 12:44:18.000000000 +0100 | ||
7 | +++ rdist-6.1.5/build/os-type 2003-12-17 12:44:29.000000000 +0100 | ||
8 | @@ -83,7 +83,6 @@ | ||
9 | if [ -z "${OS}" -a ! -z "${uname}" ]; then | ||
10 | case "`$uname -a | tr '[A-Z]' '[a-z]'`" in | ||
11 | osf1*) OS=break;; | ||
12 | - *"4.0"*) OS=svr4;; # There has to be a better way | ||
13 | *" dcosx "*) OS=dcosx;; | ||
14 | *"cx/ux"*) OS=cxux;; | ||
15 | *"hp-ux"*) # HP-UX 9.x | ||
diff --git a/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-varargs.patch b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-varargs.patch new file mode 100644 index 000000000..e6edbc44d --- /dev/null +++ b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-varargs.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | Upstream-Status: Inappropriate [1] | ||
2 | |||
3 | [1] Not the author, the patch is from: | ||
4 | http://vault.centos.org/5.8/os/SRPMS/rdist-6.1.5-44.src.rpm | ||
5 | |||
6 | --- rdist-6.1.5/config/os-linux.h.varargs 2003-06-17 17:52:33.000000000 +0200 | ||
7 | +++ rdist-6.1.5/config/os-linux.h 2003-06-17 17:53:07.000000000 +0200 | ||
8 | @@ -68,7 +68,7 @@ | ||
9 | /* | ||
10 | * Type of arg functions we have. | ||
11 | */ | ||
12 | -#define ARG_TYPE ARG_VARARGS | ||
13 | +#define ARG_TYPE ARG_STDARG | ||
14 | |||
15 | /* | ||
16 | * Do we have select()? | ||
diff --git a/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb b/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb new file mode 100644 index 000000000..cea1f08f9 --- /dev/null +++ b/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Remote file distribution client and server" | ||
2 | DESCRIPTION = "\ | ||
3 | Rdist is a program to maintain identical copies of files over multiple \ | ||
4 | hosts. It preserves the owner, group, mode, and mtime of files if \ | ||
5 | possible and can update programs that are executing. \ | ||
6 | " | ||
7 | SECTION = "console/network" | ||
8 | LICENSE = "BSD-4-Clause" | ||
9 | LIC_FILES_CHKSUM = "file://Copyright;md5=3f47ec9f64b11c8192ee05a66b5c2755" | ||
10 | |||
11 | SRC_URI = "http://www.magnicomp.com/download/${BPN}/${BP}.tar.gz" | ||
12 | SRC_URI[md5sum] = "546779700af70aa5f9103e08782cdcac" | ||
13 | SRC_URI[sha256sum] = "2bb0d0f5904eadc9e7fe3d60c15389d6897fcf884211070e289a6c710ff37f96" | ||
14 | |||
15 | SRC_URI += "file://rdist-6.1.5-linux.patch \ | ||
16 | file://rdist-6.1.5-links.patch \ | ||
17 | file://rdist-6.1.5-oldpath.patch \ | ||
18 | file://rdist-6.1.5-hardlink.patch \ | ||
19 | file://rdist-6.1.5-bison.patch \ | ||
20 | file://rdist-6.1.5-varargs.patch \ | ||
21 | file://rdist-6.1.5-maxargs.patch \ | ||
22 | file://rdist-6.1.5-lfs.patch \ | ||
23 | file://rdist-6.1.5-cleanup.patch \ | ||
24 | file://rdist-6.1.5-svr4.patch \ | ||
25 | file://rdist-6.1.5-ssh.patch \ | ||
26 | file://rdist-6.1.5-mkstemp.patch \ | ||
27 | file://rdist-6.1.5-stat64.patch \ | ||
28 | file://rdist-6.1.5-fix-msgsndnotify-loop.patch \ | ||
29 | file://rdist-6.1.5-bb-build.patch \ | ||
30 | file://rdist-6.1.5-makefile-add-ldflags.patch \ | ||
31 | " | ||
32 | |||
33 | DEPENDS = "bison-native" | ||
34 | |||
35 | inherit autotools-brokensep | ||
36 | |||
37 | EXTRA_OEMAKE = "BIN_GROUP=root MAN_GROUP=root RDIST_MODE=755 RDISTD_MODE=755 MAN_MODE=644" | ||