Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 174802

Summary: net-misc/xsupplicant-1.2.8-r5.ebuild (patched to be able to used in the China Education and Research Network authentication)
Product: Gentoo Linux Reporter: Yu Yuwei <acevery>
Component: New packagesAssignee: Mobile Herd (OBSOLETE) <mobile+disabled>
Status: RESOLVED UPSTREAM    
Severity: enhancement CC: acevery, mabi, ostefano
Priority: High Keywords: EBUILD
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: the ebuild
the patch written by Yu Yuwei to embeded Ruijie algorithm into xsupplicant
the 802.1x program, which is needed in calculating the checksum in Ruijie authentication.

Description Yu Yuwei 2007-04-16 15:45:29 UTC
In China Education and Research Network, the popular method of authentication is Ruijie algorithm, which is a non-standard EAP-MD5 algorithm. With the patch of xsupplicant-1.2.8-rj.patch, the xsupplicant could be used to pass the authentication of Ruijie Authenticator smoothly. 

In order to use xsupplicant in normal situation, the patch use [-r] parameter to initiate Ruijie algorithm, without [-r] xsupplicant will work as its normal way.

from the open1x.sourceforge.net, I got the information that xsupplicant-1.2.8 had already fix the overflow bug as well.
Comment 1 Yu Yuwei 2007-04-16 15:49:28 UTC
Created attachment 116451 [details]
the ebuild

xsupplicant-1.2.8-r1.ebuild would patch xsupplicant-1.2.8 with xsupplicant-1.2.8-rj.patch, and install ruijie, saier init script, which is used to initiate authentication in China Education and Research Network.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-04-16 15:50:04 UTC
Please, submit such things upstream...
Comment 3 Yu Yuwei 2007-04-16 15:53:13 UTC
Created attachment 116453 [details, diff]
the patch written by Yu Yuwei to embeded Ruijie algorithm into xsupplicant

This patch have be tested in Xiamen University, Fujian, China. The algorithm came from the anti-compiling method.
Comment 4 Yu Yuwei 2007-04-16 15:58:57 UTC
Created attachment 116457 [details]
the 802.1x program, which is needed in calculating the  checksum in Ruijie authentication.

Ruijie authentication algorithm take the checking of client into account. 8021x.exe is need in every circle of Ruijie authentication.
Comment 5 Yu Yuwei 2007-04-16 16:02:45 UTC
Portage 2.1.2.3 (default-linux/x86/2007.0, gcc-4.1.1, glibc-2.5-r0, 2.6.18-suspend2-r1 i686)
=================================================================
System uname: 2.6.18-suspend2-r1 i686 Intel(R) Pentium(R) M processor 1.10GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Mon, 16 Apr 2007 02:01:01 +0000
dev-java/java-config: 1.3.7, 2.0.31-r7
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.15-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -march=pentium-m -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp3.tsinghua.edu.cn/mirror/gentoo  http://gentoo.osuosl.org/ "
LANG="zh_CN.UTF-8"
LC_ALL=""
LINGUAS="zh_CN"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/gentoo-china /usr/portage/local/layman/xeffects"
SYNC="rsync://140.211.166.165/gentoo-portage"
USE="16Bit X aac acl acpi aiglx alsa asf bash-completion berkdb bitmap-fonts browserplugin bzip2 cairo cjk cli cpudetection cracklib crypt cups dbus dmx dri dvd dvdread esd fbcon fbsplash firefox flac fortran gdbm gif gnome gpm gstreamer gtk gtk2 hal i8x0 iconv ieee1394 ipv6 isdnlog java jpeg jpeg2k latex libg++ libnotify mad midi mmx mp3 msn ncurses nls nptl nptlonly nsplugin ogg opengl pam pcmcia pcre pdf perl png pppd python qq quicktime readline real reflection samba sdl session spl sse sse2 ssl svg tcl tcltk tcpd tetex tiff tk truetype truetype-fonts type1-fonts unicode vcd vim vim-with-x vorbis wifi win32codecs x86 xine xinerama xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" FOO2ZJS_DEVICES="hp1020" INPUT_DEVICES="synaptics keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="zh_CN" USERLAND="GNU" VIDEO_CARDS="i810"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 6 Yu Yuwei 2007-04-16 16:22:13 UTC
Comment on attachment 116451 [details]
the ebuild

><HTML><HEAD/><BODY><PRE># Copyright 1999-2006 Gentoo Foundation
># Distributed under the terms of the GNU General Public License v2
># $Header: /usr/local/portage/net-misc/xsupplicant/xsupplicant-1.2.8-r1.ebuild,v 0.1 2007/04/13 16:51:36 Acevery Exp $
>
>inherit flag-o-matic
>
>DESCRIPTION="Open Source Implementation of IEEE 802.1x"
>HOMEPAGE="http://open1x.sourceforge.net/"
>SRC_URI="mirror://sourceforge/open1x/${P}.tar.gz"
>
>LICENSE="|| ( GPL-2 BSD )"
>SLOT="0"
>KEYWORDS="~amd64 ~ppc ~x86"
>
>IUSE="gsm"
>
>RDEPEND="&gt;=dev-libs/openssl-0.9.7
>		net-wireless/wireless-tools
>		gsm? (sys-apps/pcsc-lite )"
>
>DEPEND="sys-devel/bison
>		sys-devel/flex
>		${RDEPEND}"
>
>src_compile() {
>	local conf
>	
>	# fix compilation with recent kernels
>	append-flags -DHEADERS_KERNEL
>
>	if use gsm; then
>		use wireless
>		# fix USE=-gsm (bug #118885)
>		conf="--enable-eap-sim"
>		# fix compilation with pcsc-lite-1.2.9_beta9 (bug #81338)
>		append-flags -I/usr/include/PCSC
>	fi
>	
>	
>	epatch ${FILESDIR}/${P}-rj.patch
>
>	econf \
>		${conf} \
>		|| die "econf failed"
>
>	emake || die "emake failed"
>}
>
>src_install() {
>	make DESTDIR="${D}" install || die "make install failed"
>
>	dodoc AUTHORS README TODO \
>		doc/README.certificates doc/README.wpa
>
>	dohtml doc/Xsupplicant-wireless-cards.html
>
>	docinto examples
>	dodoc etc/*-example.conf
>
>	insinto /etc
>	newins etc/xsupplicant.conf xsupplicant.conf.example
>	newins ${FILESDIR}/8021x.exe 8021x.exe
>
>	newinitd ${FILESDIR}/saier saier
>	newinitd ${FILESDIR}/ruijie ruijie
>	newinitd ${FILESDIR}/${P}-init.d ${PN}
>}
>
>pkg_postinst() {
>	einfo
>	einfo "To use ${P} you must create the configuration file"
>	einfo "/etc/xsupplicant.conf"
>	einfo
>	einfo "An example configuration file has been installed as"
>	einfo "/etc/xsupplicant.conf.example"
>	einfo
>	einfo "To use Authenticate with Ruijie private protocal"
>	einfo "You need to set account and password in default section"
>	einfo
>	einfo "Then,"
>	einfo "If you use dynamic IP"
>	einfo "You need use: /etc/init.d/ruijie start | stop to begin or stop"
>	einfo "If your network interface is not eth0"
>	einfo "Just modify /etc/init.d/ruijie"
>	einfo 
>	einfo "If you use Static IP"
>	einfo "You need to set your IP and router"
>	einfo "/etc/init.d/net as usual"
>	einfo "Then use: /etc/init.d/saier start | stop to begin or stop"
>	ewarn "You need to change the DNS in /etc/init.d/saier to yours."
>	einfo 
>}
></PRE></BODY></HTML>
Comment 7 Yu Yuwei 2007-04-16 16:22:47 UTC
Comment on attachment 116451 [details]
the ebuild

><HTML><HEAD/><BODY><PRE># Copyright 1999-2006 Gentoo Foundation
># Distributed under the terms of the GNU General Public License v2
># $Header: /usr/local/portage/net-misc/xsupplicant/xsupplicant-1.2.8-r1.ebuild,v 0.5 2007/04/13 16:51:36 Acevery Exp $
>
>inherit flag-o-matic
>
>DESCRIPTION="Open Source Implementation of IEEE 802.1x"
>HOMEPAGE="http://open1x.sourceforge.net/"
>SRC_URI="mirror://sourceforge/open1x/${P}.tar.gz"
>
>LICENSE="|| ( GPL-2 BSD )"
>SLOT="0"
>KEYWORDS="~amd64 ~ppc ~x86"
>
>IUSE="gsm"
>
>RDEPEND="&gt;=dev-libs/openssl-0.9.7
>		net-wireless/wireless-tools
>		gsm? (sys-apps/pcsc-lite )"
>
>DEPEND="sys-devel/bison
>		sys-devel/flex
>		${RDEPEND}"
>
>src_compile() {
>	local conf
>	
>	# fix compilation with recent kernels
>	append-flags -DHEADERS_KERNEL
>
>	if use gsm; then
>		use wireless
>		# fix USE=-gsm (bug #118885)
>		conf="--enable-eap-sim"
>		# fix compilation with pcsc-lite-1.2.9_beta9 (bug #81338)
>		append-flags -I/usr/include/PCSC
>	fi
>	
>	
>	epatch ${FILESDIR}/${P}-rj.patch
>
>	econf \
>		${conf} \
>		|| die "econf failed"
>
>	emake || die "emake failed"
>}
>
>src_install() {
>	make DESTDIR="${D}" install || die "make install failed"
>
>	dodoc AUTHORS README TODO \
>		doc/README.certificates doc/README.wpa
>
>	dohtml doc/Xsupplicant-wireless-cards.html
>
>	docinto examples
>	dodoc etc/*-example.conf
>
>	insinto /etc
>	newins etc/xsupplicant.conf xsupplicant.conf.example
>	newins ${FILESDIR}/8021x.exe 8021x.exe
>
>	newinitd ${FILESDIR}/saier saier
>	newinitd ${FILESDIR}/ruijie ruijie
>	newinitd ${FILESDIR}/${P}-init.d ${PN}
>}
>
>pkg_postinst() {
>	einfo
>	einfo "To use ${P} you must create the configuration file"
>	einfo "/etc/xsupplicant.conf"
>	einfo
>	einfo "An example configuration file has been installed as"
>	einfo "/etc/xsupplicant.conf.example"
>	einfo
>	einfo "To use Authenticate with Ruijie private protocal"
>	einfo "You need to set account and password in default section"
>	einfo
>	einfo "Then,"
>	einfo "If you use dynamic IP"
>	einfo "You need use: /etc/init.d/ruijie start | stop to begin or stop"
>	einfo "If your network interface is not eth0"
>	einfo "Just modify /etc/init.d/ruijie"
>	einfo 
>	einfo "If you use Static IP"
>	einfo "You need to set your IP and router"
>	einfo "/etc/init.d/net as usual"
>	einfo "Then use: /etc/init.d/saier start | stop to begin or stop"
>	ewarn "You need to change the DNS in /etc/init.d/saier to yours."
>	einfo 
>}
></PRE></BODY></HTML>
Comment 8 Stefano 2007-08-31 21:17:14 UTC
What about merging this http://bugs.gentoo.org/show_bug.cgi?id=154994 ?

The last reply offers an ebuild that compiles correctly on kernel >2.6.19 

Just my two cents ^_^
Comment 9 Matti Bickel (RETIRED) gentoo-dev 2008-11-30 16:04:27 UTC
Would you be willing to provide a update to the latest stable version: 2.0.1?
I'll include it in the tree, but i don't use it, so i have to depend on somebody to test and update it.

Please respond within 14 days. After that, i'll give the in tree version to treecleaners who will remove it.
Comment 10 Yu Yuwei 2008-12-01 00:40:17 UTC
(In reply to comment #9)
> Would you be willing to provide a update to the latest stable version: 2.0.1?
> I'll include it in the tree, but i don't use it, so i have to depend on
> somebody to test and update it.
> 
> Please respond within 14 days. After that, i'll give the in tree version to
> treecleaners who will remove it.
> 
Yes, it is out of date.
In order to easy the installation by some friend of mine, who are not capable of compiling,  I have written a up-to-date python program to do the same thing, which called xmuruijie.
so please leave this patch out of the tree. :)
Comment 11 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2010-05-26 11:37:54 UTC
please submit this feature request upstream. thanks