Konstantin Gizdov pushed to branch main at Arch Linux / Packaging / Packages / 
ddclient


Commits:
c76c52fa by Konstantin Gizdov at 2024-02-21T02:00:03+02:00
upgpkg: 3.11.2-4: FIX:ddclient/#1

- - - - -


3 changed files:

- .SRCINFO
- PKGBUILD
- + permission.patch


Changes:

=====================================
.SRCINFO
=====================================
@@ -1,7 +1,7 @@
 pkgbase = ddclient
        pkgdesc = Update dynamic DNS entries for accounts on many dynamic DNS 
services
        pkgver = 3.11.2
-       pkgrel = 3
+       pkgrel = 4
        url = https://github.com/ddclient/ddclient
        arch = any
        license = GPL2
@@ -12,8 +12,10 @@ pkgbase = ddclient
        optdepends = smtp-forwarder: email support requires sendmail binary
        backup = etc/ddclient/ddclient.conf
        source = git+https://github.com/ddclient/ddclient.git?signed#tag=v3.11.2
+       source = permission.patch
        validpgpkeys = 53B26AEDC08246715E15504B236B6291555E8401
        validpgpkeys = D852004BCC1AEC6F2449631D394799890605C42A
-       sha512sums = SKIP
+       b2sums = SKIP
+       b2sums = 
2379e14eba18c77de9043373e850974a41a9ddfff3f81820b00fec7ff311812a110949371d17c26c232442e07d84421f872a8a30b9437bcae11e29036132a5c3
 
 pkgname = ddclient


=====================================
PKGBUILD
=====================================
@@ -6,7 +6,7 @@
 
 pkgname=ddclient
 pkgver=3.11.2
-pkgrel=3
+pkgrel=4
 pkgdesc="Update dynamic DNS entries for accounts on many dynamic DNS services"
 url="https://github.com/ddclient/ddclient";
 arch=('any')
@@ -15,14 +15,23 @@ backup=('etc/ddclient/ddclient.conf')
 depends=('curl' 'perl-digest-sha1' 'net-tools')
 makedepends=('git')
 optdepends=('smtp-forwarder: email support requires sendmail binary')
-source=("git+https://github.com/ddclient/ddclient.git?signed#tag=v${pkgver}";)
-sha512sums=('SKIP')
+source=(
+  "git+https://github.com/ddclient/ddclient.git?signed#tag=v${pkgver}";
+  permission.patch
+)
+b2sums=('SKIP'
+        
'2379e14eba18c77de9043373e850974a41a9ddfff3f81820b00fec7ff311812a110949371d17c26c232442e07d84421f872a8a30b9437bcae11e29036132a5c3')
 validpgpkeys=('53B26AEDC08246715E15504B236B6291555E8401' # Sandro Jäckel
               'D852004BCC1AEC6F2449631D394799890605C42A' # Lenard Heß
 )
 
+prepare() {
+  cd "${srcdir}/${pkgname}"
+  patch -Np1 -i "${srcdir}/permission.patch"
+}
+
 build() {
-  cd ${pkgname}
+  cd "${srcdir}/${pkgname}"
   ./autogen
   ./configure \
     --prefix=/usr \
@@ -32,12 +41,12 @@ build() {
 }
 
 check() {
-  cd ${pkgname}
+  cd "${srcdir}/${pkgname}"
   make VERBOSE=1 check
 }
 
 package() {
-  cd ${pkgname}
+  cd "${srcdir}/${pkgname}"
   make DESTDIR="${pkgdir}" install
 
   install -Dm644 sample-etc_systemd.service 
"$pkgdir"/usr/lib/systemd/system/ddclient.service


=====================================
permission.patch
=====================================
@@ -0,0 +1,24 @@
+diff --color -aur ddclient.old/ddclient.in ddclient.new/ddclient.in
+--- ddclient.old/ddclient.in   2024-02-21 00:36:27.549089907 +0200
++++ ddclient.new/ddclient.in   2024-02-21 01:49:30.982544914 +0200
+@@ -1575,12 +1575,17 @@
+     # If file is owned by our effective uid, ensure that it has no access for 
group or others.
+     # Otherwise, require that it isn't writable when not owned by us. For 
example allow it to
+     # be owned by root:ddclient with mode 640. Always ensure that it is not 
accessible to others.
+-    my ($dev, $ino, $mode, @statrest) = stat(FD);
++    my ($dev, $ino, $mode, $nlink, $uid, $gid, @statrest) = stat(FD);
++    my $group_name = 'ddclient';
++    my $group_gid = getgrnam($group_name);
+     if ($mode & 077 && -o FD) {
+-        if (-f FD && (chmod 0600, $file)) {
++        if ((!defined $group_gid || $gid != $group_gid) && -f FD && (chmod 
0600, $file)) {
+             warning("file $file must be accessible only by its owner 
(fixed).");
++        } elsif ($gid == $group_gid) {
++            info("file $file is accessible to ddclient group.")
++        } else {
++            warning("file $file must be accessible only by its owner.");
+         }
+-        warning("file $file must be accessible only by its owner.");
+     } elsif (! -o FD && -w FD) {
+         warning("file $file should be owned only by ddclient or not be 
writable.");
+     }



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/ddclient/-/commit/c76c52fa7c5f765c5f0ff456a3028fb3281c7d77

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/ddclient/-/commit/c76c52fa7c5f765c5f0ff456a3028fb3281c7d77
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to