Subversion Repositories pmk

Compare Revisions

Ignore whitespace Rev 10 → Rev 11

/trunk/debian/patches/25_pmksetup.dpatch
6,20 → 6,9
## DP: immediately.
 
@DPATCH@
 
--- pmk-0.10.1.orig/pmksetup.h
+++ pmk-0.10.1/pmksetup.h
@@ -85,7 +85,7 @@
#define ECHO_NL "\\n"
#define ECHO_HT "\\t"
-#define PMKSTP_OPT_STR "hr:u:vV" /* "a:hr:u:vV" */
+#define PMKSTP_OPT_STR "ghr:su:vV" /* "a:hr:u:vV" */
#define EMSG_PRIV_FMT "Failed to change privilege (%s)"
--- pmk-0.10.1.orig/pmksetup.c
+++ pmk-0.10.1/pmksetup.c
diff -urNad trunk~/pmksetup.c trunk/pmksetup.c
--- trunk~/pmksetup.c 2006-10-15 00:31:11.000000000 +0200
+++ trunk/pmksetup.c 2007-08-05 15:17:25.000000000 +0200
@@ -66,6 +66,7 @@
extern int optind;
133,7 → 122,31
PREMAKE_CONFIG_PATH);
if (fcopy(sfn, PREMAKE_CONFIG_PATH,
PREMAKE_CONFIG_MODE) == false) {
@@ -1165,7 +1177,7 @@
@@ -1129,15 +1141,17 @@
}
#endif
+ if (!tostdout) {
#ifdef PMKSETUP_DEBUG
- debugf("%s has not been deleted!", sfn);
+ debugf("%s has not been deleted!", sfn);
#else
- if (unlink(sfn) == -1) {
- errorf("cannot remove temporary file: '%s' : %s.",
- sfn, strerror(errno));
- error = true;
- }
+ if (unlink(sfn) == -1) {
+ errorf("cannot remove temporary file: '%s' : %s.",
+ sfn, strerror(errno));
+ error = true;
+ }
#endif /* PMKSETUP_DEBUG */
+ }
#ifndef WITHOUT_FORK
if (status != 0) {
@@ -1165,7 +1179,7 @@
***********************************************************************/
void usage(void) {
142,7 → 155,7
"[-r variable] [-u variable=value]\n");
exit(EXIT_FAILURE);
}
@@ -1188,6 +1200,7 @@
@@ -1188,6 +1202,7 @@
optind = 1;
while ((ch = getopt(argc, argv, PMKSTP_OPT_STR)) != -1) {
switch(ch) {
150,7 → 163,7
case 'r' :
case 'u' :
/*
@@ -1206,6 +1219,10 @@
@@ -1206,6 +1221,10 @@
verbose_flag = 1;
break;
161,7 → 174,7
case '?' :
default :
usage();
@@ -1213,7 +1230,6 @@
@@ -1213,7 +1232,6 @@
}
}
169,7 → 182,7
if (getuid() == 0) {
#ifdef PMKSETUP_DEBUG
debugf("PRIVSEP_USER = '%s'", PRIVSEP_USER);
@@ -1227,22 +1243,27 @@
@@ -1227,22 +1245,27 @@
gid = pw->pw_gid;
}
211,3 → 224,15
}
#ifndef WITHOUT_FORK
diff -urNad trunk~/pmksetup.h trunk/pmksetup.h
--- trunk~/pmksetup.h 2005-05-14 13:37:38.000000000 +0200
+++ trunk/pmksetup.h 2007-08-05 15:09:51.000000000 +0200
@@ -85,7 +85,7 @@
#define ECHO_NL "\\n"
#define ECHO_HT "\\t"
-#define PMKSTP_OPT_STR "hr:u:vV" /* "a:hr:u:vV" */
+#define PMKSTP_OPT_STR "ghr:su:vV" /* "a:hr:u:vV" */
#define EMSG_PRIV_FMT "Failed to change privilege (%s)"