1 --- rpm-5.4.15/rpmio/iosm.c~ 2014-06-11 19:58:04.000000000 +0200
2 +++ rpm-5.4.15/rpmio/iosm.c 2015-01-25 21:53:27.659197235 +0100
7 - iosm->wfd = Fopen(iosm->path, "w.fdio");
8 + iosm->wfd = Fopen(iosm->path, "wU.fdio");
9 if (iosm->wfd == NULL || Ferror(iosm->wfd)) {
10 if (iosm->wfd != NULL) (void) iosmNext(iosm, IOSM_WCLOSE);
12 --- rpm-5.4.15/rpmio/rpmio.c~ 2014-08-05 00:47:16.000000000 +0200
13 +++ rpm-5.4.15/rpmio/rpmio.c 2015-01-25 21:50:59.409202466 +0100
14 @@ -2638,16 +2638,20 @@
15 * - bzopen: 'q' sets verbosity to 0
16 * - bzopen: 'v' does verbosity++ (up to 4)
17 * - HACK: '.' terminates, rest is type of I/O
18 + * - 'U' sets *mode to zero (no permissions) instead of 0666
20 static inline void cvtfmode (const char *m,
21 /*@out@*/ char *stdio, size_t nstdio,
22 /*@out@*/ char *other, size_t nother,
23 - /*@out@*/ const char **end, /*@out@*/ int * f)
24 + /*@out@*/ const char **end, /*@out@*/ int * f, mode_t *mode)
25 /*@modifies *stdio, *other, *end, *f @*/
35 flags |= O_WRONLY | O_CREAT | O_APPEND;
38 if (--nstdio > 0) *stdio++ = *m;
41 + if (mode) *mode = 0;
50 - cvtfmode(fmode, stdio, sizeof(stdio), other, sizeof(other), &end, NULL);
51 + cvtfmode(fmode, stdio, sizeof(stdio), other, sizeof(other), &end, NULL, NULL);
56 const char * fmode = NULL;
57 char stdio[20], other[20];
58 const char *end = NULL;
59 - mode_t perms = 0666;
65 fprintf(stderr, "==> Fopen(%s, %s)\n", path, fmode);
68 - cvtfmode(fmode, stdio, sizeof(stdio), other, sizeof(other), &end, &flags);
69 + cvtfmode(fmode, stdio, sizeof(stdio), other, sizeof(other), &end, &flags, &perms);