From owner-freebsd-doc@FreeBSD.ORG Thu Apr 8 15:16:29 2004 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E77DC16A4CE for ; Thu, 8 Apr 2004 15:16:28 -0700 (PDT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B4BB43D2F for ; Thu, 8 Apr 2004 15:16:28 -0700 (PDT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id 1E7776520E; Thu, 8 Apr 2004 23:16:26 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 66364-04-3; Thu, 8 Apr 2004 23:16:25 +0100 (BST) Received: from empiric.dek.spc.org (82-147-17-88.dsl.uk.rapidplay.com [82.147.17.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 2B2FF65218; Thu, 8 Apr 2004 23:16:25 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id 7BCF360EE; Thu, 8 Apr 2004 23:16:24 +0100 (BST) Date: Thu, 8 Apr 2004 23:16:24 +0100 From: Bruce M Simpson To: docs@FreeBSD.org Message-ID: <20040408221624.GG710@empiric.dek.spc.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="F8dlzb82+Fcn6AgP" Content-Disposition: inline cc: Boris Kovalenko Subject: Porter's Handook: uid reservation? X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2004 22:16:29 -0000 --F8dlzb82+Fcn6AgP Content-Type: multipart/mixed; boundary="GZVR6ND4mMseVXL/" Content-Disposition: inline --GZVR6ND4mMseVXL/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Could someone more familiar with the doc tree than I add a user ID to the list of reserved UIDs in the Porter's Handbook on Boris' behalf? Many thanks, BMS --GZVR6ND4mMseVXL/ Content-Type: message/rfc822 Content-Disposition: inline Return-Path: X-Original-To: bms@spc.org Delivered-To: bms@spc.org Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id CCD60653B5 for ; Thu, 8 Apr 2004 04:35:04 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 56238-02-3 for ; Thu, 8 Apr 2004 04:35:04 +0100 (BST) Received: from nikom.tagil.ru (nikom.tagil.ru [195.151.0.208]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id 1DAAF653F9 for ; Thu, 8 Apr 2004 04:34:55 +0100 (BST) Received: from boris.nikom.ru ([10.1.16.195] helo=tagnet.ru) by nikom.tagil.ru with esmtp (Exim 4.24) id 1BBQJV-0004eS-SK; Thu, 08 Apr 2004 09:34:49 +0600 Message-ID: <4074C859.3060205@tagnet.ru> Date: Thu, 08 Apr 2004 09:34:49 +0600 From: Boris Kovalenko User-Agent: Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.6) Gecko/20040117 X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: bms@FreeBSD.org Cc: Bruce M Simpson Subject: Quagga port Content-Type: multipart/mixed; boundary="------------040303050303030901010104" X-Spam-Status: No, hits=-0.6 required=5.0 tests=PATCH_UNIFIED_DIFF,USER_AGENT_MOZILLA_UA,X_ACCEPT_LANG version=2.55 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) X-Spam-Report: This mail is probably spam. The original message has been attachedunwanted mail in future. See http://spamassassin.org/tag/ for more details. Content preview: Hello, Bruce! I have a report that choosen UID for Quagga port conflicts with already registerd in Porter's Handbook Firebird engine UID. So, I have choosen another free UID and made a UID with Porter's Handbook. [...] Content analysis details: (-0.60 points, 5 required) non-spam MUA (Mozilla) X_ACCEPT_LANG (-0.1 points) Has a X-Accept-Language header patch from diff -u This is a multi-part message in MIME format. --------------040303050303030901010104 Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Hello, Bruce! I have a report that choosen UID for Quagga port conflicts with already registerd in Porter's Handbook Firebird engine UID. So, I have choosen another free UID and made a patch. Please review and commit it. Also please register new Quagga UID with Porter's Handbook. -- With respect, Boris --------------040303050303030901010104 Content-Type: text/plain; name="qugga.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qugga.diff" --- pkg-install.orig Wed Nov 5 20:19:54 2003 +++ pkg-install Wed Apr 7 16:28:10 2004 @@ -20,7 +20,7 @@ case $2 in POST-INSTALL) - UID=90 + UID=101 GID=${UID} if pw group show "${ENABLE_GROUP}" 2>/dev/null; then echo "You already have a group \"${ENABLE_GROUP}\", so I will use it." --- Makefile.orig Wed Mar 31 11:46:49 2004 +++ Makefile Thu Apr 8 08:53:48 2004 @@ -144,11 +144,60 @@ @${ECHO} "quagga_enable=\"YES\"" @${ECHO} "Also You may want to set router_enable=\"NO\"" @${ECHO} "" + @${ECHO} "Note!!! Since 0.96_5 port uses new id for quagga user and group." + @${ECHO} " So, You need to manually chown files:" + @${ECHO} " in ${SYSCONF_DIR}" + @${ECHO} " and ${LOCALSTATE_DIR}" + @${ECHO} " if You had never do this before. Or run" + @${ECHO} " make changeuser" + @${ECHO} "" @${INSTALL_SCRIPT} ${WRKDIR}/quagga.sh ${RC_DIR}/quagga${RC_SUFX} .if !defined(BATCH) post-clean: @${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc .endif + +changeuser: +# Recover from the problem that earlier versions of this port created the +# quagga pseudo-user with an id of 90 which is used by FireBird database +# engine. The port now uses id 101:101. +# NOTE: +# This target assumes that ENABLE_GROUP is the primary group of ENABLE_USER. If you +# have a different setup, do not run this target! + @if [ `${ID} -u` -ne 0 ]; \ + then ${ECHO_CMD} "Sorry, you must be root to use this target."; exit 1; fi; \ + current_uid=`id -u ${ENABLE_USER}`; \ + current_gid=`pw groupshow ${ENABLE_GROUP}|cut -f 3 -d :`; \ + ${ECHO_CMD} "I will remove this user:"; \ + ${ID} -P $${current_uid}; \ + ${ECHO_CMD} "and this group:"; \ + pw groupshow ${ENABLE_GROUP}; \ + ${ECHO_CMD} "I will then re-create them with a user and group id of 101."; \ + ${ECHO_CMD} "Then all files and directories under ${PREFIX} and /var that"; \ + ${ECHO_CMD} "are owned by uid $${current_uid} will be chown(1)'ed."; \ + ${ECHO_CMD} "After that, all files and directories that were accessible"; \ + ${ECHO_CMD} "by group $${current_gid} will chgrp(1)'ed respectively."; \ + ${ECHO_CMD} "Note that this assumes group '${ENABLE_GROUP}' to be the primary"; \ + ${ECHO_CMD} "group of user '${ENABLE_USER}'. If you have a different setup"; \ + ${ECHO_CMD} "please abort this target now. Also don't forget to write your"; \ + ${ECHO_CMD} "Quagga configs right now!"; \ + read -p "Press RETURN to continue or CTRL-C to abort:" dummy ; \ + ${ECHO_CMD} "OK, here we go:"; \ + ${ECHO_CMD} "deleting user $${current_uid} and his primary group..."; \ + pw userdel -u $${current_uid}; \ + ${ECHO_CMD} "adding user ${SQUID_UID} with id 100..."; \ + pw groupadd -n ${ENABLE_USER} -g 101; \ + pw useradd -n ${ENABLE_GROUP} -u 101 -c "quagga route daemon pseudo-user" \ + -d ${SYSCONF_DIR} -s /sbin/nologin -h - ; \ + ${ECHO_CMD} "chown(1)'ing everything under ${PREFIX} from $${current_uid} to 101..."; \ + ${FIND} -H ${PREFIX} -user $${current_uid} -exec ${CHOWN} 101 {} \; ; \ + ${ECHO_CMD} "chgrp(1)'ing everything under ${PREFIX} from $${current_gid} to 100..."; \ + ${FIND} -H ${PREFIX} -group $${current_gid} -exec ${CHOWN} :101 {} \; ; \ + ${ECHO_CMD} "chown(1)'ing everything under /var from $${current_uid} to 101..."; \ + ${FIND} -H /var -user $${current_uid} -exec ${CHOWN} 101 {} \; ; \ + ${ECHO_CMD} "chgrp(1)'ing everything under /var from $${current_gid} to 101..."; \ + ${FIND} -H /var -group $${current_gid} -exec ${CHOWN} :101 {} \; ; \ + ${ECHO_CMD} "Finished. You must stop and then start Quagga now." .include --------------040303050303030901010104-- --GZVR6ND4mMseVXL/-- --F8dlzb82+Fcn6AgP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Comment: '' iD8DBQFAdc83ueUpAYYNtTsRAuGtAJ0XNLSAbRBTrVLMWizh9FV1C4Ev7wCeMafa XAoy/APSIRXjJKo1ktcc9uQ= =k4mi -----END PGP SIGNATURE----- --F8dlzb82+Fcn6AgP--