2
## 60-compressowner.dpatch by Paul Martin <pm@debian.org>
4
## All lines beginning with `## DP:' are a description of the patch.
8
echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
12
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
13
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
16
-patch) patch -p1 ${patch_opts} < $0;;
17
-unpatch) patch -R -p1 ${patch_opts} < $0;;
19
echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
26
diff -urNad /home/pm/deb/logrotate/logrotate-3.7/logrotate.c logrotate-3.7/logrotate.c
27
--- /home/pm/deb/logrotate/logrotate-3.7/logrotate.c 2004-05-10 19:30:36.000000000 +0100
28
+++ logrotate-3.7/logrotate.c 2004-05-10 19:31:04.000000000 +0100
35
fullCommand = alloca(sizeof(*fullCommand) *
36
(log->compress_options_count + 2));
41
- if ((outFile = open(compressedName, O_RDWR | O_CREAT | O_TRUNC, 0666)) < 0) {
44
+ if ((outFile = open(compressedName, O_RDWR | O_CREAT | O_TRUNC, sb.st_mode)) < 0) {
45
message(MESS_ERROR, "unable to open %s for compressed output\n",
51
+ if (fchown(outFile, sb.st_uid, sb.st_gid)) {
52
+ message(MESS_ERROR, "unable to change owner of output file %s\n",
59
message(MESS_DEBUG, "compressing log with: %s\n", fullCommand[0]);