debian/0000755000000000000000000000000011770641550007174 5ustar debian/watch0000644000000000000000000000020711543375323010224 0ustar version=3 opts=filenamemangle=s/.*:// http://galileo.dmi.unict.it/wiki/weborf/doku.php?id=download /wiki/[^:]*:weborf_(\d+.*)\.tar\.gz debian/changelog0000644000000000000000000000517111770641466011060 0ustar weborf (0.13-3) unstable; urgency=low * Fixed typo in the description (Closes: #677083) * Correctly handles IPv4 clients in log files when started by xinetd (Closes: #601253) * Updated Standards-Version * Build-depends on hardening-wrapper -- Salvo 'LtWorf' Tomaselli Thu, 21 Jun 2012 17:35:43 +0200 weborf (0.13-2) unstable; urgency=low * Backport fix from upstream: qweborf doesn't crash when miredo is in use -- Salvo 'LtWorf' Tomaselli Mon, 19 Dec 2011 10:54:07 +0100 weborf (0.13-1) unstable; urgency=low * New upstream release * Adds qweborf package, GUI for sharing files with HTTP * Uses GNU autotools (Closes: #611528) * Adds libmagic-dev in build-deps * Added more examples -- Salvo 'LtWorf' Tomaselli Sat, 26 Mar 2011 14:44:31 +0100 weborf (0.12.5-1) unstable; urgency=high * New upstream release * Fixes DoS -- Salvo 'LtWorf' Tomaselli Fri, 28 Jan 2011 11:18:01 +0100 weborf (0.12.4-1) unstable; urgency=high * New upstream release * Fixes DoS (Closes: #601585) -- Salvo 'LtWorf' Tomaselli Wed, 27 Oct 2010 16:01:35 +0200 weborf (0.12.3-1) unstable; urgency=low * New upstream release * Fixes directory traversal (Closes: #596112) -- Salvo 'LtWorf' Tomaselli Wed, 08 Sep 2010 22:24:21 +0200 weborf (0.12.2-1) unstable; urgency=low * New upstream release -- Salvo 'LtWorf' Tomaselli Tue, 22 Jun 2010 16:33:22 +0200 weborf (0.12.1-1) unstable; urgency=low * New upstream release -- Salvo 'LtWorf' Tomaselli Thu, 03 Jun 2010 23:48:40 +0200 weborf (0.12-2) unstable; urgency=low * Using quilt * Fixed error in Makefile that prevented building * Fixed date error in debian changelog -- Salvo 'LtWorf' Tomaselli Sat, 29 May 2010 18:30:22 +0200 weborf (0.12-1) unstable; urgency=low * Corrected spelling mistake in manpage (Closes: #549652) * Builds weborf-daemon package * New upstream release * Added explicit format 1.0 -- Salvo 'LtWorf' Tomaselli Thu, 27 May 2010 22:10:22 +0200 weborf (0.11-2) unstable; urgency=low * Corrected name of upstream author Salvo Rinaldi in the copyright file. * Added name of upstream author Salvo Rinaldi in the manpages. * Edited description of the package -- Salvo 'LtWorf' Tomaselli Sat, 26 Sep 2009 18:46:22 +0200 weborf (0.11-1) unstable; urgency=low * Initial release (Closes: #506771) -- Salvo 'LtWorf' Tomaselli Tue, 22 Sep 2009 15:13:55 +0200 debian/weborf.examples0000644000000000000000000000013011543375323012212 0ustar examples/auth.py examples/weborf_auth.c examples/xinetd.conf examples/weborf_auth_dav.c debian/weborf.docs0000644000000000000000000000002011543375323011322 0ustar README TODOlist debian/patches/0000755000000000000000000000000011770637514010630 5ustar debian/patches/series0000644000000000000000000000002311770637347012044 0ustar miredo mapped_addr debian/patches/mapped_addr0000644000000000000000000000662611770637514013025 0ustar Description: deals with ipv4 addresses (usually converted by xinetd) . weborf (0.13-2) unstable; urgency=low . * Backport fix from upstream: qweborf doesn't crash when miredo is in use Author: Salvo 'LtWorf' Tomaselli Bug-Debian: http://bugs.debian.org/601253 --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- weborf-0.13.orig/instance.c +++ weborf-0.13/instance.c @@ -297,15 +297,7 @@ void * instance(void * nulla) { } connection_prop.sock=sock;//Assigned socket into the struct - - //Converting address to string -#ifdef IPV6 - getpeername(sock, (struct sockaddr *)&addr, &addr_l); - inet_ntop(AF_INET6, &addr.sin6_addr, connection_prop.ip_addr, INET6_ADDRSTRLEN); -#else - getpeername(sock, (struct sockaddr *)&addr,(socklen_t *) &addr_l); - inet_ntop(AF_INET, &addr.sin_addr, connection_prop.ip_addr, INET_ADDRSTRLEN); -#endif + net_getpeername(sock,connection_prop.ip_addr); #ifdef THREADDBG syslog(LOG_DEBUG,"Thread %ld: Reading from socket",thread_prop.id); @@ -1274,14 +1266,7 @@ void inetd() { goto release_resources; } - //Converting address to string -#ifdef IPV6 - getpeername(sock, (struct sockaddr *)&addr, &addr_l); - inet_ntop(AF_INET6, &addr.sin6_addr, connection_prop.ip_addr, INET6_ADDRSTRLEN); -#else - getpeername(sock, (struct sockaddr *)&addr,(socklen_t *) &addr_l); - inet_ntop(AF_INET, &addr.sin_addr, connection_prop.ip_addr, INET_ADDRSTRLEN); -#endif + net_getpeername(sock,connection_prop.ip_addr); handle_requests(buf,&read_b,&bufFull,&connection_prop,thread_prop.id); //close(sock);//Closing the socket --- weborf-0.13.orig/mynet.c +++ weborf-0.13/mynet.c @@ -154,3 +154,31 @@ void net_bind_and_listen(int s) { listen(s, MAXQ); //Listen to the socket } + + +void net_getpeername(int socket,char* buffer) { + +#ifdef IPV6 + + struct sockaddr_storage t_addr; + socklen_t addr_l=sizeof(t_addr); + + getpeername(socket, (struct sockaddr *)&t_addr, &addr_l); + + if (t_addr.ss_family==AF_INET) { + struct sockaddr_in *addr =(struct sockaddr_in *)&t_addr; + char temp_buffer[INET_ADDRSTRLEN]; + inet_ntop(AF_INET, &(addr->sin_addr), temp_buffer, INET_ADDRSTRLEN); + snprintf(buffer,INET6_ADDRSTRLEN,"::ffff:%s",temp_buffer); + } else { + struct sockaddr_in6 *addr =(struct sockaddr_in6 *)&t_addr; + inet_ntop(AF_INET6, &(addr->sin6_addr), buffer, INET6_ADDRSTRLEN); + } +#else + struct sockaddr_in addr; + socklen_t addr_l=sizeof(struct sockaddr_in); + + getpeername(socket, (struct sockaddr *)&addr,&addr_l); + inet_ntop(AF_INET, &addr.sin_addr, buffer, INET_ADDRSTRLEN); +#endif +} --- weborf-0.13.orig/mynet.h +++ weborf-0.13/mynet.h @@ -26,5 +26,6 @@ along with this program. If not, see --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: upstream Reviewed-By: Salvo "LtWorf" Tomaselli Last-Update: 2011-12-19 --- weborf-0.13.orig/qweborf/nhelper.py +++ weborf-0.13/qweborf/nhelper.py @@ -131,8 +131,9 @@ def getifaddrs(): if name not in result: result[name] = {} - - sa = sockaddr.from_address(ifa.ifa_addr) + + if ifa.ifa_addr != None: + sa = sockaddr.from_address(ifa.ifa_addr) if sa.sa_family not in result[name]: result[name][sa.sa_family] = [] debian/control0000644000000000000000000000273611770641401010602 0ustar Source: weborf Section: httpd Priority: optional Maintainer: Salvo 'LtWorf' Tomaselli Build-Depends: debhelper (>= 7.0.50~), libmagic-dev (>=5.04~), python, python-support, pyqt4-dev-tools, hardening-wrapper Standards-Version: 3.9.3 Homepage: http://galileo.dmi.unict.it/wiki/weborf/ Package: weborf Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: php5-cgi (>= 5.2.11.dfsg.1) Description: Fast and small webserver meant to be run without root privileges Weborf is a configurationless webserver mainly meant to allow users to easily share their directories over the web. Has limited support to webdav, allowing its use by GNOME and KDE filemanagers. It also supports cgi. Package: weborf-daemon Architecture: all Depends: ${misc:Depends}, weborf (>=0.13) Description: init script for weborf Weborf is a configurationless webserver mainly meant to allow users to easily share their directories over the web. Has limited support to webdav, allowing its use by GNOME and KDE filemanagers. It also supports cgi. . This package provides a SystemV daemon to start weborf using init. Package: qweborf Architecture: all Depends: ${misc:Depends}, ${python:Depends}, weborf (>=0.12), python-qt4 (>=4.7.3) Description: Shares files using the HTTP protocol Qweborf provides an easy to use graphical interface to share local files using the HTTP protocol. It can enable writing on the server, webdav, authentication and sending directories as tar.gz. debian/rules0000755000000000000000000000146611770641550010263 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. export DEB_BUILD_HARDENING=1 SHELL=sh -e # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ override_dh_installinit: dh_installinit -pweborf-daemon --onlyscripts --init-script=weborf override_dh_auto_install: pyuic4 qweborf/main.ui > qweborf/main.py python qweborf.setup.py install --root=$(CURDIR)/debian/qweborf dh_auto_install override_dh_install: install -D qweborf/qweborf debian/qweborf/usr/bin/qweborf dh_install debian/qweborf.install0000644000000000000000000000005711543375323012233 0ustar qweborf/qweborf.desktop usr/share/applications debian/source/0000755000000000000000000000000011543375330010472 5ustar debian/source/format0000644000000000000000000000001411543375323011702 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000211543375323010372 0ustar 7 debian/qweborf.manpages0000644000000000000000000000002211543375323012350 0ustar qweborf/qweborf.1 debian/copyright0000644000000000000000000000243711543375323011135 0ustar This work was packaged for Debian by: Salvo 'LtWorf' Tomaselli on Mon, 21 Sep 2009 23:13:38 +0200 It was downloaded from: http://galileo.dmi.unict.it/wiki/weborf/ Upstream Authors: Salvo 'LtWorf' Tomaselli Salvo Rinaldi Copyright: Copyright (C) 2007 Salvo 'LtWorf' Tomaselli License: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . On Debian systems, the complete text of the GNU General Public License version 3 can be found in `/usr/share/common-licenses/GPL-3'. The Debian packaging is: Copyright (C) 2009 Salvo 'LtWorf' Tomaselli and is licensed under the GPL version 3, see above. debian/weborf-daemon.install0000644000000000000000000000007511543375323013313 0ustar usr/share/man/man5/weborf.conf.5 etc/weborf.conf etc/init.d/ debian/weborf.install0000644000000000000000000000016611543375323012053 0ustar usr/bin/weborf usr/lib/cgi-bin/weborf_cgi_wrapper usr/lib/cgi-bin/weborf_py_wrapper usr/share/man/man1/weborf.1