From: ms Date: Wed, 28 Nov 2007 19:42:42 +0000 (+0000) Subject: The svn relevant functions are now to find in an extra file. X-Git-Tag: v3.0-alpha1~1149 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=67deab0a5eabb306dbb1bf5d2d47cb8e9f353c71;p=ipfire-3.x.git The svn relevant functions are now to find in an extra file. Removed some unused patches. Added mc, glib and modified some stuff. Removed old configuration. git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@1102 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- diff --git a/config/glib/glib2-locale.sh b/config/glib/glib2-locale.sh new file mode 100644 index 000000000..8dd50d557 --- /dev/null +++ b/config/glib/glib2-locale.sh @@ -0,0 +1,3 @@ +# Use the current locale charset for filenames +# in applications using GLib +export G_FILENAME_ENCODING=@locale diff --git a/config/httpd/conf.d/php5.conf b/config/httpd/conf.d/php5.conf deleted file mode 100644 index 76ddc77be..000000000 --- a/config/httpd/conf.d/php5.conf +++ /dev/null @@ -1,12 +0,0 @@ - - - AddType application/x-httpd-php .php3 - AddType application/x-httpd-php .php4 - AddType application/x-httpd-php .php5 - AddType application/x-httpd-php .php - DirectoryIndex index.php3 - DirectoryIndex index.php4 - DirectoryIndex index.php5 - DirectoryIndex index.php - - diff --git a/config/httpd/default-server.conf b/config/httpd/default-server.conf deleted file mode 100644 index db082298a..000000000 --- a/config/httpd/default-server.conf +++ /dev/null @@ -1,8 +0,0 @@ -# -# Global configuration that will be applicable for all virtual hosts, unless -# deleted here, or overriden elswhere. -# - -DocumentRoot /srv/web/ipfire/html - -#Include /etc/httpd/conf/conf.d/*.conf diff --git a/config/httpd/global.conf b/config/httpd/global.conf deleted file mode 100644 index a97702643..000000000 --- a/config/httpd/global.conf +++ /dev/null @@ -1,10 +0,0 @@ -Timeout 300 -ServerSignature on -UseCanonicalName off -ServerTokens Full -LogLevel warn -CustomLog /var/log/httpd/access_log combined -Include /etc/httpd/conf/hostname.conf -HostnameLookups off -AddHandler cgi-script .cgi -EnableSendfile Off diff --git a/config/httpd/httpd.conf b/config/httpd/httpd.conf deleted file mode 100644 index 7e00b8826..000000000 --- a/config/httpd/httpd.conf +++ /dev/null @@ -1,120 +0,0 @@ -# -# /etc/httpd/conf/httpd.conf -# -# This is the main Apache2 server configuration file for IPFire. -# Plese do not change this file! - -# Overview of include files, chronologically: -# -# httpd.conf -# | -# |-- uid.conf . . . . . . . . . . . . . . UserID/GroupID to run under -# |-- server-tuning.conf . . . . . . . . . sizing of the server (how many processes to start, ...) -# |-- loadmodule.conf . . . . . . . . . . . load these modules -# |-- listen.conf . . . . . . . . . . . . . IP adresses / ports to listen on -# |-- mod_log_config.conf . . . . . . . . . define logging formats -# |-- sysconfig.d/global.conf . . . . . . . server-wide general settings -# |-- mod_status.conf . . . . . . . . . . . restrict access to mod_status (server monitoring) -# |-- mod_info.conf . . . . . . . . . . . . restrict access to mod_info -# |-- mod_usertrack.conf . . . . . . . . . defaults for cookie-based user tracking -# |-- mod_autoindex-defaults.conf . . . . . defaults for displaying of server-generated directory listings -# |-- mod_mime-defaults.conf . . . . . . . defaults for mod_mime configuration -# |-- errors.conf . . . . . . . . . . . . . customize error responses -# |-- ssl-global.conf . . . . . . . . . . . SSL conf that applies to default server _and all_ virtual hosts -# | -# |-- default-server.conf . . . . . . . . . set up the default server that replies to non-virtual-host requests -# | -# `-- vhosts.d/ . . . . . . . . . . . . . . for each virtual host, place one file here -# `-- *.conf . . . . . . . . . . . . . (*.conf is automatically included) -# - -### Global Environment ###################################################### -# -# The directives in this section affect the overall operation of Apache, -# such as the number of concurrent requests. - -# run under this user/group id -Include /etc/httpd/conf/uid.conf - -# - how many server processes to start (server pool regulation) -# - usage of KeepAlive -Include /etc/httpd/conf/server-tuning.conf - -# ErrorLog: The location of the error log file. -# If you do not specify an ErrorLog directive within a -# container, error messages relating to that virtual host will be -# logged here. If you *do* define an error logfile for a -# container, that host's errors will be logged there and not here. -ErrorLog /var/log/httpd/error_log - -# Load Modules here -Include /etc/httpd/conf/loadmodule.conf - -# IP addresses / ports to listen on -Include /etc/httpd/conf/listen.conf - -# predefined logging formats -Include /etc/httpd/conf/mod_log_config.conf - -# global settings -Include /etc/httpd/conf/global.conf - -# optional mod_status, mod_info -#Include /etc/httpd/conf/mod_status.conf -#Include /etc/httpd/conf/mod_info.conf - -# associate MIME types with filename extensions -TypesConfig /etc/mime.types -DefaultType text/plain - -# global (server-wide) SSL configuration, that is not specific to -# any virtual host -Include /etc/httpd/conf/ssl-global.conf - - - Options None - AllowOverride None - - -# use .htaccess files for overriding, -AccessFileName .htaccess -# and never show them - - Order allow,deny - Deny from all - - -# List of resources to look for when the client requests a directory -DirectoryIndex index.html index.htm index.shtml index.cgi - -### 'Main' server configuration ############################################# -# -# The directives in this section set up the values used by the 'main' -# server, which responds to any requests that aren't handled by a -# definition. These values also provide defaults for -# any containers you may define later in the file. -# -# All of these directives may appear inside containers, -# in which case these default settings will be overridden for the -# virtual host being defined. -# -Include /etc/httpd/conf/default-server.conf - - -### Virtual server configuration ############################################ -# -# VirtualHost: If you want to maintain multiple domains/hostnames on your -# machine you can setup VirtualHost containers for them. Most configurations -# use only name-based virtual hosts so the server doesn't need to worry about -# IP addresses. This is indicated by the asterisks in the directives below. -# -# Please see the documentation at -# -# for further details before you try to setup virtual hosts. -# -# You may use the command line option '-S' to verify your virtual host -# configuration. -# -Include /etc/httpd/conf/vhosts.d/*.conf - - diff --git a/config/httpd/listen.conf b/config/httpd/listen.conf deleted file mode 100644 index cefce5396..000000000 --- a/config/httpd/listen.conf +++ /dev/null @@ -1,2 +0,0 @@ -Listen 81 -Listen 444 diff --git a/config/httpd/loadmodule.conf b/config/httpd/loadmodule.conf deleted file mode 100644 index e30f79b28..000000000 --- a/config/httpd/loadmodule.conf +++ /dev/null @@ -1,51 +0,0 @@ -LoadModule authn_file_module /usr/lib/apache/mod_authn_file.so -#LoadModule authn_dbm_module /usr/lib/apache/mod_authn_dbm.so -#LoadModule authn_anon_module /usr/lib/apache/mod_authn_anon.so -#LoadModule authn_dbd_module /usr/lib/apache/mod_authn_dbd.so -#LoadModule authn_default_module /usr/lib/apache/mod_authn_default.so -LoadModule authz_host_module /usr/lib/apache/mod_authz_host.so -#LoadModule authz_groupfile_module /usr/lib/apache/mod_authz_groupfile.so -LoadModule authz_user_module /usr/lib/apache/mod_authz_user.so -#LoadModule authz_dbm_module /usr/lib/apache/mod_authz_dbm.so -#LoadModule authz_owner_module /usr/lib/apache/mod_authz_owner.so -#LoadModule authz_default_module /usr/lib/apache/mod_authz_default.so -LoadModule auth_basic_module /usr/lib/apache/mod_auth_basic.so -LoadModule auth_digest_module /usr/lib/apache/mod_auth_digest.so -#LoadModule dbd_module /usr/lib/apache/mod_dbd.so -#LoadModule dumpio_module /usr/lib/apache/mod_dumpio.so -#LoadModule ext_filter_module /usr/lib/apache/mod_ext_filter.so -#LoadModule include_module /usr/lib/apache/mod_include.so -#LoadModule filter_module /usr/lib/apache/mod_filter.so -#LoadModule deflate_module /usr/lib/apache/mod_deflate.so -LoadModule log_config_module /usr/lib/apache/mod_log_config.so -#LoadModule log_forensic_module /usr/lib/apache/mod_log_forensic.so -#LoadModule logio_module /usr/lib/apache/mod_logio.so -LoadModule env_module /usr/lib/apache/mod_env.so -#LoadModule mime_magic_module /usr/lib/apache/mod_mime_magic.so -#LoadModule cern_meta_module /usr/lib/apache/mod_cern_meta.so -#LoadModule expires_module /usr/lib/apache/mod_expires.so -LoadModule headers_module /usr/lib/apache/mod_headers.so -#LoadModule ident_module /usr/lib/apache/mod_ident.so -#LoadModule usertrack_module /usr/lib/apache/mod_usertrack.so -#LoadModule unique_id_module /usr/lib/apache/mod_unique_id.so -LoadModule setenvif_module /usr/lib/apache/mod_setenvif.so -#LoadModule version_module /usr/lib/apache/mod_version.so -LoadModule mime_module /usr/lib/apache/mod_mime.so -#LoadModule dav_module /usr/lib/apache/mod_dav.so -#LoadModule status_module /usr/lib/apache/mod_status.so -LoadModule autoindex_module /usr/lib/apache/mod_autoindex.so -#LoadModule asis_module /usr/lib/apache/mod_asis.so -#LoadModule info_module /usr/lib/apache/mod_info.so -LoadModule cgi_module /usr/lib/apache/mod_cgi.so -#LoadModule dav_fs_module /usr/lib/apache/mod_dav_fs.so -#LoadModule vhost_alias_module /usr/lib/apache/mod_vhost_alias.so -#LoadModule negotiation_module /usr/lib/apache/mod_negotiation.so -LoadModule dir_module /usr/lib/apache/mod_dir.so -#LoadModule imagemap_module /usr/lib/apache/mod_imagemap.so -#LoadModule actions_module /usr/lib/apache/mod_actions.so -#LoadModule speling_module /usr/lib/apache/mod_speling.so -#LoadModule userdir_module /usr/lib/apache/mod_userdir.so -LoadModule alias_module /usr/lib/apache/mod_alias.so -LoadModule rewrite_module /usr/lib/apache/mod_rewrite.so -LoadModule ssl_module /usr/lib/apache/mod_ssl.so -LoadModule php5_module /usr/lib/apache/libphp5.so diff --git a/config/httpd/mod_log_config.conf b/config/httpd/mod_log_config.conf deleted file mode 100644 index 89ad09a80..000000000 --- a/config/httpd/mod_log_config.conf +++ /dev/null @@ -1,31 +0,0 @@ -# -# The following directives define some format nicknames for use with -# a CustomLog directive. -# - -# -# Format string: Nickname: -# -LogFormat "%h %l %u %t \"%r\" %>s %b" common -LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common -LogFormat "%{Referer}i -> %U" referer -LogFormat "%{User-agent}i" agent -LogFormat "%h %l %u %t \"%r\" %>s %b \ -\"%{Referer}i\" \"%{User-Agent}i\"" combined -LogFormat "%v %h %l %u %t \"%r\" %>s %b \ -\"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined - -# To use %I and %O, you need to enable mod_logio - -LogFormat "%h %l %u %t \"%r\" %>s %b \ -\"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio - - -# Use one of these when you want a compact non-error SSL logfile on a virtual -# host basis: - -Logformat "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \ -\"%r\" %b" ssl_common -Logformat "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \ -\"%r\" %b \"%{Referer}i\" \"%{User-Agent}i\"" ssl_combined - diff --git a/config/httpd/server-tuning.conf b/config/httpd/server-tuning.conf deleted file mode 100644 index 9cb766232..000000000 --- a/config/httpd/server-tuning.conf +++ /dev/null @@ -1,34 +0,0 @@ -# -# KeepAlive: Whether or not to allow persistent connections (more than -# one request per connection). Set to "Off" to deactivate. -# -KeepAlive On - -# -# MaxKeepAliveRequests: The maximum number of requests to allow -# during a persistent connection. Set to 0 to allow an unlimited amount. -# We recommend you leave this number high, for maximum performance. -# -MaxKeepAliveRequests 100 - -# -# KeepAliveTimeout: Number of seconds to wait for the next request from the -# same client on the same connection. -# -KeepAliveTimeout 15 - -MinSpareServers 1 -MaxSpareServers 2 -StartServers 2 -MaxClients 10 -MaxRequestsPerChild 100 - -# -# The following directives modify normal HTTP response behavior to -# handle known problems with browser implementations. -# -BrowserMatch "Mozilla/2" nokeepalive -BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 -BrowserMatch "RealPlayer 4\.0" force-response-1.0 -BrowserMatch "Java/1\.0" force-response-1.0 -BrowserMatch "JDK/1\.0" force-response-1.0 diff --git a/config/httpd/ssl-global.conf b/config/httpd/ssl-global.conf deleted file mode 100644 index 458339add..000000000 --- a/config/httpd/ssl-global.conf +++ /dev/null @@ -1,69 +0,0 @@ -## -## SSL Global Context -## -## All SSL configuration in this context applies both to -## the main server and all SSL-enabled virtual hosts. -## - -# These are the configuration directives to instruct the server how to -# serve pages over an https connection. For detailing information about these -# directives see -# -# Do NOT simply read the instructions in here without understanding -# what they do. They're here only as hints or reminders. If you are unsure -# consult the online docs. You have been warned. - -# This global SSL configuration is ignored if -# "SSL" is not defined, or if "NOSSL" is defined. - - - - - # - # Some MIME-types for downloading Certificates and CRLs - # - AddType application/x-x509-ca-cert .crt - AddType application/x-pkcs7-crl .crl - - # Pass Phrase Dialog: - # Configure the pass phrase gathering process. - # The filtering dialog program (`builtin' is a internal - # terminal dialog) has to provide the pass phrase on stdout. - SSLPassPhraseDialog builtin - - # Inter-Process Session Cache: - # Configure the SSL Session Cache: First the mechanism - # to use and second the expiring timeout (in seconds). - # shm means the same as shmht. - # Note that on most platforms shared memory segments are not allowed to be on - # network-mounted drives, so in that case you need to use the dbm method. - #SSLSessionCache none - #SSLSessionCache dbm:/var/log/httpd/ssl_scache - #SSLSessionCache shmht:/var/log/httpd/ssl_scache(512000) - SSLSessionCache shmcb:/var/log/httpd/ssl_scache(512000) - SSLSessionCacheTimeout 900 - - # Semaphore: - # Configure the path to the mutual exclusion semaphore the - # SSL engine uses internally for inter-process synchronization. - SSLMutex file:/var/log/httpd/ssl_mutex - - # Pseudo Random Number Generator (PRNG): - # Configure one or more sources to seed the PRNG of the - # SSL library. The seed data should be of good random quality. - # WARNING! On some platforms /dev/random blocks if not enough entropy - # is available. This means you then cannot use the /dev/random device - # because it would lead to very long connection times (as long as - # it requires to make more entropy available). But usually those - # platforms additionally provide a /dev/urandom device which doesn't - # block. So, if available, use this one instead. Read the mod_ssl User - # Manual for more details. - SSLRandomSeed startup builtin - SSLRandomSeed connect builtin - - SSLLog /var/log/httpd/ssl_engine_log - SSLLogLevel info - - - - diff --git a/config/httpd/uid.conf b/config/httpd/uid.conf deleted file mode 100644 index cb6963733..000000000 --- a/config/httpd/uid.conf +++ /dev/null @@ -1,2 +0,0 @@ -User nobody -Group nobody diff --git a/config/httpd/vhosts.d/ipfire-interface-ssl.conf b/config/httpd/vhosts.d/ipfire-interface-ssl.conf deleted file mode 100644 index 5a39e3e76..000000000 --- a/config/httpd/vhosts.d/ipfire-interface-ssl.conf +++ /dev/null @@ -1,71 +0,0 @@ - - - RewriteEngine on - RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS) - RewriteRule .* - [F] - DocumentRoot /srv/web/ipfire/html - ServerAdmin root@localhost - ErrorLog /var/log/httpd/error_log - TransferLog /var/log/httpd/access_log - SSLEngine on - SSLProtocol all -SSLv2 - SSLCipherSuite ALL:!ADH:!EXPORT56:!eNULL:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW:+EXP - SSLCertificateFile /etc/httpd/server.crt - SSLCertificateKeyFile /etc/httpd/server.key - - Options ExecCGI - AllowOverride None - Order allow,deny - Allow from all - - - AuthName "IPFire - Restricted" - AuthType Basic - AuthUserFile /var/ipfire/auth/users - Require user admin - - ScriptAlias /cgi-bin/ /srv/web/ipfire/cgi-bin/ - - AllowOverride None - Options None - AuthName "IPFire - Restricted" - AuthType Basic - AuthUserFile /var/ipfire/auth/users - Require user admin - - Satisfy Any - Allow from All - - - Satisfy Any - Allow from All - - - Satisfy Any - Allow from All - - - Require user admin - - - - AllowOverride None - Options None - AuthName "IPFire - Restricted" - AuthType Basic - AuthUserFile /var/ipfire/auth/users - Require user dial admin - - - SSLOptions +StdEnvVars - - - SSLOptions +StdEnvVars - - SetEnv HOME /home/nobody - SetEnvIf User-Agent ".*MSIE.*" \ - nokeepalive ssl-unclean-shutdown \ - downgrade-1.0 force-response-1.0 - CustomLog /var/log/httpd/ssl_request_log \ - "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" - diff --git a/config/httpd/vhosts.d/ipfire-interface.conf b/config/httpd/vhosts.d/ipfire-interface.conf deleted file mode 100644 index 604802f99..000000000 --- a/config/httpd/vhosts.d/ipfire-interface.conf +++ /dev/null @@ -1,54 +0,0 @@ - - - DocumentRoot /srv/web/ipfire/html - - RewriteEngine on - RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS) - RewriteRule .* - [F] - - - Options ExecCGI - AllowOverride None - Order allow,deny - Allow from all - - - AuthName "IPFire - Restricted" - AuthType Basic - AuthUserFile /var/ipfire/auth/users - Require user admin - - ScriptAlias /cgi-bin/ /srv/web/ipfire/cgi-bin/ - - AllowOverride None - Options None - AuthName "IPFire - Restricted" - AuthType Basic - AuthUserFile /var/ipfire/auth/users - Require user admin - - Satisfy Any - Allow from All - - - Satisfy Any - Allow from All - - - Satisfy Any - Allow from All - - - Require user admin - - - - AllowOverride None - Options None - AuthName "IPFire - Restricted" - AuthType Basic - AuthUserFile /var/ipfire/auth/users - Require user dial admin - - - \ No newline at end of file diff --git a/config/httpd/vhosts.d/openmailadmin.conf b/config/httpd/vhosts.d/openmailadmin.conf deleted file mode 100644 index 6e7aaef40..000000000 --- a/config/httpd/vhosts.d/openmailadmin.conf +++ /dev/null @@ -1,16 +0,0 @@ -Listen 1001 - - - - DocumentRoot /srv/web/openmailadmin - - Include /etc/httpd/conf/conf.d/php*.conf - - - Options +FollowSymlinks - AllowOverride None - Order allow,deny - Allow from all - - - diff --git a/config/httpd/vhosts.d/phpaj.conf b/config/httpd/vhosts.d/phpaj.conf deleted file mode 100644 index a6b764ea1..000000000 --- a/config/httpd/vhosts.d/phpaj.conf +++ /dev/null @@ -1,16 +0,0 @@ -Listen 1002 - - - - DocumentRoot /srv/web/phpaj - - Include /etc/httpd/conf/conf.d/php*.conf - - - Options None - AllowOverride None - Order allow,deny - Allow from all - - - diff --git a/config/openmailadmin/config.local.inc.php b/config/openmailadmin/config.local.inc.php deleted file mode 100644 index 0b8a6040e..000000000 --- a/config/openmailadmin/config.local.inc.php +++ /dev/null @@ -1,21 +0,0 @@ - 'mysql://root:mysqlfire@localhost/mail', - 'PREFIX' => '', -); -$cfg['Servers']['IMAP'][] = array( - 'TYPE' => 'cyrus', - 'HOST' => 'localhost', - 'PORT' => 143, - 'ADMIN' => 'cyrus', - 'PASS' => 'ipfire', - 'VDOM' => '' -); -?> \ No newline at end of file diff --git a/config/openmailadmin/mail.dump b/config/openmailadmin/mail.dump deleted file mode 100644 index d42ec8cf2..000000000 --- a/config/openmailadmin/mail.dump +++ /dev/null @@ -1,167 +0,0 @@ --- MySQL dump 10.10 --- --- Host: localhost Database: mail --- ------------------------------------------------------ --- Server version 5.0.24a - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Database: `mail` --- - -CREATE DATABASE `mail`; -USE `mail`; - --- -------------------------------------------------------- - --- --- Table structure for table `domains` --- - -DROP TABLE IF EXISTS `domains`; -CREATE TABLE `domains` ( - `ID` int(10) unsigned NOT NULL auto_increment, - `domain` varchar(64) NOT NULL default '', - `categories` varchar(100) NOT NULL default 'all', - `owner` varchar(16) NOT NULL default '', - `a_admin` text, - `neu` tinyint(1) NOT NULL default '1', - PRIMARY KEY (`ID`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `domains` --- - - -/*!40000 ALTER TABLE `domains` DISABLE KEYS */; -LOCK TABLES `domains` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `domains` ENABLE KEYS */; - --- --- Table structure for table `imap_demo` --- - -DROP TABLE IF EXISTS `imap_demo`; -CREATE TABLE `imap_demo` ( - `mailbox` varchar(250) NOT NULL default '', - `used` int(10) unsigned NOT NULL default '0', - `qmax` int(10) unsigned NOT NULL default '0', - `ACL` text, - PRIMARY KEY (`mailbox`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `imap_demo` --- - - -/*!40000 ALTER TABLE `imap_demo` DISABLE KEYS */; -LOCK TABLES `imap_demo` WRITE; -INSERT INTO `imap_demo` VALUES ('shared',0,0,'anyone lrswipcda'); -UNLOCK TABLES; -/*!40000 ALTER TABLE `imap_demo` ENABLE KEYS */; - --- --- Table structure for table `user` --- - -DROP TABLE IF EXISTS `user`; -CREATE TABLE `user` ( - `mbox` varchar(16) NOT NULL default '', - `person` varchar(100) NOT NULL default '', - `pate` varchar(16) NOT NULL default '', - `canonical` varchar(100) NOT NULL default '', - `password` varchar(40) NOT NULL default '', - `domains` varchar(100) NOT NULL default '', - `active` tinyint(1) NOT NULL default '0', - `created` int(10) unsigned NOT NULL default '0', - `last_login` int(10) unsigned NOT NULL default '0', - `max_alias` int(10) unsigned NOT NULL default '1', - `max_regexp` int(10) unsigned NOT NULL default '1', - `a_admin_domains` tinyint(4) NOT NULL default '0', - `a_admin_user` tinyint(4) NOT NULL default '0', - `a_super` tinyint(4) default '0', - PRIMARY KEY (`mbox`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `user` --- - - -/*!40000 ALTER TABLE `user` DISABLE KEYS */; -LOCK TABLES `user` WRITE; -INSERT INTO `user` VALUES ('admin','Admin John Doe','admin','admin@example.com','mailfire','all',1,1190483338,1190558772,10000,100,2,2,2),('cyrus','cyrus','cyrus','--@example.com','ipfire','none',1,1190483338,0,0,0,0,0,1); -UNLOCK TABLES; -/*!40000 ALTER TABLE `user` ENABLE KEYS */; - --- --- Table structure for table `virtual` --- - -DROP TABLE IF EXISTS `virtual`; -CREATE TABLE `virtual` ( - `address` varchar(255) NOT NULL default '', - `dest` text, - `owner` varchar(16) NOT NULL default '', - `active` tinyint(1) NOT NULL default '1', - `neu` tinyint(1) NOT NULL default '1', - PRIMARY KEY (`address`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `virtual` --- - - -/*!40000 ALTER TABLE `virtual` DISABLE KEYS */; -LOCK TABLES `virtual` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `virtual` ENABLE KEYS */; - --- --- Table structure for table `virtual_regexp` --- - -DROP TABLE IF EXISTS `virtual_regexp`; -CREATE TABLE `virtual_regexp` ( - `ID` int(10) unsigned NOT NULL auto_increment, - `reg_exp` varchar(255) NOT NULL default '', - `dest` text, - `owner` varchar(16) NOT NULL default '', - `active` tinyint(1) NOT NULL default '0', - `neu` tinyint(1) NOT NULL default '1', - PRIMARY KEY (`ID`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - --- --- Dumping data for table `virtual_regexp` --- - - -/*!40000 ALTER TABLE `virtual_regexp` DISABLE KEYS */; -LOCK TABLES `virtual_regexp` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `virtual_regexp` ENABLE KEYS */; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - diff --git a/config/syslinux/boot.msg b/config/syslinux/boot.msg deleted file mode 100644 index f20088163..000000000 --- a/config/syslinux/boot.msg +++ /dev/null @@ -1,10 +0,0 @@ - -splash.lss - - - - - To install IPFire on your system, press the 0407 key. - - - Use the function keys listed below for more information. - -0f[F1-Main] [F2-Options]07 diff --git a/config/syslinux/options.msg b/config/syslinux/options.msg deleted file mode 100644 index d1a977d4f..000000000 --- a/config/syslinux/options.msg +++ /dev/null @@ -1,30 +0,0 @@ -00 - - - 0fInstaller Boot Options07 - - - To disable vga mode, type: 04novga 07. - - - To enable dma support, type: 04dma 07. - - - To test the memory in your system type: 04memtest 07. - - - - - - - - - - - - - - - - - - - -0f[F1-Main] [F2-Options]07 diff --git a/config/syslinux/splash.lss b/config/syslinux/splash.lss deleted file mode 100644 index 0ab1f9bac..000000000 Binary files a/config/syslinux/splash.lss and /dev/null differ diff --git a/config/syslinux/syslinux.cfg b/config/syslinux/syslinux.cfg deleted file mode 100644 index 0aa1ec06d..000000000 --- a/config/syslinux/syslinux.cfg +++ /dev/null @@ -1,16 +0,0 @@ -TIMEOUT 5000 -DISPLAY boot.msg -PROMPT 1 -F1 boot.msg -F2 options.msg -DEFAULT vmlinuz - APPEND ide=nodma initrd=instroot root=/dev/ram0 ramdisk_size=16384 vga=791 splash=silent ro -LABEL novga - KERNEL vmlinuz - APPEND ide=nodma initrd=instroot root=/dev/ram0 ramdisk_size=16384 ro -LABEL dma - KERNEL vmlinuz - APPEND initrd=instroot root=/dev/ram0 ramdisk_size=16384 vga=791 splash=silent ro -LABEL memtest - KERNEL memtest - APPEND - diff --git a/config/syslinux/unattended.conf b/config/syslinux/unattended.conf deleted file mode 100644 index 5adf27900..000000000 --- a/config/syslinux/unattended.conf +++ /dev/null @@ -1,12 +0,0 @@ -DOMAINNAME=localdomain -HOSTNAME=ipfire -KEYMAP=/lib/kbd/keymaps/i386/qwertz/de-latin1-nodeadkeys.map.gz -LANGUAGE=de -TIMEZONE=/usr/share/zoneinfo/posix/Europe/Berlin -THEME=ipfire -GREEN_ADDRESS=192.168.180.30 -GREEN_NETMASK=255.255.255.0 -GREEN_NETADDRESS=192.168.180.0 -GREEN_BROADCAST=192.168.180.255 -ROOT_PASSWORD=ipfire -ADMIN_PASSWORD=ipfire diff --git a/lfs/cdrom b/lfs/cdrom index ad2bb4815..6eec4790f 100644 --- a/lfs/cdrom +++ b/lfs/cdrom @@ -49,7 +49,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) ### Compress root fs # cd / && find $(DIR_SOURCE)/rootfiles/core -maxdepth 1 -type f | xargs cat | \ - sed -e "s/KVER/$(KVER)/g" | grep -v '#' | sort | uniq | cpio -o -H newc | \ + grep -v ^# | sed -e "s/KVER/$(KVER)/g" | sort | uniq | cpio -o -H newc | \ lzma e -si -so > $(CDROM_DIR)/$(SNAME)-$(VERSION).img # Other files diff --git a/lfs/glib b/lfs/glib index 461c9b6d6..b16709ddc 100644 --- a/lfs/glib +++ b/lfs/glib @@ -24,17 +24,14 @@ include Config -VER = 2.9.6 +PKG_NAME = glib +VER = 2.12.12 -THISAPP = glib-$(VER) +THISAPP = $(PKG_NAME)-$(VER) DL_FILE = $(THISAPP).tar.bz2 -DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) -TARGET = $(DIR_INFO)/$(THISAPP) -PROG = glib -PAK_VER = 1 -DEPS = "" +TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) ############################################################################### # Top-level Rules @@ -42,34 +39,13 @@ DEPS = "" objects = $(DL_FILE) -$(DL_FILE) = $(DL_FROM)/$(DL_FILE) - -$(DL_FILE)_MD5 = 2ba1146e767454e14ac0788187c35892 - -install : $(TARGET) - -check : $(patsubst %,$(DIR_CHK)/%,$(objects)) +install: $(TARGET) download :$(patsubst %,$(DIR_DL)/%,$(objects)) -md5 : $(subst %,%_MD5,$(objects)) - -dist: - @$(PAK) - -############################################################################### -# Downloading, checking, md5sum -############################################################################### - -$(patsubst %,$(DIR_CHK)/%,$(objects)) : - @$(CHECK) - $(patsubst %,$(DIR_DL)/%,$(objects)) : @$(LOAD) -$(subst %,%_MD5,$(objects)) : - @$(MD5) - ############################################################################### # Installation Details ############################################################################### @@ -77,8 +53,9 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) - cd $(DIR_APP) && ./configure --prefix=/usr --disable-nls - cd $(DIR_APP) && make $(MAKETUNING) + cd $(DIR_APP) && ./configure --prefix=/usr + cd $(DIR_APP) && make -j $(PARALLELISM) cd $(DIR_APP) && make install + cp -vf $(DIR_CONFIG)/$(PKG_NAME)/glib2-locale.sh /etc/profile.d/ @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/lfs/man-db b/lfs/man-db index d3865581b..ee4c89d64 100644 --- a/lfs/man-db +++ b/lfs/man-db @@ -65,7 +65,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && echo -e "#define GRAP \"/usr/bin/grap\"" >> include/manconfig.h.in cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-fixes-1.patch cd $(DIR_APP) && ./configure --prefix=/usr --enable-mb-groff --disable-setuid - cd $(DIR_APP) && make -j $(PARALLELISM) + cd $(DIR_APP) && make #-j $(PARALLELISM) cd $(DIR_APP) && make install @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/lfs/mc b/lfs/mc index d3dfa3ac6..12c283e72 100644 --- a/lfs/mc +++ b/lfs/mc @@ -24,17 +24,14 @@ include Config +PKG_NAME = mc VER = 4.6.1 -THISAPP = mc-$(VER) +THISAPP = $(PKG_NAME)-$(VER) DL_FILE = $(THISAPP).tar.gz -DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) -TARGET = $(DIR_INFO)/$(THISAPP) -PROG = mc -PAK_VER = 1 -DEPS = "glib" +TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) ############################################################################### # Top-level Rules @@ -42,34 +39,13 @@ DEPS = "glib" objects = $(DL_FILE) -$(DL_FILE) = $(DL_FROM)/$(DL_FILE) - -$(DL_FILE)_MD5 = 18b20db6e40480a53bac2870c56fc3c4 - -install : $(TARGET) - -check : $(patsubst %,$(DIR_CHK)/%,$(objects)) +install: $(TARGET) download :$(patsubst %,$(DIR_DL)/%,$(objects)) -md5 : $(subst %,%_MD5,$(objects)) - -dist: - @$(PAK) - -############################################################################### -# Downloading, checking, md5sum -############################################################################### - -$(patsubst %,$(DIR_CHK)/%,$(objects)) : - @$(CHECK) - $(patsubst %,$(DIR_DL)/%,$(objects)) : @$(LOAD) -$(subst %,%_MD5,$(objects)) : - @$(MD5) - ############################################################################### # Installation Details ############################################################################### @@ -77,10 +53,12 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) - cd $(DIR_APP) && ./configure --prefix=/usr \ - --without-x --disable-nls \ - --with-samba - cd $(DIR_APP) && make $(MAKETUNING) + cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-bash32-1.patch + cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/$(THISAPP)-debian_fixes-1.patch + cd $(DIR_APP) && CPPFLAGS="$(CPPFLAGS) -DUTF8" ./configure --prefix=/usr \ + --enable-charset + cd $(DIR_APP) && make -j $(PARALLELISM) cd $(DIR_APP) && make install + chmod 1755 /usr/lib/mc/cons.saver @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/lfs/stage2 b/lfs/stage2 index 6fe835565..cd064bf7e 100644 --- a/lfs/stage2 +++ b/lfs/stage2 @@ -103,7 +103,7 @@ $(TARGET) : echo "\n running on \s \r \m" >> /etc/issue touch /var/run/utmp /var/log/{btmp,lastlog,wtmp} - chgrp -v utmp /var/run/utmp /var/log/lastlog + #chgrp -v utmp /var/run/utmp /var/log/lastlog chmod -v 664 /var/run/utmp /var/log/lastlog # Bash startup files diff --git a/make.sh b/make.sh index 91b06c166..e05dffff0 100755 --- a/make.sh +++ b/make.sh @@ -285,7 +285,6 @@ ipfire_build() { #ipfire_make logrotate #ipfire_make logwatch #ipfire_make nasm - #ipfire_make glib #ipfire_make wireless #ipfire_make libsafe @@ -305,6 +304,9 @@ misc_build() { #ipfire_make stage4 + ipfire_make glib + ipfire_make mc + ipfire_make cpio ipfire_make cdrtools ipfire_make parted @@ -329,7 +331,6 @@ misc_build() { #ipfire_make foomatic #ipfire_make hplip #ipfire_make samba - #ipfire_make mc #ipfire_make wget #ipfire_make postfix #ipfire_make fetchmail @@ -714,86 +715,22 @@ othersrc) ;; svn) + . $BASEDIR/tools/make-subversion case "$2" in - update|up) - # clear - echo -ne "Loading the latest source files...\n" - if [ $3 ]; then - svn update -r $3 | tee -a $PWD/log/_build.svn.update.log - else - svn update | tee -a $PWD/log/_build.svn.update.log - fi - if [ $? -eq "0" ]; then - beautify message DONE - else - beautify message FAIL - exit 1 - fi - echo -ne "Writing the svn-info to a file" - svn info > $PWD/svn_status - if [ $? -eq "0" ]; then - beautify message DONE - else - beautify message FAIL - exit 1 - fi - chmod 755 $0 - exit 0 - ;; - commit|ci) - clear - if [ -f /usr/bin/mcedit ]; then - export EDITOR=/usr/bin/mcedit - fi - if [ -f /usr/bin/nano ]; then - export EDITOR=/usr/bin/nano - fi - echo -ne "Selecting editor $EDITOR..." - beautify message DONE - if [ -e /sbin/yast ]; then - if [ "`echo $SVN_REVISION | cut -c 3`" -eq "0" ]; then - $0 changelog - fi - fi - update_langs - svn commit - $0 svn up - if [ -n "$FTP_CACHE_URL" ]; then - $0 uploadsrc - fi - ;; - dist) - if [ $3 ]; then - SVN_REVISION=$3 - fi - if [ -f ipfire-source-r$SVN_REVISION.tar.gz ]; then - echo -ne "REV $SVN_REVISION: SKIPPED!\n" - exit 0 - fi - echo -en "REV $SVN_REVISION: Downloading..." - svn export http://svn.ipfire.org/svn/ipfire/trunk ipfire-source/ --force > /dev/null - svn log http://svn.ipfire.org/svn/ipfire/trunk -r 1:$SVN_REVISION > ipfire-source/Changelog - #svn info http://svn.ipfire.org/svn/ipfire/trunk -r $SVN_REVISION > ipfire-source/svn_status - evaluate 1 - - echo -en "REV $SVN_REVISION: Compressing files..." - if [ -e ipfire-source/trunk/make.sh ]; then - chmod 755 ipfire-source/trunk/make.sh - fi - tar cfz ipfire-source-r$SVN_REVISION.tar.gz ipfire-source - evaluate 1 - echo -en "REV $SVN_REVISION: Cleaning up..." - rm ipfire-source/ -r - evaluate 1 - ;; - diff|di) - update_langs - echo -ne "Make a local diff to last svn revision" - svn diff > ipfire-diff-`date +'%Y-%m-%d-%H:%M'`-r`svn info | grep Revision | cut -c 11-`.diff - evaluate 1 - echo "Diff was successfully saved to ipfire-diff-`date +'%Y-%m-%d-%H:%M'`-r`svn info | grep Revision | cut -c 11-`.diff" - svn status - ;; + update|up) + svn_up + ;; + commit|ci) + clear + svn_commit + svn_up + ;; + dist) + svn_dist + ;; + diff|di) + svn_diff + ;; esac ;; diff --git a/src/patches/cdrtools-2.01-ascii-2.patch b/src/patches/cdrtools-2.01-ascii-2.patch deleted file mode 100644 index 6b6f22fd9..000000000 --- a/src/patches/cdrtools-2.01-ascii-2.patch +++ /dev/null @@ -1,139 +0,0 @@ -Submitted By: Alexander E. Patrakov -Date: 2006-06-05 -Initial Package Version: 2.01 -Upstream Status: Knows about a similar RedHat patch, ignores the issue -Origin: Alexander E. Patrakov; RedHat does something very similar - Modified by Andy Benton to fix an issue with it not applying properly -Description: Replaces hard-coded ISO-8859-1 with ASCII approximations -To regenerate: - -for F in cdrecord/cdrecord.c cdrecord/diskid.c cdrecord/sector.c \ - readcd/readcd.c scgcheck/scgcheck.c scgskeleton/skel.c ; do - LC_ALL=de_DE iconv -f ISO-8859-1 -t US-ASCII//TRANSLIT $F >tmp - mv tmp $F -done - -and remove hunks that modify comments. - -RedHat converts to UTF-8 instead, but this is unacceptable for LFS because -not everyone uses UTF-8 based locales. - -$Id: cdrtools-2.01-ascii-2.patch 1553 2006-06-05 12:05:57Z randy $ - - -diff -urN cdrtools-2.01.orig/cdrecord/cdrecord.c cdrtools-2.01/cdrecord/cdrecord.c ---- cdrtools-2.01.orig/cdrecord/cdrecord.c 2004-09-08 23:26:35.000000000 +0600 -+++ cdrtools-2.01/cdrecord/cdrecord.c 2006-02-13 10:17:29.000000000 +0500 -@@ -297,7 +297,7 @@ - * - * Warning: you are not allowed to modify or to remove the - * Copyright and version printing code below! -- * See also GPL § 2 subclause c) -+ * See also GPL paragraph 2 subclause c) - * - * If you modify cdrecord you need to include additional version - * printing code that: -@@ -349,7 +349,7 @@ - # define CLONE_TITLE "" - #endif - if ((flags & F_MSINFO) == 0 || lverbose || flags & F_VERSION) { -- printf("Cdrecord%s%s %s (%s-%s-%s) Copyright (C) 1995-2004 Jörg Schilling\n", -+ printf("Cdrecord%s%s %s (%s-%s-%s) Copyright (C) 1995-2004 Joerg Schilling\n", - PRODVD_TITLE, - CLONE_TITLE, - cdr_version, -@@ -1651,7 +1651,7 @@ - error("\t-xamix Subsequent tracks are CD-ROM XA mode 2 form 1/2 - 2332 bytes\n"); - error("\t-cdi Subsequent tracks are CDI tracks\n"); - error("\t-isosize Use iso9660 file system size for next data track\n"); -- error("\t-preemp Audio tracks are mastered with 50/15 µs preemphasis\n"); -+ error("\t-preemp Audio tracks are mastered with 50/15 us preemphasis\n"); - error("\t-nopreemp Audio tracks are mastered with no preemphasis (default)\n"); - error("\t-copy Audio tracks have unlimited copy permission\n"); - error("\t-nocopy Audio tracks may only be copied once for personal use (default)\n"); -diff -urN cdrtools-2.01.orig/cdrecord/diskid.c cdrtools-2.01/cdrecord/diskid.c ---- cdrtools-2.01.orig/cdrecord/diskid.c 2004-03-02 06:14:38.000000000 +0500 -+++ cdrtools-2.01/cdrecord/diskid.c 2006-02-13 10:17:35.000000000 +0500 -@@ -112,8 +112,8 @@ - LOCAL char m_grandadv[] = "Grand Advance Technology Ltd."; - LOCAL char m_digitalstor[] = "DIGITAL STORAGE TECHNOLOGY CO.,LTD"; - LOCAL char m_matsushita[] = "Matsushita Electric Industrial Co.,Ltd."; --LOCAL char m_albrechts[] = "CDA Datenträger Albrechts GmbH."; --LOCAL char m_xalbrechts[] = "??? CDA Datenträger Albrechts GmbH."; -+LOCAL char m_albrechts[] = "CDA Datentraeger Albrechts GmbH."; -+LOCAL char m_xalbrechts[] = "??? CDA Datentraeger Albrechts GmbH."; - - LOCAL char m_prodisc[] = "Prodisc Technology Inc."; - LOCAL char m_postech[] = "POSTECH Corporation"; -@@ -150,7 +150,7 @@ - {{97, 27, 00}, 81, "ILLEGAL OLD CODE: Old Ritek Co.???" }, - {{97, 27, 25}, 0, m_ill }, - {{97, 30, 00}, 0, m_ill }, -- {{97, 33, 00}, 82, "ILLEGAL OLD CODE: Old CDA Datenträger Albrechts GmbH." }, -+ {{97, 33, 00}, 82, "ILLEGAL OLD CODE: Old CDA Datentraeger Albrechts GmbH." }, - {{97, 35, 44}, 0, m_ill }, - {{97, 39, 00}, 0, m_ill }, - {{97, 45, 36}, 83, "ILLEGAL OLD CODE: Old Kodak Photo CD" }, - -diff -urN cdrtools-2.01.orig/cdrecord/sector.c cdrtools-2.01/cdrecord/sector.c ---- cdrtools-2.01.orig/cdrecord/sector.c 2004-03-01 14:19:13.000000000 +0500 -+++ cdrtools-2.01/cdrecord/sector.c 2006-02-13 10:17:36.000000000 +0500 -@@ -125,7 +125,7 @@ - break; - } - if (be_verbose) { -- printf("Encoding speed : %dx (%d sectors/s) for libedc from Heiko Eißfeldt\n", -+ printf("Encoding speed : %dx (%d sectors/s) for libedc from Heiko Eissfeldt\n", - (i+74)/75, i); - } - return ((i+74)/75); -diff -urN cdrtools-2.01.orig/readcd/readcd.c cdrtools-2.01/readcd/readcd.c ---- cdrtools-2.01.orig/readcd/readcd.c 2004-09-08 23:24:14.000000000 +0600 -+++ cdrtools-2.01/readcd/readcd.c 2006-02-13 10:17:37.000000000 +0500 -@@ -296,7 +296,7 @@ - if (help) - usage(0); - if (pversion) { -- printf("readcd %s (%s-%s-%s) Copyright (C) 1987, 1995-2003 Jörg Schilling\n", -+ printf("readcd %s (%s-%s-%s) Copyright (C) 1987, 1995-2003 Joerg Schilling\n", - cdr_version, - HOST_CPU, HOST_VENDOR, HOST_OS); - exit(0); -diff -urN cdrtools-2.01.orig/scgcheck/scgcheck.c cdrtools-2.01/scgcheck/scgcheck.c ---- cdrtools-2.01.orig/scgcheck/scgcheck.c 2004-09-08 23:49:48.000000000 +0600 -+++ cdrtools-2.01/scgcheck/scgcheck.c 2006-02-13 10:17:38.000000000 +0500 -@@ -129,7 +129,7 @@ - if (help) - usage(0); - if (pversion) { -- printf("scgckeck %s (%s-%s-%s) Copyright (C) 1998-2002 Jörg Schilling\n", -+ printf("scgckeck %s (%s-%s-%s) Copyright (C) 1998-2002 Joerg Schilling\n", - scgc_version, - HOST_CPU, HOST_VENDOR, HOST_OS); - exit(0); -@@ -153,11 +153,11 @@ - comerr("Cannot open logfile.\n"); - - printf("Scgcheck %s (%s-%s-%s) SCSI user level transport library ABI checker.\n\ --Copyright (C) 1998,2001 Jörg Schilling\n", -+Copyright (C) 1998,2001 Joerg Schilling\n", - scgc_version, - HOST_CPU, HOST_VENDOR, HOST_OS); - fprintf(logfile, "Scgcheck %s (%s-%s-%s) SCSI user level transport library ABI checker.\n\ --Copyright (C) 1998,2001 Jörg Schilling\n", -+Copyright (C) 1998,2001 Joerg Schilling\n", - scgc_version, - HOST_CPU, HOST_VENDOR, HOST_OS); - /* -diff -urN cdrtools-2.01.orig/scgskeleton/skel.c cdrtools-2.01/scgskeleton/skel.c ---- cdrtools-2.01.orig/scgskeleton/skel.c 2004-07-11 04:57:27.000000000 +0600 -+++ cdrtools-2.01/scgskeleton/skel.c 2006-02-13 10:17:39.000000000 +0500 -@@ -155,7 +155,7 @@ - if (help) - usage(0); - if (pversion) { -- printf("scgskeleton %s (%s-%s-%s) Copyright (C) 1987, 1995-2003 Jörg Schilling\n", -+ printf("scgskeleton %s (%s-%s-%s) Copyright (C) 1987, 1995-2003 Joerg Schilling\n", - skel_version, - HOST_CPU, HOST_VENDOR, HOST_OS); - exit(0); diff --git a/src/patches/cdrtools-2.01-mkisofs_iconv-1.patch b/src/patches/cdrtools-2.01-mkisofs_iconv-1.patch deleted file mode 100644 index 4f4753370..000000000 --- a/src/patches/cdrtools-2.01-mkisofs_iconv-1.patch +++ /dev/null @@ -1,629 +0,0 @@ -Submitted By: Alexander E. Patrakov -Date: 2005-09-30 -Initial Package Version: 2.01 -Origin: RedHat (but maybe they initially obtained the patch from elsewhere) -Upstream Status: Not applied -Description: Allows one to specify any glibc-supported source charset -for Joliet filenames, instead of the very limited choice offered by mkisofs -itself. Required for writing Windows-readable data CDs in UTF-8 locales when -filenames contain national characters. - -diff -urN --exclude-from=- cdrtools-2.01/include/unls.h cdrtools-2.01-jh/include/unls.h ---- cdrtools-2.01/include/unls.h 2003-06-16 00:41:23.000000000 +0300 -+++ cdrtools-2.01-jh/include/unls.h 2004-02-02 18:31:22.000000000 +0200 -@@ -30,6 +30,10 @@ - #include - #endif - -+#ifdef USE_ICONV -+#include -+#endif -+ - #ifdef __cplusplus - extern "C" { - #endif -@@ -43,6 +47,9 @@ - char *charset; - unsigned char **page_uni2charset; - struct nls_unicode *charset2uni; -+#ifdef USE_ICONV -+ iconv_t iconv_d; -+#endif - - void (*inc_use_count) __PR((void)); - void (*dec_use_count) __PR((void)); -@@ -58,6 +65,9 @@ - extern void unload_nls __PR((struct nls_table *)); - extern struct nls_table *load_nls_default __PR((void)); - extern int init_nls_file __PR((char * name)); -+#ifdef USE_ICONV -+extern int init_nls_iconv __PR((char * name)); -+#endif - - #ifdef __cplusplus - } -diff -urN --exclude-from=- cdrtools-2.01/libunls/libunls.mk cdrtools-2.01-jh/libunls/libunls.mk ---- cdrtools-2.01/libunls/libunls.mk 2000-03-25 14:51:56.000000000 +0200 -+++ cdrtools-2.01-jh/libunls/libunls.mk 2004-02-02 18:31:22.000000000 +0200 -@@ -8,6 +8,7 @@ - INSDIR= lib - TARGETLIB= unls - #CPPOPTS += -Istdio -+CPPOPTS += -DUSE_ICONV - include Targets - LIBS= - -diff -urN --exclude-from=- cdrtools-2.01/libunls/nls.h cdrtools-2.01-jh/libunls/nls.h ---- cdrtools-2.01/libunls/nls.h 2002-12-03 02:34:27.000000000 +0200 -+++ cdrtools-2.01-jh/libunls/nls.h 2004-02-02 18:31:22.000000000 +0200 -@@ -111,5 +111,8 @@ - extern int init_nls_cp10079 __PR((void)); - extern int init_nls_cp10081 __PR((void)); - extern int init_nls_file __PR((char * name)); -+#ifdef USE_ICONV -+extern int init_nls_iconv __PR((char * name)); -+#endif - - #endif /* _NLS_H */ -diff -urN --exclude-from=- cdrtools-2.01/libunls/nls_iconv.c cdrtools-2.01-jh/libunls/nls_iconv.c ---- cdrtools-2.01/libunls/nls_iconv.c 1970-01-01 02:00:00.000000000 +0200 -+++ cdrtools-2.01-jh/libunls/nls_iconv.c 2004-02-02 18:31:22.000000000 +0200 -@@ -0,0 +1,96 @@ -+/* @(#)nls_iconv.c 1.0 02/04/20 2002 J. Schilling */ -+#ifndef lint -+static char sccsid[] = -+ "@(#)nls_iconv.c 1.0 02/01/20 2002 J. Schilling"; -+#endif -+/* -+ * 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 2, or (at your option) -+ * any later version. -+ * -+ * This program 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; see the file COPYING. If not, write to -+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -+ */ -+/* -+ * Modifications to make the code portable Copyright (c) 2000 J. Schilling -+ * -+ * nls_iconv: create a pseudo-charset table to use iconv() provided by C -+ * library or libiconv by Bruno Haible -+ * The Unicode to charset table has only exact mappings. -+ * -+ * -+ * Jungshik Shin (jshin@mailaps.org) 04-Feb-2002 -+ */ -+ -+#ifdef USE_ICONV -+#include -+#include -+#include -+#include -+#include "nls.h" -+#include -+ -+static void inc_use_count __PR((void)); -+static void dec_use_count __PR((void)); -+ -+ -+static void -+inc_use_count() -+{ -+ MOD_INC_USE_COUNT; -+} -+ -+static void -+dec_use_count() -+{ -+ MOD_DEC_USE_COUNT; -+} -+ -+int -+init_nls_iconv(charset) -+ char *charset; -+{ -+ iconv_t iconv_d; /* iconv conversion descriptor */ -+ struct nls_table *table; -+ -+ /* give up if no charset is given */ -+ if (charset == NULL) -+ return -1; -+ -+ /* see if we already have a table with this name - built in tables -+ have precedence over iconv() - i.e. can't have the name of an -+ existing table. Also, we may have already registered this file -+ table */ -+ if (find_nls(charset) != NULL) -+ return -1; -+ -+ if ((iconv_d = iconv_open("UCS-2BE", charset)) == (iconv_t) -1) -+ return -1; -+ -+ -+ /* set up the table */ -+ if ((table = (struct nls_table *)malloc(sizeof (struct nls_table))) -+ == NULL) { -+ return -1; -+ } -+ -+ /* give the table the file name, so we can find it again if needed */ -+ table->charset = strdup(charset); -+ table->iconv_d = iconv_d; -+ table->page_uni2charset = NULL; -+ table->charset2uni = NULL; -+ table->inc_use_count = inc_use_count; -+ table->dec_use_count = dec_use_count; -+ table->next = NULL; -+ -+ /* register the table */ -+ return register_nls(table); -+} -+#endif -diff -urN --exclude-from=- cdrtools-2.01/libunls/Targets cdrtools-2.01-jh/libunls/Targets ---- cdrtools-2.01/libunls/Targets 2002-12-03 02:34:27.000000000 +0200 -+++ cdrtools-2.01-jh/libunls/Targets 2004-02-02 18:31:22.000000000 +0200 -@@ -39,4 +39,5 @@ - nls_cp10029.c \ - nls_cp10079.c \ - nls_cp10081.c \ -- nls_file.c -+ nls_file.c \ -+ nls_iconv.c -diff -urN --exclude-from=- cdrtools-2.01/mkisofs/joliet.c cdrtools-2.01-jh/mkisofs/joliet.c ---- cdrtools-2.01/mkisofs/joliet.c 2003-04-28 01:36:08.000000000 +0300 -+++ cdrtools-2.01-jh/mkisofs/joliet.c 2004-02-03 14:15:17.000000000 +0200 -@@ -90,6 +90,11 @@ - #include /* For UNICODE translation */ - #include - -+#ifdef USE_ICONV -+#include -+#include -+#endif -+ - static Uint jpath_table_index; - static struct directory **jpathlist; - static int next_jpath_index = 1; -@@ -103,13 +108,23 @@ - }; - - #ifdef UDF -- void convert_to_unicode __PR((unsigned char *buffer, -+# ifdef USE_ICONV -+ size_t -+# else -+ void -+# endif -+ convert_to_unicode __PR((unsigned char *buffer, - int size, char *source, struct nls_table *inls)); -- int joliet_strlen __PR((const char *string)); -+ int joliet_strlen __PR((const char *string, struct nls_table *inls)); - #else --static void convert_to_unicode __PR((unsigned char *buffer, -+# ifdef USE_ICONV -+ static size_t -+# else -+ static void -+#endif -+ convert_to_unicode __PR((unsigned char *buffer, - int size, char *source, struct nls_table *inls)); --static int joliet_strlen __PR((const char *string)); -+static int joliet_strlen __PR((const char *string, struct nls_table *inls)); - #endif - static void get_joliet_vol_desc __PR((struct iso_primary_descriptor *jvol_desc)); - static void assign_joliet_directory_addresses __PR((struct directory *node)); -@@ -161,6 +176,20 @@ - if (inls == onls) - return (c); - -+#ifdef USE_ICONV -+ if(inls->charset2uni == NULL || onls->page_uni2charset == NULL) { -+ /* -+ * This shouldn't be reached -+ */ -+ static BOOL iconv_warned = FALSE; -+ if(!iconv_warned) { -+ error("Warning: Iconv conversion not supported in conv_charset.\n"); -+ iconv_warned = TRUE; -+ } -+ return (c); -+ } -+#endif -+ - /* get high and low UNICODE bytes */ - uh = inls->charset2uni[c].uni2; - ul = inls->charset2uni[c].uni1; -@@ -186,10 +215,18 @@ - * - * Notes: - */ --#ifdef UDF --void -+#ifdef USE_ICONV -+# if UDF -+size_t -+# else -+static size_t -+# endif - #else -+# if UDF -+void -+# else - static void -+# endif - #endif - convert_to_unicode(buffer, size, source, inls) - unsigned char *buffer; -@@ -216,6 +253,51 @@ - tmpbuf = (Uchar *) source; - } - -+#ifdef USE_ICONV -+ if (inls->iconv_d && inls->charset2uni==NULL && -+ inls->page_uni2charset==NULL) { -+ char *inptr = tmpbuf; -+ char *outptr = buffer; -+ size_t inleft = strlen(tmpbuf); -+ size_t inlen = inleft; -+ size_t outleft = size; -+ -+ iconv(inls->iconv_d, NULL, NULL, NULL, NULL); -+ if(iconv(inls->iconv_d, &inptr, &inleft, &outptr, &outleft) == -+ (size_t)-1 && errno == EILSEQ) { -+ fprintf(stderr, "Incorrectly encoded string (%s) " -+ "encountered.\nPossibly creating an invalid " -+ "Joliet extension. Aborting.\n", source); -+ exit(1); -+ } -+ -+ for (i = 0; (i + 1) < size - outleft; i += 2) { /* Size may be odd!!!*/ -+ if (buffer[i]=='\0') { -+ switch (buffer[i+1]) { /* Invalid characters for Joliet */ -+ case '*': -+ case '/': -+ case ':': -+ case ';': -+ case '?': -+ case '\\': -+ buffer[i+1]='_'; -+ default: -+ if (buffer[i+1] == 0x7f || -+ buffer[i+1] < 0x20) -+ buffer[i+1]='_'; -+ } -+ } -+ } -+ if (size & 1) { /* beautification */ -+ buffer[size - 1] = 0; -+ } -+ if (source == NULL) { -+ free(tmpbuf); -+ } -+ return (inlen - inleft); -+ } -+#endif -+ - /* - * Now start copying characters. If the size was specified to be 0, - * then assume the input was 0 terminated. -@@ -271,6 +353,9 @@ - if (source == NULL) { - free(tmpbuf); - } -+#ifdef USE_ICONV -+ return j; -+#endif - } - - /* -@@ -287,12 +372,50 @@ - #else - static int - #endif --joliet_strlen(string) -+joliet_strlen(string, inls) - const char *string; -+ struct nls_table *inls; - { - int rtn; - -+#ifdef USE_ICONV -+ if (inls->iconv_d && inls->charset2uni==NULL && -+ inls->page_uni2charset==NULL) { -+ /* -+ * we const-cast since we're sure iconv won't change -+ * the string itself -+ */ -+ char *string_ptr = (char *)string; -+ size_t string_len = strlen(string); -+ -+ /* -+ * iconv has no way of finding out the required size -+ * in the target -+ */ -+ -+ char *tmp, *tmp_ptr; -+ /* we assume that the maximum length is 2 * jlen */ -+ size_t tmp_len = (size_t)jlen * 2 + 1; -+ tmp = e_malloc(tmp_len); -+ tmp_ptr = tmp; -+ -+ iconv(inls->iconv_d, NULL, NULL, NULL, NULL); -+ iconv(inls->iconv_d, &string_ptr, &string_len, &tmp_ptr, -+ &tmp_len); -+ -+ /* -+ * iconv advanced the tmp pointer with as many chars -+ * as it has written to it, so we add up the delta -+ */ -+ rtn = (tmp_ptr - tmp); -+ -+ free(tmp); -+ } else { -+ rtn = strlen(string) << 1; -+ } -+#else - rtn = strlen(string) << 1; -+#endif - - /* - * We do clamp the maximum length of a Joliet string to be the -@@ -480,16 +603,33 @@ - /* compare the Unicode names */ - - while (*rpnt && *lpnt) { -+#ifdef USE_ICONV -+ size_t ri, li; -+ -+ ri = convert_to_unicode(rtmp, 2, rpnt, rinls); -+ li = convert_to_unicode(ltmp, 2, lpnt, linls); -+ rpnt += ri; -+ lpnt += li; -+ if(!ri && !li) -+ return (0); -+ else if(ri && !li) -+ return (1); -+ else if(!ri && li) -+ return (-1); -+#else - convert_to_unicode(rtmp, 2, rpnt, rinls); - convert_to_unicode(ltmp, 2, lpnt, linls); -+#endif - - if (a_to_u_2_byte(rtmp) < a_to_u_2_byte(ltmp)) - return (-1); - if (a_to_u_2_byte(rtmp) > a_to_u_2_byte(ltmp)) - return (1); - -+#ifndef USE_ICONV - rpnt++; - lpnt++; -+#endif - } - - if (*rpnt) -@@ -574,10 +714,10 @@ - } - #ifdef APPLE_HYB - if (USE_MAC_NAME(de)) -- namelen = joliet_strlen(de->hfs_ent->name); -+ namelen = joliet_strlen(de->hfs_ent->name, hfs_inls); - else - #endif /* APPLE_HYB */ -- namelen = joliet_strlen(de->name); -+ namelen = joliet_strlen(de->name, in_nls); - - if (dpnt == root) { - jpath_table_l[jpath_table_index] = 1; -@@ -742,10 +882,10 @@ - #ifdef APPLE_HYB - /* Use the HFS name if it exists */ - if (USE_MAC_NAME(s_entry1)) -- cvt_len = joliet_strlen(s_entry1->hfs_ent->name); -+ cvt_len = joliet_strlen(s_entry1->hfs_ent->name, hfs_inls); - else - #endif /* APPLE_HYB */ -- cvt_len = joliet_strlen(s_entry1->name); -+ cvt_len = joliet_strlen(s_entry1->name, in_nls); - - /* - * Fix the record length -@@ -891,12 +1031,12 @@ - if (USE_MAC_NAME(s_entry)) - /* Use the HFS name if it exists */ - jpath_table_size += -- joliet_strlen(s_entry->hfs_ent->name) + -+ joliet_strlen(s_entry->hfs_ent->name, hfs_inls) + - offsetof(struct iso_path_table, name[0]); - else - #endif /* APPLE_HYB */ - jpath_table_size += -- joliet_strlen(s_entry->name) + -+ joliet_strlen(s_entry->name, in_nls) + - offsetof(struct iso_path_table, name[0]); - if (jpath_table_size & 1) { - jpath_table_size++; -@@ -918,13 +1058,13 @@ - /* Use the HFS name if it exists */ - s_entry->jreclen = - offsetof(struct iso_directory_record, name[0]) -- + joliet_strlen(s_entry->hfs_ent->name) -+ + joliet_strlen(s_entry->hfs_ent->name, hfs_inls) - + 1; - else - #endif /* APPLE_HYB */ - s_entry->jreclen = - offsetof(struct iso_directory_record, name[0]) -- + joliet_strlen(s_entry->name) -+ + joliet_strlen(s_entry->name, in_nls) - + 1; - } else { - /* -@@ -1072,6 +1212,9 @@ - #endif - - while (*rpnt && *lpnt) { -+#ifdef USE_ICONV -+ size_t ri, li; -+#endif - if (*rpnt == ';' && *lpnt != ';') - return (-1); - if (*rpnt != ';' && *lpnt == ';') -@@ -1092,16 +1235,32 @@ - return (1); - #endif - -+#ifdef USE_ICONV -+ -+ ri = convert_to_unicode(rtmp, 2, rpnt, rinls); -+ li = convert_to_unicode(ltmp, 2, lpnt, linls); -+ rpnt += ri; -+ lpnt += li; -+ if(!ri && !li) -+ return (0); -+ else if(ri && !li) -+ return (1); -+ else if(!ri && li) -+ return (-1); -+#else - convert_to_unicode(rtmp, 2, rpnt, rinls); - convert_to_unicode(ltmp, 2, lpnt, linls); -+#endif - - if (a_to_u_2_byte(rtmp) < a_to_u_2_byte(ltmp)) - return (-1); - if (a_to_u_2_byte(rtmp) > a_to_u_2_byte(ltmp)) - return (1); - -+#ifndef USE_ICONV - rpnt++; - lpnt++; -+#endif - } - if (*rpnt) - return (1); -diff -urN --exclude-from=- cdrtools-2.01/mkisofs/Makefile cdrtools-2.01-jh/mkisofs/Makefile ---- cdrtools-2.01/mkisofs/Makefile 2004-01-02 17:23:32.000000000 +0200 -+++ cdrtools-2.01-jh/mkisofs/Makefile 2004-02-02 18:31:22.000000000 +0200 -@@ -32,6 +32,7 @@ - CPPOPTS += -DUDF - CPPOPTS += -DDVD_VIDEO - CPPOPTS += -DSORTING -+CPPOPTS += -DUSE_ICONV - CPPOPTS += -I../libhfs_iso/ - CPPOPTS += -DHAVE_CONFIG_H -DUSE_LIBSCHILY -DUSE_SCG \ - '-DAPPID_DEFAULT="MKISOFS ISO 9660/HFS FILESYSTEM BUILDER & CDRECORD CD-R/DVD CREATOR (C) 1993 E.YOUNGDALE (C) 1997 J.PEARSON/J.SCHILLING"' \ -diff -urN --exclude-from=- cdrtools-2.01/mkisofs/mkisofs.c cdrtools-2.01-jh/mkisofs/mkisofs.c ---- cdrtools-2.01/mkisofs/mkisofs.c 2004-01-07 01:23:46.000000000 +0200 -+++ cdrtools-2.01-jh/mkisofs/mkisofs.c 2004-02-02 18:31:22.000000000 +0200 -@@ -59,6 +59,11 @@ - #endif - #endif /* no_more_needed */ - -+#ifdef USE_ICONV -+#include -+#include -+#endif -+ - struct directory *root = NULL; - int path_ind; - -@@ -223,6 +228,10 @@ - int do_sort = 0; /* sort file data */ - #endif /* SORTING */ - -+#ifdef USE_ICONV -+int iconv_possible; -+#endif -+ - struct nls_table *in_nls = NULL; /* input UNICODE conversion table */ - struct nls_table *out_nls = NULL; /* output UNICODE conversion table */ - #ifdef APPLE_HYB -@@ -2235,6 +2244,37 @@ - init_nls_file(hfs_ocharset); - #endif /* APPLE_HYB */ - -+#ifdef USE_ICONV -+ iconv_possible = !(iso9660_level >= 4 || ((ocharset && -+ strcmp(ocharset, icharset ? icharset : "")) && -+ use_RockRidge) || apple_ext || apple_hyb); -+ -+ setlocale(LC_CTYPE, ""); -+ -+ if (icharset == NULL && iconv_possible) { -+ char *charset = nl_langinfo(CODESET); -+ /* set to detected value but only if it is not pure US-ASCII */ -+ if(strcmp(charset, "ANSI_X3.4-1968") != 0) -+ icharset = charset; -+ -+ if(icharset && verbose > 0) -+ fprintf(stderr, "INFO:\t" -+ "%s character encoding detected by locale settings." -+ "\n\tAssuming %s encoded filenames on source " -+ "filesystem,\n" -+ "\tuse -input-charset to override.\n", -+ icharset, icharset); -+ } -+ -+ if(iconv_possible) { -+ /* -+ * don't care if initialization fails -+ */ -+ init_nls_iconv(icharset); -+ init_nls_iconv(ocharset); -+ } -+#endif -+ - if (icharset == NULL) { - #if (defined(__CYGWIN32__) || defined(__CYGWIN__)) && !defined(IS_CYGWIN_1) - in_nls = load_nls("cp437"); -@@ -2262,6 +2302,12 @@ - if (in_nls == NULL || out_nls == NULL) { /* Unknown charset specified */ - fprintf(stderr, "Unknown charset\nKnown charsets are:\n"); - list_nls(); /* List all known charset names */ -+#ifdef USE_ICONV -+ if(!iconv_possible) -+ fprintf(stderr, "Iconv charsets cannot be used with " -+ "Apple extension, HFS, ISO9660 version 2 or\n" -+ "Rock Ridge.\n"); -+#endif - exit(1); - } - -diff -urN --exclude-from=- cdrtools-2.01/mkisofs/mkisofs.h cdrtools-2.01-jh/mkisofs/mkisofs.h ---- cdrtools-2.01/mkisofs/mkisofs.h 2003-12-28 15:38:51.000000000 +0200 -+++ cdrtools-2.01-jh/mkisofs/mkisofs.h 2004-02-02 18:31:22.000000000 +0200 -@@ -501,9 +501,14 @@ - - /* joliet.c */ - #ifdef UDF -+# ifdef USE_ICONV -+extern size_t convert_to_unicode __PR((unsigned char *buffer, -+ int size, char *source, struct nls_table *inls)); -+# else - extern void convert_to_unicode __PR((unsigned char *buffer, - int size, char *source, struct nls_table *inls)); --extern int joliet_strlen __PR((const char *string)); -+# endif -+extern int joliet_strlen __PR((const char *string, struct nls_table *inls)); - #endif - extern unsigned char conv_charset __PR((unsigned char, struct nls_table *, - struct nls_table *)); -diff -urN --exclude-from=- cdrtools-2.01/mkisofs/udf.c cdrtools-2.01-jh/mkisofs/udf.c ---- cdrtools-2.01/mkisofs/udf.c 2003-04-28 01:34:52.000000000 +0300 -+++ cdrtools-2.01-jh/mkisofs/udf.c 2004-02-02 18:31:22.000000000 +0200 -@@ -442,7 +442,7 @@ - int i; - int expanded_length; - -- expanded_length = joliet_strlen(src); -+ expanded_length = joliet_strlen(src, in_nls); - if (expanded_length > 1024) - expanded_length = 1024; - if (expanded_length > (dst_size-1)*2) diff --git a/src/patches/iptables-1.3.0-imq1.diff b/src/patches/iptables-1.3.0-imq1.diff deleted file mode 100644 index c3bf8d015..000000000 --- a/src/patches/iptables-1.3.0-imq1.diff +++ /dev/null @@ -1,220 +0,0 @@ ---- userspace/extensions.orig/.IMQ-test6 Thu Jan 1 01:00:00 1970 -+++ userspace/extensions/.IMQ-test6 Mon Jun 16 10:12:47 2003 -@@ -0,0 +1,3 @@ -+#!/bin/sh -+# True if IMQ target patch is applied. -+[ -f $KERNEL_DIR/net/ipv6/netfilter/ip6t_IMQ.c ] && echo IMQ ---- userspace/extensions.orig/libip6t_IMQ.c Thu Jan 1 01:00:00 1970 -+++ userspace/extensions/libip6t_IMQ.c Mon Jun 16 10:12:47 2003 -@@ -0,0 +1,101 @@ -+/* Shared library add-on to iptables to add IMQ target support. */ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+/* Function which prints out usage message. */ -+static void -+help(void) -+{ -+ printf( -+"IMQ target v%s options:\n" -+" --todev enqueue to imq, defaults to 0\n", -+IPTABLES_VERSION); -+} -+ -+static struct option opts[] = { -+ { "todev", 1, 0, '1' }, -+ { 0 } -+}; -+ -+/* Initialize the target. */ -+static void -+init(struct ip6t_entry_target *t, unsigned int *nfcache) -+{ -+ struct ip6t_imq_info *mr = (struct ip6t_imq_info*)t->data; -+ -+ mr->todev = 0; -+ *nfcache |= NFC_UNKNOWN; -+} -+ -+/* Function which parses command options; returns true if it -+ ate an option */ -+static int -+parse(int c, char **argv, int invert, unsigned int *flags, -+ const struct ip6t_entry *entry, -+ struct ip6t_entry_target **target) -+{ -+ struct ip6t_imq_info *mr = (struct ip6t_imq_info*)(*target)->data; -+ -+ switch(c) { -+ case '1': -+ if (check_inverse(optarg, &invert, NULL, 0)) -+ exit_error(PARAMETER_PROBLEM, -+ "Unexpected `!' after --todev"); -+ mr->todev=atoi(optarg); -+ break; -+ default: -+ return 0; -+ } -+ return 1; -+} -+ -+static void -+final_check(unsigned int flags) -+{ -+} -+ -+/* Prints out the targinfo. */ -+static void -+print(const struct ip6t_ip6 *ip, -+ const struct ip6t_entry_target *target, -+ int numeric) -+{ -+ struct ip6t_imq_info *mr = (struct ip6t_imq_info*)target->data; -+ -+ printf("IMQ: todev %u ", mr->todev); -+} -+ -+/* Saves the union ipt_targinfo in parsable form to stdout. */ -+static void -+save(const struct ip6t_ip6 *ip, const struct ip6t_entry_target *target) -+{ -+ struct ip6t_imq_info *mr = (struct ip6t_imq_info*)target->data; -+ -+ printf("--todev %u", mr->todev); -+} -+ -+static struct ip6tables_target imq = { -+ .next = NULL, -+ .name = "IMQ", -+ .version = IPTABLES_VERSION, -+ .size = IP6T_ALIGN(sizeof(struct ip6t_imq_info)), -+ .userspacesize = IP6T_ALIGN(sizeof(struct ip6t_imq_info)), -+ .help = &help, -+ .init = &init, -+ .parse = &parse, -+ .final_check = &final_check, -+ .print = &print, -+ .save = &save, -+ .extra_opts = opts -+}; -+ -+void _init(void) -+{ -+ register_target6(&imq); -+} ---- userspace/extensions.orig/.IMQ-test Thu Jan 1 01:00:00 1970 -+++ userspace/extensions/.IMQ-test Mon Jun 16 10:12:47 2003 -@@ -0,0 +1,3 @@ -+#!/bin/sh -+# True if IMQ target patch is applied. -+[ -f $KERNEL_DIR/net/ipv4/netfilter/ipt_IMQ.c ] && echo IMQ ---- userspace/extensions.orig/libipt_IMQ.c Thu Jan 1 01:00:00 1970 -+++ userspace/extensions/libipt_IMQ.c Mon Jun 16 10:12:47 2003 -@@ -0,0 +1,101 @@ -+/* Shared library add-on to iptables to add IMQ target support. */ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+/* Function which prints out usage message. */ -+static void -+help(void) -+{ -+ printf( -+"IMQ target v%s options:\n" -+" --todev enqueue to imq, defaults to 0\n", -+IPTABLES_VERSION); -+} -+ -+static struct option opts[] = { -+ { "todev", 1, 0, '1' }, -+ { 0 } -+}; -+ -+/* Initialize the target. */ -+static void -+init(struct ipt_entry_target *t, unsigned int *nfcache) -+{ -+ struct ipt_imq_info *mr = (struct ipt_imq_info*)t->data; -+ -+ mr->todev = 0; -+ *nfcache |= NFC_UNKNOWN; -+} -+ -+/* Function which parses command options; returns true if it -+ ate an option */ -+static int -+parse(int c, char **argv, int invert, unsigned int *flags, -+ const struct ipt_entry *entry, -+ struct ipt_entry_target **target) -+{ -+ struct ipt_imq_info *mr = (struct ipt_imq_info*)(*target)->data; -+ -+ switch(c) { -+ case '1': -+ if (check_inverse(optarg, &invert, NULL, 0)) -+ exit_error(PARAMETER_PROBLEM, -+ "Unexpected `!' after --todev"); -+ mr->todev=atoi(optarg); -+ break; -+ default: -+ return 0; -+ } -+ return 1; -+} -+ -+static void -+final_check(unsigned int flags) -+{ -+} -+ -+/* Prints out the targinfo. */ -+static void -+print(const struct ipt_ip *ip, -+ const struct ipt_entry_target *target, -+ int numeric) -+{ -+ struct ipt_imq_info *mr = (struct ipt_imq_info*)target->data; -+ -+ printf("IMQ: todev %u ", mr->todev); -+} -+ -+/* Saves the union ipt_targinfo in parsable form to stdout. */ -+static void -+save(const struct ipt_ip *ip, const struct ipt_entry_target *target) -+{ -+ struct ipt_imq_info *mr = (struct ipt_imq_info*)target->data; -+ -+ printf("--todev %u", mr->todev); -+} -+ -+static struct iptables_target imq = { -+ .next = NULL, -+ .name = "IMQ", -+ .version = IPTABLES_VERSION, -+ .size = IPT_ALIGN(sizeof(struct ipt_imq_info)), -+ .userspacesize = IPT_ALIGN(sizeof(struct ipt_imq_info)), -+ .help = &help, -+ .init = &init, -+ .parse = &parse, -+ .final_check = &final_check, -+ .print = &print, -+ .save = &save, -+ .extra_opts = opts -+}; -+ -+void _init(void) -+{ -+ register_target(&imq); -+} diff --git a/src/patches/syslinux-3.11-nopie.patch b/src/patches/syslinux-3.11-nopie.patch deleted file mode 100644 index 138d83e9d..000000000 --- a/src/patches/syslinux-3.11-nopie.patch +++ /dev/null @@ -1,23 +0,0 @@ -borrowed from gentoo ---- syslinux/com32/libutil/Makefile -+++ syslinux/com32/libutil/Makefile -@@ -40,7 +40,7 @@ - AR = ar - NASM = nasm - RANLIB = ranlib --CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -D__COM32__ -W -Wall -march=i386 -Os -fomit-frame-pointer -I./include -I../include $(call gcc_ok,-fno-stack-protector,) -+CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -D__COM32__ -W -Wall -march=i386 -Os -fomit-frame-pointer -I./include -I../include $(call gcc_ok,-fno-stack-protector,) $(call gcc_ok,-nopie,) - SFLAGS = $(M32) -D__COM32__ -march=i386 - LDFLAGS = -T ../lib/com32.ld - LNXCFLAGS = -I./include -W -Wall -fno-stack-protector -O -g ---- syslinux/dos/Makefile -+++ syslinux/dos/Makefile -@@ -3,7 +3,7 @@ - OBJCOPY = objcopy - OPTFLAGS = -g -Os -march=i386 -falign-functions=0 -falign-jumps=0 -falign-loops=0 -fomit-frame-pointer - INCLUDES = -include code16.h -I. -I.. -I../libfat --CFLAGS = -W -Wall -fno-stack-protector -ffreestanding -msoft-float $(OPTFLAGS) $(INCLUDES) -+CFLAGS = -W -Wall -nopie -fno-stack-protector -ffreestanding -msoft-float $(OPTFLAGS) $(INCLUDES) - LDFLAGS = -T com16.ld - AR = ar - RANLIB = ranlib diff --git a/src/patches/syslinux-3.11-nossp.patch b/src/patches/syslinux-3.11-nossp.patch deleted file mode 100644 index 5fb804ac7..000000000 --- a/src/patches/syslinux-3.11-nossp.patch +++ /dev/null @@ -1,173 +0,0 @@ -borrowed from gentoo ---- syslinux/Makefile -+++ syslinux/Makefile -@@ -18,7 +18,7 @@ - OSTYPE = $(shell uname -msr) - CC = gcc - INCLUDE = --CFLAGS = -W -Wall -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -+CFLAGS = -W -Wall -fno-stack-protector -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 - PIC = -fPIC - LDFLAGS = -O2 -s - AR = ar -@@ -194,9 +194,8 @@ libsyslinux.a: bootsect_bin.o ldlinux_bi - $(LIB_SO): bootsect_bin.o ldlinux_bin.o syslxmod.o - $(CC) $(LDFLAGS) -shared -Wl,-soname,$(LIB_SONAME) -o $@ $^ - --gethostip.o: gethostip.c -- --gethostip: gethostip.o -+gethostip: gethostip.c -+ $(CC) $(LDFLAGS) gethostip.c -o gethostip -fno-stack-protector - - mkdiskimage: mkdiskimage.in mbr.bin bin2hex.pl - $(PERL) bin2hex.pl < mbr.bin | cat mkdiskimage.in - > $@ ---- syslinux/com32/lib/MCONFIG -+++ syslinux/com32/lib/MCONFIG -@@ -18,7 +18,7 @@ LIBFLAGS = -DDYNAMIC_CRC_TABLE -DPNG_NO_ - - REQFLAGS = -g -m32 -mregparm=3 -DREGPARM=3 -D__COM32__ -I. -I./sys -I../include - OPTFLAGS = -Os -march=i386 -falign-functions=0 -falign-jumps=0 \ -- -falign-labels=0 -+ -falign-labels=0 -fno-stack-protector - WARNFLAGS = -W -Wall -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Winline - - CFLAGS = -Wp,-MT,$@,-MD,$(dir $@).$(notdir $@).d $(OPTFLAGS) \ ---- syslinux/com32/libutil/Makefile -+++ syslinux/com32/libutil/Makefile -@@ -40,10 +40,10 @@ LD = ld -m elf_i386 - AR = ar - NASM = nasm - RANLIB = ranlib --CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -D__COM32__ -W -Wall -march=i386 -Os -fomit-frame-pointer -I./include -I../include -+CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -D__COM32__ -W -Wall -march=i386 -Os -fomit-frame-pointer -I./include -I../include $(call gcc_ok,-fno-stack-protector,) - SFLAGS = $(M32) -D__COM32__ -march=i386 - LDFLAGS = -T ../lib/com32.ld --LNXCFLAGS = -I./include -W -Wall -O -g -+LNXCFLAGS = -I./include -W -Wall -O -g $(call gcc_ok,-fno-stack-protector,) - LNXSFLAGS = -g - LNXLDFLAGS = -g - OBJCOPY = objcopy ---- syslinux/com32/modules/Makefile -+++ syslinux/com32/modules/Makefile -@@ -25,8 +25,8 @@ LD = ld -m elf_i386 - AR = ar - NASM = nasm - RANLIB = ranlib --CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os -fomit-frame-pointer -I../libutil/include -I../include -D__COM32__ --LNXCFLAGS = -W -Wall -O -g -I../libutil/include -+CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os -fomit-frame-pointer -I../libutil/include -I../include -D__COM32__ $(call gcc_ok,-fno-stack-protector,) -+LNXCFLAGS = -W -Wall -O -g -I../libutil/include $(call gcc_ok,-fno-stack-protector,) - LNXSFLAGS = -g - LNXLDFLAGS = -g - SFLAGS = -D__COM32__ -march=i386 ---- syslinux/com32/samples/Makefile -+++ syslinux/com32/samples/Makefile -@@ -25,8 +25,8 @@ LD = ld -m elf_i386 - AR = ar - NASM = nasm - RANLIB = ranlib --CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os -fomit-frame-pointer -I../libutil/include -I../include -D__COM32__ --LNXCFLAGS = -W -Wall -O -g -I../libutil/include -+CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os -fomit-frame-pointer -I../libutil/include -I../include -D__COM32__ $(call gcc_ok,-fno-stack-protector,) -+LNXCFLAGS = -W -Wall -O -g -I../libutil/include $(call gcc_ok,-fno-stack-protector,) - LNXSFLAGS = -g - LNXLDFLAGS = -g - SFLAGS = -D__COM32__ -march=i386 ---- syslinux/dos/Makefile -+++ syslinux/dos/Makefile -@@ -3,7 +3,7 @@ LD = ld -m elf_i386 - OBJCOPY = objcopy - OPTFLAGS = -g -Os -march=i386 -falign-functions=0 -falign-jumps=0 -falign-loops=0 -fomit-frame-pointer - INCLUDES = -include code16.h -I. -I.. -I../libfat --CFLAGS = -W -Wall -ffreestanding -msoft-float $(OPTFLAGS) $(INCLUDES) -+CFLAGS = -W -Wall -fno-stack-protector -ffreestanding -msoft-float $(OPTFLAGS) $(INCLUDES) - LDFLAGS = -T com16.ld - AR = ar - RANLIB = ranlib ---- syslinux/extlinux/Makefile -+++ syslinux/extlinux/Makefile -@@ -1,7 +1,7 @@ - CC = gcc - OPTFLAGS = -g -Os - INCLUDES = -I. -I.. -I../libfat --CFLAGS = -W -Wall -Wno-sign-compare -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES) -+CFLAGS = -W -Wall -fno-stack-protector -Wno-sign-compare -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES) - LDFLAGS = -s - - SRCS = extlinux.c ../extlinux_bss_bin.c ../extlinux_sys_bin.c ---- syslinux/memdisk/Makefile -+++ syslinux/memdisk/Makefile -@@ -20,7 +20,7 @@ M32 := $(call gcc_ok,-m32,) - FREE := $(call gcc_ok,-ffreestanding,) - - CC = gcc $(M32) $(FREE) --CFLAGS = -g -W -Wall -Wno-sign-compare \ -+CFLAGS = -g -W -Wall -Wno-sign-compare $(call gcc_ok,-fno-stack-protector,) \ - -Os -fomit-frame-pointer -march=i386 $(ALIGN) \ - -DVERSION='"$(VERSION)"' -DDATE='"$(DATE)"' - LDFLAGS = -g ---- syslinux/menu/Makefile -+++ syslinux/menu/Makefile -@@ -5,7 +5,7 @@ M32 := $(call gcc_ok,-m32,) - COM32DIR = ../com32 - LUDIR = $(COM32DIR)/libutil - LDIR = $(COM32DIR)/lib --CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os -fomit-frame-pointer -I$(LUDIR)/include -I$(COM32DIR)/include -Ilibmenu -D__COM32__ -+CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -march=i386 -Os -fomit-frame-pointer -I$(LUDIR)/include -I$(COM32DIR)/include -Ilibmenu -D__COM32__ $(call gcc_ok,-fno-stack-protector,) - SFLAGS = -D__COM32__ -march=i386 - LDFLAGS = -T $(LDIR)/com32.ld - OBJCOPY = objcopy ---- syslinux/mtools/Makefile -+++ syslinux/mtools/Makefile -@@ -1,7 +1,7 @@ - CC = gcc - OPTFLAGS = -g -Os - INCLUDES = -I. -I.. -I../libfat --CFLAGS = -W -Wall -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES) -+CFLAGS = -W -Wall -fno-stack-protector -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES) - LDFLAGS = -s - - SRCS = syslinux.c ../syslxmod.c ../bootsect_bin.c ../ldlinux_bin.c $(wildcard ../libfat/*.c) ---- syslinux/sample/Makefile -+++ syslinux/sample/Makefile -@@ -25,7 +25,7 @@ LD = ld -m elf_i386 - AR = ar - NASM = nasm - RANLIB = ranlib --CFLAGS = -W -Wall -march=i386 -Os -fomit-frame-pointer -I../com32/include -+CFLAGS = -W -Wall -march=i386 -Os -fomit-frame-pointer -I../com32/include $(call gcc_ok,-fno-stack-protector,) - SFLAGS = -march=i386 - LDFLAGS = -s - OBJCOPY = objcopy ---- syslinux/unix/Makefile -+++ syslinux/unix/Makefile -@@ -1,7 +1,7 @@ - CC = gcc - OPTFLAGS = -g -Os - INCLUDES = -I. -I.. -I../libfat --CFLAGS = -W -Wall -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES) -+CFLAGS = -W -Wall -fno-stack-protector -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES) - LDFLAGS = -s - - SRCS = syslinux.c ../syslxmod.c ../bootsect_bin.c ../ldlinux_bin.c $(wildcard ../libfat/*.c) ---- syslinux/win32/Makefile -+++ syslinux/win32/Makefile -@@ -23,7 +23,7 @@ ifeq ($(findstring CYGWIN,$(OSTYPE)),CYG - CC = gcc - AR = ar - RANLIB = ranlib --CFLAGS = -mno-cygwin -W -Wall -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -+CFLAGS = -mno-cygwin -W -Wall -fno-stack-protector -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 - PIC = - LDFLAGS = -mno-cygwin -Os -s - else -@@ -37,7 +37,7 @@ AR = mingw-ar - RANLIB = mingw-ranlib - endif - --CFLAGS = -W -Wall -Wno-sign-compare -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -+CFLAGS = -W -Wall -fno-stack-protector -Wno-sign-compare -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 - PIC = - LDFLAGS = -Os -s - endif diff --git a/src/patches/tcp_wrappers-7.6-shared_lib_plus_plus-1.patch b/src/patches/tcp_wrappers-7.6-shared_lib_plus_plus-1.patch deleted file mode 100644 index 9a5b20cb5..000000000 --- a/src/patches/tcp_wrappers-7.6-shared_lib_plus_plus-1.patch +++ /dev/null @@ -1,1035 +0,0 @@ -Submitted By: Tushar Teredesai -Date: 2003-10-04 -Initial Package Version: 7.6 -Origin: http://archives.linuxfromscratch.org/mail-archives/blfs-dev/2003-January/001960.html -Description: The patch was created from the tcp_wrappers modified package by Mark Heerdink. -This patch provides the following improvements: - * Install libwrap.so along with libwrap.a. - * Create an install target for tcp_wrappers. - * Compilation and security fixes. - * Documentation fixes. -diff -Naur tcp_wrappers_7.6/Makefile tcp_wrappers_7.6.gimli/Makefile ---- tcp_wrappers_7.6/Makefile 1997-03-21 12:27:21.000000000 -0600 -+++ tcp_wrappers_7.6.gimli/Makefile 2002-07-15 16:07:21.000000000 -0500 -@@ -1,5 +1,10 @@ -+GLIBC=$(shell grep -s -c __GLIBC__ /usr/include/features.h) -+ - # @(#) Makefile 1.23 97/03/21 19:27:20 - -+# unset the HOSTNAME environment variable -+HOSTNAME = -+ - what: - @echo - @echo "Usage: edit the REAL_DAEMON_DIR definition in the Makefile then:" -@@ -19,7 +24,7 @@ - @echo " generic (most bsd-ish systems with sys5 compatibility)" - @echo " 386bsd aix alpha apollo bsdos convex-ultranet dell-gcc dgux dgux543" - @echo " dynix epix esix freebsd hpux irix4 irix5 irix6 isc iunix" -- @echo " linux machten mips(untested) ncrsvr4 netbsd next osf power_unix_211" -+ @echo " linux gnu machten mips(untested) ncrsvr4 netbsd next osf power_unix_211" - @echo " ptx-2.x ptx-generic pyramid sco sco-nis sco-od2 sco-os5 sinix sunos4" - @echo " sunos40 sunos5 sysv4 tandem ultrix unicos7 unicos8 unixware1 unixware2" - @echo " uts215 uxp" -@@ -43,8 +48,8 @@ - # Ultrix 4.x SunOS 4.x ConvexOS 10.x Dynix/ptx - #REAL_DAEMON_DIR=/usr/etc - # --# SysV.4 Solaris 2.x OSF AIX --#REAL_DAEMON_DIR=/usr/sbin -+# SysV.4 Solaris 2.x OSF AIX Linux -+REAL_DAEMON_DIR=/usr/sbin - # - # BSD 4.4 - #REAL_DAEMON_DIR=/usr/libexec -@@ -141,10 +146,21 @@ - LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= \ - EXTRA_CFLAGS=-DSYS_ERRLIST_DEFINED VSYSLOG= all - -+ifneq ($(GLIBC),0) -+MYLIB=-lnsl -+endif -+ - linux: - @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ -- LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=setenv.o \ -- NETGROUP= TLI= EXTRA_CFLAGS="-DBROKEN_SO_LINGER" all -+ LIBS=$(MYLIB) RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \ -+ NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= all \ -+ EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_WEAKSYMS -D_REENTRANT" -+ -+gnu: -+ @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \ -+ LIBS=$(MYLIB) RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \ -+ NETGROUP=-DNETGROUP TLI= VSYSLOG= BUGS= all \ -+ EXTRA_CFLAGS="-DHAVE_STRERROR -DHAVE_WEAKSYMS -D_REENTRANT" - - # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x. - hpux hpux8 hpux9 hpux10: -@@ -391,7 +407,7 @@ - # the ones provided with this source distribution. The environ.c module - # implements setenv(), getenv(), and putenv(). - --AUX_OBJ= setenv.o -+#AUX_OBJ= setenv.o - #AUX_OBJ= environ.o - #AUX_OBJ= environ.o strcasecmp.o - -@@ -454,7 +470,8 @@ - # host name aliases. Compile with -DSOLARIS_24_GETHOSTBYNAME_BUG to work - # around this. The workaround does no harm on other Solaris versions. - --BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DLIBC_CALLS_STRTOK -+BUGS = -+#BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DLIBC_CALLS_STRTOK - #BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DINET_ADDR_BUG - #BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DSOLARIS_24_GETHOSTBYNAME_BUG - -@@ -464,7 +481,7 @@ - # If your system supports NIS or YP-style netgroups, enable the following - # macro definition. Netgroups are used only for host access control. - # --#NETGROUP= -DNETGROUP -+NETGROUP= -DNETGROUP - - ############################################################### - # System dependencies: whether or not your system has vsyslog() -@@ -491,7 +508,7 @@ - # Uncomment the next definition to turn on the language extensions - # (examples: allow, deny, banners, twist and spawn). - # --#STYLE = -DPROCESS_OPTIONS # Enable language extensions. -+STYLE = -DPROCESS_OPTIONS # Enable language extensions. - - ################################################################ - # Optional: Changing the default disposition of logfile records -@@ -514,7 +531,7 @@ - # - # The LOG_XXX names below are taken from the /usr/include/syslog.h file. - --FACILITY= LOG_MAIL # LOG_MAIL is what most sendmail daemons use -+FACILITY= LOG_DAEMON # LOG_MAIL is what most sendmail daemons use - - # The syslog priority at which successful connections are logged. - -@@ -610,7 +627,7 @@ - # Paranoid mode implies hostname lookup. In order to disable hostname - # lookups altogether, see the next section. - --PARANOID= -DPARANOID -+#PARANOID= -DPARANOID - - ######################################## - # Optional: turning off hostname lookups -@@ -623,7 +640,7 @@ - # In order to perform selective hostname lookups, disable paranoid - # mode (see previous section) and comment out the following definition. - --HOSTNAME= -DALWAYS_HOSTNAME -+#HOSTNAME= -DALWAYS_HOSTNAME - - ############################################# - # Optional: Turning on host ADDRESS checking -@@ -649,28 +666,46 @@ - # source-routed traffic in the kernel. Examples: 4.4BSD derivatives, - # Solaris 2.x, and Linux. See your system documentation for details. - # --# KILL_OPT= -DKILL_IP_OPTIONS -+KILL_OPT= -DKILL_IP_OPTIONS - - ## End configuration options - ############################ - - # Protection against weird shells or weird make programs. - -+CC = gcc - SHELL = /bin/sh --.c.o:; $(CC) $(CFLAGS) -c $*.c -+.c.o:; $(CC) $(CFLAGS) -o $*.o -c $*.c -+ -+SOMAJOR = 0 -+SOMINOR = 7.6 -+ -+LIB = libwrap.a -+SHLIB = shared/libwrap.so.$(SOMAJOR).$(SOMINOR) -+SHLIBSOMAJ= shared/libwrap.so.$(SOMAJOR) -+SHLIBSO = shared/libwrap.so -+SHLIBFLAGS = -Lshared -lwrap - --CFLAGS = -O -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \ -+shared/%.o: %.c -+ $(CC) $(CFLAGS) $(SHCFLAGS) -c $< -o $@ -+ -+CFLAGS = -O2 -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \ - $(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \ - -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \ - -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \ - $(UCHAR) $(TABLES) $(STRINGS) $(TLI) $(EXTRA_CFLAGS) $(DOT) \ - $(VSYSLOG) $(HOSTNAME) - -+SHLINKFLAGS = -shared -Xlinker -soname -Xlinker libwrap.so.$(SOMAJOR) -lc $(LIBS) -+SHCFLAGS = -fPIC -shared -D_REENTRANT -+ - LIB_OBJ= hosts_access.o options.o shell_cmd.o rfc931.o eval.o \ - hosts_ctl.o refuse.o percent_x.o clean_exit.o $(AUX_OBJ) \ - $(FROM_OBJ) fix_options.o socket.o tli.o workarounds.o \ - update.o misc.o diag.o percent_m.o myvsyslog.o - -+SHLIB_OBJ= $(addprefix shared/, $(LIB_OBJ)); -+ - FROM_OBJ= fromhost.o - - KIT = README miscd.c tcpd.c fromhost.c hosts_access.c shell_cmd.c \ -@@ -684,46 +719,80 @@ - refuse.c tcpdchk.8 setenv.c inetcf.c inetcf.h scaffold.c \ - scaffold.h tcpdmatch.8 README.NIS - --LIB = libwrap.a -- --all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk -+all other: config-check tcpd tcpdmatch try-from safe_finger tcpdchk $(LIB) - - # Invalidate all object files when the compiler options (CFLAGS) have changed. - - config-check: - @set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; } -- @set +e; echo $(CFLAGS) >/tmp/cflags.$$$$ ; \ -- if cmp cflags /tmp/cflags.$$$$ ; \ -- then rm /tmp/cflags.$$$$ ; \ -- else mv /tmp/cflags.$$$$ cflags ; \ -+ @set +e; echo $(CFLAGS) >cflags.new ; \ -+ if cmp cflags cflags.new ; \ -+ then rm cflags.new ; \ -+ else mv cflags.new cflags ; \ - fi >/dev/null 2>/dev/null -+ @if [ ! -d shared ]; then mkdir shared; fi - - $(LIB): $(LIB_OBJ) - rm -f $(LIB) - $(AR) $(ARFLAGS) $(LIB) $(LIB_OBJ) - -$(RANLIB) $(LIB) - --tcpd: tcpd.o $(LIB) -- $(CC) $(CFLAGS) -o $@ tcpd.o $(LIB) $(LIBS) -+$(SHLIB): $(SHLIB_OBJ) -+ rm -f $(SHLIB) -+ $(CC) -o $(SHLIB) $(SHLINKFLAGS) $(SHLIB_OBJ) -+ ln -s $(notdir $(SHLIB)) $(SHLIBSOMAJ) -+ ln -s $(notdir $(SHLIBSOMAJ)) $(SHLIBSO) -+ -+tcpd: tcpd.o $(SHLIB) -+ $(CC) $(CFLAGS) -o $@ tcpd.o $(SHLIBFLAGS) - --miscd: miscd.o $(LIB) -- $(CC) $(CFLAGS) -o $@ miscd.o $(LIB) $(LIBS) -+miscd: miscd.o $(SHLIB) -+ $(CC) $(CFLAGS) -o $@ miscd.o $(SHLIBFLAGS) - --safe_finger: safe_finger.o $(LIB) -- $(CC) $(CFLAGS) -o $@ safe_finger.o $(LIB) $(LIBS) -+safe_finger: safe_finger.o $(SHLIB) -+ $(CC) $(CFLAGS) -o $@ safe_finger.o $(SHLIBFLAGS) - - TCPDMATCH_OBJ = tcpdmatch.o fakelog.o inetcf.o scaffold.o - --tcpdmatch: $(TCPDMATCH_OBJ) $(LIB) -- $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(LIB) $(LIBS) -+tcpdmatch: $(TCPDMATCH_OBJ) $(SHLIB) -+ $(CC) $(CFLAGS) -o $@ $(TCPDMATCH_OBJ) $(SHLIBFLAGS) - --try-from: try-from.o fakelog.o $(LIB) -- $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(LIB) $(LIBS) -+try-from: try-from.o fakelog.o $(SHLIB) -+ $(CC) $(CFLAGS) -o $@ try-from.o fakelog.o $(SHLIBFLAGS) - - TCPDCHK_OBJ = tcpdchk.o fakelog.o inetcf.o scaffold.o - --tcpdchk: $(TCPDCHK_OBJ) $(LIB) -- $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(LIB) $(LIBS) -+tcpdchk: $(TCPDCHK_OBJ) $(SHLIB) -+ $(CC) $(CFLAGS) -o $@ $(TCPDCHK_OBJ) $(SHLIBFLAGS) -+ -+install: install-lib install-bin install-dev -+ -+install-lib: -+ install -o root -g root -m 0755 $(SHLIB) ${DESTDIR}/usr/lib/ -+ ln -sf $(notdir $(SHLIB)) ${DESTDIR}/usr/lib/$(notdir $(SHLIBSOMAJ)) -+ ln -sf $(notdir $(SHLIBSOMAJ)) ${DESTDIR}/usr/lib/$(notdir $(SHLIBSO)) -+ -+install-bin: -+ install -o root -g root -m 0755 tcpd ${DESTDIR}/usr/sbin/ -+ install -o root -g root -m 0755 tcpdchk ${DESTDIR}/usr/sbin/ -+ install -o root -g root -m 0755 tcpdmatch ${DESTDIR}/usr/sbin/ -+ install -o root -g root -m 0755 try-from ${DESTDIR}/usr/sbin/ -+ install -o root -g root -m 0755 safe_finger ${DESTDIR}/usr/sbin/ -+ install -o root -g root -m 0644 tcpd.8 ${DESTDIR}/usr/share/man/man8/ -+ install -o root -g root -m 0644 tcpdchk.8 ${DESTDIR}/usr/share/man/man8/ -+ install -o root -g root -m 0644 try-from.8 ${DESTDIR}/usr/share/man/man8/ -+ install -o root -g root -m 0644 tcpdmatch.8 ${DESTDIR}/usr/share/man/man8/ -+ install -o root -g root -m 0644 safe_finger.8 ${DESTDIR}/usr/share/man/man8/ -+ install -o root -g root -m 0644 hosts_access.5 ${DESTDIR}/usr/share/man/man5/ -+ install -o root -g root -m 0644 hosts_options.5 ${DESTDIR}/usr/share/man/man5/ -+ -+install-dev: -+ install -o root -g root -m 0644 hosts_access.3 ${DESTDIR}/usr/share/man/man3/ -+ install -o root -g root -m 0644 tcpd.h ${DESTDIR}/usr/include/ -+ install -o root -g root -m 0644 $(LIB) ${DESTDIR}/usr/lib/ -+ ln -sf hosts_access.3 ${DESTDIR}/usr/share/man/man3/hosts_ctl.3 -+ ln -sf hosts_access.3 ${DESTDIR}/usr/share/man/man3/request_init.3 -+ ln -sf hosts_access.3 ${DESTDIR}/usr/share/man/man3/request_set.3 - - shar: $(KIT) - @shar $(KIT) -@@ -739,7 +808,8 @@ - - clean: - rm -f tcpd miscd safe_finger tcpdmatch tcpdchk try-from *.[oa] core \ -- cflags -+ cflags libwrap*.so* -+ rm -rf shared - - tidy: clean - chmod -R a+r . -@@ -885,5 +955,6 @@ - update.o: mystdarg.h - update.o: tcpd.h - vfprintf.o: cflags -+weak_symbols.o: tcpd.h - workarounds.o: cflags - workarounds.o: tcpd.h -diff -Naur tcp_wrappers_7.6/fix_options.c tcp_wrappers_7.6.gimli/fix_options.c ---- tcp_wrappers_7.6/fix_options.c 1997-04-07 19:29:19.000000000 -0500 -+++ tcp_wrappers_7.6.gimli/fix_options.c 2002-01-07 08:50:19.000000000 -0600 -@@ -35,7 +35,12 @@ - #ifdef IP_OPTIONS - unsigned char optbuf[BUFFER_SIZE / 3], *cp; - char lbuf[BUFFER_SIZE], *lp; -+#if !defined(__GLIBC__) - int optsize = sizeof(optbuf), ipproto; -+#else /* __GLIBC__ */ -+ size_t optsize = sizeof(optbuf); -+ int ipproto; -+#endif /* __GLIBC__ */ - struct protoent *ip; - int fd = request->fd; - unsigned int opt; -diff -Naur tcp_wrappers_7.6/hosts_access.3 tcp_wrappers_7.6.gimli/hosts_access.3 ---- tcp_wrappers_7.6/hosts_access.3 1996-02-11 10:01:27.000000000 -0600 -+++ tcp_wrappers_7.6.gimli/hosts_access.3 2002-01-07 08:50:19.000000000 -0600 -@@ -3,7 +3,7 @@ - hosts_access, hosts_ctl, request_init, request_set \- access control library - .SH SYNOPSIS - .nf --#include "tcpd.h" -+#include - - extern int allow_severity; - extern int deny_severity; -diff -Naur tcp_wrappers_7.6/hosts_access.5 tcp_wrappers_7.6.gimli/hosts_access.5 ---- tcp_wrappers_7.6/hosts_access.5 1995-01-30 12:51:47.000000000 -0600 -+++ tcp_wrappers_7.6.gimli/hosts_access.5 2002-01-07 08:50:19.000000000 -0600 -@@ -8,9 +8,9 @@ - impatient reader is encouraged to skip to the EXAMPLES section for a - quick introduction. - .PP --An extended version of the access control language is described in the --\fIhosts_options\fR(5) document. The extensions are turned on at --program build time by building with -DPROCESS_OPTIONS. -+The extended version of the access control language is described in the -+\fIhosts_options\fR(5) document. \fBNote that this language supersedes -+the meaning of \fIshell_command\fB as documented below.\fR - .PP - In the following text, \fIdaemon\fR is the the process name of a - network daemon process, and \fIclient\fR is the name and/or address of -@@ -40,7 +40,7 @@ - character. This permits you to break up long lines so that they are - easier to edit. - .IP \(bu --Blank lines or lines that begin with a `#\' character are ignored. -+Blank lines or lines that begin with a `#' character are ignored. - This permits you to insert comments and whitespace so that the tables - are easier to read. - .IP \(bu -@@ -69,26 +69,33 @@ - .SH PATTERNS - The access control language implements the following patterns: - .IP \(bu --A string that begins with a `.\' character. A host name is matched if -+A string that begins with a `.' character. A host name is matched if - the last components of its name match the specified pattern. For --example, the pattern `.tue.nl\' matches the host name --`wzv.win.tue.nl\'. -+example, the pattern `.tue.nl' matches the host name -+`wzv.win.tue.nl'. - .IP \(bu --A string that ends with a `.\' character. A host address is matched if -+A string that ends with a `.' character. A host address is matched if - its first numeric fields match the given string. For example, the --pattern `131.155.\' matches the address of (almost) every host on the -+pattern `131.155.' matches the address of (almost) every host on the - Eind\%hoven University network (131.155.x.x). - .IP \(bu --A string that begins with an `@\' character is treated as an NIS -+A string that begins with an `@' character is treated as an NIS - (formerly YP) netgroup name. A host name is matched if it is a host - member of the specified netgroup. Netgroup matches are not supported - for daemon process names or for client user names. - .IP \(bu --An expression of the form `n.n.n.n/m.m.m.m\' is interpreted as a --`net/mask\' pair. A host address is matched if `net\' is equal to the --bitwise AND of the address and the `mask\'. For example, the net/mask --pattern `131.155.72.0/255.255.254.0\' matches every address in the --range `131.155.72.0\' through `131.155.73.255\'. -+An expression of the form `n.n.n.n/m.m.m.m' is interpreted as a -+`net/mask' pair. A host address is matched if `net' is equal to the -+bitwise AND of the address and the `mask'. For example, the net/mask -+pattern `131.155.72.0/255.255.254.0' matches every address in the -+range `131.155.72.0' through `131.155.73.255'. -+.IP \(bu -+A string that begins with a `/' character is treated as a file -+name. A host name or address is matched if it matches any host name -+or address pattern listed in the named file. The file format is -+zero or more lines with zero or more host name or address patterns -+separated by whitespace. A file name pattern can be used anywhere -+a host name or address pattern can be used. - .SH WILDCARDS - The access control language supports explicit wildcards: - .IP ALL -@@ -115,19 +122,19 @@ - .ne 6 - .SH OPERATORS - .IP EXCEPT --Intended use is of the form: `list_1 EXCEPT list_2\'; this construct -+Intended use is of the form: `list_1 EXCEPT list_2'; this construct - matches anything that matches \fIlist_1\fR unless it matches - \fIlist_2\fR. The EXCEPT operator can be used in daemon_lists and in - client_lists. The EXCEPT operator can be nested: if the control --language would permit the use of parentheses, `a EXCEPT b EXCEPT c\' --would parse as `(a EXCEPT (b EXCEPT c))\'. -+language would permit the use of parentheses, `a EXCEPT b EXCEPT c' -+would parse as `(a EXCEPT (b EXCEPT c))'. - .br - .ne 6 - .SH SHELL COMMANDS - If the first-matched access control rule contains a shell command, that - command is subjected to % substitutions (see next section). - The result is executed by a \fI/bin/sh\fR child process with standard --input, output and error connected to \fI/dev/null\fR. Specify an `&\' -+input, output and error connected to \fI/dev/null\fR. Specify an `&' - at the end of the command if you do not want to wait until it has - completed. - .PP -@@ -159,7 +166,7 @@ - .IP %u - The client user name (or "unknown"). - .IP %% --Expands to a single `%\' character. -+Expands to a single `%' character. - .PP - Characters in % expansions that may confuse the shell are replaced by - underscores. -@@ -243,9 +250,9 @@ - less trustworthy. It is possible for an intruder to spoof both the - client connection and the IDENT lookup, although doing so is much - harder than spoofing just a client connection. It may also be that --the client\'s IDENT server is lying. -+the client's IDENT server is lying. - .PP --Note: IDENT lookups don\'t work with UDP services. -+Note: IDENT lookups don't work with UDP services. - .SH EXAMPLES - The language is flexible enough that different types of access control - policy can be expressed with a minimum of fuss. Although the language -@@ -285,7 +292,7 @@ - .br - ALL: .foobar.edu EXCEPT terminalserver.foobar.edu - .PP --The first rule permits access from hosts in the local domain (no `.\' -+The first rule permits access from hosts in the local domain (no `.' - in the host name) and from members of the \fIsome_netgroup\fP - netgroup. The second rule permits access from all hosts in the - \fIfoobar.edu\fP domain (notice the leading dot), with the exception of -@@ -322,8 +329,8 @@ - /etc/hosts.deny: - .in +3 - .nf --in.tftpd: ALL: (/some/where/safe_finger -l @%h | \\ -- /usr/ucb/mail -s %d-%h root) & -+in.tftpd: ALL: (/usr/sbin/safe_finger -l @%h | \\ -+ /usr/bin/mail -s %d-%h root) & - .fi - .PP - The safe_finger command comes with the tcpd wrapper and should be -@@ -349,7 +356,7 @@ - capacity of an internal buffer; when an access control rule is not - terminated by a newline character; when the result of % - expansion would overflow an internal buffer; when a system call fails --that shouldn\'t. All problems are reported via the syslog daemon. -+that shouldn't. All problems are reported via the syslog daemon. - .SH FILES - .na - .nf -diff -Naur tcp_wrappers_7.6/hosts_access.c tcp_wrappers_7.6.gimli/hosts_access.c ---- tcp_wrappers_7.6/hosts_access.c 1997-02-11 19:13:23.000000000 -0600 -+++ tcp_wrappers_7.6.gimli/hosts_access.c 2002-01-07 08:50:19.000000000 -0600 -@@ -240,6 +240,26 @@ - } - } - -+/* hostfile_match - look up host patterns from file */ -+ -+static int hostfile_match(path, host) -+char *path; -+struct hosts_info *host; -+{ -+ char tok[BUFSIZ]; -+ int match = NO; -+ FILE *fp; -+ -+ if ((fp = fopen(path, "r")) != 0) { -+ while (fscanf(fp, "%s", tok) == 1 && !(match = host_match(tok, host))) -+ /* void */ ; -+ fclose(fp); -+ } else if (errno != ENOENT) { -+ tcpd_warn("open %s: %m", path); -+ } -+ return (match); -+} -+ - /* host_match - match host name and/or address against pattern */ - - static int host_match(tok, host) -@@ -267,6 +287,8 @@ - tcpd_warn("netgroup support is disabled"); /* not tcpd_jump() */ - return (NO); - #endif -+ } else if (tok[0] == '/') { /* /file hack */ -+ return (hostfile_match(tok, host)); - } else if (STR_EQ(tok, "KNOWN")) { /* check address and name */ - char *name = eval_hostname(host); - return (STR_NE(eval_hostaddr(host), unknown) && HOSTNAME_KNOWN(name)); -diff -Naur tcp_wrappers_7.6/hosts_options.5 tcp_wrappers_7.6.gimli/hosts_options.5 ---- tcp_wrappers_7.6/hosts_options.5 1994-12-28 10:42:29.000000000 -0600 -+++ tcp_wrappers_7.6.gimli/hosts_options.5 2002-01-07 08:50:19.000000000 -0600 -@@ -58,12 +58,12 @@ - Execute, in a child process, the specified shell command, after - performing the % expansions described in the hosts_access(5) - manual page. The command is executed with stdin, stdout and stderr --connected to the null device, so that it won\'t mess up the -+connected to the null device, so that it won't mess up the - conversation with the client host. Example: - .sp - .nf - .ti +3 --spawn (/some/where/safe_finger -l @%h | /usr/ucb/mail root) & -+spawn (/usr/sbin/safe_finger -l @%h | /usr/bin/mail root) & - .fi - .sp - executes, in a background child process, the shell command "safe_finger -diff -Naur tcp_wrappers_7.6/options.c tcp_wrappers_7.6.gimli/options.c ---- tcp_wrappers_7.6/options.c 1996-02-11 10:01:32.000000000 -0600 -+++ tcp_wrappers_7.6.gimli/options.c 2002-01-07 08:50:19.000000000 -0600 -@@ -473,6 +473,9 @@ - #ifdef LOG_CRON - "cron", LOG_CRON, - #endif -+#ifdef LOG_FTP -+ "ftp", LOG_FTP, -+#endif - #ifdef LOG_LOCAL0 - "local0", LOG_LOCAL0, - #endif -diff -Naur tcp_wrappers_7.6/percent_m.c tcp_wrappers_7.6.gimli/percent_m.c ---- tcp_wrappers_7.6/percent_m.c 1994-12-28 10:42:37.000000000 -0600 -+++ tcp_wrappers_7.6.gimli/percent_m.c 2002-01-07 08:50:19.000000000 -0600 -@@ -13,7 +13,7 @@ - #include - - extern int errno; --#ifndef SYS_ERRLIST_DEFINED -+#if !defined(SYS_ERRLIST_DEFINED) && !defined(HAVE_STRERROR) - extern char *sys_errlist[]; - extern int sys_nerr; - #endif -@@ -29,11 +29,15 @@ - - while (*bp = *cp) - if (*cp == '%' && cp[1] == 'm') { -+#ifdef HAVE_STRERROR -+ strcpy(bp, strerror(errno)); -+#else - if (errno < sys_nerr && errno > 0) { - strcpy(bp, sys_errlist[errno]); - } else { - sprintf(bp, "Unknown error %d", errno); - } -+#endif - bp += strlen(bp); - cp += 2; - } else { -diff -Naur tcp_wrappers_7.6/rfc931.c tcp_wrappers_7.6.gimli/rfc931.c ---- tcp_wrappers_7.6/rfc931.c 1995-01-02 09:11:34.000000000 -0600 -+++ tcp_wrappers_7.6.gimli/rfc931.c 2002-01-07 08:50:19.000000000 -0600 -@@ -33,7 +33,7 @@ - - int rfc931_timeout = RFC931_TIMEOUT;/* Global so it can be changed */ - --static jmp_buf timebuf; -+static sigjmp_buf timebuf; - - /* fsocket - open stdio stream on top of socket */ - -@@ -62,7 +62,7 @@ - static void timeout(sig) - int sig; - { -- longjmp(timebuf, sig); -+ siglongjmp(timebuf, sig); - } - - /* rfc931 - return remote user name, given socket structures */ -@@ -99,7 +99,7 @@ - * Set up a timer so we won't get stuck while waiting for the server. - */ - -- if (setjmp(timebuf) == 0) { -+ if (sigsetjmp(timebuf,1) == 0) { - signal(SIGALRM, timeout); - alarm(rfc931_timeout); - -diff -Naur tcp_wrappers_7.6/safe_finger.8 tcp_wrappers_7.6.gimli/safe_finger.8 ---- tcp_wrappers_7.6/safe_finger.8 1969-12-31 18:00:00.000000000 -0600 -+++ tcp_wrappers_7.6.gimli/safe_finger.8 2002-01-07 08:50:19.000000000 -0600 -@@ -0,0 +1,34 @@ -+.TH SAFE_FINGER 8 "21th June 1997" Linux "Linux Programmer's Manual" -+.SH NAME -+safe_finger \- finger client wrapper that protects against nasty stuff -+from finger servers -+.SH SYNOPSIS -+.B safe_finger [finger_options] -+.SH DESCRIPTION -+The -+.B safe_finger -+command protects against nasty stuff from finger servers. Use this -+program for automatic reverse finger probes from the -+.B tcp_wrapper -+.B (tcpd) -+, not the raw finger command. The -+.B safe_finger -+command makes sure that the finger client is not run with root -+privileges. It also runs the finger client with a defined PATH -+environment. -+.B safe_finger -+will also protect you from problems caused by the output of some -+finger servers. The problem: some programs may react to stuff in -+the first column. Other programs may get upset by thrash anywhere -+on a line. File systems may fill up as the finger server keeps -+sending data. Text editors may bomb out on extremely long lines. -+The finger server may take forever because it is somehow wedged. -+.B safe_finger -+takes care of all this badness. -+.SH SEE ALSO -+.BR hosts_access (5), -+.BR hosts_options (5), -+.BR tcpd (8) -+.SH AUTHOR -+Wietse Venema, Eindhoven University of Technology, The Netherlands. -+ -diff -Naur tcp_wrappers_7.6/safe_finger.c tcp_wrappers_7.6.gimli/safe_finger.c ---- tcp_wrappers_7.6/safe_finger.c 1994-12-28 10:42:42.000000000 -0600 -+++ tcp_wrappers_7.6.gimli/safe_finger.c 2002-01-07 08:50:19.000000000 -0600 -@@ -26,21 +26,24 @@ - #include - #include - #include -+#include - - extern void exit(); - - /* Local stuff */ - --char path[] = "PATH=/bin:/usr/bin:/usr/ucb:/usr/bsd:/etc:/usr/etc:/usr/sbin"; -+char path[] = "PATH=/bin:/usr/bin:/sbin:/usr/sbin"; - - #define TIME_LIMIT 60 /* Do not keep listinging forever */ - #define INPUT_LENGTH 100000 /* Do not keep listinging forever */ - #define LINE_LENGTH 128 /* Editors can choke on long lines */ - #define FINGER_PROGRAM "finger" /* Most, if not all, UNIX systems */ - #define UNPRIV_NAME "nobody" /* Preferred privilege level */ --#define UNPRIV_UGID 32767 /* Default uid and gid */ -+#define UNPRIV_UGID 65534 /* Default uid and gid */ - - int finger_pid; -+int allow_severity = SEVERITY; -+int deny_severity = LOG_WARNING; - - void cleanup(sig) - int sig; -diff -Naur tcp_wrappers_7.6/scaffold.c tcp_wrappers_7.6.gimli/scaffold.c ---- tcp_wrappers_7.6/scaffold.c 1997-03-21 12:27:24.000000000 -0600 -+++ tcp_wrappers_7.6.gimli/scaffold.c 2002-01-07 08:50:19.000000000 -0600 -@@ -180,10 +180,12 @@ - - /* ARGSUSED */ - --void rfc931(request) --struct request_info *request; -+void rfc931(rmt_sin, our_sin, dest) -+struct sockaddr_in *rmt_sin; -+struct sockaddr_in *our_sin; -+char *dest; - { -- strcpy(request->user, unknown); -+ strcpy(dest, unknown); - } - - /* check_path - examine accessibility */ -diff -Naur tcp_wrappers_7.6/socket.c tcp_wrappers_7.6.gimli/socket.c ---- tcp_wrappers_7.6/socket.c 1997-03-21 12:27:25.000000000 -0600 -+++ tcp_wrappers_7.6.gimli/socket.c 2002-01-07 08:50:19.000000000 -0600 -@@ -76,7 +76,11 @@ - { - static struct sockaddr_in client; - static struct sockaddr_in server; -+#if !defined (__GLIBC__) - int len; -+#else /* __GLIBC__ */ -+ size_t len; -+#endif /* __GLIBC__ */ - char buf[BUFSIZ]; - int fd = request->fd; - -@@ -224,7 +228,11 @@ - { - char buf[BUFSIZ]; - struct sockaddr_in sin; -+#if !defined(__GLIBC__) - int size = sizeof(sin); -+#else /* __GLIBC__ */ -+ size_t size = sizeof(sin); -+#endif /* __GLIBC__ */ - - /* - * Eat up the not-yet received datagram. Some systems insist on a -diff -Naur tcp_wrappers_7.6/tcpd.8 tcp_wrappers_7.6.gimli/tcpd.8 ---- tcp_wrappers_7.6/tcpd.8 1996-02-21 09:39:16.000000000 -0600 -+++ tcp_wrappers_7.6.gimli/tcpd.8 2002-01-07 08:50:19.000000000 -0600 -@@ -94,7 +94,7 @@ - .PP - The example assumes that the network daemons live in /usr/etc. On some - systems, network daemons live in /usr/sbin or in /usr/libexec, or have --no `in.\' prefix to their name. -+no `in.' prefix to their name. - .SH EXAMPLE 2 - This example applies when \fItcpd\fR expects that the network daemons - are left in their original place. -@@ -110,26 +110,26 @@ - becomes: - .sp - .ti +5 --finger stream tcp nowait nobody /some/where/tcpd in.fingerd -+finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd - .sp - .fi - .PP - The example assumes that the network daemons live in /usr/etc. On some - systems, network daemons live in /usr/sbin or in /usr/libexec, the --daemons have no `in.\' prefix to their name, or there is no userid -+daemons have no `in.' prefix to their name, or there is no userid - field in the inetd configuration file. - .PP - Similar changes will be needed for the other services that are to be --covered by \fItcpd\fR. Send a `kill -HUP\' to the \fIinetd\fR(8) -+covered by \fItcpd\fR. Send a `kill -HUP' to the \fIinetd\fR(8) - process to make the changes effective. AIX users may also have to --execute the `inetimp\' command. -+execute the `inetimp' command. - .SH EXAMPLE 3 - In the case of daemons that do not live in a common directory ("secret" - or otherwise), edit the \fIinetd\fR configuration file so that it - specifies an absolute path name for the process name field. For example: - .nf - .sp -- ntalk dgram udp wait root /some/where/tcpd /usr/local/lib/ntalkd -+ ntalk dgram udp wait root /usr/sbin/tcpd /usr/sbin/in.ntalkd - .sp - .fi - .PP -diff -Naur tcp_wrappers_7.6/tcpd.h tcp_wrappers_7.6.gimli/tcpd.h ---- tcp_wrappers_7.6/tcpd.h 1996-03-19 09:22:25.000000000 -0600 -+++ tcp_wrappers_7.6.gimli/tcpd.h 2002-01-07 08:50:19.000000000 -0600 -@@ -4,6 +4,25 @@ - * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. - */ - -+#ifndef _TCPWRAPPERS_TCPD_H -+#define _TCPWRAPPERS_TCPD_H -+ -+/* someone else may have defined this */ -+#undef __P -+ -+/* use prototypes if we have an ANSI C compiler or are using C++ */ -+#if defined(__STDC__) || defined(__cplusplus) -+#define __P(args) args -+#else -+#define __P(args) () -+#endif -+ -+/* Need definitions of struct sockaddr_in and FILE. */ -+#include -+#include -+ -+__BEGIN_DECLS -+ - /* Structure to describe one communications endpoint. */ - - #define STRING_LENGTH 128 /* hosts, users, processes */ -@@ -25,10 +44,10 @@ - char pid[10]; /* access via eval_pid(request) */ - struct host_info client[1]; /* client endpoint info */ - struct host_info server[1]; /* server endpoint info */ -- void (*sink) (); /* datagram sink function or 0 */ -- void (*hostname) (); /* address to printable hostname */ -- void (*hostaddr) (); /* address to printable address */ -- void (*cleanup) (); /* cleanup function or 0 */ -+ void (*sink) __P((int)); /* datagram sink function or 0 */ -+ void (*hostname) __P((struct host_info *)); /* address to printable hostname */ -+ void (*hostaddr) __P((struct host_info *)); /* address to printable address */ -+ void (*cleanup) __P((struct request_info *)); /* cleanup function or 0 */ - struct netconfig *config; /* netdir handle */ - }; - -@@ -61,25 +80,30 @@ - /* Global functions. */ - - #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) --extern void fromhost(); /* get/validate client host info */ -+extern void fromhost __P((struct request_info *)); /* get/validate client host info */ - #else - #define fromhost sock_host /* no TLI support needed */ - #endif - --extern int hosts_access(); /* access control */ --extern void shell_cmd(); /* execute shell command */ --extern char *percent_x(); /* do % expansion */ --extern void rfc931(); /* client name from RFC 931 daemon */ --extern void clean_exit(); /* clean up and exit */ --extern void refuse(); /* clean up and exit */ --extern char *xgets(); /* fgets() on steroids */ --extern char *split_at(); /* strchr() and split */ --extern unsigned long dot_quad_addr(); /* restricted inet_addr() */ -+extern void shell_cmd __P((char *)); /* execute shell command */ -+extern char *percent_x __P((char *, int, char *, struct request_info *)); /* do % expansion */ -+extern void rfc931 __P((struct sockaddr_in *, struct sockaddr_in *, char *)); /* client name from RFC 931 daemon */ -+extern void clean_exit __P((struct request_info *)); /* clean up and exit */ -+extern void refuse __P((struct request_info *)); /* clean up and exit */ -+extern char *xgets __P((char *, int, FILE *)); /* fgets() on steroids */ -+extern char *split_at __P((char *, int)); /* strchr() and split */ -+extern unsigned long dot_quad_addr __P((char *)); /* restricted inet_addr() */ - - /* Global variables. */ - -+#ifdef HAVE_WEAKSYMS -+extern int allow_severity __attribute__ ((weak)); /* for connection logging */ -+extern int deny_severity __attribute__ ((weak)); /* for connection logging */ -+#else - extern int allow_severity; /* for connection logging */ - extern int deny_severity; /* for connection logging */ -+#endif -+ - extern char *hosts_allow_table; /* for verification mode redirection */ - extern char *hosts_deny_table; /* for verification mode redirection */ - extern int hosts_access_verbose; /* for verbose matching mode */ -@@ -92,9 +116,14 @@ - */ - - #ifdef __STDC__ -+extern int hosts_access(struct request_info *request); -+extern int hosts_ctl(char *daemon, char *client_name, char *client_addr, -+ char *client_user); - extern struct request_info *request_init(struct request_info *,...); - extern struct request_info *request_set(struct request_info *,...); - #else -+extern int hosts_access(); -+extern int hosts_ctl(); - extern struct request_info *request_init(); /* initialize request */ - extern struct request_info *request_set(); /* update request structure */ - #endif -@@ -117,27 +146,31 @@ - * host_info structures serve as caches for the lookup results. - */ - --extern char *eval_user(); /* client user */ --extern char *eval_hostname(); /* printable hostname */ --extern char *eval_hostaddr(); /* printable host address */ --extern char *eval_hostinfo(); /* host name or address */ --extern char *eval_client(); /* whatever is available */ --extern char *eval_server(); /* whatever is available */ -+extern char *eval_user __P((struct request_info *)); /* client user */ -+extern char *eval_hostname __P((struct host_info *)); /* printable hostname */ -+extern char *eval_hostaddr __P((struct host_info *)); /* printable host address */ -+extern char *eval_hostinfo __P((struct host_info *)); /* host name or address */ -+extern char *eval_client __P((struct request_info *)); /* whatever is available */ -+extern char *eval_server __P((struct request_info *)); /* whatever is available */ - #define eval_daemon(r) ((r)->daemon) /* daemon process name */ - #define eval_pid(r) ((r)->pid) /* process id */ - - /* Socket-specific methods, including DNS hostname lookups. */ - --extern void sock_host(); /* look up endpoint addresses */ --extern void sock_hostname(); /* translate address to hostname */ --extern void sock_hostaddr(); /* address to printable address */ -+/* look up endpoint addresses */ -+extern void sock_host __P((struct request_info *)); -+/* translate address to hostname */ -+extern void sock_hostname __P((struct host_info *)); -+/* address to printable address */ -+extern void sock_hostaddr __P((struct host_info *)); -+ - #define sock_methods(r) \ - { (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; } - - /* The System V Transport-Level Interface (TLI) interface. */ - - #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) --extern void tli_host(); /* look up endpoint addresses etc. */ -+extern void tli_host __P((struct request_info *)); /* look up endpoint addresses etc. */ - #endif - - /* -@@ -178,7 +211,7 @@ - * behavior. - */ - --extern void process_options(); /* execute options */ -+extern void process_options __P((char *, struct request_info *)); /* execute options */ - extern int dry_run; /* verification flag */ - - /* Bug workarounds. */ -@@ -217,3 +250,7 @@ - #define strtok my_strtok - extern char *my_strtok(); - #endif -+ -+__END_DECLS -+ -+#endif /* tcpd.h */ -diff -Naur tcp_wrappers_7.6/tcpdchk.c tcp_wrappers_7.6.gimli/tcpdchk.c ---- tcp_wrappers_7.6/tcpdchk.c 1997-02-11 19:13:25.000000000 -0600 -+++ tcp_wrappers_7.6.gimli/tcpdchk.c 2002-01-07 08:50:19.000000000 -0600 -@@ -350,6 +350,8 @@ - { - if (pat[0] == '@') { - tcpd_warn("%s: daemon name begins with \"@\"", pat); -+ } else if (pat[0] == '/') { -+ tcpd_warn("%s: daemon name begins with \"/\"", pat); - } else if (pat[0] == '.') { - tcpd_warn("%s: daemon name begins with dot", pat); - } else if (pat[strlen(pat) - 1] == '.') { -@@ -382,6 +384,8 @@ - { - if (pat[0] == '@') { /* @netgroup */ - tcpd_warn("%s: user name begins with \"@\"", pat); -+ } else if (pat[0] == '/') { -+ tcpd_warn("%s: user name begins with \"/\"", pat); - } else if (pat[0] == '.') { - tcpd_warn("%s: user name begins with dot", pat); - } else if (pat[strlen(pat) - 1] == '.') { -@@ -402,8 +406,13 @@ - static int check_host(pat) - char *pat; - { -+ char buf[BUFSIZ]; - char *mask; - int addr_count = 1; -+ FILE *fp; -+ struct tcpd_context saved_context; -+ char *cp; -+ char *wsp = " \t\r\n"; - - if (pat[0] == '@') { /* @netgroup */ - #ifdef NO_NETGRENT -@@ -422,6 +431,21 @@ - tcpd_warn("netgroup support disabled"); - #endif - #endif -+ } else if (pat[0] == '/') { /* /path/name */ -+ if ((fp = fopen(pat, "r")) != 0) { -+ saved_context = tcpd_context; -+ tcpd_context.file = pat; -+ tcpd_context.line = 0; -+ while (fgets(buf, sizeof(buf), fp)) { -+ tcpd_context.line++; -+ for (cp = strtok(buf, wsp); cp; cp = strtok((char *) 0, wsp)) -+ check_host(cp); -+ } -+ tcpd_context = saved_context; -+ fclose(fp); -+ } else if (errno != ENOENT) { -+ tcpd_warn("open %s: %m", pat); -+ } - } else if (mask = split_at(pat, '/')) { /* network/netmask */ - if (dot_quad_addr(pat) == INADDR_NONE - || dot_quad_addr(mask) == INADDR_NONE) -diff -Naur tcp_wrappers_7.6/try-from.8 tcp_wrappers_7.6.gimli/try-from.8 ---- tcp_wrappers_7.6/try-from.8 1969-12-31 18:00:00.000000000 -0600 -+++ tcp_wrappers_7.6.gimli/try-from.8 2002-01-07 08:50:19.000000000 -0600 -@@ -0,0 +1,28 @@ -+.TH TRY-FROM 8 "21th June 1997" Linux "Linux Programmer's Manual" -+.SH NAME -+try-from \- test program for the tcp_wrapper -+.SH SYNOPSIS -+.B try-from -+.SH DESCRIPTION -+The -+.B try-from -+command can be called via a remote shell command to find out -+if the hostname and address are properly recognized -+by the -+.B tcp_wrapper -+library, if username lookup works, and (SysV only) if the TLI -+on top of IP heuristics work. Diagnostics are reported through -+.BR syslog (3) -+and redirected to stderr. -+ -+Example: -+ -+rsh host /some/where/try-from -+ -+.SH SEE ALSO -+.BR hosts_access (5), -+.BR hosts_options (5), -+.BR tcpd (8) -+.SH AUTHOR -+Wietse Venema, Eindhoven University of Technology, The Netherlands. -+ -diff -Naur tcp_wrappers_7.6/weak_symbols.c tcp_wrappers_7.6.gimli/weak_symbols.c ---- tcp_wrappers_7.6/weak_symbols.c 1969-12-31 18:00:00.000000000 -0600 -+++ tcp_wrappers_7.6.gimli/weak_symbols.c 2002-01-07 08:50:19.000000000 -0600 -@@ -0,0 +1,11 @@ -+ /* -+ * @(#) weak_symbols.h 1.5 99/12/29 23:50 -+ * -+ * Author: Anthony Towns -+ */ -+ -+#ifdef HAVE_WEAKSYMS -+#include -+int deny_severity = LOG_WARNING; -+int allow_severity = SEVERITY; -+#endif -diff -Naur tcp_wrappers_7.6/workarounds.c tcp_wrappers_7.6.gimli/workarounds.c ---- tcp_wrappers_7.6/workarounds.c 1996-03-19 09:22:26.000000000 -0600 -+++ tcp_wrappers_7.6.gimli/workarounds.c 2002-01-07 08:50:19.000000000 -0600 -@@ -163,7 +163,11 @@ - int fix_getpeername(sock, sa, len) - int sock; - struct sockaddr *sa; -+#if !defined(__GLIBC__) - int *len; -+#else /* __GLIBC__ */ -+size_t *len; -+#endif /* __GLIBC__ */ - { - int ret; - struct sockaddr_in *sin = (struct sockaddr_in *) sa; diff --git a/tools/make-subversion b/tools/make-subversion new file mode 100644 index 000000000..d05fdd7f8 --- /dev/null +++ b/tools/make-subversion @@ -0,0 +1,79 @@ +#!/bin/bash +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# # +# 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 program 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 . # +# # +############################################################################### +############################################################################### +# +# A small helper to make the svn functions comfortable +# +############################################################################### + +svn_up() { + echo "Loading the latest source files..." + if [ "$3" ]; then + svn update -r $3 + else + svn update + fi + if [ $? -eq "0" ]; then + beautify message DONE + else + beautify message FAIL + exit 1 + fi +} + +svn_commit() { + if which nano; then + export EDITOR=nano + fi + if [ "`echo $SVN_REVISION | cut -c 3`" -eq "0" ]; then + svn_changelog + fi + update_langs + svn commit +} + +svn_diff(){ + echo -ne "Make a local diff to last svn revision" + svn diff > ipfire-diff-`date +'%Y-%m-%d-%H:%M'`-r`svn info | grep Revision | cut -c 11-`.diff + evaluate 1 + echo "Diff was successfully saved to ipfire-diff-`date +'%Y-%m-%d-%H:%M'`-r`svn info | grep Revision | cut -c 11-`.diff" + svn status +} + +svn_dist() { + if [ "$3" ]; then + SVN_REVISION=$3 + fi + + echo -en "REV $SVN_REVISION: Downloading code..." + svn export http://svn.ipfire.org/svn/ipfire/trunk ipfire-source/ --force > /dev/null + evaluate 1 + + echo -en "REV $SVN_REVISION: Fetching changelog..." + svn log http://svn.ipfire.org/svn/ipfire/trunk -r 1:$SVN_REVISION > ipfire-source/Changelog + evaluate 1 + + echo -en "REV $SVN_REVISION: Compressing files..." + tar cfj ipfire-source-r$SVN_REVISION.tar.bz2 ipfire-source + evaluate 1 + + rm -rf ipfire-source/ +}