From owner-freebsd-current@FreeBSD.ORG Tue Dec 2 08:38:12 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FE6E16A4CE for ; Tue, 2 Dec 2003 08:38:12 -0800 (PST) Received: from kazi.fit.vutbr.cz (kazi.fit.vutbr.cz [147.229.8.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id A31F143FEC for ; Tue, 2 Dec 2003 08:38:07 -0800 (PST) (envelope-from cejkar@fit.vutbr.cz) Received: from kazi.fit.vutbr.cz (localhost [127.0.0.1]) by kazi.fit.vutbr.cz (8.12.10/8.12.9) with ESMTP id hB2Gc6Zw041367 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Tue, 2 Dec 2003 17:38:06 +0100 (CET) Received: (from cejkar@localhost) by kazi.fit.vutbr.cz (8.12.10/8.12.5/Submit) id hB2Gc5lN041366 for freebsd-current@freebsd.org; Tue, 2 Dec 2003 17:38:05 +0100 (CET) X-Authentication-Warning: kazi.fit.vutbr.cz: cejkar set sender to cejkar@fit.vutbr.cz using -f Date: Tue, 2 Dec 2003 17:38:05 +0100 From: Rudolf Cejka To: freebsd-current@freebsd.org Message-ID: <20031202163805.GA40233@fit.vutbr.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) Subject: User mounts could not use character conversions (libkiconv is just for roots) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 16:38:12 -0000 Hello, I have found, that user mounts using libkiconv.so (msdosfs, cd9660, ...) could not use character code conversions, beause writing to sysctl kern.iconv.add is allowed just for root. Personally, I have created small patch, which allows to change kern.iconv.add to anybody, so it does work for me. Does anybody know, if there are security drawbacks and if it can or can not be commited? Thanks. --- sys/libkern/iconv.c.orig Tue Dec 2 16:58:05 2003 +++ sys/libkern/iconv.c Tue Dec 2 16:59:57 2003 @@ -401,7 +401,8 @@ return error; } -SYSCTL_PROC(_kern_iconv, OID_AUTO, add, CTLFLAG_RW | CTLTYPE_OPAQUE, +SYSCTL_PROC(_kern_iconv, OID_AUTO, add, CTLFLAG_RW | CTLFLAG_ANYBODY + | CTLTYPE_OPAQUE, NULL, 0, iconv_sysctl_add, "S,xlat", "register charset pair"); /* -- Rudolf Cejka http://www.fit.vutbr.cz/~cejkar Brno University of Technology, Faculty of Information Technology Bozetechova 2, 612 66 Brno, Czech Republic