Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 78780 Details for
Bug 117124
net-dns/ddclient-3.6.7 version bump
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Combined patch for 3.6.7
ddclient-3.6.7-combined.patch (text/plain), 4.29 KB, created by
michael@smith-li.com
on 2006-02-02 21:09:14 UTC
(
hide
)
Description:
Combined patch for 3.6.7
Filename:
MIME Type:
Creator:
michael@smith-li.com
Created:
2006-02-02 21:09:14 UTC
Size:
4.29 KB
patch
obsolete
>--- ddclient.bak 2006-02-02 23:52:52.000000000 -0500 >+++ ddclient 2006-02-02 23:52:52.000000000 -0500 >@@ -22,6 +22,7 @@ > my $now = time; > my $hostname = hostname(); > my $etc = ($program =~ /test/i) ? './' : '/etc/ddclient/'; >+my $run = ($program =~ /test/i) ? './' : '/var/run/ddclient/'; > my $savedir = ($program =~ /test/i) ? 'URL/' : '/tmp/'; > my $msgs = ''; > my $last_msgs = ''; >@@ -221,7 +222,7 @@ > 'global-defaults' => { > 'daemon' => setv(T_DELAY, 0, 0, 1, 0, interval('60s')), > 'file' => setv(T_FILE, 0, 0, 1, "$etc$program.conf", undef), >- 'cache' => setv(T_FILE, 0, 0, 1, "$etc$program.cache", undef), >+ 'cache' => setv(T_FILE, 0, 0, 1, "$run$program.cache", undef), > 'pid' => setv(T_FILE, 0, 0, 1, "", undef), > 'proxy' => setv(T_FQDNP, 0, 0, 1, '', undef), > 'protocol' => setv(T_PROTO, 0, 0, 1, 'dyndns2', undef), >@@ -474,8 +475,10 @@ > } > my $caught_hup = 0; > my $caught_term = 0; >+my $killing_me_softly = 0; > $SIG{'HUP'} = sub { $caught_hup = 1; }; > $SIG{'TERM'} = sub { $caught_term = 1; }; >+$SIG{'USR1'} = sub { $killing_me_softly = 1;}; > if (opt('daemon') && !opt('force')) { > $SIG{'CHLD'} = 'IGNORE'; > my $pid = fork; >@@ -537,7 +540,7 @@ > sendmail(); > > my $left = $daemon; >- while (($left > 0) && !$caught_hup && !$caught_term) { >+ while (($left > 0) && !$caught_hup && !$caught_term && !$killing_me_softly) { > my $delay = $left > 10 ? 10 : $left; > > $0 = sprintf("%s - sleeping for %s seconds", $program, $left); >@@ -553,8 +556,9 @@ > } else { > $result = $result eq 'OK' ? 0 : 1; > } >-} while ($daemon && !$result && !$caught_term); >+} while ($daemon && !$result && !$caught_term && !$killing_me_softly); > >+info("Shutting down ddclient.") if $killing_me_softly; > warning("caught SIGTERM; exiting") if $caught_term; > unlink_pid(); > sendmail(); >@@ -772,20 +776,31 @@ > my $content = ''; > > local *FD; >- if (! open(FD, "< $file")) { >- # fatal("Cannot open file '%s'. ($!)", $file); >- warning("Cannot open file '%s'. ($!)", $file); >- } >+ if (! open(FD, "< $file")) { fatal("Cannot open file '%s'. ($!)", $file); } > # Check for only owner has any access to config file >- my ($dev, $ino, $mode, @statrest) = stat(FD); >- if ($mode & 077) { >- if (-f FD && (chmod 0600, $file)) { >- warning("file $file must be accessible only by its owner (fixed)."); >- } else { >- # fatal("file $file must be accessible only by its owner."); >- warning("file $file must be accessible only by its owner."); >- } >- } >+ my $badperm = 0; >+ my @stats = stat(FD); >+ my $perms = $stats[2] & 07777; >+ my $oct_perms = sprintf "%lo", $perms; >+ my $uid = $stats[4]; >+ my $uname = getpwuid($uid); >+ my $gid = $stats[5]; >+ my $grnam = getgrgid($gid); >+ if ($uid != getpwnam("root")) { >+ $badperm = 1; >+ warning("Root should own $file, but $uname owns it!"); >+ } >+ if ($gid != getgrnam("ddclient")) { >+ $badperm = 1; >+ warning("Group ddclient should own $file, but group $grnam owns it!"); >+ } >+ if ($perms != 0640) { >+ $badperm = 1; >+ warning("$file has permissions $oct_perms, but should have permissions 0640."); >+ } >+# if ($badperm) { >+# fatal("Please correct the permissions on $file and restart ddclient. Exiting.") >+# } > > local $lineno = 0; > my $continuation = ''; >@@ -969,6 +984,12 @@ > my $def = $variables{'merged'}{$k}; > my $ovalue = define($globals{$k}, $def->{'default'}); > my $value = check_value($ovalue, $def); >+ >+ # we should really be allowed to set daemon to 0 in the config file >+ if ($k eq 'daemon' && $ovalue == 0) { >+ $value = $ovalue; >+ } >+ > if ($def->{'required'} && !defined $value) { > $value = default($k); > warning("'%s=%s' is an invalid %s. (using default of %s)", $k, $ovalue, $def->{'type'}, $value); >@@ -2810,7 +2831,7 @@ > my $h = pop @hosts; > > $config{$h}{'status'} = $status; >- if ($status eq 'ok') { >+ if ($status eq 'ok' || $status eq 'nochange') { > $config{$h}{'ip'} = $ip; > $config{$h}{'mtime'} = $now; > success("updating %s: %s: IP address set to %s", $h, $status, $ip);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 117124
:
77501
|
77502
|
77503
| 78780 |
78781
|
78782
|
84063
|
84068
|
84237
|
84238
|
84416
|
84417
|
84418
|
84435
|
84436
|
84466
|
84467
|
84511
|
88423
|
88568
|
88577
|
89240
|
89242
|
93921
|
95055
|
95056