User mounts could not use character conversions (libkiconv is just for roots)

Rudolf Cejka cejkar at fit.vutbr.cz
Tue Dec 2 08:38:12 PST 2003


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 <cejkar at fit.vutbr.cz> http://www.fit.vutbr.cz/~cejkar
Brno University of Technology, Faculty of Information Technology
Bozetechova 2, 612 66  Brno, Czech Republic


More information about the freebsd-current mailing list