pkgsrc-WIP-changes archive

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

make vty group mechanism work (permissions)



Module Name:	pkgsrc-wip
Committed By:	Frank Kardel <kardel%NetBSD.org@localhost>
Pushed By:	kardel
Date:		Mon Oct 12 21:35:01 2020 +0200
Changeset:	12f23bde2aebc49ac3cea558fbc1360bcb5141ac

Modified Files:
	frr/Makefile
	frr/distinfo
	frr/patches/patch-pkgsrc_zebra.sh.in

Log Message:
make vty group mechanism work (permissions)

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=12f23bde2aebc49ac3cea558fbc1360bcb5141ac

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

diffstat:
 frr/Makefile                         | 11 ++++++++---
 frr/distinfo                         |  2 +-
 frr/patches/patch-pkgsrc_zebra.sh.in |  2 +-
 3 files changed, 10 insertions(+), 5 deletions(-)

diffs:
diff --git a/frr/Makefile b/frr/Makefile
index 3227a3a7bd..d74bfc71ab 100644
--- a/frr/Makefile
+++ b/frr/Makefile
@@ -30,7 +30,7 @@ FRR_VTY_GROUP?=	frrvty
 FRR_USER?=		_frr
 FRR_CONF_MODE=		0640
 FRR_LOG_MODE=		0640
-PKG_SYSCONFDIR_PERMS=	${FRR_USER} ${FRR_GROUP} 0750
+PKG_SYSCONFDIR_PERMS=	${FRR_USER} ${FRR_VTY_GROUP} 0750
 PKG_SYSCONFSUBDIR=	frr
 
 PKG_GECOS.${FRR_USER}=	FRRouting User
@@ -58,7 +58,7 @@ SUBST_CLASSES+=		ids
 SUBST_STAGE.ids=	pre-configure
 SUBST_MESSAGE.ids=	Fixing user/group references.
 SUBST_FILES.ids=	pkgsrc/zebra.sh.in
-SUBST_VARS.ids=		FRR_USER FRR_GROUP
+SUBST_VARS.ids=		FRR_USER FRR_VTY_GROUP
 
 SUBST_CLASSES+=		workdir
 SUBST_STAGE.workdir=	post-configure
@@ -96,6 +96,11 @@ CONFIG_TEMPLATES!=	${EGREP} ${CONFIG_TEMPLATE_PATH:Q} PLIST 2>/dev/null
 CONF_FILES?=
 
 .for l in ${CONFIG_TEMPLATES}
-CONF_FILES_PERMS+=	/dev/null ${PKG_SYSCONFDIR}${l:C/^${CONFIG_TEMPLATE_PATH}(.*)\.sample/\1/} \
+.if ${l:C,^${CONFIG_TEMPLATE_PATH}/(.*)\.sample,\1,} == "vtysh.conf"
+CONF_FILES_PERMS+=	/dev/null ${PKG_SYSCONFDIR}${l:C,^${CONFIG_TEMPLATE_PATH}(/.*)\.sample,\1,} \
+			${FRR_USER} ${FRR_VTY_GROUP} ${FRR_CONF_MODE}
+.else
+CONF_FILES_PERMS+=	/dev/null ${PKG_SYSCONFDIR}${l:C,^${CONFIG_TEMPLATE_PATH}(/.*)\.sample,\1,} \
 			${FRR_USER} ${FRR_GROUP} ${FRR_CONF_MODE}
+.endif
 .endfor
diff --git a/frr/distinfo b/frr/distinfo
index 04c441e727..becf772178 100644
--- a/frr/distinfo
+++ b/frr/distinfo
@@ -5,5 +5,5 @@ RMD160 (frr-7.4.tar.gz) = 6c8dbf18b9d59c6518d57b2a1869d827ff194448
 SHA512 (frr-7.4.tar.gz) = d5c4e3bf7527bc094a65b24fda1b7a86f87e996fb3d98abe646e878274e0ca30f45aefca76816414b9d44607616cd2eb8ad118045b8986a92dd130f3a704162f
 Size (frr-7.4.tar.gz) = 6074854 bytes
 SHA1 (patch-lib_zlog.c) = 206b6c48129d8122bf23d245f3d86284e5057fee
-SHA1 (patch-pkgsrc_zebra.sh.in) = b692068722ee5a06e4fd975edbf0a724dfc03ac9
+SHA1 (patch-pkgsrc_zebra.sh.in) = d458e74a1f3319f6e075d3d3a81414bc7d7022f2
 SHA1 (patch-zebra_ioctl.c) = 99b7606564f4dc620df997889156b5c09f7fb396
diff --git a/frr/patches/patch-pkgsrc_zebra.sh.in b/frr/patches/patch-pkgsrc_zebra.sh.in
index 27b893a3c9..d352da3985 100644
--- a/frr/patches/patch-pkgsrc_zebra.sh.in
+++ b/frr/patches/patch-pkgsrc_zebra.sh.in
@@ -10,7 +10,7 @@ $NetBSD$
  {
      mkdir -p "${socket_dir}"
 -    chown quagga.quagga "${socket_dir}"
-+    chown @FRR_USER@.@FRR_GROUP@ "${socket_dir}"
++    chown @FRR_USER@.@FRR_VTY_GROUP@ "${socket_dir}"
      chmod 750 "${socket_dir}"
      rc_flags="$(
  	set -- $rc_flags


Home | Main Index | Thread Index | Old Index