pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/security/polkit



Module Name:    pkgsrc
Committed By:   wiz
Date:           Wed Jun  7 15:36:40 UTC 2023

Modified Files:
        pkgsrc/security/polkit: Makefile PLIST distinfo options.mk
        pkgsrc/security/polkit/patches:
            patch-src_polkitbackend_polkitbackendinteractiveauthority.c
            patch-src_programs_pkexec.c
Removed Files:
        pkgsrc/security/polkit/patches: patch-configure.ac patch-meson.build
            patch-meson__options.txt patch-src_polkitbackend_Makefile.am
            patch-src_polkitbackend_meson.build
            patch-src_polkitbackend_polkitbackendduktapeauthority.c
            patch-src_programs_pkcheck.c

Log Message:
polkit: update to 121.

## polkit 121

### Highlights:
- new versioning
- duktape added as backend JS engine
- autotools build system removed
- new translations

### Changes since polkit 0.120:

* Simon McVittie
    * meson and testsuite fixes
* Bastien Nocera
    * add ability to create policyconfig-1.dtd file
* Xi Ruoyao
    * port to newer mozjs-91, jsauthority tweaks
* Wu Xiaotian and Gustavo Lima Chaves
    * Add duktape as javascript engine
* Nathan Follens
    * Dutch translation
* Daniel E
    * duktape fixup
* Fabrice Fontaine
    * fix build without C++
* Dan Nicholson
    * fixup in group permision checking (backend)
* Phaedrus Leeds
    * typo fix
* Adrian Vovk
    * add option (--keep-cwd) for pkexec
* Matt Turner
    * Allow --version and --help even if not setuid root
* Benedikt Ames
    * fixes in polkitagent
* Vincent Mihalkovic
    * development support


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 pkgsrc/security/polkit/Makefile
cvs rdiff -u -r1.7 -r1.8 pkgsrc/security/polkit/PLIST
cvs rdiff -u -r1.18 -r1.19 pkgsrc/security/polkit/distinfo
cvs rdiff -u -r1.5 -r1.6 pkgsrc/security/polkit/options.mk
cvs rdiff -u -r1.1 -r0 pkgsrc/security/polkit/patches/patch-configure.ac \
    pkgsrc/security/polkit/patches/patch-meson__options.txt \
    pkgsrc/security/polkit/patches/patch-src_polkitbackend_Makefile.am \
    pkgsrc/security/polkit/patches/patch-src_polkitbackend_meson.build \
    pkgsrc/security/polkit/patches/patch-src_programs_pkcheck.c
cvs rdiff -u -r1.2 -r0 pkgsrc/security/polkit/patches/patch-meson.build \
    pkgsrc/security/polkit/patches/patch-src_polkitbackend_polkitbackendduktapeauthority.c
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/security/polkit/patches/patch-src_polkitbackend_polkitbackendinteractiveauthority.c
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/security/polkit/patches/patch-src_programs_pkexec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/security/polkit/Makefile
diff -u pkgsrc/security/polkit/Makefile:1.48 pkgsrc/security/polkit/Makefile:1.49
--- pkgsrc/security/polkit/Makefile:1.48        Mon Jan 30 17:44:08 2023
+++ pkgsrc/security/polkit/Makefile     Wed Jun  7 15:36:40 2023
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.48 2023/01/30 17:44:08 wiz Exp $
+# $NetBSD: Makefile,v 1.49 2023/06/07 15:36:40 wiz Exp $
 
-DISTNAME=      polkit-0.120
-PKGREVISION=   4
+DISTNAME=      polkit-121
 CATEGORIES=    security
 MASTER_SITES=  http://www.freedesktop.org/software/polkit/releases/
 
@@ -14,19 +13,14 @@ TOOL_DEPENDS+=              gettext-m4-[0-9]*:../../
 TOOL_DEPENDS+=         gettext-tools-[0-9]*:../../devel/gettext-tools
 TOOL_DEPENDS+=         libxslt-[0-9]*:../../textproc/libxslt
 TOOL_DEPENDS+=         docbook-xsl-[0-9]*:../../textproc/docbook-xsl
-# autoreconf processing requires gtkdocize
-TOOL_DEPENDS+=         gtk-doc-[0-9]*:../../textproc/gtk-doc
 
 NOT_PAX_MPROTECT_SAFE= lib/polkit-1/polkitd
 
-GNU_CONFIGURE=         yes
-GNU_CONFIGURE_STRICT=  no # has sub-configures
+WRKSRC=                        ${WRKDIR}/polkit-v.${PKGVERSION_NOREV}
 USE_LANGUAGES=         c c++14
-USE_LIBTOOL=           yes
-USE_PKGLOCALEDIR=      yes
-USE_TOOLS+=            pkg-config gmake perl
-USE_TOOLS+=            msgfmt msgmerge xgettext
-USE_TOOLS+=            autoconf autoreconf automake
+USE_TOOLS+=            msgfmt msgmerge pkg-config perl xgettext
+
+MESON_ARGS+=           -Dman=true
 
 # configure: error: *** A compiler with support for C++17 language features is required.
 GCC_REQD+=     7
@@ -34,13 +28,6 @@ GCC_REQD+=   7
 PKGCONFIG_OVERRIDE+=   data/polkit-gobject-1.pc.in
 PKGCONFIG_OVERRIDE+=   data/polkit-agent-1.pc.in
 
-CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
-CONFIGURE_ARGS+=       --with-polkitd-user=${POLKITD_USER}
-CONFIGURE_ARGS+=       --disable-libsystemd-login
-CONFIGURE_ARGS+=       --disable-libelogind
-CONFIGURE_ARGS+=       --with-duktape
-CONFIGURE_ARGS+=       --enable-introspection
-
 BUILDLINK_TRANSFORM.SunOS+=    rm:-Wl,--as-needed
 
 .include "../../mk/bsd.prefs.mk"
@@ -58,8 +45,7 @@ BUILD_DEFS+=          VARBASE
 
 REPLACE_PERL+=         src/polkitbackend/toarray.pl
 
-INSTALL_MAKE_FLAGS+=   sysconfdir=${PREFIX}/share/examples/polkit
-INSTALL_MAKE_FLAGS+=   pamdir=${PREFIX}/share/examples/pam.d
+INSTALLATION_DIRS+=    share/examples/polkit/polkit-1/rules.d
 
 OWN_DIRS_PERMS+=       ${PKG_SYSCONFDIR}/polkit-1/rules.d \
                        ${POLKITD_USER} ${POLKITD_GROUP} 700
@@ -80,12 +66,15 @@ SUBST_FILES.paths+= docs/man/pkexec.xml
 SUBST_FILES.paths+=    src/examples/org.freedesktop.policykit.examples.pkexec.policy.in
 SUBST_SED.paths+=      -e 's,/usr/bin/,${PREFIX}/bin/,g'
 
-pre-configure:
-       cd ${WRKSRC} && autoreconf -fi
+post-install:
+       ${MV} ${DESTDIR}${PREFIX}/etc/polkit-1/rules.d/50-default.rules \
+               ${DESTDIR}${PREFIX}/share/examples/polkit/polkit-1/rules.d/50-default.rules
 
+.include "../../devel/meson/build.mk"
 .include "../../lang/libduktape/buildlink3.mk"
 .include "../../devel/gettext-lib/buildlink3.mk"
 .include "../../devel/gettext-tools/msgfmt-desktop.mk"
+BUILDLINK_API_DEPENDS.glib2+=  glib2>=2.32
 .include "../../devel/glib2/buildlink3.mk"
 BUILDLINK_DEPMETHOD.gobject-introspection+=    build
 .include "../../devel/gobject-introspection/buildlink3.mk"

Index: pkgsrc/security/polkit/PLIST
diff -u pkgsrc/security/polkit/PLIST:1.7 pkgsrc/security/polkit/PLIST:1.8
--- pkgsrc/security/polkit/PLIST:1.7    Tue Jun  7 18:03:55 2022
+++ pkgsrc/security/polkit/PLIST        Wed Jun  7 15:36:40 2023
@@ -1,5 +1,4 @@
-@comment $NetBSD: PLIST,v 1.7 2022/06/07 18:03:55 wiz Exp $
-bin/pk-example-frobnicate
+@comment $NetBSD: PLIST,v 1.8 2023/06/07 15:36:40 wiz Exp $
 bin/pkaction
 bin/pkcheck
 bin/pkexec
@@ -34,8 +33,12 @@ include/polkit-1/polkitagent/polkitagent
 include/polkit-1/polkitagent/polkitagenttypes.h
 lib/girepository-1.0/Polkit-1.0.typelib
 lib/girepository-1.0/PolkitAgent-1.0.typelib
-lib/libpolkit-agent-1.la
-lib/libpolkit-gobject-1.la
+lib/libpolkit-agent-1.so
+lib/libpolkit-agent-1.so.0
+lib/libpolkit-agent-1.so.0.0.0
+lib/libpolkit-gobject-1.so
+lib/libpolkit-gobject-1.so.0
+lib/libpolkit-gobject-1.so.0.0.0
 lib/pkgconfig/polkit-agent-1.pc
 lib/pkgconfig/polkit-gobject-1.pc
 lib/polkit-1/polkit-agent-helper-1
@@ -61,6 +64,7 @@ share/locale/hr/LC_MESSAGES/polkit-1.mo
 share/locale/hu/LC_MESSAGES/polkit-1.mo
 share/locale/id/LC_MESSAGES/polkit-1.mo
 share/locale/it/LC_MESSAGES/polkit-1.mo
+share/locale/nl/LC_MESSAGES/polkit-1.mo
 share/locale/nn/LC_MESSAGES/polkit-1.mo
 share/locale/pl/LC_MESSAGES/polkit-1.mo
 share/locale/pt/LC_MESSAGES/polkit-1.mo
@@ -72,5 +76,5 @@ share/locale/tr/LC_MESSAGES/polkit-1.mo
 share/locale/uk/LC_MESSAGES/polkit-1.mo
 share/locale/zh_CN/LC_MESSAGES/polkit-1.mo
 share/locale/zh_TW/LC_MESSAGES/polkit-1.mo
-share/polkit-1/actions/org.freedesktop.policykit.examples.pkexec.policy
 share/polkit-1/actions/org.freedesktop.policykit.policy
+share/polkit-1/policyconfig-1.dtd

Index: pkgsrc/security/polkit/distinfo
diff -u pkgsrc/security/polkit/distinfo:1.18 pkgsrc/security/polkit/distinfo:1.19
--- pkgsrc/security/polkit/distinfo:1.18        Tue Jan 25 19:40:46 2022
+++ pkgsrc/security/polkit/distinfo     Wed Jun  7 15:36:40 2023
@@ -1,20 +1,13 @@
-$NetBSD: distinfo,v 1.18 2022/01/25 19:40:46 wiz Exp $
+$NetBSD: distinfo,v 1.19 2023/06/07 15:36:40 wiz Exp $
 
-BLAKE2s (polkit-0.120.tar.gz) = d13513e4e4d643bb1f3581fe3c58d467c8f26cd33711034accee42a1546c9781
-SHA512 (polkit-0.120.tar.gz) = db072769439d5e17d0eed681e7b94251b77828c1474b40fe40b94293903a64333e7fa17515a3270648691f04a1374d8b404405ead6abf292a8eb8483164adc46
-Size (polkit-0.120.tar.gz) = 1626659 bytes
-SHA1 (patch-configure.ac) = e6c26b07908b05e38b9049470bdd5da14f91b9ae
-SHA1 (patch-meson.build) = 707d8065d65ae85909cde193785192cc8e933899
-SHA1 (patch-meson__options.txt) = cb8d920382f3b2dca0d5992abb0adf979a729a1f
+BLAKE2s (polkit-121.tar.gz) = 6314805cdcb42137a3ccfbdc827b1e00054b227d45f6e07b7d9c7595805d5940
+SHA512 (polkit-121.tar.gz) = f565027b80f32833c558900b612e089ab25027da5bf9a90c421a292467d4db9a291f6dc9850c4bca8f9ee890d476fd064a643a5f7e28497661ba1e31d4227624
+Size (polkit-121.tar.gz) = 743287 bytes
 SHA1 (patch-src_polkit_polkitunixprocess.c) = 88818b7b64502f64eade34ad379c07f2b0fd1aea
-SHA1 (patch-src_polkitbackend_Makefile.am) = 3e821914e54ce5d3dc31275cd05d5266a3edc9ba
-SHA1 (patch-src_polkitbackend_meson.build) = 8f4788a5080902eaae949d1c026046d6a3321259
-SHA1 (patch-src_polkitbackend_polkitbackendduktapeauthority.c) = a80ba55ecd4726f28c02bd0add0a454b7597519a
-SHA1 (patch-src_polkitbackend_polkitbackendinteractiveauthority.c) = dd91b4e74e6c39f24e0f5a9b3150fdac12899cb5
+SHA1 (patch-src_polkitbackend_polkitbackendinteractiveauthority.c) = 0182d49ad112ea354678e40453388b266216e4de
 SHA1 (patch-src_polkitbackend_polkitbackendjsauthority.cpp) = 432a3d7d082ba6e596ba164d91408fc521b84422
 SHA1 (patch-src_polkitbackend_polkitd.c) = b8e11b40e2b171d4f030eb4c4cbc6fdc7a96b2c2
-SHA1 (patch-src_programs_pkcheck.c) = 3dd53a15f6741b883447be4d5ccd6e86fd6b6be0
-SHA1 (patch-src_programs_pkexec.c) = c373d8e7eac1107fe056a82510fee85c4c97ea57
+SHA1 (patch-src_programs_pkexec.c) = 053123e3da0fe76dd3639b2a6235dfd37db710d8
 SHA1 (patch-src_programs_pkttyagent.c) = 2c249b61501a1ad2c077bc83fd497e45f2db69a8
 SHA1 (patch-test_mocklibc_src_grp.c) = 435ff94fd4c7f5511d74d03839fad453dd841633
 SHA1 (patch-test_mocklibc_src_netdb.c) = 0fe71068a6261d5e2c8874f2b4507e7e3c002526

Index: pkgsrc/security/polkit/options.mk
diff -u pkgsrc/security/polkit/options.mk:1.5 pkgsrc/security/polkit/options.mk:1.6
--- pkgsrc/security/polkit/options.mk:1.5       Tue Jun  7 18:03:55 2022
+++ pkgsrc/security/polkit/options.mk   Wed Jun  7 15:36:40 2023
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.5 2022/06/07 18:03:55 wiz Exp $
+# $NetBSD: options.mk,v 1.6 2023/06/07 15:36:40 wiz Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.polkit
 PKG_SUPPORTED_OPTIONS= pam
@@ -10,16 +10,14 @@ PLIST_VARS+=        pam
 
 .if !empty(PKG_OPTIONS:Mpam)
 .include "../../mk/pam.buildlink3.mk"
-CONFIGURE_ARGS+=       --with-authfw=pam
-CONFIGURE_ARGS+=       --with-pam-module-dir=${PREFIX}/lib/security
 PLIST.pam=     yes
-.  if ${OPSYS} == "NetBSD"
-CONFIGURE_ARGS+=       --with-pam-include=system
-.  endif
 MAKE_DIRS+=    /etc/pam.d
 CONF_FILES+=   ${PREFIX}/share/examples/pam.d/polkit-1 \
                /etc/pam.d/polkit-1
-.else
-CONFIGURE_ARGS+=       --with-authfw=shadow
-CONFIGURE_ARGS+=       --disable-pam-module
+INSTALLATION_DIRS+=    share/examples/pam.d
+post-install: pam-move
+.PHONY: pam-move
+pam-move:
+       ${MV} ${DESTDIR}${PREFIX}/etc/pam.d/polkit-1 \
+               ${DESTDIR}${PREFIX}/share/examples/pam.d/polkit-1
 .endif

Index: pkgsrc/security/polkit/patches/patch-src_polkitbackend_polkitbackendinteractiveauthority.c
diff -u pkgsrc/security/polkit/patches/patch-src_polkitbackend_polkitbackendinteractiveauthority.c:1.2 pkgsrc/security/polkit/patches/patch-src_polkitbackend_polkitbackendinteractiveauthority.c:1.3
--- pkgsrc/security/polkit/patches/patch-src_polkitbackend_polkitbackendinteractiveauthority.c:1.2      Sun Apr 29 05:14:36 2018
+++ pkgsrc/security/polkit/patches/patch-src_polkitbackend_polkitbackendinteractiveauthority.c  Wed Jun  7 15:36:40 2023
@@ -1,8 +1,8 @@
-$NetBSD: patch-src_polkitbackend_polkitbackendinteractiveauthority.c,v 1.2 2018/04/29 05:14:36 wiz Exp $
+$NetBSD: patch-src_polkitbackend_polkitbackendinteractiveauthority.c,v 1.3 2023/06/07 15:36:40 wiz Exp $
 
 * for *BSD netgroup functions
 
---- src/polkitbackend/polkitbackendinteractiveauthority.c.orig 2018-04-03 18:16:04.000000000 +0000
+--- src/polkitbackend/polkitbackendinteractiveauthority.c.orig 2022-07-11 08:46:06.000000000 +0000
 +++ src/polkitbackend/polkitbackendinteractiveauthority.c
 @@ -26,8 +26,13 @@
  #ifdef HAVE_NETGROUP_H
@@ -18,12 +18,12 @@ $NetBSD: patch-src_polkitbackend_polkitb
  #include <string.h>
  #include <glib/gstdio.h>
  #include <locale.h>
-@@ -2228,7 +2233,7 @@ get_users_in_net_group (PolkitIdentity  
+@@ -2250,7 +2255,7 @@ get_users_in_net_group (PolkitIdentity  
    ret = NULL;
    name = polkit_unix_netgroup_get_name (POLKIT_UNIX_NETGROUP (group));
  
 -#ifdef HAVE_SETNETGRENT_RETURN
-+#if HAVE_SETNETGRENT_RETURN && !defined(__NetBSD__)
++#if defined(HAVE_SETNETGRENT_RETURN) && !defined(__NetBSD__)
    if (setnetgrent (name) == 0)
      {
        g_warning ("Error looking up net group with name %s: %s", name, g_strerror (errno));

Index: pkgsrc/security/polkit/patches/patch-src_programs_pkexec.c
diff -u pkgsrc/security/polkit/patches/patch-src_programs_pkexec.c:1.3 pkgsrc/security/polkit/patches/patch-src_programs_pkexec.c:1.4
--- pkgsrc/security/polkit/patches/patch-src_programs_pkexec.c:1.3      Tue Jan 25 19:40:46 2022
+++ pkgsrc/security/polkit/patches/patch-src_programs_pkexec.c  Wed Jun  7 15:36:40 2023
@@ -1,69 +1,21 @@
-$NetBSD: patch-src_programs_pkexec.c,v 1.3 2022/01/25 19:40:46 wiz Exp $
+$NetBSD: patch-src_programs_pkexec.c,v 1.4 2023/06/07 15:36:40 wiz Exp $
 
 gfdwalk: Avoid conflict with SunOS function.
 
-rest:
-Fix for CVE-2021-4034.
-https://gitlab.freedesktop.org/polkit/polkit/-/commit/a2bf5c9c83b6ae46cbd5c779d3055bff81ded683
-
---- src/programs/pkexec.c.orig 2018-05-31 11:52:53.000000000 +0000
+--- src/programs/pkexec.c.orig 2022-07-11 08:46:06.000000000 +0000
 +++ src/programs/pkexec.c
-@@ -245,7 +245,7 @@ set_close_on_exec (gint     fd,
+@@ -245,8 +245,8 @@ set_close_on_exec (gint     fd,
  }
  
  static gboolean
 -fdwalk (FdCallback callback,
+-        gpointer   user_data)
 +gfdwalk (FdCallback callback,
-         gpointer   user_data)
++         gpointer   user_data)
  {
    gint fd;
-@@ -488,6 +488,15 @@ main (int argc, char *argv[])
-   pid_t pid_of_caller;
-   gpointer local_agent_handle;
- 
-+
-+  /*
-+   * If 'pkexec' is called THIS wrong, someone's probably evil-doing. Don't be nice, just bail out.
-+   */
-+  if (argc<1)
-+    {
-+      exit(127);
-+    }
-+
-   ret = 127;
-   authority = NULL;
-   subject = NULL;
-@@ -614,10 +623,10 @@ main (int argc, char *argv[])
- 
-       path = g_strdup (pwstruct.pw_shell);
-       if (!path)
--      {
-+        {
-           g_printerr ("No shell configured or error retrieving pw_shell\n");
-           goto out;
--      }
-+        }
-       /* If you change this, be sure to change the if (!command_line)
-        case below too */
-       command_line = g_strdup (path);
-@@ -636,7 +645,15 @@ main (int argc, char *argv[])
-           goto out;
-         }
-       g_free (path);
--      argv[n] = path = s;
-+      path = s;
-+
-+      /* argc<2 and pkexec runs just shell, argv is guaranteed to be null-terminated.
-+       * /-less shell shouldn't happen, but let's be defensive and don't write to null-termination
-+       */
-+      if (argv[n] != NULL)
-+      {
-+        argv[n] = path;
-+      }
-     }
-   if (access (path, F_OK) != 0)
-     {
-@@ -918,7 +935,7 @@ main (int argc, char *argv[])
+   gint max_fd;
+@@ -941,7 +941,7 @@ main (int argc, char *argv[])
      }
  
    /* set close_on_exec on all file descriptors except stdin, stdout, stderr */



Home | Main Index | Thread Index | Old Index