This commit was manufactured by cvs2svn to create tag 'start'.

This commit is contained in:
Roland Gruber 2006-07-09 14:14:58 +00:00
parent 357b976e39
commit 5121356cb0
448 changed files with 6629 additions and 120261 deletions

View File

@ -1,13 +0,0 @@
# The "checkoutlist" file is used to support additional version controlled
# administrative files in $CVSROOT/CVSROOT, such as template files.
#
# The first entry on a line is a filename which will be checked out from
# the corresponding RCS file in the $CVSROOT/CVSROOT directory.
# The remainder of the line is an error message to use if the file cannot
# be checked out.
#
# File format:
#
# [<whitespace>]<filename><whitespace><error message><end-of-line>
#
# comment lines begin with '#'

View File

@ -1,15 +0,0 @@
# The "commitinfo" file is used to control pre-commit checks.
# The filter on the right is invoked with the repository and a list
# of files to check. A non-zero exit of the filter program will
# cause the commit to be aborted.
#
# The first entry on a line is a regular expression which is tested
# against the directory that the change is being committed to, relative
# to the $CVSROOT. For the first match that is found, then the remainder
# of the line is the name of the filter to run.
#
# If the repository name does not match any of the regular expressions in this
# file, the "DEFAULT" line is used, if it is specified.
#
# If the name "ALL" appears as a regular expression it is always used
# in addition to the first matching regex or "DEFAULT".

View File

@ -1,14 +0,0 @@
# Set this to "no" if pserver shouldn't check system users/passwords
#SystemAuth=no
# Put CVS lock files in this directory rather than directly in the repository.
#LockDir=/var/lock/cvs
# Set `TopLevelAdmin' to `yes' to create a CVS directory at the top
# level of the new working directory when using the `cvs checkout'
# command.
#TopLevelAdmin=no
# Set `LogHistory' to `all' or `TOFEWGCMAR' to log all transactions to the
# history file, or a subset as needed (ie `TMAR' logs all write operations)
#LogHistory=TOFEWGCMAR

View File

@ -1,23 +0,0 @@
# This file affects handling of files based on their names.
#
# The -t/-f options allow one to treat directories of files
# as a single file, or to transform a file in other ways on
# its way in and out of CVS.
#
# The -m option specifies whether CVS attempts to merge files.
#
# The -k option specifies keyword expansion (e.g. -kb for binary).
#
# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers)
#
# wildcard [option value][option value]...
#
# where option is one of
# -f from cvs filter value: path to filter
# -t to cvs filter value: path to filter
# -m update methodology value: MERGE or COPY
# -k expansion mode value: b, o, kkv, &c
#
# and value is a single-quote delimited value.
# For example:
#*.gif -k 'b'

View File

@ -1,21 +0,0 @@
# The "editinfo" file is used to allow verification of logging
# information. It works best when a template (as specified in the
# rcsinfo file) is provided for the logging procedure. Given a
# template with locations for, a bug-id number, a list of people who
# reviewed the code before it can be checked in, and an external
# process to catalog the differences that were code reviewed, the
# following test can be applied to the code:
#
# Making sure that the entered bug-id number is correct.
# Validating that the code that was reviewed is indeed the code being
# checked in (using the bug-id number or a seperate review
# number to identify this particular code set.).
#
# If any of the above test failed, then the commit would be aborted.
#
# Actions such as mailing a copy of the report to each reviewer are
# better handled by an entry in the loginfo file.
#
# One thing that should be noted is the the ALL keyword is not
# supported. There can be only one entry that matches a given
# repository.

View File

@ -1,29 +0,0 @@
# The "loginfo" file controls where "cvs commit" log information
# is sent. The first entry on a line is a regular expression which must match
# the directory that the change is being made to, relative to the
# $CVSROOT. If a match is found, then the remainder of the line is a filter
# program that should expect log information on its standard input.
#
# If the repository name does not match any of the regular expressions in this
# file, the "DEFAULT" line is used, if it is specified.
#
# If the name ALL appears as a regular expression it is always used
# in addition to the first matching regex or DEFAULT.
#
# You may specify a format string as part of the
# filter. The string is composed of a `%' followed
# by a single format character, or followed by a set of format
# characters surrounded by `{' and `}' as separators. The format
# characters are:
#
# s = file name
# V = old version number (pre-checkin)
# v = new version number (post-checkin)
#
# For example:
#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog
# or
#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
#
# commit messages for lam-cvs
DEFAULT /cvsroot/sitedocs/CVSROOT/cvstools/syncmail %{sVv} lam-cvs@lists.sourceforge.net

View File

@ -1,26 +0,0 @@
# Three different line formats are valid:
# key -a aliases...
# key [options] directory
# key [options] directory files...
#
# Where "options" are composed of:
# -i prog Run "prog" on "cvs commit" from top-level of module.
# -o prog Run "prog" on "cvs checkout" of module.
# -e prog Run "prog" on "cvs export" of module.
# -t prog Run "prog" on "cvs rtag" of module.
# -u prog Run "prog" on "cvs update" of module.
# -d dir Place module in directory "dir" instead of module name.
# -l Top-level directory only -- do not recurse.
#
# NOTE: If you change any of the "Run" options above, you'll have to
# release and re-checkout any working directories of these modules.
#
# And "directory" is a path to a directory relative to $CVSROOT.
#
# The "-a" option specifies an alias. An alias is interpreted as if
# everything on the right of the "-a" had been typed on the command line.
#
# You can encode a module within a module by using the special '&'
# character to interpose another module into the current module. This
# can be useful for creating a module that consists of many directories
# spread out over the entire source repository.

View File

@ -1,12 +0,0 @@
# The "notify" file controls where notifications from watches set by
# "cvs watch add" or "cvs edit" are sent. The first entry on a line is
# a regular expression which is tested against the directory that the
# change is being made to, relative to the $CVSROOT. If it matches,
# then the remainder of the line is a filter program that should contain
# one occurrence of %s for the user to notify, and information on its
# standard input.
#
# "ALL" or "DEFAULT" can be used in place of the regular expression.
#
# For example:
#ALL mail %s -s "CVS notification"

View File

@ -1,13 +0,0 @@
# The "rcsinfo" file is used to control templates with which the editor
# is invoked on commit and import.
#
# The first entry on a line is a regular expression which is tested
# against the directory that the change is being made to, relative to the
# $CVSROOT. For the first match that is found, then the remainder of the
# line is the name of the file that contains the template.
#
# If the repository name does not match any of the regular expressions in this
# file, the "DEFAULT" line is used, if it is specified.
#
# If the name "ALL" appears as a regular expression it is always used
# in addition to the first matching regex or "DEFAULT".

View File

@ -1,20 +0,0 @@
# The "taginfo" file is used to control pre-tag checks.
# The filter on the right is invoked with the following arguments:
#
# $1 -- tagname
# $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d
# $3 -- repository
# $4-> file revision [file revision ...]
#
# A non-zero exit of the filter program will cause the tag to be aborted.
#
# The first entry on a line is a regular expression which is tested
# against the directory that the change is being committed to, relative
# to the $CVSROOT. For the first match that is found, then the remainder
# of the line is the name of the filter to run.
#
# If the repository name does not match any of the regular expressions in this
# file, the "DEFAULT" line is used, if it is specified.
#
# If the name "ALL" appears as a regular expression it is always used
# in addition to the first matching regex or "DEFAULT".

View File

@ -1,21 +0,0 @@
# The "verifymsg" file is used to allow verification of logging
# information. It works best when a template (as specified in the
# rcsinfo file) is provided for the logging procedure. Given a
# template with locations for, a bug-id number, a list of people who
# reviewed the code before it can be checked in, and an external
# process to catalog the differences that were code reviewed, the
# following test can be applied to the code:
#
# Making sure that the entered bug-id number is correct.
# Validating that the code that was reviewed is indeed the code being
# checked in (using the bug-id number or a seperate review
# number to identify this particular code set.).
#
# If any of the above test failed, then the commit would be aborted.
#
# Actions such as mailing a copy of the report to each reviewer are
# better handled by an entry in the loginfo file.
#
# One thing that should be noted is the the ALL keyword is not
# supported. There can be only one entry that matches a given
# repository.

View File

@ -1,79 +1,3 @@
28.07.2005 0.4.10
- PHP5 compatibility added
09.03.2005 0.4.9
- fixed bugs:
fixed error messages when moving an user account
fixed problem with special group SIDs
lamdaemon.pl security fix
26.01.2005 0.4.8
- allow "%" at the beginning of Samba home/profile path (1107998)
- fixed bugs:
fixed IE fix ;-)
no more warnings for profiles with no additional groups set
19.12.2004 0.4.7
- added "*.exe" to Samba logon script regex (1081715)
- fixed bugs:
fixed doctype of main frame
removed syntax check for LDAP suffixes
fixed IE bug at login
fixed encoding in HTTP header
passwords with "'" are now handled correctly at login (1081460)
fixed Samba flags if multiple hosts were created
updated .htaccess files to be compatible with newer Apache versions
26.05.2004 0.4.6
- fixed bugs:
password hashes were not disabled correctly
street was copied to postal code on modify (938502)
underscore was not allowed for host names (934445)
deleting postal address or facsimile number failed (948616)
TLS error handling (958497)
smaller fixes on personal settings page
21.03.2004 0.4.5
- added French translation
- fixed bugs:
StatusMessages with additional variables did not work
Samba hosts had unnecessary objectClass shadowAccount (910084)
Samba host passwords were still wrong
LAM had problems with non-standard spelled object classes (907636)
Perl scripts did not work if Perl is not installed in /usr/bin/perl (913554)
problems when cn!=uid (915041)
home directories were not deleted by lamdaemon.pl (913552)
29.02.2004 0.4.4 (stable)
- fixed bugs:
plain posix groups could not be used as Samba 3 primary group
if magic_quotes_gpc in php.ini is was set to "Off", several pages did not work
some smaller bugs in mass upload
Samba hash values for hosts were not correct
Unix passwords could be disabled but not reenabled
fixed problem with eval() in status.inc (894433)
08.02.2004 0.4.3
- new login layout
- added Hungarian and Japanese translations
- fixed bugs:
Samba paswords were sometimes empty for new users (892272)
links in list views may not work with web servers other than Apache
21.01.2004 0.4.2
- added config wizard
- MHash is only needed for PHP < 4.3
- use Blowfish for encryption instead of MCrypt
29.12.2003 0.4.1
- better error handling at login

View File

@ -6,16 +6,11 @@ Installation Instructions for LAM
1. Requirements
- Apache webserver (SSL optional) with installed PHP-Module (PHP-Module with
ldap, gettext, mcrypt+mhash optional)
ldap, gettext, mcrypt, mhash)
- Perl
- OpenLDAP (>2.0 with samba.schema)
- Openldap (>2.0)
- A web browser :-)
MHash is only needed if you use PHP < 4.3 and want to use SHA or SSHA
for password hashes.
MCrypt will be used if available, otherwise Blowfish will be used
to store your LDAP password in the session file.
Getting mcrypt and mhash for Suse/RedHat:
Either you compile PHP4 yourself or you use some unofficial packages:
@ -24,35 +19,26 @@ Installation Instructions for LAM
- RedHat: http://ftp.horde.org/pub/RPMS
Samba.schema: LAM currently depends on the schema file from Samba.
You can find samba.schema in the Samba tarball (examples/LDAP).
Add this file to your slapd.conf to get LAM working.
OpenLDAP + Suse: Do not use the rfc2307bis.schema but nis.schema instead.
2. Installation
* Extract package with:
tar xzf ldap-account-manager_<version>.tar.gz
tar xzf lam-version.tar.gz
* Copy files into the html-file scope of the webserver. For example
/apache/htdocs.
* Set appropriate file permissions:
- lam/sess: write permission for apache user
- lam/tmp: write permission for apache user
- lam/config (with subdirectories): write permission for apache user
- lam/lib: perl files must be set executable (See also
docs/readme.lamdeamon.txt)
- /lam/sess: write permission for apache user
- /lam/tmp: write permission for apache user
- /lam/config (with subdirectories): write permission for apache user
- /lam/lib: perl files must be set executable (See also
docs/readme.lamdeamon.pl)
* Configure config.cfg and create a configuration profile.
Copy config.cfg_sample to config.cfg and set the master password and default
profile.
- With web browser:
Follow the link "Configuration Login" from the start page (lam/index.html).
(The default password to edit the options is "lam")
Then use the web interface with the link "Configuration Login" (start file is /lam/index.html)
or configure LAM manually. (The default password to edit the options is "lam")
- Manually:
A default config file can be found in /lam/config/lam.conf_sample.

View File

@ -2,7 +2,7 @@
LAM - Readme
============
A set of PHP-scripts to administrate Unix and Samba accounts in an LDAP server.
A set of PHP-scripts to administrate Unix and Samba accounts in a LDAP server.
LAM runs on any webserver with PHP4 support and connects to your LDAP server
unencrypted or via SSL.
The application manages accounts for users, groups and Samba hosts in
@ -11,9 +11,10 @@ LAM - Readme
http://sourceforge.net/projects/lam/
Copyright (C) 2003 - 2004 Michael Duergner <michael@duergner.com>
Roland Gruber <mail@rolandgruber.de>
Tilo Lutz <tilolutz@gmx.de>
Copyright (C) 2003 Michael Duergner <michael@duergner.com>
Roland Gruber <mail@rolandgruber.de>
Tilo Lutz <tilolutz@gmx.de>
Leonhard Walchshäusl <dechutes@gmx.net>
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
@ -59,12 +60,19 @@ LAM - Readme
Installation:
Please see the INSTALL file.
Known Bugs:
- If you fill in the Unix workstations field the LDAP add/modify operation
may fail. This is because the host attribute is provided only by
objectClass account which conflicts with inetOrgPerson.
If you want to use host restrictions, add the host attribute to
inetOrgPerson in your schema file.
Documentation:
Basic documentation is available in the directory "docs".
Basic documentation available in /docs
Internationalization:
If you want to use a translated version of LAM be sure to install the
needed locales. See locale/ for a list of supported locales and languages.
needed locales. See locale/ for a list of supported locales.
Debian users can add locales with "dpkg-reconfigure locales".
Security:
@ -72,9 +80,8 @@ LAM - Readme
LAM needs to store your LDAP username + password in the session. The session
files are saved in sess/ and are accessible only by the web server. To increase
security username and password are encrypted with MCrypt/AES or Blowfish.
The key and IV are generated at random when you log in. They are stored in two
cookies.
security username and password are encrypted with AES (256 bit). The key and iv
are generated at random when you log in. They are stored in two cookies.
Have fun!

View File

@ -1,4 +1,13 @@
stable
???
0.5
- check security
- modular architecture
0.4.2
- add install wizard
- remove MCrypt functions (use Blowfish)

View File

@ -3,17 +3,10 @@
# Each line consists of a : seperated entrys. The first entry is the link to the language definition, the second is the language description. Further entries are not used yet.
# Normally you don't have to edit this file manually. It is modified automatically when you add a new language in the Configuration-Site.
# Englisch language
en_GB:ISO-8859-1:English (Great Britain)
# Englisch Language
en_GB:ISO-8859-1:English (Britain)
# German language
# German Language
de_DE:ISO-8859-15:Deutsch (Deutschland)
# Hungarian language
hu_HU:ISO-8859-2:Magyar (Magyarorszag)
# Japanese language
ja_JP.eucJP:EUC-JP:Japanese (EUC)
# French language
fr_FR:ISO-8859-15:Francais (France)

View File

@ -0,0 +1,4 @@
dies ist ein test $general_username test2
3
4
5

View File

@ -1,17 +0,0 @@
/bin/ash
/bin/bash
/bin/bash1
/bin/csh
/bin/false
/bin/ksh
/bin/sh
/bin/tcsh
/bin/true
/bin/zsh
/usr/bin/csh
/usr/bin/ksh
/usr/bin/passwd
/usr/bin/bash
/usr/bin/rbash
/usr/bin/tcsh
/usr/bin/zsh

View File

@ -1,51 +0,0 @@
This software is copyright (c) 2003 - 2004 by Tilo Lutz, Roland Gruber and Michael Duergner.
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 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
The complete license can be found in the file COPYING.
Some parts of this package have other, compatible licences. These are:
A: GNU Lesser General Public License
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
The complete license can be found in the file docs/LGPL-license.txt.
B: Freeware
You may use, modify and redistribute this software as you wish.
Programs and licenses with other licenses and/or authors than the
main license and authors:
lib/blowfish.inc A 2002-2003 Mike Cochrane
lib/fpdf.php B 2003 Olivier Plathey

View File

@ -1,8 +1,3 @@
Samba.schema: LAM currently depends on the schema file from Samba.
You can find samba.schema in the Samba tarball (examples/LDAP).
Add this file to your slapd.conf to get LAM working.
Access to the webfrontend:
- If you configured Apache(-SSL) at installation

View File

@ -1,86 +1,3 @@
ldap-account-manager (0.4.10-2) unstable; urgency=low
* fixed debconf dependency
-- Roland Gruber <post@rolandgruber.de> Wed, 3 Aug 2005 15:25:29 +0200
ldap-account-manager (0.4.10-1) unstable; urgency=low
* Updated to new upstream release 0.4.10.
-- Roland Gruber <post@rolandgruber.de> Wed, 27 Jul 2005 11:39:53 +0200
ldap-account-manager (0.4.9-2) unstable; urgency=low
* Closes: #300007: fixed typo
-- Roland Gruber <post@rolandgruber.de> Thu, 17 Mar 2005 19:20:29 +0100
ldap-account-manager (0.4.9-1) unstable; urgency=low
* Updated to new upstream release
* Closes: #296498: added documentation for samba.schema
-- Roland Gruber <post@rolandgruber.de> Wed, 2 Mar 2005 19:52:29 +0100
ldap-account-manager (0.4.8-1) unstable; urgency=low
* Updated to new upstream version 0.4.8.
-- Roland Gruber <post@rolandgruber.de> Sun, 23 Jan 2005 20:03:36 +0100
ldap-account-manager (0.4.7-1) unstable; urgency=low
* Updated to new upstream version 0.4.7.
-- Roland Gruber <post@rolandgruber.de> Thu, 16 Dec 2004 21:06:58 +0100
ldap-account-manager (0.4.6-3) unstable; urgency=low
* Closes: #281781: syntax error in apache.conf fixed
* added watch file
-- Roland Gruber <post@rolandgruber.de> Sun, 21 Nov 2004 13:18:43 +0100
ldap-account-manager (0.4.6-2) unstable; urgency=low
* Added template to change master configuration password.
* Closes: #257137: Interface configuration has a default password
* Closes: #260733: expanded PHP dependency with libapache2-mod-php4
-- Roland Gruber <post@rolandgruber.de> Fri, 23 Jul 2004 14:50:56 +0200
ldap-account-manager (0.4.6-1) unstable; urgency=low
* Updated to new upstream version 0.4.6.
-- Roland Gruber <post@rolandgruber.de> Thu, 20 May 2004 19:37:53 +0200
ldap-account-manager (0.4.5-1) unstable; urgency=low
* Updated to new upstream version 0.4.5.
-- Roland Gruber <post@rolandgruber.de> Sat, 20 Mar 2004 16:52:00 +0100
ldap-account-manager (0.4.4-1) unstable; urgency=low
* Updated to new upstream version (0.4.4)
* Closes: #232820: config/shells is no longer a symbolic link
-- Roland Gruber <post@rolandgruber.de> Wed, 25 Feb 2004 21:07:36 +0100
ldap-account-manager (0.4.3-1) unstable; urgency=low
* Updated to new upstream version (0.4.3)
-- Roland Gruber <post@rolandgruber.de> Sun, 8 Feb 2004 17:15:47 +0100
ldap-account-manager (0.4.2-1) unstable; urgency=low
* Updated to new upstream version (0.4.2)
-- Roland Gruber <post@rolandgruber.de> Thu, 15 Jan 2004 16:22:15 +0100
ldap-account-manager (0.4.1-1) unstable; urgency=low
* Updated to new upstream version (0.4.1)

17
lam-0.4/debian/copyright Normal file
View File

@ -0,0 +1,17 @@
This package was debianized by Roland Gruber <linux@rolandgruber.de> on
Sat, 3 May 2003 21:14:23 +0200.
It was downloaded from http://www.sf.net/projects/lam
Upstream Author(s): Roland Gruber <post@rolandgruber.de>
Copyright:
This software is copyright (c) 2003 by Tilo Lutz, Roland Gruber, Michael Duergner
and Leo Walchshaeusl.
You are free to distribute this software under the terms of
the GNU General Public License.
On Debian systems, the complete text of the GNU General Public
License can be found in /usr/share/common-licenses/GPL file.

View File

@ -27,7 +27,7 @@ Alias /lam /usr/share/ldap-account-manager
<Directory /usr/share/ldap-account-manager/lib>
Options -Indexes
<Files ~ .*>
<Files ~ *>
Order allow,deny
Deny from all
</Files>

View File

@ -4,70 +4,20 @@ Source: ldap-account-manager
Section: web
Priority: extra
Maintainer: Roland Gruber <post@rolandgruber.de>
Standards-Version: 3.6.2
Standards-Version: 3.5.9
Home-Page: <URL:http://lam.sf.net>
Upstream-Source: <URL:http://www.sourceforge.net/projects/lam>
Description: Webfrontend to manage Samba and Unix accounts
Origin: debian
Copyright: GPL
This software is copyright (c) 2003 - 2004 by Tilo Lutz, Roland Gruber
and Michael Duergner.
.
.
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 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
.
.
Some parts of this package have other, compatible licences. These are:
.
A: GNU Lesser General Public License
.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
.
This library 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
Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
.
On Debian systems, the complete text of the GNU Lesser General Public
License can be found in /usr/share/common-licenses/LGPL file.
.
B: Freeware
.
You may use, modify and redistribute this software as you wish.
.
.
Programs and licenses with other licenses and/or authors than the
main license and authors:
.
lib/blowfish.inc A 2002-2003 Mike Cochrane
lib/fpdf.php B 2003 Olivier Plathey
Copyright 2003 Tilo Lutz, Roland Gruber, Michael Duergner, Leo Walchshaeusel
Major-Changes:
Package: ldap-account-manager
Architecture: all
Depends: php4 | php4-cgi | libapache2-mod-php4, php4-ldap, apache | apache-ssl | httpd, perl, wwwconfig-common, debconf | debconf-2.0
Recommends: php4-mhash
Suggests: ldap-server, sudo, php4-mcrypt
Depends: php4 | php4-cgi, php4-ldap , php4-mcrypt , php4-mhash , apache | apache-ssl | httpd, perl, wwwconfig-common, debconf
Suggests: ldap-server, sudo
Conflicts: php4-apc
Description: webfrontend for managing Unix and Samba accounts in an LDAP directory
Description: Webfrontend for managing Unix and Samba accounts in a LDAP directory
LDAP Account Manager (LAM) runs on an existing webserver. LAM
supports LDAP connections via SSL and TLS. It uses the
Samba 2.x or Samba 3 schema and manages user, group and host
@ -76,9 +26,7 @@ Description: webfrontend for managing Unix and Samba accounts in an LDAP directo
exported as PDF file. There is also a script
included which manages quota and homedirectories, you have to
setup sudo if you want to use it. LAM is translated to
English, French, German, Hungarian and Japanese.
.
Homepage: http://lam.sourceforge.net/
English and German.
Install: sh
yada install -data -into /usr/share/ldap-account-manager index.html
yada install -data -into /var/lib/ldap-account-manager/tmp tmp/.htaccess
@ -103,15 +51,11 @@ Install: sh
yada install -data -into /usr/share/ldap-account-manager/lib lib/*.js
yada install -exec -into /usr/share/ldap-account-manager/lib lib/*.pl
yada install -data -into /usr/share/ldap-account-manager/lib/font lib/font/*.php
yada install -data -into /usr/share/ldap-account-manager/lib/font/makefont lib/font/makefont/*.php
yada install -data -into /usr/share/ldap-account-manager/lib/font/makefont lib/font/makefont/*.map
yada install -dir /usr/share/ldap-account-manager/locale
yada install -dir /usr/share/ldap-account-manager/locale/de_DE
yada install -data -into /usr/share/ldap-account-manager/locale/de_DE/LC_MESSAGES locale/de_DE/LC_MESSAGES/messages.?o
yada install -dir /usr/share/ldap-account-manager/locale/hu_HU
yada install -data -into /usr/share/ldap-account-manager/locale/hu_HU/LC_MESSAGES locale/hu_HU/LC_MESSAGES/messages.?o
yada install -dir /usr/share/ldap-account-manager/locale/ja_JP
yada install -data -into /usr/share/ldap-account-manager/locale/ja_JP/LC_MESSAGES locale/ja_JP/LC_MESSAGES/messages.?o
yada install -dir /usr/share/ldap-account-manager/locale/fr_FR
yada install -data -into /usr/share/ldap-account-manager/locale/fr_FR/LC_MESSAGES locale/fr_FR/LC_MESSAGES/messages.?o
yada install -data -into /var/lib/ldap-account-manager/sess sess/.htaccess
yada install -data -into /usr/share/ldap-account-manager/style style/*.css
yada install -data -into /usr/share/ldap-account-manager/templates templates/*.php
@ -119,7 +63,6 @@ Install: sh
yada install -data -into /usr/share/ldap-account-manager/templates/config templates/config/*.php
yada install -data -into /usr/share/ldap-account-manager/templates/lists templates/lists/*.php
yada install -data -into /usr/share/ldap-account-manager/templates/profedit templates/profedit/*.php
yada install -data -into /usr/share/ldap-account-manager/templates/confwiz templates/confwiz/*.php
yada install -conffile -subdir ldap-account-manager -as apache.conf debian/lam.apache.conf
yada install -doc -as changelog HISTORY
yada install -doc -as changelog.Debian debian/changelog
@ -144,23 +87,12 @@ Templates:
LAM will add an alias to your httpd.conf which allows you to
access LAM at http(s)://localhost/lam. If you want an alias other than
"lam" please specify it here.
.
Template: ldap-account-manager/passwd
Type: string
Default: lam
Description: Enter master configuration password (clear text):
The configuration profiles are secured by a master password.
You will need it to create and delete profiles. As default it is
set to "lam" and can be changed directly in LAM. But you can also
change it now.
Config: bash
db_subst "ldap-account-manager/webserver" "webserver" "Apache" || true
db_input medium "ldap-account-manager/webserver" || true
db_go
db_input low "ldap-account-manager/alias" || true
db_go
db_input low "ldap-account-manager/passwd" || true
db_go
Preinst: bash
if [ ! -d /var/lib/ldap-account-manager ]; then \
mkdir /var/lib/ldap-account-manager; fi
@ -190,9 +122,6 @@ Postinst: bash
alias="$RET"
perl -pi -e "s/Alias \/.* \/usr\/share\/ldap-account-manager/Alias \/$alias \/usr\/share\/ldap-account-manager/g"\
/etc/ldap-account-manager/apache.conf
db_get "ldap-account-manager/passwd"
passwd="$RET"
perl -pi -e "s/password: .*/password: $passwd/g" /etc/ldap-account-manager/config.cfg
db_get "ldap-account-manager/webserver"
webserver="$RET"
case "$webserver" in

View File

@ -1,5 +0,0 @@
# format version number, currently 2; this line is compulsory!
version=2
# LDAP Account Manager at Sourceforge
http://prdownloads.sourceforge.net/lam/ldap-account-manager_(.*)\.tar\.gz

View File

@ -1,502 +0,0 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

160
lam-0.4/docs/README.fpdf.htm → lam-0.4/docs/README.fpdf Executable file → Normal file
View File

@ -14,25 +14,28 @@
<B>6.</B> <A HREF='#6'>When I'm on SSL, IE can't open the PDF.</A><BR>
<B>7.</B> <A HREF='#7'>When I execute a script I get the message "FPDF error: Don't alter the locale before including class file".</A><BR>
<B>8.</B> <A HREF='#8'>I try to put a PNG and Acrobat says "There was an error processing a page. A drawing error occurred".</A><BR>
<B>9.</B> <A HREF='#9'>I encounter the following error when I try to generate a PDF: Warning: Cannot add header information - headers already sent by (output started at script.php:X)</A><BR>
<B>10.</B> <A HREF='#10'>I try to display a variable in the Header method but nothing prints.</A><BR>
<B>11.</B> <A HREF='#11'>I defined the Header and Footer methods in my PDF class but nothing appears.</A><BR>
<B>12.</B> <A HREF='#12'>I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.</A><BR>
<B>13.</B> <A HREF='#13'>I try to put the euro symbol but it doesn't work.</A><BR>
<B>14.</B> <A HREF='#14'>I draw a frame with very precise dimensions, but when printed I notice some differences.</A><BR>
<B>15.</B> <A HREF='#15'>I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?</A><BR>
<B>16.</B> <A HREF='#16'>What's the limit of the file sizes I can generate with FPDF?</A><BR>
<B>17.</B> <A HREF='#17'>Can I modify a PDF with FPDF?</A><BR>
<B>18.</B> <A HREF='#18'>I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?</A><BR>
<B>19.</B> <A HREF='#19'>Can I convert an HTML page to PDF with FPDF?</A><BR>
<B>20.</B> <A HREF='#20'>Can I concatenate PDF files with FPDF?</A><BR>
<B>9.</B> <A HREF='#9'>I try to put an image and Acrobat says "There was an error processing a page. Wrong operand type".</A><BR>
<B>10.</B> <A HREF='#10'>I'd like to put my image in real size in the PDF. How can I convert pixels to mm?</A><BR>
<B>11.</B> <A HREF='#11'>I encounter the following error when I try to generate a PDF: Warning: Cannot add header information - headers already sent by (output started at script.php:X)</A><BR>
<B>12.</B> <A HREF='#12'>I try to display a variable in the Header method but nothing prints.</A><BR>
<B>13.</B> <A HREF='#13'>I defined the Header and Footer methods in my PDF class but nothing appears.</A><BR>
<B>14.</B> <A HREF='#14'>I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.</A><BR>
<B>15.</B> <A HREF='#15'>I try to put the euro symbol but it doesn't work.</A><BR>
<B>16.</B> <A HREF='#16'>I draw a frame with very precise dimensions, but when printed I notice some differences.</A><BR>
<B>17.</B> <A HREF='#17'>I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?</A><BR>
<B>18.</B> <A HREF='#18'>What's the limit of the file sizes I can generate with FPDF?</A><BR>
<B>19.</B> <A HREF='#19'>Can I modify a PDF with FPDF?</A><BR>
<B>20.</B> <A HREF='#20'>I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?</A><BR>
<B>21.</B> <A HREF='#21'>Can I convert an HTML page to PDF with FPDF?</A><BR>
<B>22.</B> <A HREF='#22'>Can I concatenate PDF files with FPDF?</A><BR>
<B>23.</B> <A HREF='#23'>How can I activate the protections on a PDF? I'd like to prevent people from copying the text or modifying the document.</A><BR>
<BR><BR>
<P><A NAME='1'></A><B>1.</B> <FONT CLASS='st'>What's exactly the license of FPDF? Are there any usage restrictions?</FONT></P>
FPDF is Freeware (it is stated at the beginning of the source file). There is no usage
<A NAME='1'></A><B>1.</B> <FONT CLASS='st'>What's exactly the license of FPDF? Are there any usage restrictions?</FONT>
<P>FPDF is Freeware (it is stated at the beginning of the source file). There is no usage
restriction. You may embed it freely in your application (commercial or not), with or
without modification. You may redistribute it, too.
<P><A NAME='2'></A><B>2.</B> <FONT CLASS='st'>When I try to create a PDF, a lot of weird characters show on the screen. Why?</FONT></P>
These "weird" characters are in fact the actual content of your PDF. This behaviour is a bug of
without modification.</P>
<A NAME='2'></A><B>2.</B> <FONT CLASS='st'>When I try to create a PDF, a lot of weird characters show on the screen. Why?</FONT>
<P>These "weird" characters are in fact the actual content of your PDF. This behaviour is a bug of
IE. When it first receives an HTML page, then a PDF from the same URL, it displays it directly
without launching Acrobat. This happens frequently during the development stage: on the least
script error, an HTML page is sent, and after correction, the PDF arrives.
@ -41,9 +44,9 @@ To solve the problem, simply quit and restart IE. You can also go to another URL
back.
<BR>
To avoid this kind of inconvenience during the development, you can generate the PDF directly
to a file and open it through the explorer.
<P><A NAME='3'></A><B>3.</B> <FONT CLASS='st'>I try to generate a PDF and IE displays a blank page. What happens?</FONT></P>
First of all, check that you send nothing to the browser after the PDF (not even a space or a
to a file and open it through the explorer.</P>
<A NAME='3'></A><B>3.</B> <FONT CLASS='st'>I try to generate a PDF and IE displays a blank page. What happens?</FONT>
<P>First of all, check that you send nothing to the browser after the PDF (not even a space or a
carriage return). You can put an exit statement just after the call to the Output() method to
be sure.
<BR>
@ -53,8 +56,8 @@ test your application with as many IE versions as possible (at least if you're o
The problem occurs mostly with the POST method, so it is strongly advised to avoid it (all the
more that it causes other problems, see the next question). The GET works better but may fail
when the URL becomes too long: don't use a query string with more than 45 characters. However, a
tip exists to exceed this limit: end the URL with .pdf, which tricks IE. If you use a form, you
can add a hidden field at the last position:
tip exists to exceed this limit: end the URL with .pdf, which tricks IE. If you use a
formular, you can add a hidden field at the last position:
<BR>
<BR>
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
@ -108,7 +111,7 @@ if(substr($f,0,3)!='tmp' or strpos($f,'/') or strpos($f,'\\'))<BR>
if(!file_exists($f))<BR>
&nbsp;&nbsp;&nbsp;&nbsp;die('File does not exist');<BR>
//Handle special IE request if needed<BR>
if($HTTP_SERVER_VARS['HTTP_USER_AGENT']=='contype')<BR>
if($HTTP_ENV_VARS['USER_AGENT']=='contype')<BR>
{<BR>
&nbsp;&nbsp;&nbsp;&nbsp;Header('Content-Type: application/pdf');<BR>
&nbsp;&nbsp;&nbsp;&nbsp;exit;<BR>
@ -168,12 +171,12 @@ directory. You may call it where you want, for instance in the script which gene
<BR>
<BR>
Remark: it is necessary to open the PDF in a new window, as you can't go backwards due to the
redirection.
<P><A NAME='4'></A><B>4.</B> <FONT CLASS='st'>I send parameters using the POST method and the values don't appear in the PDF.</FONT></P>
It's a problem affecting some versions of IE (especially the first 5.5). See the previous
question for the ways to work around it.
<P><A NAME='5'></A><B>5.</B> <FONT CLASS='st'>When I use a PHP session, IE doesn't display my PDF any more but asks me to download it.</FONT></P>
It's a problem affecting some versions of IE. To work around it, add the following line before
redirection.</P>
<A NAME='4'></A><B>4.</B> <FONT CLASS='st'>I send parameters using the POST method and the values don't appear in the PDF.</FONT>
<P>It's a problem affecting some versions of IE (especially the first 5.5). See the previous
question for the ways to work around it.</P>
<A NAME='5'></A><B>5.</B> <FONT CLASS='st'>When I use a PHP session, IE doesn't display my PDF any more but asks me to download it.</FONT>
<P>It's a problem affecting some versions of IE. To work around it, add the following line before
session_start():
<BR>
<BR>
@ -182,30 +185,37 @@ session_start():
session_cache_limiter('private');
</TT>
</TD></TR></TABLE><BR>
or do a redirection as explained in question 3.
<P><A NAME='6'></A><B>6.</B> <FONT CLASS='st'>When I'm on SSL, IE can't open the PDF.</FONT></P>
The problem may be fixed by adding this line:<BR>
or do a redirection as explained in question 3.</P>
<A NAME='6'></A><B>6.</B> <FONT CLASS='st'>When I'm on SSL, IE can't open the PDF.</FONT>
<P>The problem may be fixed by adding this line:<BR>
<BR>
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
<TT>
Header('Pragma: public');
</TT>
</TD></TR></TABLE><BR>
<P><A NAME='7'></A><B>7.</B> <FONT CLASS='st'>When I execute a script I get the message "FPDF error: Don't alter the locale before including class file".</FONT></P>
When the decimal separator is configured as a comma before including a file, there is a
<A HREF="http://bugs.php.net/bug.php?id=17105" TARGET="_blank">bug</A> in some PHP versions and decimal
numbers get truncated. Therefore you shouldn't make a call to setlocale() before including the class.
</P>
<A NAME='7'></A><B>7.</B> <FONT CLASS='st'>When I execute a script I get the message "FPDF error: Don't alter the locale before including class file".</FONT>
<P>When the decimal separator is configured as a comma before including a file, there is a
<A HREF="http://bugs.php.net/bug.php?id=17105" TARGET="_blank">bug</A> in PHP and decimal numbers
get truncated. Therefore you shouldn't make a call to setlocale() before including the class.
On Unix, you shouldn't set the LC_ALL environment variable neither, for it is equivalent to a
setlocale() call.
<P><A NAME='8'></A><B>8.</B> <FONT CLASS='st'>I try to put a PNG and Acrobat says "There was an error processing a page. A drawing error occurred".</FONT></P>
Acrobat 5 has a bug and is unable to display transparent monochrome images (i.e. with 1 bit per
pixel). Remove transparency or save your image in 16 colors (4 bits per pixel) or more.
<P><A NAME='9'></A><B>9.</B> <FONT CLASS='st'>I encounter the following error when I try to generate a PDF: Warning: Cannot add header information - headers already sent by (output started at script.php:X)</FONT></P>
You must send nothing to the browser except the PDF itself: no HTML, no space, no carriage return,
neither before nor after. The script outputs something at line X.
<P><A NAME='10'></A><B>10.</B> <FONT CLASS='st'>I try to display a variable in the Header method but nothing prints.</FONT></P>
You have to use the <TT>global</TT> keyword, for instance:
setlocale() call.</P>
<A NAME='8'></A><B>8.</B> <FONT CLASS='st'>I try to put a PNG and Acrobat says "There was an error processing a page. A drawing error occurred".</FONT>
<P>Acrobat 5 has a bug and is unable to display transparent monochrome images (i.e. with 1 bit per
pixel). Remove transparency or save your image in 16 colors (4 bits per pixel) or more.</P>
<A NAME='9'></A><B>9.</B> <FONT CLASS='st'>I try to put an image and Acrobat says "There was an error processing a page. Wrong operand type".</FONT>
<P>You have to give at least one dimension; height and width can't be both equal to zero.</P>
<A NAME='10'></A><B>10.</B> <FONT CLASS='st'>I'd like to put my image in real size in the PDF. How can I convert pixels to mm?</FONT>
<P>An image has no "real size". The dimension it is given in the document is arbitrary. Except if
you want to impose a particular resolution (for instance 72dpi, which is the one typically used
on screen display), in which case the ratio between the pixel width and the resolution gives the
dimension.</P>
<A NAME='11'></A><B>11.</B> <FONT CLASS='st'>I encounter the following error when I try to generate a PDF: Warning: Cannot add header information - headers already sent by (output started at script.php:X)</FONT>
<P>You must send nothing to the browser except the PDF itself: no HTML, no space, no carriage return,
neither before nor after. The script outputs something at line X.</P>
<A NAME='12'></A><B>12.</B> <FONT CLASS='st'>I try to display a variable in the Header method but nothing prints.</FONT>
<P>You have to use the <TT>global</TT> keyword, for instance:
<BR>
<BR>
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
@ -219,20 +229,20 @@ function Header()<BR>
}
</TT>
</TD></TR></TABLE><BR>
<P><A NAME='11'></A><B>11.</B> <FONT CLASS='st'>I defined the Header and Footer methods in my PDF class but nothing appears.</FONT></P>
You have to create an object from the PDF class, not FPDF:<BR>
</P>
<A NAME='13'></A><B>13.</B> <FONT CLASS='st'>I defined the Header and Footer methods in my PDF class but nothing appears.</FONT>
<P>You have to create an object from the PDF class, not FPDF:<BR>
<BR>
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
<TT>
$pdf=new PDF();
</TT>
</TD></TR></TABLE><BR>
<P><A NAME='12'></A><B>12.</B> <FONT CLASS='st'>I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.</FONT></P>
You have to enclose your string with double quotes, not single ones.
<P><A NAME='13'></A><B>13.</B> <FONT CLASS='st'>I try to put the euro symbol but it doesn't work.</FONT></P>
The standard fonts have the euro character at position 128. You can define a constant like this
</P>
<A NAME='14'></A><B>14.</B> <FONT CLASS='st'>I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.</FONT>
<P>You have to enclose your string with double quotes, not single ones.</P>
<A NAME='15'></A><B>15.</B> <FONT CLASS='st'>I try to put the euro symbol but it doesn't work.</FONT>
<P>The standard fonts have the euro character at position 128. You can define a constant like this
for convenience:
<BR>
<BR>
@ -241,14 +251,14 @@ for convenience:
define('EURO',chr(128));
</TT>
</TD></TR></TABLE><BR>
Note: Acrobat 4 or higher is required to display euro.
<P><A NAME='14'></A><B>14.</B> <FONT CLASS='st'>I draw a frame with very precise dimensions, but when printed I notice some differences.</FONT></P>
To respect dimensions, you have to uncheck the option "Fit to page" in the print dialog box.
<P><A NAME='15'></A><B>15.</B> <FONT CLASS='st'>I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?</FONT></P>
All printers have physical margins (different depending on the model), it is therefore impossible
to remove them and print on the totality of the paper.
<P><A NAME='16'></A><B>16.</B> <FONT CLASS='st'>What's the limit of the file sizes I can generate with FPDF?</FONT></P>
There is no particular limit. There are some constraints however:
</P>
<A NAME='16'></A><B>16.</B> <FONT CLASS='st'>I draw a frame with very precise dimensions, but when printed I notice some differences.</FONT>
<P>To respect dimensions, you have to uncheck the option "Fit to page" in the print dialog box.</P>
<A NAME='17'></A><B>17.</B> <FONT CLASS='st'>I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?</FONT>
<P>All printers have physical margins (different depending on the model), it is therefore impossible
to remove them and print on the totality of the paper.</P>
<A NAME='18'></A><B>18.</B> <FONT CLASS='st'>What's the limit of the file sizes I can generate with FPDF?</FONT>
<P>There is no particular limit. There are some constraints however:
<BR>
<BR>
- The maximum memory size allocated to PHP scripts defaults to 8MB. For very big documents,
@ -266,21 +276,23 @@ generate them in a file, and to send some data to the browser from time to time
page 1, page 2... with flush() to force the output). When the document is finished, you can send
a redirection on it with JavaScript or create a link.
<BR>
Remark: even when the browser goes in time-out, the script may continue to run on the server.
<P><A NAME='17'></A><B>17.</B> <FONT CLASS='st'>Can I modify a PDF with FPDF?</FONT></P>
No.
<P><A NAME='18'></A><B>18.</B> <FONT CLASS='st'>I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?</FONT></P>
No. But a GPL C utility does exist, pdftotext, which is able to extract the textual content from
Remark: even when the browser goes in time-out, the script may continue to run on the server.</P>
<A NAME='19'></A><B>19.</B> <FONT CLASS='st'>Can I modify a PDF with FPDF?</FONT>
<P>No.</P>
<A NAME='20'></A><B>20.</B> <FONT CLASS='st'>I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?</FONT>
<P>No. But a GPL C utility does exist, pdftotext, which is able to extract the textual content from
a PDF. It is provided with the Xpdf package:<BR>
<BR>
<A HREF="http://www.foolabs.com/xpdf/" TARGET="_blank">http://www.foolabs.com/xpdf/</A>
<P><A NAME='19'></A><B>19.</B> <FONT CLASS='st'>Can I convert an HTML page to PDF with FPDF?</FONT></P>
No. But a GPL C utility does exist, htmldoc, which allows to do it and gives good results:<BR>
<A HREF="http://www.foolabs.com/xpdf/" TARGET="_blank">http://www.foolabs.com/xpdf/</A></P>
<A NAME='21'></A><B>21.</B> <FONT CLASS='st'>Can I convert an HTML page to PDF with FPDF?</FONT>
<P>No. But a GPL C utility does exist, htmldoc, which allows to do it and gives good results:<BR>
<BR>
<A HREF="http://www.easysw.com/htmldoc/" TARGET="_blank">http://www.easysw.com/htmldoc/</A>
<P><A NAME='20'></A><B>20.</B> <FONT CLASS='st'>Can I concatenate PDF files with FPDF?</FONT></P>
No. But a free C utility exists to perform this task:<BR>
<A HREF="http://www.easysw.com/htmldoc/" TARGET="_blank">http://www.easysw.com/htmldoc/</A></P>
<A NAME='22'></A><B>22.</B> <FONT CLASS='st'>Can I concatenate PDF files with FPDF?</FONT>
<P>No. But a free C utility exists to perform this task:<BR>
<BR>
<A HREF="http://thierry.schmit.free.fr/dev/mbtPdfAsm/enMbtPdfAsm2.html" TARGET="_blank">http://thierry.schmit.free.fr/dev/mbtPdfAsm/enMbtPdfAsm2.html</A>
<A HREF="http://thierry.schmit.free.fr/dev/mbtPdfAsm/enMbtPdfAsm2.html" TARGET="_blank">http://thierry.schmit.free.fr/dev/mbtPdfAsm/enMbtPdfAsm2.html</A></P>
<A NAME='23'></A><B>23.</B> <FONT CLASS='st'>How can I activate the protections on a PDF? I'd like to prevent people from copying the text or modifying the document.</FONT>
<P>You can't for the moment. The feature will be implemented in the future.</P>
</BODY>
</HTML>

View File

@ -4,7 +4,7 @@ Unfortunatly "account" conflicts with
both.
In order to get attribute host working you have to
modify schema/inetorgperson and include host:
modify schema/inetoergperson and include host:
# inetOrgPerson

View File

@ -0,0 +1,84 @@
lamdaemon.pl is used to modify quota and homedirs
on a remote or local host via ssh.
If you want wo use it you have to set up many
thins to get it work.
1. Set values in LDAP Account manager
* Set the remote or local host in the configuration
(e.g. 127.0.0.1)
* Path to lamdaemon.pl, e.g. /srv/www/htdocs/lam/lib/lamdaemon.pl
2. Set up sudo
The perlskript has to run as root (very ugly I know but
I haven't found any other solution). Therefor we need
a wrapper, sudo.
Edit /etc/sudoers on host homedirs or quotas should be used
and add the following line:
$admin All= NOPASSWD: $path
$admin is the adminuser from lam and $path
is the path include the filename of lamdaemon.pl
e.g. $admin All= NOPASSWD: /srv/www/htdocs/lam/lib/lamdaemon.pl
At the moment the password is a paramteter of lamdaemon.pl
Therefore you should disable logging so the password doesn't
apear in any logfile
This can be done by adding the following line:
Defaults:$admin !syslog
3. Set up perl
We need some external perl-modules, Quota and Net::SSH::Perl
Th install them, run:
perl -MCPAN -e shell
install Quota
install Net::SSH::Perl
Please answer all questions to describe your system
Every additional needed module should be installed
automaticly
LDAP isn't used by lamdaemon.pl anymore
I installed Math::Pari, a needed module, by hand.
I had many problems to install Math::Pari, a module needed
by Net:SSH::Perl. The reason is a bug in gcc 3.3 (In my case).
I found the following solution to prevent this bug:
* Download and untar pari (http://www.parigp-home.de)
* Download and untar Math::Pari
* run perl Makefile.PL
* edit Makefile and libPARI/Makefile
Replace line "OPTIMIZE = -O3 --pipe" with
"OPTIMIZE = -O1 --pipe".
* run make
* run make install
4. Set up ssh
On my System, Suse 9.0 I had to set usePAM no in /etc/ssh/sshd_config
to get lamdaemon.pl work
I had some problems to log in with ssh if the password hash of the
admin-user was encrypted with {SSHA}. I had to change encryption
for admin-accounts to {CRYPT} to get ssh work.
5. Test lamdaemon.pl
I've installed a test-function in lamdaemon.pl. Please run lamdaemon.pl
with the following attributes to test it:
lamdaemon.pl $ssh-server $lam_path_on_host $admin-username $admin-password *test
$ssh-server is the remote host lamdaemon.pl should be run
$lam_path_on_host is the path to lamdaemon.pl on remote host
$admin-username is the name of the user which is allowed to run lamdaemon.pl
as root. It's the same user in /etc/sudoers
$admin-password is the password of admin-user
*test is the command which tells lamdaemon.pl to test settings
You have to run the coammd as the user your webserver is running as, e.g.
wwwrun@tilo:/srv/www/htdocs/lam/lib> /srv/www/htdocs/lam/lib/lamdaemon.pl \
127.0.0.1 /srv/www/htdocs/lam/lib/lamdaemon.pl root secret *test
You should get the following response:
Net::SSH::Perl successfully installed.
sudo set up correctly.
Perl quota module successfully installed.
If you have'nt seen any error lamdaemon.pl should set up successfully.
Now everything should work fine
This is a very incomplete Documention for Beta-Release only.
Pleas send a mail to TiloLutz@gmx.de if you have any suggsestion

View File

@ -1,79 +0,0 @@
lamdaemon.pl is used to modify quota and homedirs
on a remote or local host via ssh.
If you want wo use it you have to set up some
things to get it to work:
1. Setup values in LDAP Account Manager
* Set the remote or local host in the configuration
(e.g. 127.0.0.1)
* Path to lamdaemon.pl, e.g. /srv/www/htdocs/lam/lib/lamdaemon.pl
2. Set up sudo
The perl script has to run as root. Therefore we need
a wrapper, sudo.
Edit /etc/sudoers on host where homedirs or quotas should be used
and add the following line:
$admin All= NOPASSWD: $path
$admin is the adminuser from LAM and $path
is the path to lamdaemon.pl e.g. "$admin All= NOPASSWD: /srv/www/htdocs/lam/lib/lamdaemon.pl"
At the moment the password is a paramteter of lamdaemon.pl
therefore you should disable logging so the password does not
appear in any logfile.
This can be done by adding the following line to /etc/sudoers:
Defaults:$admin !syslog
3. Set up Perl
We need some external Perl modules, Quota and Net::SSH::Perl
To install them, run:
perl -MCPAN -e shell
install Quota
install Net::SSH::Perl
If your Perl executable is not located in /usr/bin/perl you will have to edit
the path in the first line of lamdaemon.pl.
4. Test lamdaemon.pl
There is a test-function in lamdaemon.pl. Please run lamdaemon.pl
with the following parameters to test it:
lamdaemon.pl $ssh-server $lam_path_on_host $admin-username $admin-password *test
$ssh-server is the remote host lamdaemon.pl should be run on
$lam_path_on_host is the path to lamdaemon.pl on remote host
$admin-username is the name of the user which is allowed to run lamdaemon.pl
as root. It is the same user as in /etc/sudoers
$admin-password is the password of the admin user
*test is the command which tells lamdaemon.pl to test settings
You have to run the command as the user your webserver is running, e.g.
wwwrun@tilo:/srv/www/htdocs/lam/lib> /srv/www/htdocs/lam/lib/lamdaemon.pl \
127.0.0.1 /srv/www/htdocs/lam/lib/lamdaemon.pl adminuser secret *test
You should get the following response:
Net::SSH::Perl successfully installed.
Perl quota module successfully installed.
If you have not seen any error lamdaemon.pl should be set up successfully.
!!! Attention !!!
Your password in LDAP has to be hashed with CRYPT. If you use something like SSHA
you will probably get "Access denied.".
Now everything should work fine.
Security warning:
-----------------
If you use PHP < 4.3 your admin user and password are passed as commandline argument.
This can be a security risk. Upgrade your PHP version for productive use.
Please send a mail to TiloLutz@gmx.de if you have any suggestions.

View File

@ -1,4 +1,4 @@
Some basic hints to configure the OpenLDAP server:
Some basic hints to configure the openLDAP server:
SIZELIMIT: OpenLDAP allows by default 500 return values per search, if you have more users/groups/hosts
change this in slapd.conf: e.g. "sizelimit 10000" or "sizelimit -1" for unlimited return values.
@ -11,7 +11,7 @@ INDICES: Indices will improve the performance when searching for entries in the
index uidNumber eq
index gidNumber eq
index memberUid eq
index cn,sn,uid,displayName pres,sub,eq
index cn,mail,surname,givenname eq,subinitial
# Samba 2.x
index rid eq
index primaryGroupID eq

View File

@ -1,21 +0,0 @@
Some basic hints to configure the OpenLDAP server:
SIZELIMIT: OpenLDAP allows by default 500 return values per search, if you have more users/groups/hosts
change this in slapd.conf: e.g. "sizelimit 10000" or "sizelimit -1" for unlimited return values.
INDICES: Indices will improve the performance when searching for entries in the LDAP directory.
The following indices are recommended:
index objectClass eq
index default sub
index uidNumber eq
index gidNumber eq
index memberUid eq
index cn,sn,uid,displayName pres,sub,eq
# Samba 2.x
index rid eq
index primaryGroupID eq
# Samba 3.x
index sambaSID eq
index sambaPrimaryGroupSID eq
index sambaDomainName eq

View File

@ -1,7 +1,7 @@
1. Use of SSL
The data which is transfered between you and LAM is very sensitive.
The data which is transfered between you and the LAM server is very sensitive.
Please always use SSL encrypted connections between LAM and your browser to
protect yourself against network sniffers.
@ -9,7 +9,7 @@
2. LDAP+SSL and TLS
LAM should start TLS automatically if possible. LDAP+SSL will be used if you use
ldaps://servername in your configuration profile.
ldaps://servername in your configuration file.
3. Chrooted servers
@ -22,15 +22,15 @@
exploit this.
4. LDAP password protection
4. LDAP-password protection
Your LDAP password is stored encrypted in the session file. The key and IV to decrypt
it are stored in two cookies. We use MCrypt/AES or Blowfish to encrypt the password.
Your LDAP-password is stored encrypted in the session file. The key and IV to decrypt
it are stored in two cookies. We use AES to encrypt the passwort.
5. Protection of new user passwords
These passwords are, if stored in the session file, encrypted with the same key and IV
as your LDAP password.
as your LDAP-password.

View File

@ -0,0 +1,13 @@
config/shelld is a symbolic link to /etc/shells
which should contain all valid shells for new
users.
Unforutnatly some debian installations don't have
/bin/false and /bin/true in /etc/shells.
It's also possible valid shells differs completly
because /etc/shells on another host should be used.
If you want to use your own list of shells copy /etc/shells
to config/shells and change it to your benefits.
If you have questions feel free to mail me: TiloLutz@gmx.de

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -54,16 +54,16 @@ $helpArray = array (
":</b><br><br>".
_("ou=People,dc=yourcompany,dc=com will read and store all accounts in this subtree.")),
"203" => array ("ext" => "FALSE", "Headline" => _("Configuration Wizard") . " - " . _("UID number"),
"Text" => _("These are the minimum and maximum numbers to use for user IDs when creating new user accounts. The range should be different from that of machines. New user accounts will always get the highest number in use plus one.")),
"Text" => _("These are the minimum and maximum numbers to use for user IDs when creating new user accounts. The range has to be different from that of machines. New user accounts will always get the highest number in use plus one.")),
"204" => array ("ext" => "FALSE", "Headline" => _("Configuration Wizard") . " - " . _("GID number"),
"Text" => _("These are the minimum and maximum numbers to use for group IDs when creating new group accounts. New group accounts will always get the highest number in use plus one.")),
"205" => array ("ext" => "FALSE", "Headline" => _("Configuration Wizard") . " - " . _("Machine number"),
"Text" => _("These are the minimum and maximum numbers to use for machine IDs when creating new accounts for Samba hosts. The range should be different from that of users. New host accounts will always get the highest number in use plus one.")),
"Text" => _("These are the minimum and maximum numbers to use for machine IDs when creating new accounts for Samba hosts. The range has to be different from that of users. New host accounts will always get the highest number in use plus one.")),
"206" => array ("ext" => "FALSE", "Headline" => _("Configuration Wizard") . " - " . _("List attributes"),
"Text" => _("This is the list of attributes to show in the user/group/host list. The entries can either be predefined values, \"#attribute\", or individual ones, \"attribute:description\". Several entries are seperated by semicolons.") .
"Text" => _("This is the list of attributes to show in the user/group/host list. The entries can either be predefined values, \"#value\", or individual ones, \"value:description\". Several entries are seperated by semicolons.") .
"<br><br><b>" .
_("Example") .
": </b>#homeDirectory;#uid;#uidNumber;#gidNumber;mail:Mail address<br><br><br><u><b>" .
": </b>#homeDirectory;#uid;#cn;#uidNumber;#gidNumber;description:UserDescription<br><br><br><u><b>" .
_("Predefined values") .
":</b></u><br><br><b>" .
_("Users") .
@ -82,17 +82,19 @@ $helpArray = array (
"208" => array ("ext" => "FALSE", "Headline" => _("Configuration Wizard") . " - " . _("Maximum list entries"),
"Text" => _("This is the number of rows to show in the user/group/host list. If more entries are found the list will be split into several pages.")),
"209" => array ("ext" => "FALSE", "Headline" => _("Configuration Wizard") . " - " . _("Default language"),
"Text" => _("This defines the language of the login window and sets this language as the default language. Users can change the language at login.")),
"Text" => _("Defines the language of the login window and sets this language as the default language. Users can change the language at login.")),
"210" => array ("ext" => "FALSE", "Headline" => _("Configuration Wizard") . " - " . _("Script path"),
"Text" => _("This is the absolute path to an external script for setting quotas and creating home directories.").
"<br><br><b>".
_("Use it at your own risk and read the documentation for lamdaemon before you use it!").
"</b>"),
"</b>",
"SeeAlso" => "<a href=\"./help.php?HelpNumber=210\" target=\"_self\">TODO link to lamdaemon doku</a>"),
"211" => array ("ext" => "FALSE", "Headline" => _("Configuration Wizard") . " - " . _("Script server"),
"Text" => _("This is the server where the lamdaemon script is stored. LDAP Account Manager will make a SSH connection to this server with username and password provided at login.").
"<br><br><b>".
_("Use it at your own risk and read the documentation for lamdaemon before you use it!").
"</b>"),
"</b>",
"SeeAlso" => "<a href=\"./help.php?HelpNumber=210\" target=\"_self\">TODO link to lamdaemon doku</a>"),
"212" => array ("ext" => "FALSE", "Headline" => _("Configuration Wizard") . " - " . _("Change password"),
"Text" => _("If you want to change the current preferences password, please enter it here.")),
"213" => array ("ext" => "FALSE", "Headline" => _("Configuration Wizard") . " - " . _("Samba version"),
@ -144,8 +146,7 @@ $helpArray = array (
"402" => array ("ext" => "FALSE", "Headline" => _("Additional groups"),
"Text" => _("Hold the CTRL-key to (de)select multiple groups."). ' '. _("Can be left empty.")),
"403" => array ("ext" => "FALSE", "Headline" => _("Home directory"),
"Text" => _("$%s and $%s are replaced with username or primary groupname."),
"variables" => array('user', 'group')),
"Text" => _("$user and $group are replaced with username or primary groupname.")),
"404" => array ("ext" => "FALSE", "Headline" => _("Gecos"),
"Text" => _("User description. If left empty sur- and give name will be used.")),
"405" => array ("ext" => "FALSE", "Headline" => _("Login shell"),
@ -208,17 +209,14 @@ $helpArray = array (
"Text" => _("If checked account will be deactivated. (Setting D-Flag)")),
"433" => array ("ext" => "FALSE", "Headline" => _("Home drive"),
"Text" => _("Driveletter assigned on windows workstations as homedirectory.")),
"434" => array ("ext" => "FALSE", "Headline" => _("Logon script"),
"Text" => _("Filename and -path relative to netlogon-share which should be executed on logon. $%s and $%s are replaced with user- and groupname."). ' '. _("Can be left empty."),
"variables" => array('user', 'group')),
"434" => array ("ext" => "FALSE", "Headline" => _("Script path"),
"Text" => _("Filename and -path relative to netlogon-share which should be executed on logon. \$user and \$group are replaced with user- and groupname."). ' '. _("Can be left empty.")),
"435" => array ("ext" => "FALSE", "Headline" => _("Profile path"),
"Text" => _("Path of the userprofile. Can be a local absolute path or a UNC-path (\\\\server\\share). $%s and $%s are replaced with user- and groupname."). ' '. _("Can be left empty."),
"variables" => array('user', 'group')),
"Text" => _("Path of the userprofile. Can be a local absolute path or a UNC-path (\\\\server\\share). \$user and \$group are replaced with user- and groupname."). ' '. _("Can be left empty.")),
"436" => array ("ext" => "FALSE", "Headline" => _("Samba workstations"),
"Text" => _("List of samba workstations the user is allowed to login. Empty means every workstation."). ' '. _("Can be left empty.")),
"437" => array ("ext" => "FALSE", "Headline" => _("Home path"),
"Text" => _("UNC-path (\\\\server\\share) of homedirectory. $%s and $%s are replaced with user- and groupname."). ' '. _("Can be left empty."),
"variables" => array('user', 'group')),
"Text" => _("UNC-path (\\\\server\\share) of homedirectory. \$user and \$group are replaced with user- and groupname."). ' '. _("Can be left empty.")),
"438" => array ("ext" => "FALSE", "Headline" => _("Domain"),
"Text" => _("Windows-Domain of user."). ' '. _("Can be left empty.")),
"439" => array ("ext" => "FALSE", "Headline" => _("Mountpoint"),
@ -226,29 +224,29 @@ $helpArray = array (
"440" => array ("ext" => "FALSE", "Headline" => _("Used blocks"),
"Text" => _("Used blocks. 1000 blocks are usually 1MB")),
"441" => array ("ext" => "FALSE", "Headline" => _("Soft block limit"),
"Text" => _("Soft block limit."), "SeeAlso" => '<a href="http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Quota.html#ss4.4">'.
'Quota How-To</a>'),
"Text" => _("Soft block limit."), "SeeAlso" => '<a href="http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Quota.html#ss4.4"</a>'.
'Quota How-To'),
"442" => array ("ext" => "FALSE", "Headline" => _("Hard block limit"),
"Text" => _("Hard block limit").'.', "SeeAlso" => '<a href="http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Quota.html#ss4.5">'.
'Quota How-To</a>'),
"Text" => _("Hard block limit").'.', "SeeAlso" => '<a href="http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Quota.html#ss4.5"</a>'.
'Quota How-To'),
"443" => array ("ext" => "FALSE", "Headline" => _("Grace block period"),
"Text" => _("Grace block period. Most filesystems use a fixed maximum value of 7 days."), "SeeAlso" => '<a href="http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Quota.html#ss4.6">'.
'Quota How-To</a>'),
"Text" => _("Grace block period. Most filesystems use a fixed maximum value of 7 days."), "SeeAlso" => '<a href="http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Quota.html#ss4.6"</a>'.
'Quota How-To'),
"444" => array ("ext" => "FALSE", "Headline" => _("Used inodes"),
"Text" => _("Used inodes (files)").'.'),
"445" => array ("ext" => "FALSE", "Headline" => _("Soft inode limit"),
"Text" => _("Soft inode (files) limit."), "SeeAlso" => '<a href="http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Quota.html#ss4.4">'.
'Quota How-To</a>'),
"Text" => _("Soft inode (files) limit."), "SeeAlso" => '<a href="http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Quota.html#ss4.4"</a>'.
'Quota How-To'),
"446" => array ("ext" => "FALSE", "Headline" => _("Hard inode limit"),
"Text" => _("Hard inode (files) limit").'.', "SeeAlso" => '<a href="http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Quota.html#ss4.5">'.
'Quota How-To</a>'),
"Text" => _("Hard inode (files) limit").'.', "SeeAlso" => '<a href="http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Quota.html#ss4.5"</a>'.
'Quota How-To'),
"447" => array ("ext" => "FALSE", "Headline" => _("Grace inode period"),
"Text" => _("Grace inode (files) period. Most filesystems use a fixed maximum value of 7 days."), "SeeAlso" => '<a href="http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Quota.html#ss4.6">'.
'Quota How-To</a>'),
"448" => array ("ext" => "FALSE", "Headline" => _("Job title"),
"Text" => _("Job title of user, Vice President, ...")),
"Text" => _("Grace inode (files) period. Most filesystems use a fixed maximum value of 7 days."), "SeeAlso" => '<a href="http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Quota.html#ss4.6"</a>'.
'Quota How-To'),
"448" => array ("ext" => "FALSE", "Headline" => _("Title"),
"Text" => _("Title of user, Mr., Ms., ...")),
"449" => array ("ext" => "FALSE", "Headline" => _("Employee type"),
"Text" => _("Employee type: Contractor, Employee, Intern, Temp, External, ...")),
"Text" => _("Employee type: worker, student, nurse, ...")),
"450" => array ("ext" => "FALSE", "Headline" => _("Street"),
"Text" => _("Street")),
"451" => array ("ext" => "FALSE", "Headline" => _("Postal code"),

View File

@ -1,8 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>LDAP Account Manager</title>
<meta http-equiv="refresh" content="0; URL=templates/login.php">
</head>

View File

@ -1,4 +1,4 @@
<Files ~ .*>
<Files ~ *>
Order allow,deny
Deny from all
</Files>

View File

@ -23,8 +23,6 @@ $Id$
LDAP Account Manager functions used by account.php
*/
// PHP 5 compatibility
if( phpversion() >= "5" ) ini_set( "zend.ze1_compatibility_mode", 1 );
// This class keeps all needed values for any account
class account {
@ -203,16 +201,24 @@ function getquotas($users) {
if (is_array($users)) $return = $users;
else $return[0] = $users;
// get username and password of the current lam-admin
$ldap_q = $_SESSION['ldap']->decrypt_login();
$ldap_q = $_SESSION['ldap']->decrypt();
/* $towrite has the following syntax:
* admin-username, admin-password, account with quotas, 'quota', operation='get', type=user|group
* use escapeshellarg to make exec() shell-safe
*/
$towrite = escapeshellarg($_SESSION['config']->scriptServer)." ".escapeshellarg($_SESSION['config']->scriptPath)." ".
escapeshellarg($ldap_q[0]).' '.escapeshellarg($ldap_q[1]);
/* scriptServer is the IP to remote-host to which lam should connect via ssh
* scriptPath is Path to lamdaemon.pl on remote system
*/
if (is_array($return)) {
for($i=0; $i<count($return); $i++)
// put string to trasmit together
if ($return[$i]->general_username!='') $userstring .= $return[$i]->general_username." quota get ".$return[$i]->type."\n";
else $userstring .= "+ quota get ".$return[$i]->type."\n";
}
if (function_exists('proc_open')) {
if (function_exists(proc_open)) {
// New Code, requires PHP 4.3
$towrite = escapeshellarg($_SESSION['config']->scriptServer)." ".escapeshellarg($_SESSION['config']->scriptPath)." - -";
$descriptorspec = array(
0 => array("pipe", "r"), // stdin
1 => array("pipe", "w"), // stout
@ -227,9 +233,6 @@ function getquotas($users) {
* $pipes[1] is readable handle to child stdout
* any error is send to /dev/null
*/
// user+passwd
fwrite($pipes[0], $ldap_q[0] . "\n");
fwrite($pipes[0], $ldap_q[1] . "\n");
// Write one output-line for every user
fwrite($pipes[0], $userstring);
fclose($pipes[0]);
@ -242,8 +245,6 @@ function getquotas($users) {
}
}
else { // PHP 4.3>
$towrite = escapeshellarg($_SESSION['config']->scriptServer)." ".escapeshellarg($_SESSION['config']->scriptPath)." ".
escapeshellarg($ldap_q[0]).' '.escapeshellarg($ldap_q[1]);
$command = escapeshellarg($_SESSION['lampath']."lib/lamdaemon.pl")." ".$towrite;
$pipe = popen("echo \"$userstring\"|$command" , 'r');
while(!feof($pipe)) {
@ -298,7 +299,13 @@ function getquotas($users) {
*/
function setquotas($values2) {
// get username and password of the current lam-admin
$ldap_q = $_SESSION['ldap']->decrypt_login();
$ldap_q = $_SESSION['ldap']->decrypt();
/* $towrite has the following syntax:
* admin-username, admin-password, account with quotas, 'quota', operation='set', type=user|group
* use escapeshellarg to make exec() shell-safe
*/
$towrite = escapeshellarg($_SESSION['config']->scriptServer)." ".escapeshellarg($_SESSION['config']->scriptPath)." ".
escapeshellarg($ldap_q[0]).' '.escapeshellarg($ldap_q[1]);
/* Check wich quotas have changed
* Because we can not send an array to lamdaemon.pl we have to put all
@ -333,9 +340,8 @@ function setquotas($values2) {
$userstring = $values2->general_username." quota set ".$values2->type." ".$quotastring."\n";
}
if (function_exists('proc_open')) {
if (function_exists(proc_open)) {
// New Code, requires PHP 4.3
$towrite = escapeshellarg($_SESSION['config']->scriptServer)." ".escapeshellarg($_SESSION['config']->scriptPath)." - -";
$descriptorspec = array(
0 => array("pipe", "r"), // stdin
1 => array("pipe", "w"), // stout
@ -350,9 +356,6 @@ function setquotas($values2) {
* $pipes[1] is readable handle to child stdout
* any error is send to /dev/null
*/
// user+passwd
fwrite($pipes[0], $ldap_q[0] . "\n");
fwrite($pipes[0], $ldap_q[1] . "\n");
// Write to stdin
fwrite($pipes[0], $userstring);
}
@ -365,8 +368,6 @@ function setquotas($values2) {
proc_close($process);
}
else { // PHP 4.3>
$towrite = escapeshellarg($_SESSION['config']->scriptServer)." ".escapeshellarg($_SESSION['config']->scriptPath)." ".
escapeshellarg($ldap_q[0]).' '.escapeshellarg($ldap_q[1]);
$command = escapeshellarg($_SESSION['lampath']."lib/lamdaemon.pl")." ".$towrite;
$pipe = popen("echo \"$userstring\"|$command" , 'r');
while(!feof($pipe)) {
@ -389,7 +390,13 @@ function setquotas($values2) {
*/
function remquotas($users, $type) {
// get username and password of the current lam-admin
$ldap_q = $_SESSION['ldap']->decrypt_login();
$ldap_q = $_SESSION['ldap']->decrypt();
/* $towrite has the following syntax:
* admin-username, admin-password, account with quotas, 'quota', operation='rem', type=user|group
* use escapeshellarg to make exec() shell-safe
*/
$towrite = escapeshellarg($_SESSION['config']->scriptServer)." ".escapeshellarg($_SESSION['config']->scriptPath)." ".
escapeshellarg($ldap_q[0]).' '.escapeshellarg($ldap_q[1]);
if (is_array($users)) {
foreach ($users as $user) {
@ -398,9 +405,8 @@ function remquotas($users, $type) {
}
else $userstring = "$users quota rem $type\n";
if (function_exists('proc_open')) {
if (function_exists(proc_open)) {
// New Code, requires PHP 4.3
$towrite = escapeshellarg($_SESSION['config']->scriptServer)." ".escapeshellarg($_SESSION['config']->scriptPath)." - -";
$descriptorspec = array(
0 => array("pipe", "r"), // stdin
1 => array("pipe", "w"), // stout
@ -415,9 +421,6 @@ function remquotas($users, $type) {
* $pipes[1] is readable handle to child stdout
* any error is send to /dev/null
*/
// user+passwd
fwrite($pipes[0], $ldap_q[0] . "\n");
fwrite($pipes[0], $ldap_q[1] . "\n");
// Write to stdin
fwrite($pipes[0], $userstring);
}
@ -430,8 +433,6 @@ function remquotas($users, $type) {
proc_close($process);
}
else { // PHP 4.3>
$towrite = escapeshellarg($_SESSION['config']->scriptServer)." ".escapeshellarg($_SESSION['config']->scriptPath)." ".
escapeshellarg($ldap_q[0]).' '.escapeshellarg($ldap_q[1]);
$command = escapeshellarg($_SESSION['lampath']."lib/lamdaemon.pl")." ".$towrite;
$pipe = popen("echo \"$userstring\"|$command" , 'r');
while(!feof($pipe)) {
@ -454,7 +455,13 @@ function remquotas($users, $type) {
*/
function addhomedir($users) {
// get username and password of the current lam-admin
$ldap_q = $_SESSION['ldap']->decrypt_login();
$ldap_q = $_SESSION['ldap']->decrypt();
/* $towrite has the following syntax:
* admin-username, admin-password, owner of homedir, 'home', operation='add'
* use escapeshellarg to make exec() shell-safe
*/
$towrite = escapeshellarg($_SESSION['config']->scriptServer)." ".escapeshellarg($_SESSION['config']->scriptPath)." ".
escapeshellarg($ldap_q[0]).' '.escapeshellarg($ldap_q[1]);
if (is_array($users)) {
foreach ($users as $user) {
@ -463,9 +470,8 @@ function addhomedir($users) {
}
else $userstring = "$users home add\n";
if (function_exists('proc_open')) {
if (function_exists(proc_open)) {
// New Code, requires PHP 4.3
$towrite = escapeshellarg($_SESSION['config']->scriptServer)." ".escapeshellarg($_SESSION['config']->scriptPath)." - -";
$descriptorspec = array(
0 => array("pipe", "r"), // stdin
1 => array("pipe", "w"), // stout
@ -480,9 +486,6 @@ function addhomedir($users) {
* $pipes[1] is readable handle to child stdout
* any error is send to /dev/null
*/
// user+passwd
fwrite($pipes[0], $ldap_q[0] . "\n");
fwrite($pipes[0], $ldap_q[1] . "\n");
// Write to stdin
fwrite($pipes[0], $userstring);
}
@ -495,8 +498,6 @@ function addhomedir($users) {
proc_close($process);
}
else { // PHP 4.3>
$towrite = escapeshellarg($_SESSION['config']->scriptServer)." ".escapeshellarg($_SESSION['config']->scriptPath)." ".
escapeshellarg($ldap_q[0]).' '.escapeshellarg($ldap_q[1]);
$command = escapeshellarg($_SESSION['lampath']."lib/lamdaemon.pl")." ".$towrite;
$pipe = popen("echo \"$userstring\"|$command" , 'r');
while(!feof($pipe)) {
@ -520,7 +521,13 @@ function addhomedir($users) {
*/
function remhomedir($users) {
// get username and password of the current lam-admin
$ldap_q = $_SESSION['ldap']->decrypt_login();
$ldap_q = $_SESSION['ldap']->decrypt();
/* $towrite has the following syntax:
* admin-username, admin-password, owner of homedir, 'home', operation='add'
* use escapeshellarg to make exec() shell-safe
*/
$towrite = escapeshellarg($_SESSION['config']->scriptServer)." ".escapeshellarg($_SESSION['config']->scriptPath)." ".
escapeshellarg($ldap_q[0]).' '.escapeshellarg($ldap_q[1]);
if (is_array($users)) {
foreach ($users as $user) {
@ -529,9 +536,8 @@ function remhomedir($users) {
}
else $userstring = "$users home rem\n";
if (function_exists('proc_open')) {
if (function_exists(proc_open)) {
// New Code, requires PHP 4.3
$towrite = escapeshellarg($_SESSION['config']->scriptServer)." ".escapeshellarg($_SESSION['config']->scriptPath)." - -";
$descriptorspec = array(
0 => array("pipe", "r"), // stdin
1 => array("pipe", "w"), // stout
@ -546,9 +552,6 @@ function remhomedir($users) {
* $pipes[1] is readable handle to child stdout
* any error is send to /dev/null
*/
// user+passwd
fwrite($pipes[0], $ldap_q[0] . "\n");
fwrite($pipes[0], $ldap_q[1] . "\n");
// Write to stdin
fwrite($pipes[0], $userstring);
}
@ -561,8 +564,6 @@ function remhomedir($users) {
proc_close($process);
}
else { // PHP 4.3>
$towrite = escapeshellarg($_SESSION['config']->scriptServer)." ".escapeshellarg($_SESSION['config']->scriptPath)." ".
escapeshellarg($ldap_q[0]).' '.escapeshellarg($ldap_q[1]);
$command = escapeshellarg($_SESSION['lampath']."lib/lamdaemon.pl")." ".$towrite;
$pipe = popen("echo \"$userstring\"|$command" , 'r');
while(!feof($pipe)) {
@ -606,14 +607,14 @@ function ldapreload($type) {
$_SESSION['userDN'][0] = time();
// Search 4 values which should be cached
$result = @ldap_search($_SESSION['ldap']->server(), $_SESSION['config']->get_UserSuffix(),
'(&(objectClass=posixAccount)(!(uid=*$)))', array('uid', 'uidNumber'), 0);
'(&(objectClass=posixAccount)(!(uid=*$)))', array('cn', 'uidNumber'), 0);
// Write search result in array
$entry = @ldap_first_entry($_SESSION['ldap']->server(), $result);
while ($entry) {
$dn = (ldap_get_dn($_SESSION['ldap']->server(), $entry));
$attr = ldap_get_attributes($_SESSION['ldap']->server(), $entry);
if (isset($attr['uid'][0]))
$_SESSION['userDN'][$dn]['uid'] = $attr['uid'][0];
if (isset($attr['cn'][0]))
$_SESSION['userDN'][$dn]['cn'] = $attr['cn'][0];
if (isset($attr['uidNumber'][0]))
$_SESSION['userDN'][$dn]['uidNumber'] = $attr['uidNumber'][0];
$entry = ldap_next_entry($_SESSION['ldap']->server(), $entry);
@ -659,14 +660,14 @@ function ldapreload($type) {
$_SESSION['hostDN'][0] = time();
// Search 4 values which should be cached
$result = @ldap_search($_SESSION['ldap']->server(), $_SESSION['config']->get_HostSuffix(),
'(&(objectClass=posixAccount)(uid=*$))', array('uid', 'uidNumber'), 0);
'(&(objectClass=posixAccount)(uid=*$))', array('cn', 'uidNumber'), 0);
// Write search result in array
$entry = @ldap_first_entry($_SESSION['ldap']->server(), $result);
while ($entry) {
$dn = (ldap_get_dn($_SESSION['ldap']->server(), $entry));
$attr = ldap_get_attributes($_SESSION['ldap']->server(), $entry);
if (isset($attr['uid'][0]))
$_SESSION['hostDN'][$dn]['uid'] = $attr['uid'][0];
if (isset($attr['cn'][0]))
$_SESSION['hostDN'][$dn]['cn'] = $attr['cn'][0];
if (isset($attr['uidNumber'][0]))
$_SESSION['hostDN'][$dn]['uidNumber'] = $attr['uidNumber'][0];
$entry = ldap_next_entry($_SESSION['ldap']->server(), $entry);
@ -1016,16 +1017,6 @@ function loaduser($dns) {
$j++;
}
// fix misspelled object classes
$j = 0;
while (isset($attr['objectClass'][$j])) {
if (strtolower($attr['objectClass'][$j]) == "inetorgperson") $attr['objectClass'][$j] = "inetOrgPerson";
else if (strtolower($attr['objectClass'][$j]) == "posixaccount") $attr['objectClass'][$j] = "posixAccount";
else if (strtolower($attr['objectClass'][$j]) == "sambaaccount") $attr['objectClass'][$j] = "sambaAccount";
else if (strtolower($attr['objectClass'][$j]) == "sambasamaccount") $attr['objectClass'][$j] = "sambaSamAccount";
else if (strtolower($attr['objectClass'][$j]) == "shadowaccount") $attr['objectClass'][$j] = "shadowAccount";
$j++;
}
// load objectclasses
$j=0;
while (isset($attr['objectClass'][$j])) {
@ -1163,15 +1154,6 @@ function loadhost($dn) {
// Set host samba flags
$return->smb_flags['W'] = true;
$return->smb_flags['X'] = true;
// fix misspelled object classes
$j = 0;
while (isset($attr['objectClass'][$j])) {
if (strtolower($attr['objectClass'][$j]) == "account") $attr['objectClass'][$j] = "account";
else if (strtolower($attr['objectClass'][$j]) == "posixaccount") $attr['objectClass'][$j] = "posixAccount";
else if (strtolower($attr['objectClass'][$j]) == "sambaaccount") $attr['objectClass'][$j] = "sambaAccount";
else if (strtolower($attr['objectClass'][$j]) == "sambasamaccount") $attr['objectClass'][$j] = "sambaSamAccount";
$j++;
}
// load objectclasses
$i=0;
while (isset($attr['objectClass'][$i])) {
@ -1275,13 +1257,6 @@ function loadgroup($dn) {
* Some values don't have to be set. These are only loaded if they are set
*/
// fix misspelled object classes
$j = 0;
while (isset($attr['objectClass'][$j])) {
if (strtolower($attr['objectClass'][$j]) == "posixgroup") $attr['objectClass'][$j] = "posixGroup";
else if (strtolower($attr['objectClass'][$j]) == "sambagroupmapping") $attr['objectClass'][$j] = "sambaGroupMapping";
$j++;
}
// load objectclasses
$i=0;
while (isset($attr['objectClass'][$i])) {
@ -1334,12 +1309,17 @@ function createuser($values, $uselamdaemon=true) {
// Create DN for new user account
$values->general_dn = 'uid=' . $values->general_username . ',' . $values->general_dn;
// decrypt password because we don't want to store them unencrypted in session
$iv = base64_decode($_COOKIE["IV"]);
$key = base64_decode($_COOKIE["Key"]);
if ($values->unix_password != '') {
$values->unix_password = $_SESSION['ldap']->decrypt(base64_decode($values->unix_password));
$values->unix_password = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($values->unix_password), MCRYPT_MODE_ECB, $iv);
$values->unix_password = str_replace(chr(00), '', $values->unix_password);
}
if ($values->smb_password != '') {
$values->smb_password = $_SESSION['ldap']->decrypt(base64_decode($values->smb_password));
$values->smb_password = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($values->smb_password), MCRYPT_MODE_ECB, $iv);
$values->smb_password = str_replace(chr(00), '', $values->smb_password);
}
// Attributes which are required
$attr['cn'] = $values->general_username;
$attr['uid'] = $values->general_username;
@ -1370,7 +1350,6 @@ function createuser($values, $uselamdaemon=true) {
// explode host-string and save every allowed host as separate attribute
$values->unix_host = str_replace(' ', '', $values->unix_host);
$hosts = explode (',', $values->unix_host);
$hosts = array_unique($hosts);
$i=0;
while(isset($hosts[$i])) {
if ($hosts[$i]!='') $attr['host'][$i] = $hosts[$i];
@ -1387,19 +1366,19 @@ function createuser($values, $uselamdaemon=true) {
$attr['sambaLMPassword'] = 'NO PASSWORD*****';
}
else {
// use escapeshellarg() to make command shell-secure
// Set samba-passwords with external perl-script
$attr['sambaNTPassword'] = getNTPasswordHash($values->smb_password);
$attr['sambaLMPassword'] = getLMPasswordHash($values->smb_password);
$attr['sambaNTPassword'] = exec(escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." nt ".escapeshellarg($values->smb_password));
$attr['sambaLMPassword'] = exec(escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." lm ".escapeshellarg($values->smb_password));
}
$attr['sambaPwdLastSet'] = time();
// Generate SID
$attr['sambaSID'] = $values->smb_domain->SID . "-" . (2 * $values->general_uidNumber + $values->smb_domain->RIDbase); // sambaAccount_may
//if ($values->smb_mapgroup!='') $attr['sambaPrimaryGroupSID'] = $values->smb_mapgroup; // sambaAccount_req
ldapreload('group');
foreach ($_SESSION['groupDN'] as $groupname) {
if ($groupname['cn'] == $values->general_group) {
if ($groupname['sambaSID']) $attr['sambaPrimaryGroupSID'] = $groupname['sambaSID'];
}
if ($groupname['cn'] == $values->general_group) $attr['sambaPrimaryGroupSID'] = $groupname['sambaSID'];
}
if ($values->smb_pwdcanchange!='') $attr['sambaPwdCanChange'] = $values->smb_pwdcanchange; // sambaAccount_may
else $attr['sambaPwdCanChange'] = time(); // sambaAccount_may
@ -1423,9 +1402,10 @@ function createuser($values, $uselamdaemon=true) {
$attr['lmPassword'] = 'NO PASSWORD*****';
}
else {
// use escapeshellarg() to make command shell-secure
// Set samba-passwords with external perl-script
$attr['ntPassword'] = getNTPasswordHash($values->smb_password);
$attr['lmPassword'] = getLMPasswordHash($values->smb_password);
$attr['ntPassword'] = exec(escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." nt ".escapeshellarg($values->smb_password));
$attr['lmPassword'] = exec(escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." lm ".escapeshellarg($values->smb_password));
}
$attr['pwdLastSet'] = time();
// Generate pseudo SID
@ -1475,7 +1455,6 @@ function createuser($values, $uselamdaemon=true) {
if (isset($values->general_groupadd[0]))
// Loop for every group
foreach ($values->general_groupadd as $group2) {
if (! isset($group2) || ($group2 == "")) continue;
// Search for group in LDAP
$result = ldap_search($_SESSION['ldap']->server(), $_SESSION['config']->get_GroupSuffix(), "(&(objectclass=posixGroup)(cn=$group2))", array(''));
$entry = ldap_first_entry($_SESSION['ldap']->server(), $result);
@ -1520,11 +1499,15 @@ function modifyuser($values,$values_old,$uselamdaemon=true) { // Will modify the
// Create DN for new user account
$values->general_dn = 'uid=' . $values->general_username . ',' . $values->general_dn;
// decrypt password because we don't want to store them unencrypted in session
$iv = base64_decode($_COOKIE["IV"]);
$key = base64_decode($_COOKIE["Key"]);
if ($values->unix_password != '') {
$values->unix_password = $_SESSION['ldap']->decrypt(base64_decode($values->unix_password));
$values->unix_password = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($values->unix_password), MCRYPT_MODE_ECB, $iv);
$values->unix_password = str_replace(chr(00), '', $values->unix_password);
}
if ($values->smb_password != '') {
$values->smb_password = $_SESSION['ldap']->decrypt(base64_decode($values->smb_password));
$values->smb_password = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($values->smb_password), MCRYPT_MODE_ECB, $iv);
$values->smb_password = str_replace(chr(00), '', $values->smb_password);
}
// Attributes which are required
if ($values->general_username != $values_old->general_username) {
@ -1533,9 +1516,9 @@ function modifyuser($values,$values_old,$uselamdaemon=true) { // Will modify the
}
if ($values->general_uidNumber != $values_old->general_uidNumber) {
$attr['uidNumber'] = $values->general_uidNumber;
// Because sambaSID(rid) is related to uidNumber we have to change it if uidNumbaer has changed
// Because sambaSid(rid) is related to uidNumber we have to change it if uidNumbaer has changed
if ($_SESSION['config']->is_samba3())
$attr['sambaSID'] = $values->smb_domain->SID . "-" . (2 * $values->general_uidNumber + $values->smb_domain->RIDbase);
$attr['sambaSid'] = $values->smb_domain->SID . "-" . (2 * $values->general_uidNumber + $values->smb_domain->RIDbase);
else $attr['rid'] = (2 * $values->general_uidNumber + 1000);
}
if ($values->general_group != $values_old->general_group) {
@ -1544,28 +1527,14 @@ function modifyuser($values,$values_old,$uselamdaemon=true) { // Will modify the
if ($_SESSION['config']->is_samba3()) {
// We use samba 3 schema
// Change SID only if we don't use a well known SID
$found = false;
if (substr($values->smb_mapgroup, sizeof($values->smb_mapgroup)-5, 4) == '-512') $found=true;
if (substr($values->smb_mapgroup, sizeof($values->smb_mapgroup)-5, 4) == '-513') $found=true;
if (substr($values->smb_mapgroup, sizeof($values->smb_mapgroup)-5, 4) == '-514') $found=true;
if (!$found) {
ldapreload('group');
foreach ($_SESSION['groupDN'] as $groupname) {
if ($groupname['cn'] == $values->general_group) {
if ($groupname['sambaSID']) $attr['sambaPrimaryGroupSID'] = $groupname['sambaSID'];
else {
// remove primaryGroupSID if new group has no SID
$attr['sambaPrimaryGroupSID'] = $values_old->smb_mapgroup;
$attr_rem['sambaPrimaryGroupSID'] = $values_old->smb_mapgroup;
}
}
}
ldapreload('group');
foreach ($_SESSION['groupDN'] as $groupname) {
if ($groupname['cn'] == $values->general_group) $attr['sambaPrimaryGroupSID'] = $groupname['sambaSID'];
}
}
else {
// We use old samba 2.2 schema
// Change SID only if we don't use a well known SID
$found = false;
if ($values->smb_mapgroup== '512') $found=true;
if ($values->smb_mapgroup== '513') $found=true;
if ($values->smb_mapgroup== '514') $found=true;
@ -1605,15 +1574,21 @@ function modifyuser($values,$values_old,$uselamdaemon=true) { // Will modify the
// Check if shadow expire has changed
if ($values->unix_pwdexpire != $values_old->unix_pwdexpire) $attr['shadowExpire'] = intval($values->unix_pwdexpire / 86400) ;
// Set unix password
if ($values->unix_password=='') { // $values->unix_password=='' means use old password
if ($values->unix_deactivated != $values_old->unix_deactivated) { // check if password was enabled/disabled
if ($values->unix_deactivated) {
$attr['userPassword'] = pwd_disable($values_old->unix_password);
if ($values->unix_password=='') {
// $values->unix_password=='' means use old password
if ($values->unix_deactivated != $values_old->unix_deactivated) {
// (de)activate password
// Split old password hash in {CRYPT} and password-hash
$i = 0;
while ($values_old->unix_password{$i} != '}') $i++;
$passwd = substr($values_old->unix_password, $i+1 );
$crypt = substr($values_old->unix_password, 0, $i+1 );
// remove trailing ! from password hash
if ($passwd{0} == '!') $passwd = substr($passwd, 1);
// Write new password
if ($values->unix_deactivated) $attr['userPassword'] = $crypt.'!'.$passwd;
else $attr['userPassword'] = $crypt.$passwd;
}
else {
$attr['userPassword'] = pwd_enable($values_old->unix_password);
}
}
if ($values->unix_password_no) {
// use no password
if ($values->unix_deactivated) $attr['userPassword'] = pwd_hash('', false);
@ -1632,7 +1607,6 @@ function modifyuser($values,$values_old,$uselamdaemon=true) { // Will modify the
if (($values->unix_host != $values_old->unix_host)) {
$values->unix_host = str_replace(' ', '', $values->unix_host);
$host = explode (',', $values->unix_host);
$host = array_unique($host);
$values_old->unix_host = str_replace(' ', '', $values_old->unix_host);
$host_old = explode (',', $values_old->unix_host);
if ($host[0]=='') $attr_rem['host'] = $host_old;
@ -1672,7 +1646,7 @@ function modifyuser($values,$values_old,$uselamdaemon=true) { // Will modify the
$attr['displayName'] = utf8_encode($values->smb_displayName); // sambaAccount_may
$attr['sambaAcctFlags'] = smbflag($values->flags); // sambaAccount_may
$attr['sambaDomainName'] = $values->smb_domain->name; // sambaAccount_may
$attr['sambaSID'] = $values->smb_domain->SID . "-" . (2 * $values->general_uidNumber + $values->smb_domain->RIDbase); // sambaAccount_may
$attr['sambaSid'] = $values->smb_domain->SID . "-" . (2 * $values->general_uidNumber + $values->smb_domain->RIDbase); // sambaAccount_may
$attr['sambaPrimaryGroupSID'] = $values->smb_mapgroup; // sambaAccount_req
// remove old attributes
if (in_array('sambaAccount', $attr_old['objectClass'])) $attr_rem['objectClass'] = 'sambaAccount';
@ -1702,9 +1676,10 @@ function modifyuser($values,$values_old,$uselamdaemon=true) { // Will modify the
}
else
if ($values->smb_password!='') {
// use escapeshellarg() to make command shell-secure
// Set samba-passwords with external perl-script
$attr['sambaNTPassword'] = getNTPasswordHash($values->smb_password);
$attr['sambaLMPassword'] = getLMPasswordHash($values->smb_password);
$attr['sambaNTPassword'] = exec(escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." nt ".escapeshellarg($values->smb_password));
$attr['sambaLMPassword'] = exec(escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." lm ".escapeshellarg($values->smb_password));
$attr['sambaPwdLastSet'] = time(); // sambaAccount_may
}
// Check which Samba-Attributes have changed
@ -1723,27 +1698,18 @@ function modifyuser($values,$values_old,$uselamdaemon=true) { // Will modify the
if (($values->smb_smbuserworkstations=='') && ($values->smb_smbuserworkstations!=$values_old->smb_smbuserworkstations))$attr_rem['sambaUserWorkstations'] = $values_old->smb_smbuserworkstations; // sambaAccount_may
if ($values->smb_domain->name!=$values_old->smb_domain->name) {
$attr['sambaDomainName'] = $values->smb_domain->name; // sambaAccount_may
$attr['sambaSID'] = $values->smb_domain->SID . "-" . (2 * $values->general_uidNumber + $values->smb_domain->RIDbase);
$attr['sambaSid'] = $values->smb_domain->SID . "-" . (2 * $values->general_uidNumber + $values->smb_domain->RIDbase);
$attr['sambaPrimaryGroupSID'] = $values->smb_domain->SID . "-".
(2 * getgid($values->general_group) + $values->smb_domain->RIDbase+1);
}
if (($values->smb_mapgroup!='') && ($values->smb_mapgroup!=$values_old->smb_mapgroup)) {
$found = false;
if (substr($values->smb_mapgroup, sizeof($values->smb_mapgroup)-5, 4) == '-512') $found=true;
if (substr($values->smb_mapgroup, sizeof($values->smb_mapgroup)-5, 4) == '-513') $found=true;
if (substr($values->smb_mapgroup, sizeof($values->smb_mapgroup)-5, 4) == '-514') $found=true;
if (!$found) { // use group SID
ldapreload('group');
foreach ($_SESSION['groupDN'] as $groupname) {
if ($groupname['cn'] == $values->general_group) $attr['sambaPrimaryGroupSID'] = $groupname['sambaSID'];
ldapreload('group');
foreach ($_SESSION['groupDN'] as $groupname) {
if ($groupname['cn'] == $values->general_group) $attr['sambaPrimaryGroupSID'] = $groupname['sambaSID'];
}
}
else { // use special SID
$attr['sambaPrimaryGroupSID'] = $values->smb_mapgroup;
}
}
if ($values->smb_displayName != $values_old->smb_displayName) $attr['displayName'] = utf8_encode($values->smb_displayName); // sambaAccount_may
}
}
else {
// use old samba 2.2 objectclass
if (!in_array('sambaAccount', $values->general_objectClass)) {
@ -1806,9 +1772,10 @@ function modifyuser($values,$values_old,$uselamdaemon=true) { // Will modify the
}
else
if ($values->smb_password!='') {
// use escapeshellarg() to make command shell-secure
// Set samba-passwords with external perl-script
$attr['ntPassword'] = getNTPasswordHash($values->smb_password);
$attr['lmPassword'] = getLMPasswordHash($values->smb_password);
$attr['ntPassword'] = exec(escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." nt ".escapeshellarg($values->smb_password));
$attr['lmPassword'] = exec(escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." lm ".escapeshellarg($values->smb_password));
$attr['pwdLastSet'] = time(); // sambaAccount_may
}
// Check which Samba-Attributes have changed
@ -1852,19 +1819,19 @@ function modifyuser($values,$values_old,$uselamdaemon=true) { // Will modify the
if (($values->personal_facsimileTelephoneNumber != $values_old->personal_facsimileTelephoneNumber) && ($values->personal_facsimileTelephoneNumber!=''))
$attr['facsimileTelephoneNumber'] = utf8_encode($values->personal_facsimileTelephoneNumber);
if (($values->personal_facsimileTelephoneNumber != $values_old->personal_facsimileTelephoneNumber) && ($values->personal_facsimileTelephoneNumber==''))
$attr_rem['facsimileTelephoneNumber'] = array();
$attr_rem['facsimileTelephoneNumber'] = utf8_encode($values_old->personal_facsimileTelephoneNumber);
if (($values->personal_street != $values_old->personal_street) && ($values->personal_street!=''))
$attr['street'] = utf8_encode($values->personal_street);
if (($values->personal_street != $values_old->personal_street) && ($values->personal_street==''))
$attr_rem['street'] = utf8_encode($values_old->personal_street);
if (($values->personal_postalCode != $values_old->personal_postalCode) && ($values->personal_postalCode!=''))
$attr['postalCode'] = utf8_encode($values->personal_postalCode);
if (($values->personal_postalCode != $values_old->personal_postalCode) && ($values->personal_postalCode==''))
$attr_rem['postalCode'] = utf8_encode($values_old->personal_postalCode);
if (($values->personal_street != $values_old->personal_street) && ($values->personal_street!=''))
$attr['postalCode'] = utf8_encode($values->personal_street);
if (($values->personal_street != $values_old->personal_street) && ($values->personal_street==''))
$attr_rem['postalCode'] = utf8_encode($values_old->personal_street);
if (($values->personal_postalAddress != $values_old->personal_postalAddress) && ($values->personal_postalAddress!=''))
$attr['postalAddress'] = utf8_encode($values->personal_postalAddress);
if (($values->personal_postalAddress != $values_old->personal_postalAddress) && ($values->personal_postalAddress==''))
$attr_rem['postalAddress'] = array();
$attr_rem['postalAddress'] = utf8_encode($values_old->personal_postalAddress);
if (($values->personal_employeeType != $values_old->personal_employeeType) && ($values->personal_employeeType!=''))
$attr['employeeType'] = utf8_encode($values->personal_employeeType);
if (($values->personal_employeeType != $values_old->personal_employeeType) && ($values->personal_employeeType==''))
@ -1919,7 +1886,7 @@ function modifyuser($values,$values_old,$uselamdaemon=true) { // Will modify the
$i=0;
for ($i=0; $i<count($dn); $i++) {
if ($_SESSION['groupDN'][$dn]['memberUid'][$i] == $values->general_username) unset ($_SESSION['groupDN'][$dn]['memberUid'][$i]);
$_SESSION['groupDN'][$dn]['memberUid'][$i] = array_values($_SESSION['groupDN'][$dn]['memberUid']);
$_SESSION['groupDN'][$dn]['memberUid'][$i] = array_values($_SESSION['groupDN'][$dn]['memberUid'][$i]);
}
}
}
@ -2025,8 +1992,9 @@ function modifyuser($values,$values_old,$uselamdaemon=true) { // Will modify the
*/
function createhost($values) {
// These Objectclasses are needed for an host account
$attr['objectClass'][] = 'posixAccount';
$attr['objectClass'][] = 'account';
$attr['objectClass'][0] = 'posixAccount';
$attr['objectClass'][1] = 'shadowAccount';
$attr['objectClass'][2] = 'account';
// Create DN for new host account
$values->general_dn = 'uid=' . $values->general_username . ',' . $values->general_dn;
// Attributes which are required
@ -2047,10 +2015,10 @@ function createhost($values) {
// Samba attributes
if ($_SESSION['config']->is_samba3()) {
// Add all attributes as samba3 objectclass
$attr['objectClass'][] = 'sambaSamAccount';
// password for new hosts is hostname
$attr['sambaNTPassword'] = getNTPasswordHash(substr($values->general_username, 0, strlen($values->general_username) - 1));
$attr['sambaLMPassword'] = getLMPasswordHash(substr($values->general_username, 0, strlen($values->general_username) - 1));
$attr['objectClass'][3] = 'sambaSamAccount';
// "Standard" password for new hosts
$attr['sambaNTPassword'] = '0CB6948805F797BF2A82807973B89537';
$attr['sambaLMPassword'] = '01FC5A6BE7BC6929AAD3B435B51404EE';
$attr['sambaPwdLastSet'] = time(); // sambaAccount_may
$attr['sambaSID'] = $values->smb_domain->SID . "-" . (2 * $values->general_uidNumber + $values->smb_domain->RIDbase); // sambaAccount_may
$attr['sambaPrimaryGroupSID'] = $values->smb_domain->SID . "-515"; // sambaAccount_req
@ -2061,10 +2029,10 @@ function createhost($values) {
}
else {
// Add all attributes as samba2.2 objectclass
$attr['objectClass'][] = 'sambaAccount';
// password for new hosts is hostname
$attr['ntPassword'] = getNTPasswordHash(substr($values->general_username, 0, strlen($values->general_username) - 1));
$attr['lmPassword'] = getLMPasswordHash(substr($values->general_username, 0, strlen($values->general_username) - 1));
$attr['objectClass'][3] = 'sambaAccount';
// "Standard" password for new hosts
$attr['ntPassword'] = '0CB6948805F797BF2A82807973B89537';
$attr['lmPassword'] = '01FC5A6BE7BC6929AAD3B435B51404EE';
$attr['pwdLastSet'] = time(); // sambaAccount_may
$attr['rid'] = (2 * $values->general_uidNumber + 1000); // sambaAccount_may
$attr['primaryGroupID'] = (2 * getgid($values->general_group) + 1001); // sambaAccount_req
@ -2101,19 +2069,23 @@ function modifyhost($values,$values_old) {
$attr['objectClass'] = $values->general_objectClass;
$attr['objectClass'][] = 'posixAccount';
}
if (!in_array('shadowAccount', $values->general_objectClass)) {
if (!isset($attr['objectClass'])) $attr['objectClass'] = $values->general_objectClass;
$attr['objectClass'][] = 'shadowAccount';
}
// Create DN for new host account
$values->general_dn = 'uid=' . $values->general_username . ',' . $values->general_dn;
// Attributes which are required
if ($values->general_username != $values_old->general_username) {
$attr['cn'] = $values->general_username; // posixAccount_req sambaAccount_may
$attr['cn'] = $values->general_username; // posixAccount_req shadowAccount_req sambaAccount_may
$attr['uid'] = $values->general_username; // posixAccount_req
}
if ($values->general_uidNumber != $values_old->general_uidNumber) {
$attr['uidNumber'] = $values->general_uidNumber;
// Because sambaSID(rid) is related to uidNumber we have to change it if uidNumbaer has changed
// Because sambaSid(rid) is related to uidNumber we have to change it if uidNumbaer has changed
if ($_SESSION['config']->is_samba3())
$attr['sambaSID'] = $values->smb_domain->SID . "-" . (2 * $values->general_uidNumber + $values->smb_domain->RIDbase);
$attr['sambaSid'] = $values->smb_domain->SID . "-" . (2 * $values->general_uidNumber + $values->smb_domain->RIDbase);
else $attr['rid'] = (2 * $values->general_uidNumber + 1000);
}
if ($values->general_group != $values_old->general_group) {
@ -2168,7 +2140,7 @@ function modifyhost($values,$values_old) {
$attr['displayName'] = utf8_encode($values->smb_displayName); // sambaAccount_may
$attr['sambaAcctFlags'] = smbflag($values->smb_flags); // sambaAccount_may
$attr['sambaDomainName'] = $values->smb_domain->name; // sambaAccount_may
$attr['sambaSID'] = $values->smb_domain->SID . "-" . (2 * $values->general_uidNumber + $values->smb_domain->RIDbase); // sambaAccount_may
$attr['sambaSid'] = $values->smb_domain->SID . "-" . (2 * $values->general_uidNumber + $values->smb_domain->RIDbase); // sambaAccount_may
$attr['sambaPrimaryGroupSID'] = $values->smb_domain->SID . "-" . (2 * getgid($values->general_group) + $values->smb_domain->RIDbase +1); // sambaAccount_req
// remove old attributes
if (in_array('sambaAccount', $attr_old['objectClass'])) $attr_rem['objectClass'] = 'sambaAccount';
@ -2191,14 +2163,14 @@ function modifyhost($values,$values_old) {
}
// Reset password
if ($values->smb_flags['N']) {
// password for new hosts is hostname
$attr['sambaNTPassword'] = getNTPasswordHash(substr($values->general_username, 0, strlen($values->general_username) - 1));
$attr['sambaLMPassword'] = getLMPasswordHash(substr($values->general_username, 0, strlen($values->general_username) - 1));
// "Standard" password for new hosts
$attr['sambaNTPassword'] = '0CB6948805F797BF2A82807973B89537';
$attr['sambaLMPassword'] = '01FC5A6BE7BC6929AAD3B435B51404EE';
$attr['sambaPwdLastSet'] = time(); // sambaAccount_may
}
if ($values->smb_domain->name!=$values_old->smb_domain->name) {
$attr['sambaDomainName'] = $values->smb_domain->name; // sambaAccount_may
$attr['sambaSID'] = $values->smb_domain->SID . "-" . (2 * $values->general_uidNumber + $values->smb_domain->RIDbase);
$attr['sambaSid'] = $values->smb_domain->SID . "-" . (2 * $values->general_uidNumber + $values->smb_domain->RIDbase);
$attr['sambaPrimaryGroupSID'] = $values->smb_domain->SID . "-".
(2 * getgid($values->general_group) + $values->smb_domain->RIDbase+1);
}
@ -2258,9 +2230,9 @@ function modifyhost($values,$values_old) {
if (isset($attr_old['sambaSID'][0])) $attr_rem['sambaSID'] = $attr_old['sambaSID'][0];
}
if ($values->smb_flags['N']) {
// password for new hosts is hostname
$attr['ntPassword'] = getNTPasswordHash(substr($values->general_username, 0, strlen($values->general_username) - 1));
$attr['lmPassword'] = getLMPasswordHash(substr($values->general_username, 0, strlen($values->general_username) - 1));
// "Standard" password for new hosts
$attr['ntPassword'] = '0CB6948805F797BF2A82807973B89537';
$attr['lmPassword'] = '01FC5A6BE7BC6929AAD3B435B51404EE';
$attr['pwdLastSet'] = time(); // sambaAccount_may
}
if (isset($attr_old['sambaSID'][0])) $attr_rem['sambaSID'] = $attr_old['sambaSID'][0];
@ -2382,7 +2354,6 @@ function creategroup($values, $uselamdaemon=true) {
* 5 == Error while modifying Account
*/
function modifygroup($values,$values_old, $uselamdaemon=true) {
print_r($values);print_r($values_old);
// Add missing objectclasses to group
if (!in_array('posixGroup', $values->general_objectClass)) {
$attr['objectClass'] = $values->general_objectClass;
@ -2401,7 +2372,7 @@ function modifygroup($values,$values_old, $uselamdaemon=true) {
if ($values->general_uidNumber != $values_old->general_uidNumber) {
$attr['gidNumber'] = $values->general_uidNumber;
// Set correct SID if UID was changed
if ($_SESSION['config']->is_samba3()) $attr['sambaSID'] = $values->smb_domain->SID . "-" . (2 * $values->general_uidNumber + $values->smb_domain->RIDbase +1);
if ($_SESSION['config']->is_samba3()) $attr['sambaSid'] = $values->smb_domain->SID . "-" . (2 * $values->general_uidNumber + $values->smb_domain->RIDbase +1);
}
if ($values->general_gecos != $values_old->general_gecos) $attr['description'] = utf8_encode($values->general_gecos);
if ($values->smb_displayName != $values_old->smb_displayName)
@ -2496,34 +2467,5 @@ function modifygroup($values,$values_old, $uselamdaemon=true) {
return 3;
}
/**
* Returns the nt password hash of a given password.
* $password: The cleartext password
*/
function getNTPasswordHash($password) {
// if Perl is installed in default directory use it
if (file_exists("/usr/bin/perl")) {
return exec('/usr/bin/perl ' . escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." nt ".escapeshellarg($password));
}
// otherwise use Perl in search path
else {
return exec('perl ' . escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." nt ".escapeshellarg($password));
}
}
/**
* Returns the lanman password hash of a given password.
* $password: The cleartext password
*/
function getLMPasswordHash($password) {
// if Perl is installed in default directory use it
if (file_exists("/usr/bin/perl")) {
return exec('/usr/bin/perl ' . escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." lm ".escapeshellarg($password));
}
// otherwise use Perl in search path
else {
return exec('perl ' . escapeshellarg($_SESSION['lampath'].'lib/createntlm.pl')." lm ".escapeshellarg($password));
}
}
?>

View File

@ -1,530 +0,0 @@
<?php
/**
* The Cipher_blowfish:: class implements the Cipher interface enryption data
* using the Blowfish algorithm.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Copyright 2002-2003 Mike Cochrane <mike@graftonhall.co.nz>
*
* See http://www.fsf.org/copyleft/lgpl.html for license information (LGPL).
*
* This file was copied from the Horde project (http://www.horde.org).
*
* author: Mike Cochrane <mike@graftonhall.co.nz>
*
* edited by Roland Gruber <post@rolandgruber.de> for LAM
* - added encrypt/decrypt functions
*/
class Cipher_blowfish {
/* Pi Array */
var $p = array(
0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344,
0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89,
0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C,
0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917,
0x9216D5D9, 0x8979FB1B);
/* S Boxes */
var $s1 = array(
0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7,
0xB8E1AFED, 0x6A267E96, 0xBA7C9045, 0xF12C7F99,
0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16,
0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E,
0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE,
0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013,
0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF,
0x8E79DCB0, 0x603A180E, 0x6C9E0E8B, 0xB01E8A3E,
0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60,
0xE65525F3, 0xAA55AB94, 0x57489862, 0x63E81440,
0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE,
0xA15486AF, 0x7C72E993, 0xB3EE1411, 0x636FBC2A,
0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E,
0xAFD6BA33, 0x6C24CF5C, 0x7A325381, 0x28958677,
0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193,
0x61D809CC, 0xFB21A991, 0x487CAC60, 0x5DEC8032,
0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88,
0x23893E81, 0xD396ACC5, 0x0F6D6FF3, 0x83F44239,
0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E,
0x21C66842, 0xF6E96C9A, 0x670C9C61, 0xABD388F0,
0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3,
0x6EEF0B6C, 0x137A3BE4, 0xBA3BF050, 0x7EFB2A98,
0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88,
0x8CEE8619, 0x456F9FB4, 0x7D84A5C3, 0x3B8B5EBE,
0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6,
0x4ED3AA62, 0x363F7706, 0x1BFEDF72, 0x429B023D,
0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B,
0x075372C9, 0x80991B7B, 0x25D479D8, 0xF6E8DEF7,
0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA,
0xC1A94FB6, 0x409F60C4, 0x5E5C9EC2, 0x196A2463,
0x68FB6FAF, 0x3E6C53B5, 0x1339B2EB, 0x3B52EC6F,
0x6DFC511F, 0x9B30952C, 0xCC814544, 0xAF5EBD09,
0xBEE3D004, 0xDE334AFD, 0x660F2807, 0x192E4BB3,
0xC0CBA857, 0x45C8740F, 0xD20B5F39, 0xB9D3FBDB,
0x5579C0BD, 0x1A60320A, 0xD6A100C6, 0x402C7279,
0x679F25FE, 0xFB1FA3CC, 0x8EA5E9F8, 0xDB3222F8,
0x3C7516DF, 0xFD616B15, 0x2F501EC8, 0xAD0552AB,
0x323DB5FA, 0xFD238760, 0x53317B48, 0x3E00DF82,
0x9E5C57BB, 0xCA6F8CA0, 0x1A87562E, 0xDF1769DB,
0xD542A8F6, 0x287EFFC3, 0xAC6732C6, 0x8C4F5573,
0x695B27B0, 0xBBCA58C8, 0xE1FFA35D, 0xB8F011A0,
0x10FA3D98, 0xFD2183B8, 0x4AFCB56C, 0x2DD1D35B,
0x9A53E479, 0xB6F84565, 0xD28E49BC, 0x4BFB9790,
0xE1DDF2DA, 0xA4CB7E33, 0x62FB1341, 0xCEE4C6E8,
0xEF20CADA, 0x36774C01, 0xD07E9EFE, 0x2BF11FB4,
0x95DBDA4D, 0xAE909198, 0xEAAD8E71, 0x6B93D5A0,
0xD08ED1D0, 0xAFC725E0, 0x8E3C5B2F, 0x8E7594B7,
0x8FF6E2FB, 0xF2122B64, 0x8888B812, 0x900DF01C,
0x4FAD5EA0, 0x688FC31C, 0xD1CFF191, 0xB3A8C1AD,
0x2F2F2218, 0xBE0E1777, 0xEA752DFE, 0x8B021FA1,
0xE5A0CC0F, 0xB56F74E8, 0x18ACF3D6, 0xCE89E299,
0xB4A84FE0, 0xFD13E0B7, 0x7CC43B81, 0xD2ADA8D9,
0x165FA266, 0x80957705, 0x93CC7314, 0x211A1477,
0xE6AD2065, 0x77B5FA86, 0xC75442F5, 0xFB9D35CF,
0xEBCDAF0C, 0x7B3E89A0, 0xD6411BD3, 0xAE1E7E49,
0x00250E2D, 0x2071B35E, 0x226800BB, 0x57B8E0AF,
0x2464369B, 0xF009B91E, 0x5563911D, 0x59DFA6AA,
0x78C14389, 0xD95A537F, 0x207D5BA2, 0x02E5B9C5,
0x83260376, 0x6295CFA9, 0x11C81968, 0x4E734A41,
0xB3472DCA, 0x7B14A94A, 0x1B510052, 0x9A532915,
0xD60F573F, 0xBC9BC6E4, 0x2B60A476, 0x81E67400,
0x08BA6FB5, 0x571BE91F, 0xF296EC6B, 0x2A0DD915,
0xB6636521, 0xE7B9F9B6, 0xFF34052E, 0xC5855664,
0x53B02D5D, 0xA99F8FA1, 0x08BA4799, 0x6E85076A);
var $s2 = array(
0x4B7A70E9, 0xB5B32944, 0xDB75092E, 0xC4192623,
0xAD6EA6B0, 0x49A7DF7D, 0x9CEE60B8, 0x8FEDB266,
0xECAA8C71, 0x699A17FF, 0x5664526C, 0xC2B19EE1,
0x193602A5, 0x75094C29, 0xA0591340, 0xE4183A3E,
0x3F54989A, 0x5B429D65, 0x6B8FE4D6, 0x99F73FD6,
0xA1D29C07, 0xEFE830F5, 0x4D2D38E6, 0xF0255DC1,
0x4CDD2086, 0x8470EB26, 0x6382E9C6, 0x021ECC5E,
0x09686B3F, 0x3EBAEFC9, 0x3C971814, 0x6B6A70A1,
0x687F3584, 0x52A0E286, 0xB79C5305, 0xAA500737,
0x3E07841C, 0x7FDEAE5C, 0x8E7D44EC, 0x5716F2B8,
0xB03ADA37, 0xF0500C0D, 0xF01C1F04, 0x0200B3FF,
0xAE0CF51A, 0x3CB574B2, 0x25837A58, 0xDC0921BD,
0xD19113F9, 0x7CA92FF6, 0x94324773, 0x22F54701,
0x3AE5E581, 0x37C2DADC, 0xC8B57634, 0x9AF3DDA7,
0xA9446146, 0x0FD0030E, 0xECC8C73E, 0xA4751E41,
0xE238CD99, 0x3BEA0E2F, 0x3280BBA1, 0x183EB331,
0x4E548B38, 0x4F6DB908, 0x6F420D03, 0xF60A04BF,
0x2CB81290, 0x24977C79, 0x5679B072, 0xBCAF89AF,
0xDE9A771F, 0xD9930810, 0xB38BAE12, 0xDCCF3F2E,
0x5512721F, 0x2E6B7124, 0x501ADDE6, 0x9F84CD87,
0x7A584718, 0x7408DA17, 0xBC9F9ABC, 0xE94B7D8C,
0xEC7AEC3A, 0xDB851DFA, 0x63094366, 0xC464C3D2,
0xEF1C1847, 0x3215D908, 0xDD433B37, 0x24C2BA16,
0x12A14D43, 0x2A65C451, 0x50940002, 0x133AE4DD,
0x71DFF89E, 0x10314E55, 0x81AC77D6, 0x5F11199B,
0x043556F1, 0xD7A3C76B, 0x3C11183B, 0x5924A509,
0xF28FE6ED, 0x97F1FBFA, 0x9EBABF2C, 0x1E153C6E,
0x86E34570, 0xEAE96FB1, 0x860E5E0A, 0x5A3E2AB3,
0x771FE71C, 0x4E3D06FA, 0x2965DCB9, 0x99E71D0F,
0x803E89D6, 0x5266C825, 0x2E4CC978, 0x9C10B36A,
0xC6150EBA, 0x94E2EA78, 0xA5FC3C53, 0x1E0A2DF4,
0xF2F74EA7, 0x361D2B3D, 0x1939260F, 0x19C27960,
0x5223A708, 0xF71312B6, 0xEBADFE6E, 0xEAC31F66,
0xE3BC4595, 0xA67BC883, 0xB17F37D1, 0x018CFF28,
0xC332DDEF, 0xBE6C5AA5, 0x65582185, 0x68AB9802,
0xEECEA50F, 0xDB2F953B, 0x2AEF7DAD, 0x5B6E2F84,
0x1521B628, 0x29076170, 0xECDD4775, 0x619F1510,
0x13CCA830, 0xEB61BD96, 0x0334FE1E, 0xAA0363CF,
0xB5735C90, 0x4C70A239, 0xD59E9E0B, 0xCBAADE14,
0xEECC86BC, 0x60622CA7, 0x9CAB5CAB, 0xB2F3846E,
0x648B1EAF, 0x19BDF0CA, 0xA02369B9, 0x655ABB50,
0x40685A32, 0x3C2AB4B3, 0x319EE9D5, 0xC021B8F7,
0x9B540B19, 0x875FA099, 0x95F7997E, 0x623D7DA8,
0xF837889A, 0x97E32D77, 0x11ED935F, 0x16681281,
0x0E358829, 0xC7E61FD6, 0x96DEDFA1, 0x7858BA99,
0x57F584A5, 0x1B227263, 0x9B83C3FF, 0x1AC24696,
0xCDB30AEB, 0x532E3054, 0x8FD948E4, 0x6DBC3128,
0x58EBF2EF, 0x34C6FFEA, 0xFE28ED61, 0xEE7C3C73,
0x5D4A14D9, 0xE864B7E3, 0x42105D14, 0x203E13E0,
0x45EEE2B6, 0xA3AAABEA, 0xDB6C4F15, 0xFACB4FD0,
0xC742F442, 0xEF6ABBB5, 0x654F3B1D, 0x41CD2105,
0xD81E799E, 0x86854DC7, 0xE44B476A, 0x3D816250,
0xCF62A1F2, 0x5B8D2646, 0xFC8883A0, 0xC1C7B6A3,
0x7F1524C3, 0x69CB7492, 0x47848A0B, 0x5692B285,
0x095BBF00, 0xAD19489D, 0x1462B174, 0x23820E00,
0x58428D2A, 0x0C55F5EA, 0x1DADF43E, 0x233F7061,
0x3372F092, 0x8D937E41, 0xD65FECF1, 0x6C223BDB,
0x7CDE3759, 0xCBEE7460, 0x4085F2A7, 0xCE77326E,
0xA6078084, 0x19F8509E, 0xE8EFD855, 0x61D99735,
0xA969A7AA, 0xC50C06C2, 0x5A04ABFC, 0x800BCADC,
0x9E447A2E, 0xC3453484, 0xFDD56705, 0x0E1E9EC9,
0xDB73DBD3, 0x105588CD, 0x675FDA79, 0xE3674340,
0xC5C43465, 0x713E38D8, 0x3D28F89E, 0xF16DFF20,
0x153E21E7, 0x8FB03D4A, 0xE6E39F2B, 0xDB83ADF7);
var $s3 = array(
0xE93D5A68, 0x948140F7, 0xF64C261C, 0x94692934,
0x411520F7, 0x7602D4F7, 0xBCF46B2E, 0xD4A20068,
0xD4082471, 0x3320F46A, 0x43B7D4B7, 0x500061AF,
0x1E39F62E, 0x97244546, 0x14214F74, 0xBF8B8840,
0x4D95FC1D, 0x96B591AF, 0x70F4DDD3, 0x66A02F45,
0xBFBC09EC, 0x03BD9785, 0x7FAC6DD0, 0x31CB8504,
0x96EB27B3, 0x55FD3941, 0xDA2547E6, 0xABCA0A9A,
0x28507825, 0x530429F4, 0x0A2C86DA, 0xE9B66DFB,
0x68DC1462, 0xD7486900, 0x680EC0A4, 0x27A18DEE,
0x4F3FFEA2, 0xE887AD8C, 0xB58CE006, 0x7AF4D6B6,
0xAACE1E7C, 0xD3375FEC, 0xCE78A399, 0x406B2A42,
0x20FE9E35, 0xD9F385B9, 0xEE39D7AB, 0x3B124E8B,
0x1DC9FAF7, 0x4B6D1856, 0x26A36631, 0xEAE397B2,
0x3A6EFA74, 0xDD5B4332, 0x6841E7F7, 0xCA7820FB,
0xFB0AF54E, 0xD8FEB397, 0x454056AC, 0xBA489527,
0x55533A3A, 0x20838D87, 0xFE6BA9B7, 0xD096954B,
0x55A867BC, 0xA1159A58, 0xCCA92963, 0x99E1DB33,
0xA62A4A56, 0x3F3125F9, 0x5EF47E1C, 0x9029317C,
0xFDF8E802, 0x04272F70, 0x80BB155C, 0x05282CE3,
0x95C11548, 0xE4C66D22, 0x48C1133F, 0xC70F86DC,
0x07F9C9EE, 0x41041F0F, 0x404779A4, 0x5D886E17,
0x325F51EB, 0xD59BC0D1, 0xF2BCC18F, 0x41113564,
0x257B7834, 0x602A9C60, 0xDFF8E8A3, 0x1F636C1B,
0x0E12B4C2, 0x02E1329E, 0xAF664FD1, 0xCAD18115,
0x6B2395E0, 0x333E92E1, 0x3B240B62, 0xEEBEB922,
0x85B2A20E, 0xE6BA0D99, 0xDE720C8C, 0x2DA2F728,
0xD0127845, 0x95B794FD, 0x647D0862, 0xE7CCF5F0,
0x5449A36F, 0x877D48FA, 0xC39DFD27, 0xF33E8D1E,
0x0A476341, 0x992EFF74, 0x3A6F6EAB, 0xF4F8FD37,
0xA812DC60, 0xA1EBDDF8, 0x991BE14C, 0xDB6E6B0D,
0xC67B5510, 0x6D672C37, 0x2765D43B, 0xDCD0E804,
0xF1290DC7, 0xCC00FFA3, 0xB5390F92, 0x690FED0B,
0x667B9FFB, 0xCEDB7D9C, 0xA091CF0B, 0xD9155EA3,
0xBB132F88, 0x515BAD24, 0x7B9479BF, 0x763BD6EB,
0x37392EB3, 0xCC115979, 0x8026E297, 0xF42E312D,
0x6842ADA7, 0xC66A2B3B, 0x12754CCC, 0x782EF11C,
0x6A124237, 0xB79251E7, 0x06A1BBE6, 0x4BFB6350,
0x1A6B1018, 0x11CAEDFA, 0x3D25BDD8, 0xE2E1C3C9,
0x44421659, 0x0A121386, 0xD90CEC6E, 0xD5ABEA2A,
0x64AF674E, 0xDA86A85F, 0xBEBFE988, 0x64E4C3FE,
0x9DBC8057, 0xF0F7C086, 0x60787BF8, 0x6003604D,
0xD1FD8346, 0xF6381FB0, 0x7745AE04, 0xD736FCCC,
0x83426B33, 0xF01EAB71, 0xB0804187, 0x3C005E5F,
0x77A057BE, 0xBDE8AE24, 0x55464299, 0xBF582E61,
0x4E58F48F, 0xF2DDFDA2, 0xF474EF38, 0x8789BDC2,
0x5366F9C3, 0xC8B38E74, 0xB475F255, 0x46FCD9B9,
0x7AEB2661, 0x8B1DDF84, 0x846A0E79, 0x915F95E2,
0x466E598E, 0x20B45770, 0x8CD55591, 0xC902DE4C,
0xB90BACE1, 0xBB8205D0, 0x11A86248, 0x7574A99E,
0xB77F19B6, 0xE0A9DC09, 0x662D09A1, 0xC4324633,
0xE85A1F02, 0x09F0BE8C, 0x4A99A025, 0x1D6EFE10,
0x1AB93D1D, 0x0BA5A4DF, 0xA186F20F, 0x2868F169,
0xDCB7DA83, 0x573906FE, 0xA1E2CE9B, 0x4FCD7F52,
0x50115E01, 0xA70683FA, 0xA002B5C4, 0x0DE6D027,
0x9AF88C27, 0x773F8641, 0xC3604C06, 0x61A806B5,
0xF0177A28, 0xC0F586E0, 0x006058AA, 0x30DC7D62,
0x11E69ED7, 0x2338EA63, 0x53C2DD94, 0xC2C21634,
0xBBCBEE56, 0x90BCB6DE, 0xEBFC7DA1, 0xCE591D76,
0x6F05E409, 0x4B7C0188, 0x39720A3D, 0x7C927C24,
0x86E3725F, 0x724D9DB9, 0x1AC15BB4, 0xD39EB8FC,
0xED545578, 0x08FCA5B5, 0xD83D7CD3, 0x4DAD0FC4,
0x1E50EF5E, 0xB161E6F8, 0xA28514D9, 0x6C51133C,
0x6FD5C7E7, 0x56E14EC4, 0x362ABFCE, 0xDDC6C837,
0xD79A3234, 0x92638212, 0x670EFA8E, 0x406000E0);
var $s4 = array(
0x3A39CE37, 0xD3FAF5CF, 0xABC27737, 0x5AC52D1B,
0x5CB0679E, 0x4FA33742, 0xD3822740, 0x99BC9BBE,
0xD5118E9D, 0xBF0F7315, 0xD62D1C7E, 0xC700C47B,
0xB78C1B6B, 0x21A19045, 0xB26EB1BE, 0x6A366EB4,
0x5748AB2F, 0xBC946E79, 0xC6A376D2, 0x6549C2C8,
0x530FF8EE, 0x468DDE7D, 0xD5730A1D, 0x4CD04DC6,
0x2939BBDB, 0xA9BA4650, 0xAC9526E8, 0xBE5EE304,
0xA1FAD5F0, 0x6A2D519A, 0x63EF8CE2, 0x9A86EE22,
0xC089C2B8, 0x43242EF6, 0xA51E03AA, 0x9CF2D0A4,
0x83C061BA, 0x9BE96A4D, 0x8FE51550, 0xBA645BD6,
0x2826A2F9, 0xA73A3AE1, 0x4BA99586, 0xEF5562E9,
0xC72FEFD3, 0xF752F7DA, 0x3F046F69, 0x77FA0A59,
0x80E4A915, 0x87B08601, 0x9B09E6AD, 0x3B3EE593,
0xE990FD5A, 0x9E34D797, 0x2CF0B7D9, 0x022B8B51,
0x96D5AC3A, 0x017DA67D, 0xD1CF3ED6, 0x7C7D2D28,
0x1F9F25CF, 0xADF2B89B, 0x5AD6B472, 0x5A88F54C,
0xE029AC71, 0xE019A5E6, 0x47B0ACFD, 0xED93FA9B,
0xE8D3C48D, 0x283B57CC, 0xF8D56629, 0x79132E28,
0x785F0191, 0xED756055, 0xF7960E44, 0xE3D35E8C,
0x15056DD4, 0x88F46DBA, 0x03A16125, 0x0564F0BD,
0xC3EB9E15, 0x3C9057A2, 0x97271AEC, 0xA93A072A,
0x1B3F6D9B, 0x1E6321F5, 0xF59C66FB, 0x26DCF319,
0x7533D928, 0xB155FDF5, 0x03563482, 0x8ABA3CBB,
0x28517711, 0xC20AD9F8, 0xABCC5167, 0xCCAD925F,
0x4DE81751, 0x3830DC8E, 0x379D5862, 0x9320F991,
0xEA7A90C2, 0xFB3E7BCE, 0x5121CE64, 0x774FBE32,
0xA8B6E37E, 0xC3293D46, 0x48DE5369, 0x6413E680,
0xA2AE0810, 0xDD6DB224, 0x69852DFD, 0x09072166,
0xB39A460A, 0x6445C0DD, 0x586CDECF, 0x1C20C8AE,
0x5BBEF7DD, 0x1B588D40, 0xCCD2017F, 0x6BB4E3BB,
0xDDA26A7E, 0x3A59FF45, 0x3E350A44, 0xBCB4CDD5,
0x72EACEA8, 0xFA6484BB, 0x8D6612AE, 0xBF3C6F47,
0xD29BE463, 0x542F5D9E, 0xAEC2771B, 0xF64E6370,
0x740E0D8D, 0xE75B1357, 0xF8721671, 0xAF537D5D,
0x4040CB08, 0x4EB4E2CC, 0x34D2466A, 0x0115AF84,
0xE1B00428, 0x95983A1D, 0x06B89FB4, 0xCE6EA048,
0x6F3F3B82, 0x3520AB82, 0x011A1D4B, 0x277227F8,
0x611560B1, 0xE7933FDC, 0xBB3A792B, 0x344525BD,
0xA08839E1, 0x51CE794B, 0x2F32C9B7, 0xA01FBAC9,
0xE01CC87E, 0xBCC7D1F6, 0xCF0111C3, 0xA1E8AAC7,
0x1A908749, 0xD44FBD9A, 0xD0DADECB, 0xD50ADA38,
0x0339C32A, 0xC6913667, 0x8DF9317C, 0xE0B12B4F,
0xF79E59B7, 0x43F5BB3A, 0xF2D519FF, 0x27D9459C,
0xBF97222C, 0x15E6FC2A, 0x0F91FC71, 0x9B941525,
0xFAE59361, 0xCEB69CEB, 0xC2A86459, 0x12BAA8D1,
0xB6C1075E, 0xE3056A0C, 0x10D25065, 0xCB03A442,
0xE0EC6E0E, 0x1698DB3B, 0x4C98A0BE, 0x3278E964,
0x9F1F9532, 0xE0D392DF, 0xD3A0342B, 0x8971F21E,
0x1B0A7441, 0x4BA3348C, 0xC5BE7120, 0xC37632D8,
0xDF359F8D, 0x9B992F2E, 0xE60B6F47, 0x0FE3F11D,
0xE54CDA54, 0x1EDAD891, 0xCE6279CF, 0xCD3E7E6F,
0x1618B166, 0xFD2C1D05, 0x848FD2C5, 0xF6FB2299,
0xF523F357, 0xA6327623, 0x93A83531, 0x56CCCD02,
0xACF08162, 0x5A75EBB5, 0x6E163697, 0x88D273CC,
0xDE966292, 0x81B949D0, 0x4C50901B, 0x71C65614,
0xE6C6C7BD, 0x327A140A, 0x45E1D006, 0xC3F27B9A,
0xC9AA53FD, 0x62A80F00, 0xBB25BFE2, 0x35BDD2F6,
0x71126905, 0xB2040222, 0xB6CBCF7C, 0xCD769C2B,
0x53113EC0, 0x1640E3D3, 0x38ABBD60, 0x2547ADF0,
0xBA38209C, 0xF746CE76, 0x77AFA1C5, 0x20756060,
0x85CBFE4E, 0x8AE88DD8, 0x7AAAF9B0, 0x4CF9AA7E,
0x1948C25C, 0x02FB8A8C, 0x01C36AE4, 0xD6EBE1F9,
0x90D4F869, 0xA65CDEA0, 0x3F09252D, 0xC208E69F,
0xB74E6132, 0xCE77E25B, 0x578FDFE3, 0x3AC372E6);
/* The number of rounds to do */
var $_rounds = 16;
/* Constructor */
function Cipher_blowfish($params = null)
{
}
/**
* Set the key to be used for en/decryption
*
* @param String $key The key to use
*/
function setKey($key)
{
$key = $this->_formatKey($key);
$keyPos = $keyXor = 0;
$iMax = count($this->p);
$keyLen = count($key);
for ($i = 0; $i < $iMax; $i++) {
for ($t = 0; $t < 4; $t++) {
$keyXor = ($keyXor << 8) | (($key[$keyPos]) & 0x0ff);
if (++$keyPos == $keyLen) {
$keyPos = 0;
}
}
$this->p[$i] = $this->p[$i] ^ $keyXor;
}
$encZero = array('L' => 0, 'R' => 0);
for ($i = 0; $i + 1 < $iMax; $i += 2) {
$encZero = $this->_encryptBlock($encZero['L'], $encZero['R']);
$this->p[$i] = $encZero['L'];
$this->p[$i + 1] = $encZero['R'];
}
$iMax = count($this->s1);
for ($i = 0; $i < $iMax; $i += 2) {
$encZero = $this->_encryptBlock($encZero['L'], $encZero['R']);
$this->s1[$i] = $encZero['L'];
$this->s1[$i + 1] = $encZero['R'];
}
$iMax = count($this->s2);
for ($i = 0; $i < $iMax; $i += 2) {
$encZero = $this->_encryptBlock($encZero['L'], $encZero['R']);
$this->s2[$i] = $encZero['L'];
$this->s2[$i + 1] = $encZero['R'];
}
$iMax = count($this->s3);
for ($i = 0; $i < $iMax; $i += 2) {
$encZero = $this->_encryptBlock($encZero['L'], $encZero['R']);
$this->s3[$i] = $encZero['L'];
$this->s3[$i + 1] = $encZero['R'];
}
$iMax = count($this->s4);
for ($i = 0; $i < $iMax; $i += 2) {
$encZero = $this->_encryptBlock($encZero['L'], $encZero['R']);
$this->s4[$i] = $encZero['L'];
$this->s4[$i + 1] = $encZero['R'];
}
}
/**
* Return the size of the blocks that this cipher needs
*
* @return Integer The number of characters per block
*/
function getBlockSize()
{
return 8;
}
/**
* Encrypt a block on data.
*
* @param String $block The data to encrypt
* @param optional String $key The key to use
*
* @return String the encrypted output
*/
function encryptBlock($block, $key = null)
{
if (!is_null($key)) {
$this->setKey($key);
}
list($L, $R) = array_values(unpack('N*', $block));
$parts = $this->_encryptBlock($L, $R);
return pack("NN", $parts['L'], $parts['R']);
}
/**
* Encrypt a string of data.
*
* @param String $data The string to encrypt
* @param optional String $key The key to use
*
* @return String the encrypted output
*/
function encrypt($data, $key = null) {
// add end marker
$data .= 'x';
// split data to array of encryptable blocks
$data_blocks = array();
for ($j = 0; $j < strlen($data); $j = $j + 8) {
$data_blocks[] = substr($data, $j, 8);
}
// add spaces to last block if needed
$data_blocks[sizeof($data_blocks) - 1] = str_pad($data_blocks[sizeof($data_blocks) - 1], 8);
// encrypt blocks
$crypt_blocks = array();
for ($i = 0; $i < sizeof($data_blocks); $i++) {
$crypt_blocks[] = $this->encryptBlock($data_blocks[$i], $key);
}
return implode("", $crypt_blocks);
}
/**
* Encrypt a block on data.
*
* @param String $L The data to encrypt.
* @param String $R The data to encrypt.
*
* @return String The encrypted output.
*/
function _encryptBlock($L, $R)
{
$L ^= $this->p[0];
$R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[1];
$L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[2];
$R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[3];
$L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[4];
$R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[5];
$L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[6];
$R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[7];
$L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[8];
$R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[9];
$L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[10];
$R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[11];
$L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[12];
$R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[13];
$L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[14];
$R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[15];
$L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[16];
$R ^= $this->p[17];
return array('L' => $R, 'R' => $L);
}
/**
* Decrypt a string of data.
*
* @param String $data The data to decrypt
* @param optional String $key The key to use
*
* @return String the decrypted output
*/
function decrypt($data, $key = null){
// decrypt string parts
$decr_blocks = array();
for ($i = 0; $i < (strlen($data) / 8); $i++) {
$decr_blocks[] = $this->decryptBlock(substr($data, $i * 8, 8), $key);
}
$decr_text = "";
$decr_text = implode("", $decr_blocks);
// removed whitespaces and end marker
$decr_text = chop($decr_text);
$decr_text = substr($decr_text, 0, (strlen($decr_text) - 1));
return $decr_text;
}
/**
* Decrypt a block on data.
*
* @param String $block The data to decrypt
* @param optional String $key The key to use
*
* @return String the decrypted output
*/
function decryptBlock($block, $key = null)
{
if (!is_null($key)) {
$this->setKey($key);
}
list($L, $R) = array_values(unpack('N*', $block));
$L ^= $this->p[17];
$R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[16];
$L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[15];
$R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[14];
$L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[13];
$R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[12];
$L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[11];
$R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[10];
$L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[9];
$R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[8];
$L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[7];
$R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[6];
$L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[5];
$R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[4];
$L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[3];
$R ^= ((($this->s1[($L >> 24) & 0xFF] + $this->s2[($L >> 16) & 0x0ff]) ^ $this->s3[($L >> 8) & 0x0ff]) + $this->s4[$L & 0x0ff]) ^ $this->p[2];
$L ^= ((($this->s1[($R >> 24) & 0xFF] + $this->s2[($R >> 16) & 0x0ff]) ^ $this->s3[($R >> 8) & 0x0ff]) + $this->s4[$R & 0x0ff]) ^ $this->p[1];
$decrypted = pack("NN", $R ^ $this->p[0], $L);
return $decrypted;
}
/**
* Converts a text key into an array.
*
* @return array The key.
*/
function _formatKey($key)
{
return array_values(unpack('C*', $key));
}
}
?>

View File

@ -24,23 +24,19 @@ $Id$
*/
// PHP 5 compatibility
if( phpversion() >= "5" ) ini_set( "zend.ze1_compatibility_mode", 1 );
include_once("status.inc");
// sets language settings for automatic translation
function setlanguage() {
if (!isset($_SESSION['language'])) {
$_SESSION['language'] = "en_GB.:ISO-8859-1:English (Great Britain)";
if ($_SESSION['language']) {
$language = explode(":", $_SESSION['language']);
putenv("LANG=" . $language[0]); // e.g. LANG=de_DE
setlocale(LC_ALL, $language[0]); // set LC_ALL to de_DE
$locdir = substr(__FILE__, 0, strlen(__FILE__) - 15) . "/locale"; // set path to translations
bindtextdomain("messages", $locdir);
textdomain("messages");
}
$language = explode(":", $_SESSION['language']);
putenv("LANG=" . $language[0]); // e.g. LANG=de_DE
setlocale(LC_ALL, $language[0]); // set LC_ALL to de_DE
$locdir = substr(__FILE__, 0, strlen(__FILE__) - 15) . "/locale"; // set path to translations
bindtextdomain("messages", $locdir);
textdomain("messages");
header("Content-type: text/html; charset=" . $language[1], true);
else echo _("Language not defined in session!");
}
// returns an array of string with all available configuration profiles (without .conf)
@ -168,10 +164,6 @@ class Config {
$conffile = substr(__FILE__, 0, strlen(__FILE__) - 15) . "/config/" . $this->file . ".conf";
if (is_file($conffile) == True) {
$file = fopen($conffile, "r");
if (!$file) {
StatusMessage("ERROR", "", _("Unable to load configuration!") . " (" . $conffile . ")");
return;
}
while (!feof($file)) {
$line = fgets($file, 1024);
$line = trim($line); // remove spaces at the beginning and end
@ -206,10 +198,6 @@ class Config {
$conffile = substr(__FILE__, 0, strlen(__FILE__) - 15) . "/config/" . $this->file . ".conf";
if (is_file($conffile) == True) {
$file = fopen($conffile, "r");
if (!$file) {
StatusMessage("ERROR", "", _("Cannot open config file!") . " (" . $conffile . ")");
return;
}
$file_array = array();
// read config file
while (!feof($file)) {
@ -336,7 +324,7 @@ class Config {
// returns true if $value has correct format
function set_Adminstring($value) {
if (is_string($value) &&
eregi("^[^;]+(;[^;]+)*$", $value)) {
eregi("^[a-z0-9\\-]+=[a-z0-9\\-]+(,[a-z0-9\\-]+=[a-z0-9 \\-]+)+(;[a-z0-9\\-]+=[a-z0-9\\-]+(,[a-z0-9\\-]+=[a-z0-9 \\-]+)+)*$", $value)) {
$this->Admins = $value;
}
else return false;
@ -366,7 +354,7 @@ class Config {
// $value: new user suffix
// returns true if $value has correct format
function set_UserSuffix($value) {
if (is_string($value)) {
if (is_string($value) && (eregi("^(([a-z0-9 \\-])*=([a-z0-9 \\-])*)(,([a-z0-9 \\-])*=([a-z0-9 \\-])*)*$", $value))) {
$this->usersuffix = $value;
}
else return false;
@ -382,7 +370,7 @@ class Config {
// $value: new group suffix
// returns true if $value has correct format
function set_GroupSuffix($value) {
if (is_string($value)) {
if (is_string($value) && (eregi("^(([a-z0-9 \\-])*=([a-z0-9 \\-])*)(,([a-z0-9 \\-])*=([a-z0-9 \\-])*)*$", $value))) {
$this->groupsuffix = $value;
}
else return false;
@ -398,7 +386,7 @@ class Config {
// $value: new host suffix
// returns true if $value has correct format
function set_HostSuffix($value) {
if (is_string($value)) {
if (is_string($value) && (eregi("^(([a-z0-9 \\-])*=([a-z0-9 \\-])*)(,([a-z0-9 \\-])*=([a-z0-9 \\-])*)*$", $value))) {
$this->hostsuffix = $value;
}
else return false;
@ -415,7 +403,7 @@ class Config {
// returns true if $value has correct format
function set_DomainSuffix($value) {
if (!$value && ($this->get_Samba3() == "no")) $this->domainsuffix = "";
elseif (is_string($value)) {
elseif (is_string($value) && (eregi("^(([a-z0-9 \\-])*=([a-z0-9 \\-])*)(,([a-z0-9 \\-])*=([a-z0-9 \\-])*)*$", $value))) {
$this->domainsuffix = $value;
}
else return false;
@ -515,7 +503,7 @@ class Config {
// $value: new attribute string
// returns true if $value has correct format
function set_userlistAttributes($value) {
if (is_string($value) && eregi("^((#[^:;]+)|([^:;]*:[^:;]+))(;((#[^:;]+)|([^:;]*:[^:;]+)))*$", $value)) {
if (is_string($value) && eregi("^((#[a-z]+)|([a-z]*:[a-z_\\-]+))(;((#[a-z]+)|([a-z]*:[a-z_\\-]+)))*$", $value)) {
$this->userlistAttributes = $value;
}
else return false;
@ -531,7 +519,7 @@ class Config {
// $value: new attribute string
// returns true if $value has correct format
function set_grouplistAttributes($value) {
if (is_string($value) && eregi("^((#[^:;]+)|([^:;]*:[^:;]+))(;((#[^:;]+)|([^:;]*:[^:;]+)))*$", $value)) {
if (is_string($value) && eregi("^((#[a-z]+)|([a-z]*:[a-z_\\-]+))(;((#[a-z]+)|([a-z]*:[a-z_\\-]+)))*$", $value)) {
$this->grouplistAttributes = $value;
}
else return false;
@ -547,7 +535,7 @@ class Config {
// $value: new attribute string
// returns true if $value has correct format
function set_hostlistAttributes($value) {
if (is_string($value) && eregi("^((#[^:;]+)|([^:;]*:[^:;]+))(;((#[^:;]+)|([^:;]*:[^:;]+)))*$", $value)) {
if (is_string($value) && eregi("^((#[a-z]+)|([a-z]*:[a-z_\\-]+))(;((#[a-z]+)|([a-z]*:[a-z_\\-]+)))*$", $value)) {
$this->hostlistAttributes = $value;
}
else return false;
@ -727,10 +715,6 @@ class CfgMain {
$conffile = substr(__FILE__, 0, strlen(__FILE__) - 15) . "/config/config.cfg";
if (is_file($conffile) == True) {
$file = fopen($conffile, "r");
if (!$file) {
StatusMessage("ERROR", "", _("Unable to load configuration!") . " (" . $conffile . ")");
return;
}
while (!feof($file)) {
$line = fgets($file, 1024);
$line = trim($line); // remove spaces at the beginning and end
@ -759,10 +743,6 @@ class CfgMain {
// booleans to check if value was already saved
$save_password = $save_default = False;
$file = fopen($conffile, "r");
if (!$file) {
StatusMessage("ERROR", "", _("Cannot open config file!") . " (" . $conffile . ")");
return;
}
$file_array = array();
// read config file
while (!feof($file)) {

View File

@ -0,0 +1,251 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+20AC Euro
!82 U+201A quotesinglbase
!84 U+201E quotedblbase
!85 U+2026 ellipsis
!86 U+2020 dagger
!87 U+2021 daggerdbl
!89 U+2030 perthousand
!8A U+0160 Scaron
!8B U+2039 guilsinglleft
!8C U+015A Sacute
!8D U+0164 Tcaron
!8E U+017D Zcaron
!8F U+0179 Zacute
!91 U+2018 quoteleft
!92 U+2019 quoteright
!93 U+201C quotedblleft
!94 U+201D quotedblright
!95 U+2022 bullet
!96 U+2013 endash
!97 U+2014 emdash
!99 U+2122 trademark
!9A U+0161 scaron
!9B U+203A guilsinglright
!9C U+015B sacute
!9D U+0165 tcaron
!9E U+017E zcaron
!9F U+017A zacute
!A0 U+00A0 space
!A1 U+02C7 caron
!A2 U+02D8 breve
!A3 U+0141 Lslash
!A4 U+00A4 currency
!A5 U+0104 Aogonek
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+00A9 copyright
!AA U+015E Scedilla
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+017B Zdotaccent
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+02DB ogonek
!B3 U+0142 lslash
!B4 U+00B4 acute
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+00B8 cedilla
!B9 U+0105 aogonek
!BA U+015F scedilla
!BB U+00BB guillemotright
!BC U+013D Lcaron
!BD U+02DD hungarumlaut
!BE U+013E lcaron
!BF U+017C zdotaccent
!C0 U+0154 Racute
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+0102 Abreve
!C4 U+00C4 Adieresis
!C5 U+0139 Lacute
!C6 U+0106 Cacute
!C7 U+00C7 Ccedilla
!C8 U+010C Ccaron
!C9 U+00C9 Eacute
!CA U+0118 Eogonek
!CB U+00CB Edieresis
!CC U+011A Ecaron
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+010E Dcaron
!D0 U+0110 Dcroat
!D1 U+0143 Nacute
!D2 U+0147 Ncaron
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+0150 Ohungarumlaut
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+0158 Rcaron
!D9 U+016E Uring
!DA U+00DA Uacute
!DB U+0170 Uhungarumlaut
!DC U+00DC Udieresis
!DD U+00DD Yacute
!DE U+0162 Tcommaaccent
!DF U+00DF germandbls
!E0 U+0155 racute
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+0103 abreve
!E4 U+00E4 adieresis
!E5 U+013A lacute
!E6 U+0107 cacute
!E7 U+00E7 ccedilla
!E8 U+010D ccaron
!E9 U+00E9 eacute
!EA U+0119 eogonek
!EB U+00EB edieresis
!EC U+011B ecaron
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+010F dcaron
!F0 U+0111 dcroat
!F1 U+0144 nacute
!F2 U+0148 ncaron
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+0151 ohungarumlaut
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+0159 rcaron
!F9 U+016F uring
!FA U+00FA uacute
!FB U+0171 uhungarumlaut
!FC U+00FC udieresis
!FD U+00FD yacute
!FE U+0163 tcommaaccent
!FF U+02D9 dotaccent

View File

@ -0,0 +1,255 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0402 afii10051
!81 U+0403 afii10052
!82 U+201A quotesinglbase
!83 U+0453 afii10100
!84 U+201E quotedblbase
!85 U+2026 ellipsis
!86 U+2020 dagger
!87 U+2021 daggerdbl
!88 U+20AC Euro
!89 U+2030 perthousand
!8A U+0409 afii10058
!8B U+2039 guilsinglleft
!8C U+040A afii10059
!8D U+040C afii10061
!8E U+040B afii10060
!8F U+040F afii10145
!90 U+0452 afii10099
!91 U+2018 quoteleft
!92 U+2019 quoteright
!93 U+201C quotedblleft
!94 U+201D quotedblright
!95 U+2022 bullet
!96 U+2013 endash
!97 U+2014 emdash
!99 U+2122 trademark
!9A U+0459 afii10106
!9B U+203A guilsinglright
!9C U+045A afii10107
!9D U+045C afii10109
!9E U+045B afii10108
!9F U+045F afii10193
!A0 U+00A0 space
!A1 U+040E afii10062
!A2 U+045E afii10110
!A3 U+0408 afii10057
!A4 U+00A4 currency
!A5 U+0490 afii10050
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+0401 afii10023
!A9 U+00A9 copyright
!AA U+0404 afii10053
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+0407 afii10056
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+0406 afii10055
!B3 U+0456 afii10103
!B4 U+0491 afii10098
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+0451 afii10071
!B9 U+2116 afii61352
!BA U+0454 afii10101
!BB U+00BB guillemotright
!BC U+0458 afii10105
!BD U+0405 afii10054
!BE U+0455 afii10102
!BF U+0457 afii10104
!C0 U+0410 afii10017
!C1 U+0411 afii10018
!C2 U+0412 afii10019
!C3 U+0413 afii10020
!C4 U+0414 afii10021
!C5 U+0415 afii10022
!C6 U+0416 afii10024
!C7 U+0417 afii10025
!C8 U+0418 afii10026
!C9 U+0419 afii10027
!CA U+041A afii10028
!CB U+041B afii10029
!CC U+041C afii10030
!CD U+041D afii10031
!CE U+041E afii10032
!CF U+041F afii10033
!D0 U+0420 afii10034
!D1 U+0421 afii10035
!D2 U+0422 afii10036
!D3 U+0423 afii10037
!D4 U+0424 afii10038
!D5 U+0425 afii10039
!D6 U+0426 afii10040
!D7 U+0427 afii10041
!D8 U+0428 afii10042
!D9 U+0429 afii10043
!DA U+042A afii10044
!DB U+042B afii10045
!DC U+042C afii10046
!DD U+042D afii10047
!DE U+042E afii10048
!DF U+042F afii10049
!E0 U+0430 afii10065
!E1 U+0431 afii10066
!E2 U+0432 afii10067
!E3 U+0433 afii10068
!E4 U+0434 afii10069
!E5 U+0435 afii10070
!E6 U+0436 afii10072
!E7 U+0437 afii10073
!E8 U+0438 afii10074
!E9 U+0439 afii10075
!EA U+043A afii10076
!EB U+043B afii10077
!EC U+043C afii10078
!ED U+043D afii10079
!EE U+043E afii10080
!EF U+043F afii10081
!F0 U+0440 afii10082
!F1 U+0441 afii10083
!F2 U+0442 afii10084
!F3 U+0443 afii10085
!F4 U+0444 afii10086
!F5 U+0445 afii10087
!F6 U+0446 afii10088
!F7 U+0447 afii10089
!F8 U+0448 afii10090
!F9 U+0449 afii10091
!FA U+044A afii10092
!FB U+044B afii10093
!FC U+044C afii10094
!FD U+044D afii10095
!FE U+044E afii10096
!FF U+044F afii10097

View File

@ -0,0 +1,251 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+20AC Euro
!82 U+201A quotesinglbase
!83 U+0192 florin
!84 U+201E quotedblbase
!85 U+2026 ellipsis
!86 U+2020 dagger
!87 U+2021 daggerdbl
!88 U+02C6 circumflex
!89 U+2030 perthousand
!8A U+0160 Scaron
!8B U+2039 guilsinglleft
!8C U+0152 OE
!8E U+017D Zcaron
!91 U+2018 quoteleft
!92 U+2019 quoteright
!93 U+201C quotedblleft
!94 U+201D quotedblright
!95 U+2022 bullet
!96 U+2013 endash
!97 U+2014 emdash
!98 U+02DC tilde
!99 U+2122 trademark
!9A U+0161 scaron
!9B U+203A guilsinglright
!9C U+0153 oe
!9E U+017E zcaron
!9F U+0178 Ydieresis
!A0 U+00A0 space
!A1 U+00A1 exclamdown
!A2 U+00A2 cent
!A3 U+00A3 sterling
!A4 U+00A4 currency
!A5 U+00A5 yen
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+00A9 copyright
!AA U+00AA ordfeminine
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+00AF macron
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+00B4 acute
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+00B8 cedilla
!B9 U+00B9 onesuperior
!BA U+00BA ordmasculine
!BB U+00BB guillemotright
!BC U+00BC onequarter
!BD U+00BD onehalf
!BE U+00BE threequarters
!BF U+00BF questiondown
!C0 U+00C0 Agrave
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+00C3 Atilde
!C4 U+00C4 Adieresis
!C5 U+00C5 Aring
!C6 U+00C6 AE
!C7 U+00C7 Ccedilla
!C8 U+00C8 Egrave
!C9 U+00C9 Eacute
!CA U+00CA Ecircumflex
!CB U+00CB Edieresis
!CC U+00CC Igrave
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+00CF Idieresis
!D0 U+00D0 Eth
!D1 U+00D1 Ntilde
!D2 U+00D2 Ograve
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+00D5 Otilde
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+00D8 Oslash
!D9 U+00D9 Ugrave
!DA U+00DA Uacute
!DB U+00DB Ucircumflex
!DC U+00DC Udieresis
!DD U+00DD Yacute
!DE U+00DE Thorn
!DF U+00DF germandbls
!E0 U+00E0 agrave
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+00E3 atilde
!E4 U+00E4 adieresis
!E5 U+00E5 aring
!E6 U+00E6 ae
!E7 U+00E7 ccedilla
!E8 U+00E8 egrave
!E9 U+00E9 eacute
!EA U+00EA ecircumflex
!EB U+00EB edieresis
!EC U+00EC igrave
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+00EF idieresis
!F0 U+00F0 eth
!F1 U+00F1 ntilde
!F2 U+00F2 ograve
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+00F5 otilde
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+00F8 oslash
!F9 U+00F9 ugrave
!FA U+00FA uacute
!FB U+00FB ucircumflex
!FC U+00FC udieresis
!FD U+00FD yacute
!FE U+00FE thorn
!FF U+00FF ydieresis

View File

@ -0,0 +1,239 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+20AC Euro
!82 U+201A quotesinglbase
!83 U+0192 florin
!84 U+201E quotedblbase
!85 U+2026 ellipsis
!86 U+2020 dagger
!87 U+2021 daggerdbl
!89 U+2030 perthousand
!8B U+2039 guilsinglleft
!91 U+2018 quoteleft
!92 U+2019 quoteright
!93 U+201C quotedblleft
!94 U+201D quotedblright
!95 U+2022 bullet
!96 U+2013 endash
!97 U+2014 emdash
!99 U+2122 trademark
!9B U+203A guilsinglright
!A0 U+00A0 space
!A1 U+0385 dieresistonos
!A2 U+0386 Alphatonos
!A3 U+00A3 sterling
!A4 U+00A4 currency
!A5 U+00A5 yen
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+00A9 copyright
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+2015 afii00208
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+0384 tonos
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+0388 Epsilontonos
!B9 U+0389 Etatonos
!BA U+038A Iotatonos
!BB U+00BB guillemotright
!BC U+038C Omicrontonos
!BD U+00BD onehalf
!BE U+038E Upsilontonos
!BF U+038F Omegatonos
!C0 U+0390 iotadieresistonos
!C1 U+0391 Alpha
!C2 U+0392 Beta
!C3 U+0393 Gamma
!C4 U+0394 Delta
!C5 U+0395 Epsilon
!C6 U+0396 Zeta
!C7 U+0397 Eta
!C8 U+0398 Theta
!C9 U+0399 Iota
!CA U+039A Kappa
!CB U+039B Lambda
!CC U+039C Mu
!CD U+039D Nu
!CE U+039E Xi
!CF U+039F Omicron
!D0 U+03A0 Pi
!D1 U+03A1 Rho
!D3 U+03A3 Sigma
!D4 U+03A4 Tau
!D5 U+03A5 Upsilon
!D6 U+03A6 Phi
!D7 U+03A7 Chi
!D8 U+03A8 Psi
!D9 U+03A9 Omega
!DA U+03AA Iotadieresis
!DB U+03AB Upsilondieresis
!DC U+03AC alphatonos
!DD U+03AD epsilontonos
!DE U+03AE etatonos
!DF U+03AF iotatonos
!E0 U+03B0 upsilondieresistonos
!E1 U+03B1 alpha
!E2 U+03B2 beta
!E3 U+03B3 gamma
!E4 U+03B4 delta
!E5 U+03B5 epsilon
!E6 U+03B6 zeta
!E7 U+03B7 eta
!E8 U+03B8 theta
!E9 U+03B9 iota
!EA U+03BA kappa
!EB U+03BB lambda
!EC U+03BC mu
!ED U+03BD nu
!EE U+03BE xi
!EF U+03BF omicron
!F0 U+03C0 pi
!F1 U+03C1 rho
!F2 U+03C2 sigma1
!F3 U+03C3 sigma
!F4 U+03C4 tau
!F5 U+03C5 upsilon
!F6 U+03C6 phi
!F7 U+03C7 chi
!F8 U+03C8 psi
!F9 U+03C9 omega
!FA U+03CA iotadieresis
!FB U+03CB upsilondieresis
!FC U+03CC omicrontonos
!FD U+03CD upsilontonos
!FE U+03CE omegatonos

View File

@ -0,0 +1,249 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+20AC Euro
!82 U+201A quotesinglbase
!83 U+0192 florin
!84 U+201E quotedblbase
!85 U+2026 ellipsis
!86 U+2020 dagger
!87 U+2021 daggerdbl
!88 U+02C6 circumflex
!89 U+2030 perthousand
!8A U+0160 Scaron
!8B U+2039 guilsinglleft
!8C U+0152 OE
!91 U+2018 quoteleft
!92 U+2019 quoteright
!93 U+201C quotedblleft
!94 U+201D quotedblright
!95 U+2022 bullet
!96 U+2013 endash
!97 U+2014 emdash
!98 U+02DC tilde
!99 U+2122 trademark
!9A U+0161 scaron
!9B U+203A guilsinglright
!9C U+0153 oe
!9F U+0178 Ydieresis
!A0 U+00A0 space
!A1 U+00A1 exclamdown
!A2 U+00A2 cent
!A3 U+00A3 sterling
!A4 U+00A4 currency
!A5 U+00A5 yen
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+00A9 copyright
!AA U+00AA ordfeminine
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+00AF macron
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+00B4 acute
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+00B8 cedilla
!B9 U+00B9 onesuperior
!BA U+00BA ordmasculine
!BB U+00BB guillemotright
!BC U+00BC onequarter
!BD U+00BD onehalf
!BE U+00BE threequarters
!BF U+00BF questiondown
!C0 U+00C0 Agrave
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+00C3 Atilde
!C4 U+00C4 Adieresis
!C5 U+00C5 Aring
!C6 U+00C6 AE
!C7 U+00C7 Ccedilla
!C8 U+00C8 Egrave
!C9 U+00C9 Eacute
!CA U+00CA Ecircumflex
!CB U+00CB Edieresis
!CC U+00CC Igrave
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+00CF Idieresis
!D0 U+011E Gbreve
!D1 U+00D1 Ntilde
!D2 U+00D2 Ograve
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+00D5 Otilde
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+00D8 Oslash
!D9 U+00D9 Ugrave
!DA U+00DA Uacute
!DB U+00DB Ucircumflex
!DC U+00DC Udieresis
!DD U+0130 Idotaccent
!DE U+015E Scedilla
!DF U+00DF germandbls
!E0 U+00E0 agrave
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+00E3 atilde
!E4 U+00E4 adieresis
!E5 U+00E5 aring
!E6 U+00E6 ae
!E7 U+00E7 ccedilla
!E8 U+00E8 egrave
!E9 U+00E9 eacute
!EA U+00EA ecircumflex
!EB U+00EB edieresis
!EC U+00EC igrave
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+00EF idieresis
!F0 U+011F gbreve
!F1 U+00F1 ntilde
!F2 U+00F2 ograve
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+00F5 otilde
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+00F8 oslash
!F9 U+00F9 ugrave
!FA U+00FA uacute
!FB U+00FB ucircumflex
!FC U+00FC udieresis
!FD U+0131 dotlessi
!FE U+015F scedilla
!FF U+00FF ydieresis

View File

@ -0,0 +1,244 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+20AC Euro
!82 U+201A quotesinglbase
!84 U+201E quotedblbase
!85 U+2026 ellipsis
!86 U+2020 dagger
!87 U+2021 daggerdbl
!89 U+2030 perthousand
!8B U+2039 guilsinglleft
!8D U+00A8 dieresis
!8E U+02C7 caron
!8F U+00B8 cedilla
!91 U+2018 quoteleft
!92 U+2019 quoteright
!93 U+201C quotedblleft
!94 U+201D quotedblright
!95 U+2022 bullet
!96 U+2013 endash
!97 U+2014 emdash
!99 U+2122 trademark
!9B U+203A guilsinglright
!9D U+00AF macron
!9E U+02DB ogonek
!A0 U+00A0 space
!A2 U+00A2 cent
!A3 U+00A3 sterling
!A4 U+00A4 currency
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00D8 Oslash
!A9 U+00A9 copyright
!AA U+0156 Rcommaaccent
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+00C6 AE
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+00B4 acute
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+00F8 oslash
!B9 U+00B9 onesuperior
!BA U+0157 rcommaaccent
!BB U+00BB guillemotright
!BC U+00BC onequarter
!BD U+00BD onehalf
!BE U+00BE threequarters
!BF U+00E6 ae
!C0 U+0104 Aogonek
!C1 U+012E Iogonek
!C2 U+0100 Amacron
!C3 U+0106 Cacute
!C4 U+00C4 Adieresis
!C5 U+00C5 Aring
!C6 U+0118 Eogonek
!C7 U+0112 Emacron
!C8 U+010C Ccaron
!C9 U+00C9 Eacute
!CA U+0179 Zacute
!CB U+0116 Edotaccent
!CC U+0122 Gcommaaccent
!CD U+0136 Kcommaaccent
!CE U+012A Imacron
!CF U+013B Lcommaaccent
!D0 U+0160 Scaron
!D1 U+0143 Nacute
!D2 U+0145 Ncommaaccent
!D3 U+00D3 Oacute
!D4 U+014C Omacron
!D5 U+00D5 Otilde
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+0172 Uogonek
!D9 U+0141 Lslash
!DA U+015A Sacute
!DB U+016A Umacron
!DC U+00DC Udieresis
!DD U+017B Zdotaccent
!DE U+017D Zcaron
!DF U+00DF germandbls
!E0 U+0105 aogonek
!E1 U+012F iogonek
!E2 U+0101 amacron
!E3 U+0107 cacute
!E4 U+00E4 adieresis
!E5 U+00E5 aring
!E6 U+0119 eogonek
!E7 U+0113 emacron
!E8 U+010D ccaron
!E9 U+00E9 eacute
!EA U+017A zacute
!EB U+0117 edotaccent
!EC U+0123 gcommaaccent
!ED U+0137 kcommaaccent
!EE U+012B imacron
!EF U+013C lcommaaccent
!F0 U+0161 scaron
!F1 U+0144 nacute
!F2 U+0146 ncommaaccent
!F3 U+00F3 oacute
!F4 U+014D omacron
!F5 U+00F5 otilde
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+0173 uogonek
!F9 U+0142 lslash
!FA U+015B sacute
!FB U+016B umacron
!FC U+00FC udieresis
!FD U+017C zdotaccent
!FE U+017E zcaron
!FF U+02D9 dotaccent

View File

@ -0,0 +1,256 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0080 .notdef
!81 U+0081 .notdef
!82 U+0082 .notdef
!83 U+0083 .notdef
!84 U+0084 .notdef
!85 U+0085 .notdef
!86 U+0086 .notdef
!87 U+0087 .notdef
!88 U+0088 .notdef
!89 U+0089 .notdef
!8A U+008A .notdef
!8B U+008B .notdef
!8C U+008C .notdef
!8D U+008D .notdef
!8E U+008E .notdef
!8F U+008F .notdef
!90 U+0090 .notdef
!91 U+0091 .notdef
!92 U+0092 .notdef
!93 U+0093 .notdef
!94 U+0094 .notdef
!95 U+0095 .notdef
!96 U+0096 .notdef
!97 U+0097 .notdef
!98 U+0098 .notdef
!99 U+0099 .notdef
!9A U+009A .notdef
!9B U+009B .notdef
!9C U+009C .notdef
!9D U+009D .notdef
!9E U+009E .notdef
!9F U+009F .notdef
!A0 U+00A0 space
!A1 U+00A1 exclamdown
!A2 U+00A2 cent
!A3 U+00A3 sterling
!A4 U+00A4 currency
!A5 U+00A5 yen
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+00A9 copyright
!AA U+00AA ordfeminine
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+00AF macron
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+00B4 acute
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+00B8 cedilla
!B9 U+00B9 onesuperior
!BA U+00BA ordmasculine
!BB U+00BB guillemotright
!BC U+00BC onequarter
!BD U+00BD onehalf
!BE U+00BE threequarters
!BF U+00BF questiondown
!C0 U+00C0 Agrave
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+00C3 Atilde
!C4 U+00C4 Adieresis
!C5 U+00C5 Aring
!C6 U+00C6 AE
!C7 U+00C7 Ccedilla
!C8 U+00C8 Egrave
!C9 U+00C9 Eacute
!CA U+00CA Ecircumflex
!CB U+00CB Edieresis
!CC U+00CC Igrave
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+00CF Idieresis
!D0 U+00D0 Eth
!D1 U+00D1 Ntilde
!D2 U+00D2 Ograve
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+00D5 Otilde
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+00D8 Oslash
!D9 U+00D9 Ugrave
!DA U+00DA Uacute
!DB U+00DB Ucircumflex
!DC U+00DC Udieresis
!DD U+00DD Yacute
!DE U+00DE Thorn
!DF U+00DF germandbls
!E0 U+00E0 agrave
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+00E3 atilde
!E4 U+00E4 adieresis
!E5 U+00E5 aring
!E6 U+00E6 ae
!E7 U+00E7 ccedilla
!E8 U+00E8 egrave
!E9 U+00E9 eacute
!EA U+00EA ecircumflex
!EB U+00EB edieresis
!EC U+00EC igrave
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+00EF idieresis
!F0 U+00F0 eth
!F1 U+00F1 ntilde
!F2 U+00F2 ograve
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+00F5 otilde
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+00F8 oslash
!F9 U+00F9 ugrave
!FA U+00FA uacute
!FB U+00FB ucircumflex
!FC U+00FC udieresis
!FD U+00FD yacute
!FE U+00FE thorn
!FF U+00FF ydieresis

View File

@ -0,0 +1,256 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0080 .notdef
!81 U+0081 .notdef
!82 U+0082 .notdef
!83 U+0083 .notdef
!84 U+0084 .notdef
!85 U+0085 .notdef
!86 U+0086 .notdef
!87 U+0087 .notdef
!88 U+0088 .notdef
!89 U+0089 .notdef
!8A U+008A .notdef
!8B U+008B .notdef
!8C U+008C .notdef
!8D U+008D .notdef
!8E U+008E .notdef
!8F U+008F .notdef
!90 U+0090 .notdef
!91 U+0091 .notdef
!92 U+0092 .notdef
!93 U+0093 .notdef
!94 U+0094 .notdef
!95 U+0095 .notdef
!96 U+0096 .notdef
!97 U+0097 .notdef
!98 U+0098 .notdef
!99 U+0099 .notdef
!9A U+009A .notdef
!9B U+009B .notdef
!9C U+009C .notdef
!9D U+009D .notdef
!9E U+009E .notdef
!9F U+009F .notdef
!A0 U+00A0 space
!A1 U+00A1 exclamdown
!A2 U+00A2 cent
!A3 U+00A3 sterling
!A4 U+20AC Euro
!A5 U+00A5 yen
!A6 U+0160 Scaron
!A7 U+00A7 section
!A8 U+0161 scaron
!A9 U+00A9 copyright
!AA U+00AA ordfeminine
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+00AF macron
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+017D Zcaron
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+017E zcaron
!B9 U+00B9 onesuperior
!BA U+00BA ordmasculine
!BB U+00BB guillemotright
!BC U+0152 OE
!BD U+0153 oe
!BE U+0178 Ydieresis
!BF U+00BF questiondown
!C0 U+00C0 Agrave
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+00C3 Atilde
!C4 U+00C4 Adieresis
!C5 U+00C5 Aring
!C6 U+00C6 AE
!C7 U+00C7 Ccedilla
!C8 U+00C8 Egrave
!C9 U+00C9 Eacute
!CA U+00CA Ecircumflex
!CB U+00CB Edieresis
!CC U+00CC Igrave
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+00CF Idieresis
!D0 U+00D0 Eth
!D1 U+00D1 Ntilde
!D2 U+00D2 Ograve
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+00D5 Otilde
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+00D8 Oslash
!D9 U+00D9 Ugrave
!DA U+00DA Uacute
!DB U+00DB Ucircumflex
!DC U+00DC Udieresis
!DD U+00DD Yacute
!DE U+00DE Thorn
!DF U+00DF germandbls
!E0 U+00E0 agrave
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+00E3 atilde
!E4 U+00E4 adieresis
!E5 U+00E5 aring
!E6 U+00E6 ae
!E7 U+00E7 ccedilla
!E8 U+00E8 egrave
!E9 U+00E9 eacute
!EA U+00EA ecircumflex
!EB U+00EB edieresis
!EC U+00EC igrave
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+00EF idieresis
!F0 U+00F0 eth
!F1 U+00F1 ntilde
!F2 U+00F2 ograve
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+00F5 otilde
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+00F8 oslash
!F9 U+00F9 ugrave
!FA U+00FA uacute
!FB U+00FB ucircumflex
!FC U+00FC udieresis
!FD U+00FD yacute
!FE U+00FE thorn
!FF U+00FF ydieresis

View File

@ -0,0 +1,256 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0080 .notdef
!81 U+0081 .notdef
!82 U+0082 .notdef
!83 U+0083 .notdef
!84 U+0084 .notdef
!85 U+0085 .notdef
!86 U+0086 .notdef
!87 U+0087 .notdef
!88 U+0088 .notdef
!89 U+0089 .notdef
!8A U+008A .notdef
!8B U+008B .notdef
!8C U+008C .notdef
!8D U+008D .notdef
!8E U+008E .notdef
!8F U+008F .notdef
!90 U+0090 .notdef
!91 U+0091 .notdef
!92 U+0092 .notdef
!93 U+0093 .notdef
!94 U+0094 .notdef
!95 U+0095 .notdef
!96 U+0096 .notdef
!97 U+0097 .notdef
!98 U+0098 .notdef
!99 U+0099 .notdef
!9A U+009A .notdef
!9B U+009B .notdef
!9C U+009C .notdef
!9D U+009D .notdef
!9E U+009E .notdef
!9F U+009F .notdef
!A0 U+00A0 space
!A1 U+0104 Aogonek
!A2 U+0105 aogonek
!A3 U+0141 Lslash
!A4 U+20AC Euro
!A5 U+201E quotedblbase
!A6 U+0160 Scaron
!A7 U+00A7 section
!A8 U+0161 scaron
!A9 U+00A9 copyright
!AA U+0218 Scommaaccent
!AB U+00AB guillemotleft
!AC U+0179 Zacute
!AD U+00AD hyphen
!AE U+017A zacute
!AF U+017B Zdotaccent
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+010C Ccaron
!B3 U+0142 lslash
!B4 U+017D Zcaron
!B5 U+201D quotedblright
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+017E zcaron
!B9 U+010D ccaron
!BA U+0219 scommaaccent
!BB U+00BB guillemotright
!BC U+0152 OE
!BD U+0153 oe
!BE U+0178 Ydieresis
!BF U+017C zdotaccent
!C0 U+00C0 Agrave
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+0102 Abreve
!C4 U+00C4 Adieresis
!C5 U+0106 Cacute
!C6 U+00C6 AE
!C7 U+00C7 Ccedilla
!C8 U+00C8 Egrave
!C9 U+00C9 Eacute
!CA U+00CA Ecircumflex
!CB U+00CB Edieresis
!CC U+00CC Igrave
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+00CF Idieresis
!D0 U+0110 Dcroat
!D1 U+0143 Nacute
!D2 U+00D2 Ograve
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+0150 Ohungarumlaut
!D6 U+00D6 Odieresis
!D7 U+015A Sacute
!D8 U+0170 Uhungarumlaut
!D9 U+00D9 Ugrave
!DA U+00DA Uacute
!DB U+00DB Ucircumflex
!DC U+00DC Udieresis
!DD U+0118 Eogonek
!DE U+021A Tcommaaccent
!DF U+00DF germandbls
!E0 U+00E0 agrave
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+0103 abreve
!E4 U+00E4 adieresis
!E5 U+0107 cacute
!E6 U+00E6 ae
!E7 U+00E7 ccedilla
!E8 U+00E8 egrave
!E9 U+00E9 eacute
!EA U+00EA ecircumflex
!EB U+00EB edieresis
!EC U+00EC igrave
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+00EF idieresis
!F0 U+0111 dcroat
!F1 U+0144 nacute
!F2 U+00F2 ograve
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+0151 ohungarumlaut
!F6 U+00F6 odieresis
!F7 U+015B sacute
!F8 U+0171 uhungarumlaut
!F9 U+00F9 ugrave
!FA U+00FA uacute
!FB U+00FB ucircumflex
!FC U+00FC udieresis
!FD U+0119 eogonek
!FE U+021B tcommaaccent
!FF U+00FF ydieresis

View File

@ -0,0 +1,256 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0080 .notdef
!81 U+0081 .notdef
!82 U+0082 .notdef
!83 U+0083 .notdef
!84 U+0084 .notdef
!85 U+0085 .notdef
!86 U+0086 .notdef
!87 U+0087 .notdef
!88 U+0088 .notdef
!89 U+0089 .notdef
!8A U+008A .notdef
!8B U+008B .notdef
!8C U+008C .notdef
!8D U+008D .notdef
!8E U+008E .notdef
!8F U+008F .notdef
!90 U+0090 .notdef
!91 U+0091 .notdef
!92 U+0092 .notdef
!93 U+0093 .notdef
!94 U+0094 .notdef
!95 U+0095 .notdef
!96 U+0096 .notdef
!97 U+0097 .notdef
!98 U+0098 .notdef
!99 U+0099 .notdef
!9A U+009A .notdef
!9B U+009B .notdef
!9C U+009C .notdef
!9D U+009D .notdef
!9E U+009E .notdef
!9F U+009F .notdef
!A0 U+00A0 space
!A1 U+0104 Aogonek
!A2 U+02D8 breve
!A3 U+0141 Lslash
!A4 U+00A4 currency
!A5 U+013D Lcaron
!A6 U+015A Sacute
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+0160 Scaron
!AA U+015E Scedilla
!AB U+0164 Tcaron
!AC U+0179 Zacute
!AD U+00AD hyphen
!AE U+017D Zcaron
!AF U+017B Zdotaccent
!B0 U+00B0 degree
!B1 U+0105 aogonek
!B2 U+02DB ogonek
!B3 U+0142 lslash
!B4 U+00B4 acute
!B5 U+013E lcaron
!B6 U+015B sacute
!B7 U+02C7 caron
!B8 U+00B8 cedilla
!B9 U+0161 scaron
!BA U+015F scedilla
!BB U+0165 tcaron
!BC U+017A zacute
!BD U+02DD hungarumlaut
!BE U+017E zcaron
!BF U+017C zdotaccent
!C0 U+0154 Racute
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+0102 Abreve
!C4 U+00C4 Adieresis
!C5 U+0139 Lacute
!C6 U+0106 Cacute
!C7 U+00C7 Ccedilla
!C8 U+010C Ccaron
!C9 U+00C9 Eacute
!CA U+0118 Eogonek
!CB U+00CB Edieresis
!CC U+011A Ecaron
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+010E Dcaron
!D0 U+0110 Dcroat
!D1 U+0143 Nacute
!D2 U+0147 Ncaron
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+0150 Ohungarumlaut
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+0158 Rcaron
!D9 U+016E Uring
!DA U+00DA Uacute
!DB U+0170 Uhungarumlaut
!DC U+00DC Udieresis
!DD U+00DD Yacute
!DE U+0162 Tcommaaccent
!DF U+00DF germandbls
!E0 U+0155 racute
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+0103 abreve
!E4 U+00E4 adieresis
!E5 U+013A lacute
!E6 U+0107 cacute
!E7 U+00E7 ccedilla
!E8 U+010D ccaron
!E9 U+00E9 eacute
!EA U+0119 eogonek
!EB U+00EB edieresis
!EC U+011B ecaron
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+010F dcaron
!F0 U+0111 dcroat
!F1 U+0144 nacute
!F2 U+0148 ncaron
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+0151 ohungarumlaut
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+0159 rcaron
!F9 U+016F uring
!FA U+00FA uacute
!FB U+0171 uhungarumlaut
!FC U+00FC udieresis
!FD U+00FD yacute
!FE U+0163 tcommaaccent
!FF U+02D9 dotaccent

View File

@ -0,0 +1,256 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0080 .notdef
!81 U+0081 .notdef
!82 U+0082 .notdef
!83 U+0083 .notdef
!84 U+0084 .notdef
!85 U+0085 .notdef
!86 U+0086 .notdef
!87 U+0087 .notdef
!88 U+0088 .notdef
!89 U+0089 .notdef
!8A U+008A .notdef
!8B U+008B .notdef
!8C U+008C .notdef
!8D U+008D .notdef
!8E U+008E .notdef
!8F U+008F .notdef
!90 U+0090 .notdef
!91 U+0091 .notdef
!92 U+0092 .notdef
!93 U+0093 .notdef
!94 U+0094 .notdef
!95 U+0095 .notdef
!96 U+0096 .notdef
!97 U+0097 .notdef
!98 U+0098 .notdef
!99 U+0099 .notdef
!9A U+009A .notdef
!9B U+009B .notdef
!9C U+009C .notdef
!9D U+009D .notdef
!9E U+009E .notdef
!9F U+009F .notdef
!A0 U+00A0 space
!A1 U+0104 Aogonek
!A2 U+0138 kgreenlandic
!A3 U+0156 Rcommaaccent
!A4 U+00A4 currency
!A5 U+0128 Itilde
!A6 U+013B Lcommaaccent
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+0160 Scaron
!AA U+0112 Emacron
!AB U+0122 Gcommaaccent
!AC U+0166 Tbar
!AD U+00AD hyphen
!AE U+017D Zcaron
!AF U+00AF macron
!B0 U+00B0 degree
!B1 U+0105 aogonek
!B2 U+02DB ogonek
!B3 U+0157 rcommaaccent
!B4 U+00B4 acute
!B5 U+0129 itilde
!B6 U+013C lcommaaccent
!B7 U+02C7 caron
!B8 U+00B8 cedilla
!B9 U+0161 scaron
!BA U+0113 emacron
!BB U+0123 gcommaaccent
!BC U+0167 tbar
!BD U+014A Eng
!BE U+017E zcaron
!BF U+014B eng
!C0 U+0100 Amacron
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+00C3 Atilde
!C4 U+00C4 Adieresis
!C5 U+00C5 Aring
!C6 U+00C6 AE
!C7 U+012E Iogonek
!C8 U+010C Ccaron
!C9 U+00C9 Eacute
!CA U+0118 Eogonek
!CB U+00CB Edieresis
!CC U+0116 Edotaccent
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+012A Imacron
!D0 U+0110 Dcroat
!D1 U+0145 Ncommaaccent
!D2 U+014C Omacron
!D3 U+0136 Kcommaaccent
!D4 U+00D4 Ocircumflex
!D5 U+00D5 Otilde
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+00D8 Oslash
!D9 U+0172 Uogonek
!DA U+00DA Uacute
!DB U+00DB Ucircumflex
!DC U+00DC Udieresis
!DD U+0168 Utilde
!DE U+016A Umacron
!DF U+00DF germandbls
!E0 U+0101 amacron
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+00E3 atilde
!E4 U+00E4 adieresis
!E5 U+00E5 aring
!E6 U+00E6 ae
!E7 U+012F iogonek
!E8 U+010D ccaron
!E9 U+00E9 eacute
!EA U+0119 eogonek
!EB U+00EB edieresis
!EC U+0117 edotaccent
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+012B imacron
!F0 U+0111 dcroat
!F1 U+0146 ncommaaccent
!F2 U+014D omacron
!F3 U+0137 kcommaaccent
!F4 U+00F4 ocircumflex
!F5 U+00F5 otilde
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+00F8 oslash
!F9 U+0173 uogonek
!FA U+00FA uacute
!FB U+00FB ucircumflex
!FC U+00FC udieresis
!FD U+0169 utilde
!FE U+016B umacron
!FF U+02D9 dotaccent

View File

@ -0,0 +1,256 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0080 .notdef
!81 U+0081 .notdef
!82 U+0082 .notdef
!83 U+0083 .notdef
!84 U+0084 .notdef
!85 U+0085 .notdef
!86 U+0086 .notdef
!87 U+0087 .notdef
!88 U+0088 .notdef
!89 U+0089 .notdef
!8A U+008A .notdef
!8B U+008B .notdef
!8C U+008C .notdef
!8D U+008D .notdef
!8E U+008E .notdef
!8F U+008F .notdef
!90 U+0090 .notdef
!91 U+0091 .notdef
!92 U+0092 .notdef
!93 U+0093 .notdef
!94 U+0094 .notdef
!95 U+0095 .notdef
!96 U+0096 .notdef
!97 U+0097 .notdef
!98 U+0098 .notdef
!99 U+0099 .notdef
!9A U+009A .notdef
!9B U+009B .notdef
!9C U+009C .notdef
!9D U+009D .notdef
!9E U+009E .notdef
!9F U+009F .notdef
!A0 U+00A0 space
!A1 U+0401 afii10023
!A2 U+0402 afii10051
!A3 U+0403 afii10052
!A4 U+0404 afii10053
!A5 U+0405 afii10054
!A6 U+0406 afii10055
!A7 U+0407 afii10056
!A8 U+0408 afii10057
!A9 U+0409 afii10058
!AA U+040A afii10059
!AB U+040B afii10060
!AC U+040C afii10061
!AD U+00AD hyphen
!AE U+040E afii10062
!AF U+040F afii10145
!B0 U+0410 afii10017
!B1 U+0411 afii10018
!B2 U+0412 afii10019
!B3 U+0413 afii10020
!B4 U+0414 afii10021
!B5 U+0415 afii10022
!B6 U+0416 afii10024
!B7 U+0417 afii10025
!B8 U+0418 afii10026
!B9 U+0419 afii10027
!BA U+041A afii10028
!BB U+041B afii10029
!BC U+041C afii10030
!BD U+041D afii10031
!BE U+041E afii10032
!BF U+041F afii10033
!C0 U+0420 afii10034
!C1 U+0421 afii10035
!C2 U+0422 afii10036
!C3 U+0423 afii10037
!C4 U+0424 afii10038
!C5 U+0425 afii10039
!C6 U+0426 afii10040
!C7 U+0427 afii10041
!C8 U+0428 afii10042
!C9 U+0429 afii10043
!CA U+042A afii10044
!CB U+042B afii10045
!CC U+042C afii10046
!CD U+042D afii10047
!CE U+042E afii10048
!CF U+042F afii10049
!D0 U+0430 afii10065
!D1 U+0431 afii10066
!D2 U+0432 afii10067
!D3 U+0433 afii10068
!D4 U+0434 afii10069
!D5 U+0435 afii10070
!D6 U+0436 afii10072
!D7 U+0437 afii10073
!D8 U+0438 afii10074
!D9 U+0439 afii10075
!DA U+043A afii10076
!DB U+043B afii10077
!DC U+043C afii10078
!DD U+043D afii10079
!DE U+043E afii10080
!DF U+043F afii10081
!E0 U+0440 afii10082
!E1 U+0441 afii10083
!E2 U+0442 afii10084
!E3 U+0443 afii10085
!E4 U+0444 afii10086
!E5 U+0445 afii10087
!E6 U+0446 afii10088
!E7 U+0447 afii10089
!E8 U+0448 afii10090
!E9 U+0449 afii10091
!EA U+044A afii10092
!EB U+044B afii10093
!EC U+044C afii10094
!ED U+044D afii10095
!EE U+044E afii10096
!EF U+044F afii10097
!F0 U+2116 afii61352
!F1 U+0451 afii10071
!F2 U+0452 afii10099
!F3 U+0453 afii10100
!F4 U+0454 afii10101
!F5 U+0455 afii10102
!F6 U+0456 afii10103
!F7 U+0457 afii10104
!F8 U+0458 afii10105
!F9 U+0459 afii10106
!FA U+045A afii10107
!FB U+045B afii10108
!FC U+045C afii10109
!FD U+00A7 section
!FE U+045E afii10110
!FF U+045F afii10193

View File

@ -0,0 +1,250 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0080 .notdef
!81 U+0081 .notdef
!82 U+0082 .notdef
!83 U+0083 .notdef
!84 U+0084 .notdef
!85 U+0085 .notdef
!86 U+0086 .notdef
!87 U+0087 .notdef
!88 U+0088 .notdef
!89 U+0089 .notdef
!8A U+008A .notdef
!8B U+008B .notdef
!8C U+008C .notdef
!8D U+008D .notdef
!8E U+008E .notdef
!8F U+008F .notdef
!90 U+0090 .notdef
!91 U+0091 .notdef
!92 U+0092 .notdef
!93 U+0093 .notdef
!94 U+0094 .notdef
!95 U+0095 .notdef
!96 U+0096 .notdef
!97 U+0097 .notdef
!98 U+0098 .notdef
!99 U+0099 .notdef
!9A U+009A .notdef
!9B U+009B .notdef
!9C U+009C .notdef
!9D U+009D .notdef
!9E U+009E .notdef
!9F U+009F .notdef
!A0 U+00A0 space
!A1 U+2018 quoteleft
!A2 U+2019 quoteright
!A3 U+00A3 sterling
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+00A9 copyright
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AF U+2015 afii00208
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+0384 tonos
!B5 U+0385 dieresistonos
!B6 U+0386 Alphatonos
!B7 U+00B7 periodcentered
!B8 U+0388 Epsilontonos
!B9 U+0389 Etatonos
!BA U+038A Iotatonos
!BB U+00BB guillemotright
!BC U+038C Omicrontonos
!BD U+00BD onehalf
!BE U+038E Upsilontonos
!BF U+038F Omegatonos
!C0 U+0390 iotadieresistonos
!C1 U+0391 Alpha
!C2 U+0392 Beta
!C3 U+0393 Gamma
!C4 U+0394 Delta
!C5 U+0395 Epsilon
!C6 U+0396 Zeta
!C7 U+0397 Eta
!C8 U+0398 Theta
!C9 U+0399 Iota
!CA U+039A Kappa
!CB U+039B Lambda
!CC U+039C Mu
!CD U+039D Nu
!CE U+039E Xi
!CF U+039F Omicron
!D0 U+03A0 Pi
!D1 U+03A1 Rho
!D3 U+03A3 Sigma
!D4 U+03A4 Tau
!D5 U+03A5 Upsilon
!D6 U+03A6 Phi
!D7 U+03A7 Chi
!D8 U+03A8 Psi
!D9 U+03A9 Omega
!DA U+03AA Iotadieresis
!DB U+03AB Upsilondieresis
!DC U+03AC alphatonos
!DD U+03AD epsilontonos
!DE U+03AE etatonos
!DF U+03AF iotatonos
!E0 U+03B0 upsilondieresistonos
!E1 U+03B1 alpha
!E2 U+03B2 beta
!E3 U+03B3 gamma
!E4 U+03B4 delta
!E5 U+03B5 epsilon
!E6 U+03B6 zeta
!E7 U+03B7 eta
!E8 U+03B8 theta
!E9 U+03B9 iota
!EA U+03BA kappa
!EB U+03BB lambda
!EC U+03BC mu
!ED U+03BD nu
!EE U+03BE xi
!EF U+03BF omicron
!F0 U+03C0 pi
!F1 U+03C1 rho
!F2 U+03C2 sigma1
!F3 U+03C3 sigma
!F4 U+03C4 tau
!F5 U+03C5 upsilon
!F6 U+03C6 phi
!F7 U+03C7 chi
!F8 U+03C8 psi
!F9 U+03C9 omega
!FA U+03CA iotadieresis
!FB U+03CB upsilondieresis
!FC U+03CC omicrontonos
!FD U+03CD upsilontonos
!FE U+03CE omegatonos

View File

@ -0,0 +1,256 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+0080 .notdef
!81 U+0081 .notdef
!82 U+0082 .notdef
!83 U+0083 .notdef
!84 U+0084 .notdef
!85 U+0085 .notdef
!86 U+0086 .notdef
!87 U+0087 .notdef
!88 U+0088 .notdef
!89 U+0089 .notdef
!8A U+008A .notdef
!8B U+008B .notdef
!8C U+008C .notdef
!8D U+008D .notdef
!8E U+008E .notdef
!8F U+008F .notdef
!90 U+0090 .notdef
!91 U+0091 .notdef
!92 U+0092 .notdef
!93 U+0093 .notdef
!94 U+0094 .notdef
!95 U+0095 .notdef
!96 U+0096 .notdef
!97 U+0097 .notdef
!98 U+0098 .notdef
!99 U+0099 .notdef
!9A U+009A .notdef
!9B U+009B .notdef
!9C U+009C .notdef
!9D U+009D .notdef
!9E U+009E .notdef
!9F U+009F .notdef
!A0 U+00A0 space
!A1 U+00A1 exclamdown
!A2 U+00A2 cent
!A3 U+00A3 sterling
!A4 U+00A4 currency
!A5 U+00A5 yen
!A6 U+00A6 brokenbar
!A7 U+00A7 section
!A8 U+00A8 dieresis
!A9 U+00A9 copyright
!AA U+00AA ordfeminine
!AB U+00AB guillemotleft
!AC U+00AC logicalnot
!AD U+00AD hyphen
!AE U+00AE registered
!AF U+00AF macron
!B0 U+00B0 degree
!B1 U+00B1 plusminus
!B2 U+00B2 twosuperior
!B3 U+00B3 threesuperior
!B4 U+00B4 acute
!B5 U+00B5 mu
!B6 U+00B6 paragraph
!B7 U+00B7 periodcentered
!B8 U+00B8 cedilla
!B9 U+00B9 onesuperior
!BA U+00BA ordmasculine
!BB U+00BB guillemotright
!BC U+00BC onequarter
!BD U+00BD onehalf
!BE U+00BE threequarters
!BF U+00BF questiondown
!C0 U+00C0 Agrave
!C1 U+00C1 Aacute
!C2 U+00C2 Acircumflex
!C3 U+00C3 Atilde
!C4 U+00C4 Adieresis
!C5 U+00C5 Aring
!C6 U+00C6 AE
!C7 U+00C7 Ccedilla
!C8 U+00C8 Egrave
!C9 U+00C9 Eacute
!CA U+00CA Ecircumflex
!CB U+00CB Edieresis
!CC U+00CC Igrave
!CD U+00CD Iacute
!CE U+00CE Icircumflex
!CF U+00CF Idieresis
!D0 U+011E Gbreve
!D1 U+00D1 Ntilde
!D2 U+00D2 Ograve
!D3 U+00D3 Oacute
!D4 U+00D4 Ocircumflex
!D5 U+00D5 Otilde
!D6 U+00D6 Odieresis
!D7 U+00D7 multiply
!D8 U+00D8 Oslash
!D9 U+00D9 Ugrave
!DA U+00DA Uacute
!DB U+00DB Ucircumflex
!DC U+00DC Udieresis
!DD U+0130 Idotaccent
!DE U+015E Scedilla
!DF U+00DF germandbls
!E0 U+00E0 agrave
!E1 U+00E1 aacute
!E2 U+00E2 acircumflex
!E3 U+00E3 atilde
!E4 U+00E4 adieresis
!E5 U+00E5 aring
!E6 U+00E6 ae
!E7 U+00E7 ccedilla
!E8 U+00E8 egrave
!E9 U+00E9 eacute
!EA U+00EA ecircumflex
!EB U+00EB edieresis
!EC U+00EC igrave
!ED U+00ED iacute
!EE U+00EE icircumflex
!EF U+00EF idieresis
!F0 U+011F gbreve
!F1 U+00F1 ntilde
!F2 U+00F2 ograve
!F3 U+00F3 oacute
!F4 U+00F4 ocircumflex
!F5 U+00F5 otilde
!F6 U+00F6 odieresis
!F7 U+00F7 divide
!F8 U+00F8 oslash
!F9 U+00F9 ugrave
!FA U+00FA uacute
!FB U+00FB ucircumflex
!FC U+00FC udieresis
!FD U+0131 dotlessi
!FE U+015F scedilla
!FF U+00FF ydieresis

View File

@ -0,0 +1,256 @@
!00 U+0000 .notdef
!01 U+0001 .notdef
!02 U+0002 .notdef
!03 U+0003 .notdef
!04 U+0004 .notdef
!05 U+0005 .notdef
!06 U+0006 .notdef
!07 U+0007 .notdef
!08 U+0008 .notdef
!09 U+0009 .notdef
!0A U+000A .notdef
!0B U+000B .notdef
!0C U+000C .notdef
!0D U+000D .notdef
!0E U+000E .notdef
!0F U+000F .notdef
!10 U+0010 .notdef
!11 U+0011 .notdef
!12 U+0012 .notdef
!13 U+0013 .notdef
!14 U+0014 .notdef
!15 U+0015 .notdef
!16 U+0016 .notdef
!17 U+0017 .notdef
!18 U+0018 .notdef
!19 U+0019 .notdef
!1A U+001A .notdef
!1B U+001B .notdef
!1C U+001C .notdef
!1D U+001D .notdef
!1E U+001E .notdef
!1F U+001F .notdef
!20 U+0020 space
!21 U+0021 exclam
!22 U+0022 quotedbl
!23 U+0023 numbersign
!24 U+0024 dollar
!25 U+0025 percent
!26 U+0026 ampersand
!27 U+0027 quotesingle
!28 U+0028 parenleft
!29 U+0029 parenright
!2A U+002A asterisk
!2B U+002B plus
!2C U+002C comma
!2D U+002D hyphen
!2E U+002E period
!2F U+002F slash
!30 U+0030 zero
!31 U+0031 one
!32 U+0032 two
!33 U+0033 three
!34 U+0034 four
!35 U+0035 five
!36 U+0036 six
!37 U+0037 seven
!38 U+0038 eight
!39 U+0039 nine
!3A U+003A colon
!3B U+003B semicolon
!3C U+003C less
!3D U+003D equal
!3E U+003E greater
!3F U+003F question
!40 U+0040 at
!41 U+0041 A
!42 U+0042 B
!43 U+0043 C
!44 U+0044 D
!45 U+0045 E
!46 U+0046 F
!47 U+0047 G
!48 U+0048 H
!49 U+0049 I
!4A U+004A J
!4B U+004B K
!4C U+004C L
!4D U+004D M
!4E U+004E N
!4F U+004F O
!50 U+0050 P
!51 U+0051 Q
!52 U+0052 R
!53 U+0053 S
!54 U+0054 T
!55 U+0055 U
!56 U+0056 V
!57 U+0057 W
!58 U+0058 X
!59 U+0059 Y
!5A U+005A Z
!5B U+005B bracketleft
!5C U+005C backslash
!5D U+005D bracketright
!5E U+005E asciicircum
!5F U+005F underscore
!60 U+0060 grave
!61 U+0061 a
!62 U+0062 b
!63 U+0063 c
!64 U+0064 d
!65 U+0065 e
!66 U+0066 f
!67 U+0067 g
!68 U+0068 h
!69 U+0069 i
!6A U+006A j
!6B U+006B k
!6C U+006C l
!6D U+006D m
!6E U+006E n
!6F U+006F o
!70 U+0070 p
!71 U+0071 q
!72 U+0072 r
!73 U+0073 s
!74 U+0074 t
!75 U+0075 u
!76 U+0076 v
!77 U+0077 w
!78 U+0078 x
!79 U+0079 y
!7A U+007A z
!7B U+007B braceleft
!7C U+007C bar
!7D U+007D braceright
!7E U+007E asciitilde
!7F U+007F .notdef
!80 U+2500 SF100000
!81 U+2502 SF110000
!82 U+250C SF010000
!83 U+2510 SF030000
!84 U+2514 SF020000
!85 U+2518 SF040000
!86 U+251C SF080000
!87 U+2524 SF090000
!88 U+252C SF060000
!89 U+2534 SF070000
!8A U+253C SF050000
!8B U+2580 upblock
!8C U+2584 dnblock
!8D U+2588 block
!8E U+258C lfblock
!8F U+2590 rtblock
!90 U+2591 ltshade
!91 U+2592 shade
!92 U+2593 dkshade
!93 U+2320 integraltp
!94 U+25A0 filledbox
!95 U+2219 periodcentered
!96 U+221A radical
!97 U+2248 approxequal
!98 U+2264 lessequal
!99 U+2265 greaterequal
!9A U+00A0 space
!9B U+2321 integralbt
!9C U+00B0 degree
!9D U+00B2 twosuperior
!9E U+00B7 periodcentered
!9F U+00F7 divide
!A0 U+2550 SF430000
!A1 U+2551 SF240000
!A2 U+2552 SF510000
!A3 U+0451 afii10071
!A4 U+2553 SF520000
!A5 U+2554 SF390000
!A6 U+2555 SF220000
!A7 U+2556 SF210000
!A8 U+2557 SF250000
!A9 U+2558 SF500000
!AA U+2559 SF490000
!AB U+255A SF380000
!AC U+255B SF280000
!AD U+255C SF270000
!AE U+255D SF260000
!AF U+255E SF360000
!B0 U+255F SF370000
!B1 U+2560 SF420000
!B2 U+2561 SF190000
!B3 U+0401 afii10023
!B4 U+2562 SF200000
!B5 U+2563 SF230000
!B6 U+2564 SF470000
!B7 U+2565 SF480000
!B8 U+2566 SF410000
!B9 U+2567 SF450000
!BA U+2568 SF460000
!BB U+2569 SF400000
!BC U+256A SF540000
!BD U+256B SF530000
!BE U+256C SF440000
!BF U+00A9 copyright
!C0 U+044E afii10096
!C1 U+0430 afii10065
!C2 U+0431 afii10066
!C3 U+0446 afii10088
!C4 U+0434 afii10069
!C5 U+0435 afii10070
!C6 U+0444 afii10086
!C7 U+0433 afii10068
!C8 U+0445 afii10087
!C9 U+0438 afii10074
!CA U+0439 afii10075
!CB U+043A afii10076
!CC U+043B afii10077
!CD U+043C afii10078
!CE U+043D afii10079
!CF U+043E afii10080
!D0 U+043F afii10081
!D1 U+044F afii10097
!D2 U+0440 afii10082
!D3 U+0441 afii10083
!D4 U+0442 afii10084
!D5 U+0443 afii10085
!D6 U+0436 afii10072
!D7 U+0432 afii10067
!D8 U+044C afii10094
!D9 U+044B afii10093
!DA U+0437 afii10073
!DB U+0448 afii10090
!DC U+044D afii10095
!DD U+0449 afii10091
!DE U+0447 afii10089
!DF U+044A afii10092
!E0 U+042E afii10048
!E1 U+0410 afii10017
!E2 U+0411 afii10018
!E3 U+0426 afii10040
!E4 U+0414 afii10021
!E5 U+0415 afii10022
!E6 U+0424 afii10038
!E7 U+0413 afii10020
!E8 U+0425 afii10039
!E9 U+0418 afii10026
!EA U+0419 afii10027
!EB U+041A afii10028
!EC U+041B afii10029
!ED U+041C afii10030
!EE U+041D afii10031
!EF U+041E afii10032
!F0 U+041F afii10033
!F1 U+042F afii10049
!F2 U+0420 afii10034
!F3 U+0421 afii10035
!F4 U+0422 afii10036
!F5 U+0423 afii10037
!F6 U+0416 afii10024
!F7 U+0412 afii10019
!F8 U+042C afii10046
!F9 U+042B afii10045
!FA U+0417 afii10025
!FB U+0428 afii10042
!FC U+042D afii10047
!FD U+0429 afii10043
!FE U+0427 afii10041
!FF U+042A afii10044

View File

@ -0,0 +1,395 @@
<?php
/****************************************************************************
* Utility to generate font definition files *
* Version: 1.11 *
* Date: 2002-11-02 *
****************************************************************************/
function ReadMap($enc)
{
//Read a map file
$file=dirname(__FILE__).'/'.strtolower($enc).'.map';
$a=file($file);
if(empty($a))
die('<B>Error:</B> encoding not found: '.$enc);
$cc2gn=array();
foreach($a as $l)
{
$e=explode(' ',chop($l));
$cc=hexdec(substr($e[0],1));
$gn=$e[2];
$cc2gn[$cc]=$gn;
}
for($i=0;$i<=255;$i++)
if(!isset($cc2gn[$i]))
$cc2gn[$i]='.notdef';
return $cc2gn;
}
function ReadAFM($file,&$map)
{
//Read a font metric file
$a=file($file);
if(empty($a))
die('File not found');
$widths=array();
$fm=array();
$fix=array('Edot'=>'Edotaccent','edot'=>'edotaccent','Idot'=>'Idotaccent','Zdot'=>'Zdotaccent','zdot'=>'zdotaccent',
'Odblacute'=>'Ohungarumlaut','odblacute'=>'ohungarumlaut','Udblacute'=>'Uhungarumlaut','udblacute'=>'uhungarumlaut',
'Gcedilla'=>'Gcommaaccent','gcedilla'=>'gcommaaccent','Kcedilla'=>'Kcommaaccent','kcedilla'=>'kcommaaccent',
'Lcedilla'=>'Lcommaaccent','lcedilla'=>'lcommaaccent','Ncedilla'=>'Ncommaaccent','ncedilla'=>'ncommaaccent',
'Rcedilla'=>'Rcommaaccent','rcedilla'=>'rcommaaccent','Scedilla'=>'Scommaaccent','scedilla'=>'scommaaccent',
'Tcedilla'=>'Tcommaaccent','tcedilla'=>'tcommaaccent','Dslash'=>'Dcroat','dslash'=>'dcroat','Dmacron'=>'Dcroat','dmacron'=>'dcroat');
foreach($a as $l)
{
$e=explode(' ',chop($l));
if(count($e)<2)
continue;
$code=$e[0];
$param=$e[1];
if($code=='C')
{
//Character metrics
$cc=(int)$e[1];
$w=$e[4];
$gn=$e[7];
if(substr($gn,-4)=='20AC')
$gn='Euro';
if(isset($fix[$gn]))
{
//Fix incorrect glyph name
foreach($map as $c=>$n)
if($n==$fix[$gn])
$map[$c]=$gn;
}
if(empty($map))
{
//Symbolic font: use built-in encoding
$widths[$cc]=$w;
}
else
{
$widths[$gn]=$w;
if($gn=='X')
$fm['CapXHeight']=$e[13];
}
if($gn=='.notdef')
$fm['MissingWidth']=$w;
}
elseif($code=='FontName')
$fm['FontName']=$param;
elseif($code=='Weight')
$fm['Weight']=$param;
elseif($code=='ItalicAngle')
$fm['ItalicAngle']=(double)$param;
elseif($code=='Ascender')
$fm['Ascender']=(int)$param;
elseif($code=='Descender')
$fm['Descender']=(int)$param;
elseif($code=='UnderlineThickness')
$fm['UnderlineThickness']=(int)$param;
elseif($code=='UnderlinePosition')
$fm['UnderlinePosition']=(int)$param;
elseif($code=='IsFixedPitch')
$fm['IsFixedPitch']=($param=='true');
elseif($code=='FontBBox')
$fm['FontBBox']=array($e[1],$e[2],$e[3],$e[4]);
elseif($code=='CapHeight')
$fm['CapHeight']=(int)$param;
elseif($code=='StdVW')
$fm['StdVW']=(int)$param;
}
if(!isset($fm['FontName']))
die('FontName not found');
if(!empty($map))
{
if(!isset($widths['.notdef']))
$widths['.notdef']=600;
if(!isset($widths['Delta']) and isset($widths['increment']))
$widths['Delta']=$widths['increment'];
//Order widths according to map
for($i=0;$i<=255;$i++)
{
if(!isset($widths[$map[$i]]))
{
echo '<B>Warning:</B> character '.$map[$i].' is missing<BR>';
$widths[$i]=$widths['.notdef'];
}
else
$widths[$i]=$widths[$map[$i]];
}
}
$fm['Widths']=$widths;
return $fm;
}
function MakeFontDescriptor($fm,$symbolic)
{
//Ascent
$asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000);
$fd="array('Ascent'=>".$asc;
//Descent
$desc=(isset($fm['Descender']) ? $fm['Descender'] : -200);
$fd.=",'Descent'=>".$desc;
//CapHeight
if(isset($fm['CapHeight']))
$ch=$fm['CapHeight'];
elseif(isset($fm['CapXHeight']))
$ch=$fm['CapXHeight'];
else
$ch=$asc;
$fd.=",'CapHeight'=>".$ch;
//Flags
$flags=0;
if(isset($fm['IsFixedPitch']) and $fm['IsFixedPitch'])
$flags+=1<<0;
if($symbolic)
$flags+=1<<2;
if(!$symbolic)
$flags+=1<<5;
if(isset($fm['ItalicAngle']) and $fm['ItalicAngle']!=0)
$flags+=1<<6;
$fd.=",'Flags'=>".$flags;
//FontBBox
if(isset($fm['FontBBox']))
$fbb=$fm['FontBBox'];
else
$fbb=array(0,$des-100,1000,$asc+100);
$fd.=",'FontBBox'=>'[".$fbb[0].' '.$fbb[1].' '.$fbb[2].' '.$fbb[3]."]'";
//ItalicAngle
$ia=(isset($fm['ItalicAngle']) ? $fm['ItalicAngle'] : 0);
$fd.=",'ItalicAngle'=>".$ia;
//StemV
if(isset($fm['StdVW']))
$stemv=$fm['StdVW'];
elseif(isset($fm['Weight']) and eregi('(bold|black)',$fm['Weight']))
$stemv=120;
else
$stemv=70;
$fd.=",'StemV'=>".$stemv;
//MissingWidth
if(isset($fm['MissingWidth']))
$fd.=",'MissingWidth'=>".$fm['MissingWidth'];
$fd.=')';
return $fd;
}
function MakeWidthArray($fm)
{
//Make character width array
$s="array(\n\t";
$cw=$fm['Widths'];
for($i=0;$i<=255;$i++)
{
if(chr($i)=="'")
$s.="'\\''";
elseif(chr($i)=="\\")
$s.="'\\\\'";
elseif($i>=32 and $i<=126)
$s.="'".chr($i)."'";
else
$s.="chr($i)";
$s.="=>".$fm['Widths'][$i];
if($i<255)
$s.=",";
if(($i+1)%22==0)
$s.="\n\t";
}
$s.=")";
return $s;
}
function MakeFontEncoding($map)
{
//Build differences from reference encoding
$ref=ReadMap('cp1252');
$s='';
$last=0;
for($i=32;$i<=255;$i++)
{
if($map[$i]!=$ref[$i])
{
if($i!=$last+1)
$s.=$i.' ';
$last=$i;
$s.='/'.$map[$i].' ';
}
}
return chop($s);
}
function SaveToFile($file,$s,$mode='t')
{
$f=fopen($file,'w'.$mode);
if(!$f)
die('Can\'t write to file '.$file);
fwrite($f,$s,strlen($s));
fclose($f);
}
function ReadShort($f)
{
$a=unpack('n1n',fread($f,2));
return $a['n'];
}
function ReadLong($f)
{
$a=unpack('N1N',fread($f,4));
return $a['N'];
}
function CheckTTF($file)
{
//Check if font license allows embedding
$f=fopen($file,'rb');
if(!$f)
die('<B>Error:</B> Can\'t open '.$file);
//Extract number of tables
fseek($f,4,SEEK_CUR);
$nb=ReadShort($f);
fseek($f,6,SEEK_CUR);
//Seek OS/2 table
$found=false;
for($i=0;$i<$nb;$i++)
{
if(fread($f,4)=='OS/2')
{
$found=true;
break;
}
fseek($f,12,SEEK_CUR);
}
if(!$found)
{
fclose($f);
return;
}
fseek($f,4,SEEK_CUR);
$offset=ReadLong($f);
fseek($f,$offset,SEEK_SET);
//Extract fsType flags
fseek($f,8,SEEK_CUR);
$fsType=ReadShort($f);
$rl=($fsType & 0x02)!=0;
$pp=($fsType & 0x04)!=0;
$e=($fsType & 0x08)!=0;
fclose($f);
if($rl and !$pp and !$e)
echo '<B>Warning:</B> font license does not allow embedding';
}
/****************************************************************************
* $fontfile: path to TTF file (or empty string if not to be embedded) *
* $afmfile: path to AFM file *
* $enc: font encoding (or empty string for symbolic fonts) *
* $patch: optional patch for encoding *
* $type : font type if $fontfile is empty *
****************************************************************************/
function MakeFont($fontfile,$afmfile,$enc='cp1252',$patch=array(),$type='TrueType')
{
//Generate a font definition file
set_magic_quotes_runtime(0);
if($enc)
{
$map=ReadMap($enc);
foreach($patch as $cc=>$gn)
$map[$cc]=$gn;
}
else
$map=array();
if(!file_exists($afmfile))
die('<B>Error:</B> AFM file not found: '.$afmfile);
$fm=ReadAFM($afmfile,$map);
if($enc)
$diff=MakeFontEncoding($map);
else
$diff='';
$fd=MakeFontDescriptor($fm,empty($map));
//Find font type
if($fontfile)
{
$ext=strtolower(substr($fontfile,-3));
if($ext=='ttf')
$type='TrueType';
elseif($ext=='pfb')
$type='Type1';
else
die('<B>Error:</B> unrecognized font file extension: '.$ext);
}
else
{
if($type!='TrueType' and $type!='Type1')
die('<B>Error:</B> incorrect font type: '.$type);
}
//Start generation
$s='<?php'."\n";
$s.='$type=\''.$type."';\n";
$s.='$name=\''.$fm['FontName']."';\n";
$s.='$desc='.$fd.";\n";
if(!isset($fm['UnderlinePosition']))
$fm['UnderlinePosition']=-100;
if(!isset($fm['UnderlineThickness']))
$fm['UnderlineThickness']=50;
$s.='$up='.$fm['UnderlinePosition'].";\n";
$s.='$ut='.$fm['UnderlineThickness'].";\n";
$w=MakeWidthArray($fm);
$s.='$cw='.$w.";\n";
$s.='$enc=\''.$enc."';\n";
$s.='$diff=\''.$diff."';\n";
$basename=substr(basename($afmfile),0,-4);
if($fontfile)
{
//Embedded font
if(!file_exists($fontfile))
die('<B>Error:</B> font file not found: '.$fontfile);
if($type=='TrueType')
CheckTTF($fontfile);
$f=fopen($fontfile,'rb');
if(!$f)
die('<B>Error:</B> Can\'t open '.$fontfile);
$file=fread($f,filesize($fontfile));
fclose($f);
if($type=='Type1')
{
//Find first two sections and discard third one
$pos=strpos($file,'eexec');
if(!$pos)
die('<B>Error:</B> font file does not seem to be valid Type1');
$size1=$pos+6;
$pos=strpos($file,'00000000');
if(!$pos)
die('<B>Error:</B> font file does not seem to be valid Type1');
$size2=$pos-$size1;
$file=substr($file,0,$size1+$size2);
}
if(function_exists('gzcompress'))
{
$cmp=$basename.'.z';
SaveToFile($cmp,gzcompress($file),'b');
$s.='$file=\''.$cmp."';\n";
echo 'Font file compressed ('.$cmp.')<BR>';
}
else
{
$s.='$file=\''.basename($fontfile)."';\n";
echo '<B>Notice:</B> font file could not be compressed (gzcompress not available)<BR>';
}
if($type=='Type1')
{
$s.='$size1='.$size1.";\n";
$s.='$size2='.$size2.";\n";
}
else
$s.='$originalsize='.filesize($fontfile).";\n";
}
else
{
//Not embedded font
$s.='$file='."'';\n";
}
$s.="?>\n";
SaveToFile($basename.'.php',$s);
echo 'Font definition file generated ('.$basename.'.php'.')<BR>';
}
?>

View File

@ -1,17 +1,14 @@
<?php
/*******************************************************************************
* Software: FPDF *
* Version: 1.52 *
* Date: 2003-12-30 *
* Author: Olivier PLATHEY *
* License: Freeware *
* *
* You may use, modify and redistribute this software as you wish. *
*******************************************************************************/
if(!class_exists('FPDF'))
{
define('FPDF_VERSION','1.52');
/****************************************************************************
* Software: FPDF *
* Version: 1.51 *
* Date: 2002/08/03 *
* Author: Olivier PLATHEY *
* License: Freeware *
* *
* You may use and modify this software as you wish. *
****************************************************************************/
define('FPDF_VERSION','1.51');
class FPDF
{
@ -26,17 +23,17 @@ var $compress; //compression flag
var $DefOrientation; //default orientation
var $CurOrientation; //current orientation
var $OrientationChanges; //array indicating orientation changes
var $k; //scale factor (number of points in user unit)
var $fwPt,$fhPt; //dimensions of page format in points
var $fw,$fh; //dimensions of page format in user unit
var $wPt,$hPt; //current dimensions of page in points
var $k; //scale factor (number of points in user unit)
var $w,$h; //current dimensions of page in user unit
var $lMargin; //left margin
var $tMargin; //top margin
var $rMargin; //right margin
var $bMargin; //page break margin
var $cMargin; //cell margin
var $x,$y; //current position in user unit for cell positioning
var $x,$y; //current position in user unit for cell positionning
var $lasth; //height of last cell printed
var $LineWidth; //line width in user unit
var $CoreFonts; //array of standard font names
@ -69,15 +66,16 @@ var $keywords; //keywords
var $creator; //creator
var $AliasNbPages; //alias for total number of pages
/*******************************************************************************
* *
* Public methods *
* *
*******************************************************************************/
/****************************************************************************
* *
* Public methods *
* *
****************************************************************************/
function FPDF($orientation='P',$unit='mm',$format='A4')
{
//Some checks
$this->_dochecks();
//Check for PHP locale-related bug
if(1.1==1)
$this->Error('Don\'t alter the locale before including class file');
//Initialization of properties
$this->page=0;
$this->n=2;
@ -91,7 +89,6 @@ function FPDF($orientation='P',$unit='mm',$format='A4')
$this->images=array();
$this->links=array();
$this->InFooter=false;
$this->lasth=0;
$this->FontFamily='';
$this->FontStyle='';
$this->FontSizePt=12;
@ -102,10 +99,20 @@ function FPDF($orientation='P',$unit='mm',$format='A4')
$this->ColorFlag=false;
$this->ws=0;
//Standard fonts
$this->CoreFonts=array('courier'=>'Courier','courierB'=>'Courier-Bold','courierI'=>'Courier-Oblique','courierBI'=>'Courier-BoldOblique',
'helvetica'=>'Helvetica','helveticaB'=>'Helvetica-Bold','helveticaI'=>'Helvetica-Oblique','helveticaBI'=>'Helvetica-BoldOblique',
'times'=>'Times-Roman','timesB'=>'Times-Bold','timesI'=>'Times-Italic','timesBI'=>'Times-BoldItalic',
'symbol'=>'Symbol','zapfdingbats'=>'ZapfDingbats');
$this->CoreFonts['courier']='Courier';
$this->CoreFonts['courierB']='Courier-Bold';
$this->CoreFonts['courierI']='Courier-Oblique';
$this->CoreFonts['courierBI']='Courier-BoldOblique';
$this->CoreFonts['helvetica']='Helvetica';
$this->CoreFonts['helveticaB']='Helvetica-Bold';
$this->CoreFonts['helveticaI']='Helvetica-Oblique';
$this->CoreFonts['helveticaBI']='Helvetica-BoldOblique';
$this->CoreFonts['times']='Times-Roman';
$this->CoreFonts['timesB']='Times-Bold';
$this->CoreFonts['timesI']='Times-Italic';
$this->CoreFonts['timesBI']='Times-BoldItalic';
$this->CoreFonts['symbol']='Symbol';
$this->CoreFonts['zapfdingbats']='ZapfDingbats';
//Scale factor
if($unit=='pt')
$this->k=1;
@ -220,11 +227,13 @@ function SetDisplayMode($zoom,$layout='continuous')
//Set display mode in viewer
if($zoom=='fullpage' or $zoom=='fullwidth' or $zoom=='real' or $zoom=='default' or !is_string($zoom))
$this->ZoomMode=$zoom;
elseif($zoom=='zoom')
$this->ZoomMode=$layout;
else
$this->Error('Incorrect zoom display mode: '.$zoom);
if($layout=='single' or $layout=='continuous' or $layout=='two' or $layout=='default')
$this->LayoutMode=$layout;
else
elseif($zoom!='zoom')
$this->Error('Incorrect layout display mode: '.$layout);
}
@ -282,15 +291,12 @@ function Error($msg)
function Open()
{
//Begin document
if($this->state==0)
$this->_begindoc();
$this->_begindoc();
}
function Close()
{
//Terminate document
if($this->state==3)
return;
if($this->page==0)
$this->AddPage();
//Page footer
@ -306,8 +312,6 @@ function Close()
function AddPage($orientation='')
{
//Start a new page
if($this->state==0)
$this->Open();
$family=$this->FontFamily;
$style=$this->FontStyle.($this->underline ? 'U' : '');
$size=$this->FontSizePt;
@ -605,7 +609,8 @@ function Link($x,$y,$w,$h,$link)
function Text($x,$y,$txt)
{
//Output a string
$s=sprintf('BT %.2f %.2f Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
$txt=str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$txt)));
$s=sprintf('BT %.2f %.2f Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$txt);
if($this->underline and $txt!='')
$s.=' '.$this->_dounderline($x,$y,$txt);
if($this->ColorFlag)
@ -625,7 +630,6 @@ function Cell($w,$h=0,$txt='',$border=0,$ln=0,$align='',$fill=0,$link='')
$k=$this->k;
if($this->y+$h>$this->PageBreakTrigger and !$this->InFooter and $this->AcceptPageBreak())
{
//Automatic page break
$x=$this->x;
$ws=$this->ws;
if($ws>0)
@ -673,10 +677,10 @@ function Cell($w,$h=0,$txt='',$border=0,$ln=0,$align='',$fill=0,$link='')
$dx=($w-$this->GetStringWidth($txt))/2;
else
$dx=$this->cMargin;
$txt=str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$txt)));
if($this->ColorFlag)
$s.='q '.$this->TextColor.' ';
$txt2=str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$txt)));
$s.=sprintf('BT %.2f %.2f Td (%s) Tj ET',($this->x+$dx)*$k,($this->h-($this->y+.5*$h+.3*$this->FontSize))*$k,$txt2);
$s.=sprintf('BT %.2f %.2f Td (%s) Tj ET',($this->x+$dx)*$k,($this->h-($this->y+.5*$h+.3*$this->FontSize))*$k,$txt);
if($this->underline)
$s.=' '.$this->_dounderline($this->x+$dx,$this->y+.5*$h+.3*$this->FontSize,$txt);
if($this->ColorFlag)
@ -737,7 +741,7 @@ function MultiCell($w,$h,$txt,$border=0,$align='J',$fill=0)
while($i<$nb)
{
//Get next character
$c=$s{$i};
$c=$s[$i];
if($c=="\n")
{
//Explicit line break
@ -807,7 +811,7 @@ function MultiCell($w,$h,$txt,$border=0,$align='J',$fill=0)
}
if($border and is_int(strpos($border,'B')))
$b.='B';
$this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
$this->Cell($w,$h,substr($s,$j,$i),$b,2,$align,$fill);
$this->x=$this->lMargin;
}
@ -846,7 +850,10 @@ function Write($h,$txt,$link='')
continue;
}
if($c==' ')
{
$sep=$i;
$ls=$l;
}
$l+=$cw[$c];
if($l>$wmax)
{
@ -889,10 +896,10 @@ function Write($h,$txt,$link='')
}
//Last chunk
if($i!=$j)
$this->Cell($l/1000*$this->FontSize,$h,substr($s,$j),0,0,'',0,$link);
$this->Cell($l/1000*$this->FontSize,$h,substr($s,$j,$i),0,0,'',0,$link);
}
function Image($file,$x,$y,$w=0,$h=0,$type='',$link='')
function Image($file,$x,$y,$w,$h=0,$type='',$link='')
{
//Put an image on the page
if(!isset($this->images[$file]))
@ -913,26 +920,14 @@ function Image($file,$x,$y,$w=0,$h=0,$type='',$link='')
elseif($type=='png')
$info=$this->_parsepng($file);
else
{
//Allow for additional formats
$mtd='_parse'.$type;
if(!method_exists($this,$mtd))
$this->Error('Unsupported image type: '.$type);
$info=$this->$mtd($file);
}
$this->Error('Unsupported image file type: '.$type);
set_magic_quotes_runtime($mqr);
$info['i']=count($this->images)+1;
$this->images[$file]=$info;
}
else
$info=$this->images[$file];
//Automatic width and height calculation if needed
if($w==0 and $h==0)
{
//Put image at 72 dpi
$w=$info['w']/$this->k;
$h=$info['h']/$this->k;
}
//Automatic width or height calculation
if($w==0)
$w=$h*$info['w']/$info['h'];
if($h==0)
@ -990,87 +985,55 @@ function SetXY($x,$y)
$this->SetX($x);
}
function Output($name='',$dest='')
function Output($file='',$download=false)
{
//Output PDF to some destination
global $HTTP_SERVER_VARS;
//Output PDF to file or browser
global $HTTP_ENV_VARS;
//Finish document if necessary
if($this->state<3)
$this->Close();
//Normalize parameters
if(is_bool($dest))
$dest=$dest ? 'D' : 'F';
$dest=strtoupper($dest);
if($dest=='')
if($file=='')
{
if($name=='')
{
$name='doc.pdf';
$dest='I';
}
else
$dest='F';
//Send to browser
Header('Content-Type: application/pdf');
if(headers_sent())
$this->Error('Some data has already been output to browser, can\'t send PDF file');
Header('Content-Length: '.strlen($this->buffer));
Header('Content-disposition: inline; filename=doc.pdf');
echo $this->buffer;
}
switch($dest)
else
{
case 'I':
//Send to standard output
if(isset($HTTP_SERVER_VARS['SERVER_NAME']))
{
//We send to a browser
Header('Content-Type: application/pdf');
if(headers_sent())
$this->Error('Some data has already been output to browser, can\'t send PDF file');
Header('Content-Length: '.strlen($this->buffer));
Header('Content-disposition: inline; filename='.$name);
}
echo $this->buffer;
break;
case 'D':
if($download)
{
//Download file
if(isset($HTTP_SERVER_VARS['HTTP_USER_AGENT']) and strpos($HTTP_SERVER_VARS['HTTP_USER_AGENT'],'MSIE'))
Header('Content-Type: application/force-download');
if(isset($HTTP_ENV_VARS['HTTP_USER_AGENT']) and strpos($HTTP_ENV_VARS['HTTP_USER_AGENT'],'MSIE 5.5'))
Header('Content-Type: application/dummy');
else
Header('Content-Type: application/octet-stream');
if(headers_sent())
$this->Error('Some data has already been output to browser, can\'t send PDF file');
Header('Content-Length: '.strlen($this->buffer));
Header('Content-disposition: attachment; filename='.$name);
Header('Content-disposition: attachment; filename='.$file);
echo $this->buffer;
break;
case 'F':
//Save to local file
$f=fopen($name,'wb');
}
else
{
//Save file locally
$f=fopen($file,'wb');
if(!$f)
$this->Error('Unable to create output file: '.$name);
$this->Error('Unable to create output file: '.$file);
fwrite($f,$this->buffer,strlen($this->buffer));
fclose($f);
break;
case 'S':
//Return as a string
return $this->buffer;
default:
$this->Error('Incorrect output destination: '.$dest);
}
}
return '';
}
/*******************************************************************************
* *
* Protected methods *
* *
*******************************************************************************/
function _dochecks()
{
//Check for locale-related bug
if(1.1==1)
$this->Error('Don\'t alter the locale before including class file');
//Check for decimal separator
if(sprintf('%.1f',1.0)!='1.0')
setlocale(LC_NUMERIC,'C');
}
/****************************************************************************
* *
* Private methods *
* *
****************************************************************************/
function _begindoc()
{
//Start document
@ -1187,29 +1150,24 @@ function _putfonts()
foreach($this->fonts as $k=>$font)
{
//Font objects
$this->fonts[$k]['n']=$this->n+1;
$type=$font['type'];
$this->_newobj();
$this->fonts[$k]['n']=$this->n;
$name=$font['name'];
if($type=='core')
$this->_out('<</Type /Font');
$this->_out('/BaseFont /'.$name);
if($font['type']=='core')
{
//Standard font
$this->_newobj();
$this->_out('<</Type /Font');
$this->_out('/BaseFont /'.$name);
$this->_out('/Subtype /Type1');
if($name!='Symbol' and $name!='ZapfDingbats')
$this->_out('/Encoding /WinAnsiEncoding');
$this->_out('>>');
$this->_out('endobj');
}
elseif($type=='Type1' or $type=='TrueType')
else
{
//Additional Type1 or TrueType font
$this->_newobj();
$this->_out('<</Type /Font');
$this->_out('/BaseFont /'.$name);
$this->_out('/Subtype /'.$type);
$this->_out('/FirstChar 32 /LastChar 255');
//Additional font
$this->_out('/Subtype /'.$font['type']);
$this->_out('/FirstChar 32');
$this->_out('/LastChar 255');
$this->_out('/Widths '.($this->n+1).' 0 R');
$this->_out('/FontDescriptor '.($this->n+2).' 0 R');
if($font['enc'])
@ -1219,8 +1177,11 @@ function _putfonts()
else
$this->_out('/Encoding /WinAnsiEncoding');
}
$this->_out('>>');
$this->_out('endobj');
}
$this->_out('>>');
$this->_out('endobj');
if($font['type']!='core')
{
//Widths
$this->_newobj();
$cw=&$font['cw'];
@ -1236,26 +1197,17 @@ function _putfonts()
$s.=' /'.$k.' '.$v;
$file=$font['file'];
if($file)
$s.=' /FontFile'.($type=='Type1' ? '' : '2').' '.$this->FontFiles[$file]['n'].' 0 R';
$s.=' /FontFile'.($font['type']=='Type1' ? '' : '2').' '.$this->FontFiles[$file]['n'].' 0 R';
$this->_out($s.'>>');
$this->_out('endobj');
}
else
{
//Allow for additional types
$mtd='_put'.strtolower($type);
if(!method_exists($this,$mtd))
$this->Error('Unsupported font type: '.$type);
$this->$mtd($font);
}
}
}
function _putimages()
{
$filter=($this->compress) ? '/Filter /FlateDecode ' : '';
reset($this->images);
while(list($file,$info)=each($this->images))
foreach($this->images as $file=>$info)
{
$this->_newobj();
$this->images[$file]['n']=$this->n;
@ -1284,7 +1236,6 @@ function _putimages()
}
$this->_out('/Length '.strlen($info['data']).'>>');
$this->_putstream($info['data']);
unset($this->images[$file]['data']);
$this->_out('endobj');
//Palette
if($info['cs']=='Indexed')
@ -1405,6 +1356,7 @@ function _beginpage($orientation)
$this->state=2;
$this->x=$this->lMargin;
$this->y=$this->tMargin;
$this->lasth=0;
$this->FontFamily='';
//Page orientation
if(!$orientation)
@ -1477,9 +1429,7 @@ function _parsejpg($file)
$bpc=isset($a['bits']) ? $a['bits'] : 8;
//Read whole file
$f=fopen($file,'rb');
$data='';
while(!feof($f))
$data.=fread($f,4096);
$data=fread($f,filesize($file));
fclose($f);
return array('w'=>$a[0],'h'=>$a[1],'cs'=>$colspace,'bpc'=>$bpc,'f'=>'DCTDecode','data'=>$data);
}
@ -1607,12 +1557,11 @@ function _out($s)
//End of class
}
//Handle special IE contype request
if(isset($HTTP_SERVER_VARS['HTTP_USER_AGENT']) and $HTTP_SERVER_VARS['HTTP_USER_AGENT']=='contype')
//Handle silly IE contype request
if(isset($HTTP_ENV_VARS['HTTP_USER_AGENT']) and $HTTP_ENV_VARS['HTTP_USER_AGENT']=='contype')
{
Header('Content-Type: application/pdf');
exit;
}
}
?>

View File

@ -71,10 +71,11 @@ if ($( == 0 ) { # we are root
if ($ARGV[0] eq "*test") {
use Quota; # Needed to get and set quotas
print "Perl quota module successfully installed.\n";
print "If you haven't seen any errors lamdaemon.pl was set up successfully.\n";
print "IF you haven't seen any errors lamdaemon.pl was set up successfully.\n";
}
else {
# loop for every transmitted user
# XXX fixme change code to read stdin at once and then loop
my $string = do {local $/;<STDIN>};
@input = split ("\n", $string );
for ($i=0; $i<=$#input; $i++) {
@ -194,39 +195,24 @@ else {
$remotepath = shift @ARGV;
use Net::SSH::Perl;
if ($ARGV[2] eq "*test") { print "Net::SSH::Perl successfully installed.\n"; }
if (($ARGV[0] eq "-") and ($ARGV[1] eq "-")) { # user+passwd are in STDIN
$username = <STDIN>;
chop($username);
@username = split (',', $username);
$username[0] =~ s/uid=//;
$username[0] =~ s/cn=//;
$username = $username[0];
$password = <STDIN>;
chop($password);
}
else {
@username = split (',', $ARGV[0]);
$username[0] =~ s/uid=//;
$username[0] =~ s/cn=//;
$username = $username[0];
$password = $ARGV[1];
}
my $ssh = Net::SSH::Perl->new($hostname, options=>[
"UserKnownHostsFile /dev/null"],
protocol => "2,1" );
$ssh->login($username, $password);
@username = split (',', $ARGV[0]);
$username[0] =~ s/uid=//;
$password = $ARGV[1];
# Put all transfered lines in one string
if ($ARGV[2] ne "*test") {
$string = do {local $/;<STDIN>};
@string2 = split ("\n", $string);
for ($i=0; $i<=$#string2; $i++) {
($stdout2, $stderr, $exit) = $ssh->cmd("sudo $remotepath $argv", $string2[$i]);
$stdout .= $stdout2;
}
print $stdout;
else { $argv = "*test\n"; }
my $ssh = Net::SSH::Perl->new($hostname, options=>[
"UserKnownHostsFile /dev/null"],
protocol => "2,1" );
$ssh->login($username[0], $password);
# Change needed to prevent buffer overrun
@string2 = split ("\n", $string);
for ($i=0; $i<=$#string2; $i++) {
($stdout2, $stderr, $exit) = $ssh->cmd("sudo $remotepath $argv", $string2[$i]);
$stdout .= $stdout2;
}
#($stdout, $stderr, $exit) = $ssh->cmd("sudo $remotepath $argv", $string);
print $stdout;
}
else {
($stdout, $stderr, $exit) = $ssh->cmd("sudo $remotepath *test");
print $stdout;
}
}

View File

@ -23,16 +23,8 @@ $Id$
// ldap.inc provides basic functions to connect to the OpenLDAP server.
// PHP 5 compatibility
if( phpversion() >= "5" ) ini_set( "zend.ze1_compatibility_mode", 1 );
include_once("config.inc");
include_once("blowfish.inc");
// converts a HEX string to a binary value
function hex2bin($value) {
return pack("H*", $value);
}
// returns the hash value of a plain text password
// the hash algorithm depends on the configuration file
@ -41,10 +33,9 @@ function hex2bin($value) {
function pwd_hash($password, $enabled=true) {
// check for empty password
if (! $password || ($password == "")) {
return "";
if ($enabled) return "";
else return "!";
}
// calculate new random number
$_SESSION['ldap']->new_rand();
// hash password with algorithm from config file
$hash = "";
switch ($_SESSION['config']->get_pwdhash()) {
@ -52,70 +43,34 @@ function pwd_hash($password, $enabled=true) {
$hash = "{CRYPT}" . crypt($password);
break;
case 'MD5':
$hash = "{MD5}" . base64_encode(hex2bin(md5($password)));
$hash = "{MD5}" . base64_encode(mHash(MHASH_MD5, $password));
break;
case 'SMD5':
$salt0 = substr(pack("h*", md5($_SESSION['ldap']->rand)), 0, 8);
$salt = substr(pack("H*", md5($salt0 . $password)), 0, 4);
$hash = "{SMD5}" . base64_encode(hex2bin(md5($password . $salt)) . $salt);
$salt = mhash_keygen_s2k(MHASH_MD5, $password, substr(pack("h*", md5(mt_rand())), 0, 8), 4);
$hash = base64_encode(mHash(MHASH_MD5, $password . $salt) . $salt);
$hash = "{SMD5}" . $hash;
break;
case 'SHA':
// PHP 4.3+ can use sha1() function
if (function_exists(sha1)) {
$hash = "{SHA}" . base64_encode(hex2bin(sha1($password)));
}
// otherwise use MHash
elseif (function_exists(mHash)) {
$hash = "{SHA}" . base64_encode(mHash(MHASH_SHA1, $password));
}
// if SHA1 is not possible use crypt()
else {
$hash = "{CRYPT}" . crypt($password);
}
$hash = base64_encode(mHash(MHASH_SHA1, $password));
$hash = "{SHA}" . $hash;
break;
case 'SSHA':
// PHP 4.3+ can use sha1() function
if (function_exists(sha1)) {
$salt0 = substr(pack("h*", md5($_SESSION['ldap']->rand)), 0, 8);
$salt = substr(pack("H*", sha1($salt0 . $password)), 0, 4);
$hash = "{SSHA}" . base64_encode(hex2bin(sha1($password . $salt)) . $salt);
}
// otherwise use MHash
elseif (function_exists(mHash)) {
$salt = mhash_keygen_s2k(MHASH_SHA1, $password, substr(pack("h*", md5($_SESSION['ldap']->rand)), 0, 8), 4);
$hash = base64_encode(mHash(MHASH_SHA1, $password . $salt) . $salt);
$hash = "{SSHA}" . $hash;
}
// if SSHA is not possible use crypt()
else {
$hash = "{CRYPT}" . crypt($password);
}
$salt = mhash_keygen_s2k(MHASH_SHA1, $password, substr(pack("h*", md5(mt_rand())), 0, 8), 4);
$hash = base64_encode(mHash(MHASH_SHA1, $password . $salt) . $salt);
$hash = "{SSHA}" . $hash;
break;
case 'PLAIN':
$hash = $password;
break;
// use SSHA if the setting is invalid
default:
// PHP 4.3+ can use sha1() function
if (function_exists(sha1)) {
$salt0 = substr(pack("h*", md5($_SESSION['ldap']->rand)), 0, 8);
$salt = substr(pack("H*", sha1($salt0 . $password)), 0, 4);
$hash = "{SSHA}" . base64_encode(hex2bin(sha1($password . $salt)) . $salt);
}
// otherwise use MHash
elseif (function_exists(mHash)) {
$salt = mhash_keygen_s2k(MHASH_SHA1, $password, substr(pack("h*", md5($_SESSION['ldap']->rand)), 0, 8), 4);
$hash = base64_encode(mHash(MHASH_SHA1, $password . $salt) . $salt);
$hash = "{SSHA}" . $hash;
}
// if SSHA is not possible use crypt()
else {
$hash = "{CRYPT}" . crypt($password);
}
$salt = mhash_keygen_s2k(MHASH_SHA1, $password, substr(pack("h*", md5(mt_rand())), 0, 8), 4);
$hash = base64_encode(mHash(MHASH_SHA1, $password . $salt) . $salt);
$hash = "{SSHA}" . $hash;
break;
}
// enable/disable password
if (! $enabled) return pwd_disable($hash);
if (! $enabled) return "!" . $hash;
else return $hash;
}
@ -124,21 +79,12 @@ function pwd_hash($password, $enabled=true) {
// and returns the new hash string
// hash: hash value to enable
function pwd_enable($hash) {
// check if password is disabled (old wrong LAM method)
if ((substr($hash, 0, 2) == "!{") || ((substr($hash, 0, 2) == "*{"))) {
// check if password is disabled
if ((substr($hash, 0, 1) == "!") || ((substr($hash, 0, 1) == "*"))) {
return substr($hash, 1, strlen($hash));
}
// check for "!" or "*" at beginning of password hash
else {
if (substr($hash, 0, 1) == "{") {
$pos = strpos($hash, "}");
if ((substr($hash, $pos + 1, 1) == "!") || (substr($hash, $pos + 1, 1) == "*")) {
// enable hash
return substr($hash, 0, $pos + 1) . substr($hash, $pos + 2, strlen($hash));
}
else return $hash; // not disabled
}
else return $hash; // password is plain text
return $hash;
}
}
@ -146,35 +92,20 @@ function pwd_enable($hash) {
// and returns the new hash string
// hash: hash value to disable
function pwd_disable($hash) {
// check if password is disabled (old wrong LAM method)
if ((substr($hash, 0, 2) == "!{") || ((substr($hash, 0, 2) == "*{"))) {
// check if already disabled
if ((substr($hash, 0, 1) == "!") || ((substr($hash, 0, 1) == "*"))) {
return $hash;
}
// check for "!" or "*" at beginning of password hash
else {
if (substr($hash, 0, 1) == "{") {
$pos = strpos($hash, "}");
if ((substr($hash, $pos + 1, 1) == "!") || (substr($hash, $pos + 1, 1) == "*")) {
// hash already disabled
return $hash;
}
else return substr($hash, 0, $pos + 1) . "!" . substr($hash, $pos + 1, strlen($hash)); // not disabled
}
else return $hash; // password is plain text
return "!" . $hash;
}
}
// checks if a password hash is enabled/disabled
// returns true if the password is marked as enabled
function pwd_is_enabled($hash) {
// disabled passwords have a "!" or "*" at the beginning (old wrong LAM method)
if ((substr($hash, 0, 2) == "!{") || ((substr($hash, 0, 2) == "*{"))) return false;
if (substr($hash, 0, 1) == "{") {
$pos = strrpos($hash, "}");
// check if hash starts with "!" or "*"
if ((substr($hash, $pos + 1, 1) == "!") || (substr($hash, $pos + 1, 1) == "*")) return false;
else return true;
}
// disabled passwords have a "!" or "*" at the beginning
if ((substr($hash, 0, 1) == "!") || ((substr($hash, 0, 1) == "*"))) return false;
else return true;
}
@ -260,7 +191,7 @@ class Ldap{
return false;
}
// save password und username encrypted
$this->encrypt_login($user, $passwd);
$this->encrypt($user, $passwd);
$this->server = @ldap_connect($this->conf->get_ServerURL());
if ($this->server) {
// use LDAPv3
@ -269,7 +200,7 @@ class Ldap{
if (function_exists('ldap_start_tls')) {
@ldap_start_tls($this->server);
// connect without TLS if it failed
if (ldap_errno($this->server) != 0) {
if (ldap_errno($this->server) > 0) {
@ldap_close($this->server);
$this->server = @ldap_connect($this->conf->get_ServerURL());
ldap_set_option($this->server, LDAP_OPT_PROTOCOL_VERSION, 3);
@ -413,7 +344,7 @@ class Ldap{
// reconnects to LDAP server when deserialized
function __wakeup() {
$data = $this->decrypt_login();
$data = $this->decrypt();
$this->connect($data[0], $data[1]);
// change random number
mt_srand($this->rand + (microtime() * 1000000));
@ -435,81 +366,32 @@ class Ldap{
}
}
// calculates a new value for rand
function new_rand() {
// change random number
mt_srand($this->rand + (microtime() * 1000000));
$this->rand = mt_rand();
}
// encrypts a string
// $data: string to encrypt
// return: encrypted string
function encrypt($data) {
// use MCrypt if available
if (function_exists(mcrypt_create_iv)) {
// read key and iv from cookie
$iv = base64_decode($_COOKIE["IV"]);
$key = base64_decode($_COOKIE["Key"]);
// encrypt string
return mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $data, MCRYPT_MODE_ECB, $iv);
}
// use Blowfish if MCrypt is not available
else {
// read key and iv from cookie
$iv = base64_decode($_COOKIE["IV"]);
$key = base64_decode($_COOKIE["Key"]);
$b_key = $iv . $key;
// encrypt string
$b_fish = new Cipher_blowfish();
return $b_fish->encrypt($data, $b_key);
}
}
// decrypts a string
// $data: string to decrypt
// return: decrypted string
function decrypt($data) {
// use MCrypt if available
if (function_exists(mcrypt_create_iv)) {
// read key and iv from cookie
$iv = base64_decode($_COOKIE["IV"]);
$key = base64_decode($_COOKIE["Key"]);
// decrypt string
$ret = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $data, MCRYPT_MODE_ECB, $iv);
$ret = str_replace(chr(00), "", $ret);
return $ret;
}
// use Blowfish if MCrypt is not available
else {
// read key and iv from cookie
$iv = base64_decode($_COOKIE["IV"]);
$key = base64_decode($_COOKIE["Key"]);
$b_key = $iv . $key;
// decrypt string
$b_fish = new Cipher_blowfish();
return $b_fish->decrypt($data, $b_key);
}
}
// encrypts username and password
// $username: LDAP user name
// $password: LDAP password
function encrypt_login($username, $password) {
function encrypt($username, $password) {
// read key and iv from cookie
$iv = base64_decode($_COOKIE["IV"]);
$key = base64_decode($_COOKIE["Key"]);
// encrypt username and password
$this->username = base64_encode($this->encrypt($username));
$this->password = base64_encode($this->encrypt($password));
$this->username = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $username, MCRYPT_MODE_ECB, $iv));
$this->password = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $password, MCRYPT_MODE_ECB, $iv));
}
// decrypts username and password
// returns an array
// return[0]: user name
// return[1]: password
function decrypt_login() {
function decrypt() {
// read key and iv from cookie
$iv = base64_decode($_COOKIE["IV"]);
$key = base64_decode($_COOKIE["Key"]);
// decrypt username and password
$username = $this->decrypt(base64_decode($this->username));
$password = $this->decrypt(base64_decode($this->password));
$username = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($this->username), MCRYPT_MODE_ECB, $iv);
$password = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($this->password), MCRYPT_MODE_ECB, $iv);
$ret = array($username, $password);
$ret[0] = str_replace(chr(00), "", $ret[0]);
$ret[1] = str_replace(chr(00), "", $ret[1]);
return $ret;
}

View File

@ -23,9 +23,6 @@ $Id$
LDAP Account Manager lamPDF class and some pdf functions
*/
// PHP 5 compatibility
if( phpversion() >= "5" ) ini_set( "zend.ze1_compatibility_mode", 1 );
define('FPDF_FONTPATH', 'font/');
include_once("fpdf.php");
@ -44,6 +41,8 @@ function createUserPDF($accounts) {
$pdfFile->setCreator("LDAP Account Manager (pdf.inc)");
// Loop for every sumbitted account and print its values on a extra page
foreach ($accounts as $account) {
$iv = base64_decode($_COOKIE['IV']);
$key = base64_decode($_COOKIE['Key']);
$pdfFile->addPage();
// Load string with additional information from session
$info_string = $_SESSION['config']->pdftext;
@ -72,6 +71,9 @@ function createUserPDF($accounts) {
}
// Split string in array
$info_array = explode("\n", $info_string);
$pdfFile->setFont("arial","B",12);
$pdfFile->Write(5,"- " . _("User Information") . ":");
$pdfFile->Ln(6);
$pdfFile->setFont("times","",10);
foreach ($info_array as $info)
$pdfFile->Cell(50,5,$info,0,1,"L",0);
@ -81,7 +83,7 @@ function createUserPDF($accounts) {
$pdfFile->Write(5,"- " . _("Personal User Infos") . ":");
$pdfFile->Ln(6);
$pdfFile->setFont("times","B",10);
$pdfFile->Cell(50,5,_("Job title") . ":",0,0,"R",0);
$pdfFile->Cell(50,5,_("Title") . ":",0,0,"R",0);
$pdfFile->setFont("times","",10);
$pdfFile->Cell(50,5,$account->personal_title,0,1,"L",0);
$pdfFile->setFont("times","B",10);
@ -139,7 +141,8 @@ function createUserPDF($accounts) {
elseif($account->unix_password == "") {
}
else {
$account->unix_password = $_SESSION['ldap']->decrypt(base64_decode($account->unix_password));
$account->unix_password = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($account->unix_password), MCRYPT_MODE_ECB, $iv);
$account->unix_password = str_replace(chr(00), '', $account->unix_password);
$pdfFile->setFont("times","B",10);
$pdfFile->Cell(50,5,_("Unix password") . ":",0,0,"R",0);
$pdfFile->setFont("times","",10);
@ -147,16 +150,13 @@ function createUserPDF($accounts) {
}
$pdfFile->setFont("times","B",10);
$pdfFile->Cell(50,5,_("Group(s)") . ":",0,0,"R",0);
if ($account->general_group != -1) {
$text = $account->general_group;
if (sizeof($account->general_groupadd) > 0) $text .= ", " . implode(", ", $account->general_groupadd);
}
else {
$text = "";
if (sizeof($account->general_groupadd) > 0) $text = implode(", ", $account->general_groupadd);
$text = $account->general_group;
$groups = $account->general_groupadd;
for($j=0;$j<count($groups);$j++) {
$text .= ", " . $groups[$j];
}
$pdfFile->setFont("times","",10);
$pdfFile->MultiCell(0,5,$text,0,"L",0);
$pdfFile->Cell(50,5,$text,0,1,"L",0);
$pdfFile->setFont("times","B",10);
$pdfFile->Cell(50,5,_("Home Directory") . ":",0,0,"R",0);
$pdfFile->setFont("times","",10);
@ -174,7 +174,7 @@ function createUserPDF($accounts) {
$pdfFile->setFont("times","B",10);
$pdfFile->Cell(50,5,_("Login at host(s)") . ":",0,0,"R",0);
$pdfFile->setFont("times","",10);
$pdfFile->MultiCell(0,5,implode(", ",explode(",",$account->unix_host)),0,1,"L",0);
$pdfFile->Cell(50,5,$account->unix_host,0,1,"L",0);
// Print Samba settings
$pdfFile->Ln(9);
$pdfFile->setFont("arial","B",12);
@ -188,7 +188,7 @@ function createUserPDF($accounts) {
$pdfFile->setFont("times","B",10);
$pdfFile->Cell(50,5,_("Windows password") . ":",0,0,"R",0);
$pdfFile->setFont("times","",10);
$pdfFile->Cell(50,5,_("Windows password disabled!"),0,1,"L",0);
$pdfFile->Cell(50,5,_("Window password disabled!"),0,1,"L",0);
}
elseif($account->smb_useunixpwd == "1") {
$pdfFile->setFont("times","B",10);
@ -199,7 +199,8 @@ function createUserPDF($accounts) {
elseif($account->smb_password == "") {
}
else {
$account->smb_password = $_SESSION['ldap']->decrypt(base64_decode($account->smb_password));
$account->smb_password = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($account->smb_password), MCRYPT_MODE_ECB, $iv);
$account->smb_password = str_replace(chr(00), '', $account->smb_password);
$pdfFile->setFont("times","B",10);
$pdfFile->Cell(50,5,_("Windows password") . ":",0,0,"R",0);
$pdfFile->setFont("times","",10);
@ -210,7 +211,7 @@ function createUserPDF($accounts) {
$pdfFile->setFont("times","",10);
$pdfFile->Cell(50,5,$account->smb_homedrive,0,1,"L",0);
$pdfFile->setFont("times","B",10);
$pdfFile->Cell(50,5,_("Logon script") . ":",0,0,"R",0);
$pdfFile->Cell(50,5,_("Script path") . ":",0,0,"R",0);
$pdfFile->setFont("times","",10);
$pdfFile->Cell(50,5,$account->smb_scriptPath,0,1,"L",0);
$pdfFile->setFont("times","B",10);
@ -220,7 +221,7 @@ function createUserPDF($accounts) {
$pdfFile->setFont("times","B",10);
$pdfFile->Cell(50,5,_("Login at workstation(s)") . ":",0,0,"R",0);
$pdfFile->setFont("times","",10);
$pdfFile->MultiCell(0,5,implode(", ",explode(",",$account->smb_smbuserworkstations)),0,1,"L",0);
$pdfFile->Cell(50,5,$account->smb_smbuserworkstations,0,1,"L",0);
$pdfFile->setFont("times","B",10);
$pdfFile->Cell(50,5,_("Windows home directory") . ":",0,0,"R",0);
$pdfFile->setFont("times","",10);
@ -312,7 +313,7 @@ function createHostPDF($accounts) {
$pdfFile->setFont("times","B",10);
$pdfFile->Write(5,_("Primary group") . ": ");
$pdfFile->setFont("times","",10);
if ($account->general_group != -1) $pdfFile->Write(5,$account->general_group);
$pdfFile->Write(5,$account->general_group);
$pdfFile->Ln(5);
$pdfFile->setFont("times","B",10);
$pdfFile->Write(5,_("Domain") . ": ");
@ -500,7 +501,7 @@ class lamPDF extends FPDF {
$this->SetLineWidth(0.8);
$this->Line(10,40,200,40);
$this->Line(10,42,200,42);
$this->SetY(50);
$this->SetY(60);
}
// Print page footer

View File

@ -23,9 +23,6 @@ $Id$
// profiles.inc provides functions to load and save profiles for users/groups/hosts
// PHP 5 compatibility
if( phpversion() >= "5" ) ini_set( "zend.ze1_compatibility_mode", 1 );
include_once("config.inc");
include_once("account.inc");
include_once("ldap.inc");

View File

@ -23,9 +23,6 @@ $Id$
LDAP Account Manager status messages.
*/
// PHP 5 compatibility
if( phpversion() >= "5" ) ini_set( "zend.ze1_compatibility_mode", 1 );
function StatusMessage($MessageTyp,$MessageHeadline,$MessageText,$MessageVariables = array()) {
/* Setting CSS-StyleSheet class depending on the $MessageTyp and rewriting $MessageTyp with a readable string. */
if($MessageTyp == "INFO") {
@ -58,13 +55,11 @@ function StatusMessage($MessageTyp,$MessageHeadline,$MessageText,$MessageVariabl
$MessageHeadline = "<h2 " . $class . ">" . $MessageHeadline . "</h2>"; // Format $MessageHeadline
$MessageText = "<p " . $class . ">" . $MessageText . "</p>"; // Format $MessageText
$format = "<div " . $class . ">\n<br>\n<table>\n<tr>\n<td>" . $MessageTyp . "</td>\n<td>" . $MessageHeadline . $MessageText . "</td>\n</tr>\n</table>\n<br>\n</div>\n";
if (is_array($MessageVariables)) {
array_unshift($MessageVariables, $format);
call_user_func_array('printf',$MessageVariables);
}
else {
printf($format, $MessageVariables);
for($i=0;$i<count($MessageVariables);$i++) {
$variables .= "," . $MessageVariables[$i];
}
$command = 'printf("' . addslashes($format) . '"' . $variables . ');';
eval($command);
}
/* Use the three replace functions on the submitted Text. */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +0,0 @@
#!/bin/bash
# $Id$
#
# Copyright (C) 2003 Roland Gruber
# This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
# This script is run after make_po to merge the existing German translations to messages.po
msgmerge -v ../locale/fr_FR/LC_MESSAGES/messages.po messages.po -o messages.po

View File

@ -1,9 +0,0 @@
#!/bin/bash
# $Id$
#
# Copyright (C) 2004 Roland Gruber
# This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
# This script is run after make_po to merge the existing Hungarian translations to messages.po
msgmerge -v ../locale/hu_HU/LC_MESSAGES/messages.po messages.po -o messages.po

View File

@ -1,9 +0,0 @@
#!/bin/bash
# $Id$
#
# Copyright (C) 2004 Roland Gruber
# This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
# This script is run after make_po to merge the existing Japanese translations to messages.po
msgmerge -v ../locale/ja_JP/LC_MESSAGES/messages.po messages.po -o messages.po

View File

@ -4,12 +4,12 @@
msgid ""
msgstr ""
"Project-Id-Version: LAM 0.4.2\n"
"Project-Id-Version: LAM 0.4\n"
"Report-Msgid-Bugs-To: post@rolandgruber.de \n"
"POT-Creation-Date: 2004-01-14 17:45+0200\n"
"PO-Revision-Date: 2004-01-14 17:45+0200\n"
"POT-Creation-Date: 2003-07-29 19:45+0200\n"
"PO-Revision-Date: 2003-07-29 19:45+0200\n"
"Last-Translator: Roland Gruber <post@rolandgruber.de>\n"
"Language-Team: German <post@rolandgruber.de>\n"
"Language-Team: German <linux@rolandgruber.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-15\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@ -8,17 +8,18 @@ Alle:
massdetail:
- mass_accounts: Array aus account-Objekten
- mass_errors: Array aus Fehlermeldungen. Index ist gleich Index von accounts
- accounts: Array aus account-Objekten
- errors: Array aus Fehlermeldungen. Index ist gleich Index von accounts
masscreate:
- mass_accounts: Array aus account-Objekten
- mass_pointer: Zeigt auf den aktuellen Startpunkt, ab dem Benutzer angelegt werden sollen.
- accounts: Array aus account-Objekten
- pointer: Zeigt auf den aktuellen Startpunkt, ab dem Benutzer angelegt werden sollen.
Noetig, da mit Meta-Refreshs gearbeitet werden muss
- mass_errors: Array aus Fehlermeldungen. Index ist gleich Index von accounts
- mass_group_suffix: Suffix, unter welchem eine Gruppe bei Bedarf angelegt wird
- mass_group_selectprofile: Profil, mit dem eine Gruppe bei Bedarf angelegt werden soll
- errors: Array aus Fehlermeldungen. Index ist gleich Index von accounts
- group_suffix: Suffix, unter welchem eine Gruppe bei Bedarf angelegt wird
- group_selectprofile: Profil, mit dem eine Gruppe bei Bedarf angelegt werden soll
- rowstart: ??? nicht mehr benutzt
main:

View File

@ -39,12 +39,12 @@ body {
/* links */
a {
color:blue;
text-decoration:none;
text-decoration:underline;
}
a:visited {
color:blue;
text-decoration:none;
text-decoration:underline;
}
a:hover {
@ -52,11 +52,6 @@ color:red;
text-decoration:none;
}
a:active {
color:red;
text-decoration:none;
}
form { }
input {
font-weight:bold;

View File

@ -76,7 +76,6 @@ if (isset($_GET['DN']) && $_GET['DN']!='') {
$account_old =& $_SESSION['account_'.$varkey.'_account_old'];
// get "real" DN from variable
$DN = str_replace("\'", '',$_GET['DN']);
if ($_GET['DN'] == $DN) $DN = str_replace("'", '',$_GET['DN']);
// Load existing group
$account_new = loadgroup($DN);
// Get a copy of original host
@ -135,7 +134,6 @@ switch ($_POST['select']) {
do { // X-Or, only one if() can be true
if (isset($_POST['users']) && isset($_POST['add'])) { // Add users to list
// Add new user
if (!is_array($account_new->unix_memberUid)) $account_new->unix_memberUid = array();
$account_new->unix_memberUid = array_merge($account_new->unix_memberUid, $_POST['users']);
// remove doubles
$account_new->unix_memberUid = array_flip($account_new->unix_memberUid);
@ -483,7 +481,7 @@ switch ($select_local) {
// unset timestamp stored in $temp2[0]
unset($temp2[0]);
// load list with all users
foreach ($temp2 as $temp) $users[] = $temp['uid'];
foreach ($temp2 as $temp) $users[] = $temp['cn'];
// sort users
if (is_array($users)) sort($users, SORT_STRING);
// remove users which are allready additional members of group
@ -494,16 +492,16 @@ switch ($select_local) {
*/
// Do a ldap-search
if (isset($account_old->general_uidNumber))
$result = ldap_search($_SESSION['ldap']->server(), $_SESSION['config']->get_UserSuffix(), "(&(objectClass=PosixAccount)(gidNumber=$account_old->general_uidNumber))", array('uid'));
else $result = ldap_search($_SESSION['ldap']->server(), $_SESSION['config']->get_UserSuffix(), "(&(objectClass=PosixAccount)(gidNumber=$account_new->general_uidNumber))", array('uid'));
$result = ldap_search($_SESSION['ldap']->server(), $_SESSION['config']->get_UserSuffix(), "(&(objectClass=PosixAccount)(gidNumber=$account_old->general_uidNumber))", array('cn'));
else $result = ldap_search($_SESSION['ldap']->server(), $_SESSION['config']->get_UserSuffix(), "(&(objectClass=PosixAccount)(gidNumber=$account_new->general_uidNumber))", array('cn'));
$entry = ldap_first_entry($_SESSION['ldap']->server(), $result);
// loop for every user which is primary member of group
while ($entry) {
$attr = ldap_get_attributes($_SESSION['ldap']->server(), $entry);
if (isset($attr['uid'][0])) {
if (isset($attr['cn'][0])) {
// Remove user from user list
$users = @array_flip($users);
unset ($users[$attr['uid'][0]]);
unset ($users[$attr['cn'][0]]);
$users = @array_flip($users);
}
// Go to next entry
@ -813,12 +811,12 @@ switch ($select_local) {
echo "<table border=0 width=\"100%\">\n<tr>\n<td>";
echo "<fieldset class=\"groupedit-middle\"><legend class=\"groupedit-bright\"><b>";
echo _("Save profile");
echo "</b></legend>\n";
echo "</b></legend>\n<table border=0 width=\"100%\">\n<tr>\n<td>";
echo '<input name="f_finish_safeProfile" type="text" size="30" maxlength="50">';
echo "&nbsp;<input name=\"save\" type=\"submit\" $disabled value=\"";
echo "</td><td><input name=\"save\" type=\"submit\" $disabled value=\"";
echo _('Save profile');
echo '">&nbsp;<a href="../help.php?HelpNumber=457" target="lamhelp">'._('Help');
echo "</a>\n</fieldset>\n</td></tr>\n<tr><td>\n";
echo '"></td><td><a href="../help.php?HelpNumber=457" target="lamhelp">'._('Help');
echo "</a></td>\n</tr>\n</table>\n</fieldset>\n</td></tr>\n<tr><td>\n";
echo "<fieldset class=\"groupedit-bright\"><legend class=\"groupedit-bright\"><b>";
if ($account_old) echo _('Modify');
else echo _('Create');
@ -844,19 +842,20 @@ switch ($select_local) {
// Final Settings
echo '<input name="select" type="hidden" value="finish">';
echo "<fieldset class=\"groupedit-bright\"><legend class=\"groupedit-bright\"><b>"._('Note')."</b></legend>\n";
if ($account_old) {
printf(_("Group %s has been modified."), $account_new->general_username);
}
else {
printf(_("Group %s has been created."), $account_new->general_username);
}
echo "<br><br>";
if (!$account_old) {
echo '<input name="createagain" type="submit" value="'; echo _('Create another group'); echo '">';
}
echo '<input name="outputpdf" type="submit" value="'; echo _('Create PDF file'); echo '">'.
'&nbsp;<input name="backmain" type="submit" value="'; echo _('Back to group list'); echo '">'.
'</fieldset'."\n";
echo "<table border=0 width=\"100%\">";
echo '<tr><td>';
echo _('Group').' ';
echo $account_new->general_username;
if ($account_old) echo ' '._('has been modified').'.';
else echo ' '._('has been created').'.';
echo '</td></tr>'."\n".'<tr><td>';
if (!$account_old)
{ echo' <input name="createagain" type="submit" value="'; echo _('Create another group'); echo '">'; }
echo '</td>'."\n".'<td>'.
'<input name="outputpdf" type="submit" value="'; echo _('Create PDF file'); echo '">'.
'</td>'."\n".'<td>'.
'<input name="backmain" type="submit" value="'; echo _('Back to group list'); echo '">'.
'</td></tr></table></fieldset'."\n";
break;
}

View File

@ -72,7 +72,6 @@ if (isset($_GET['DN']) && $_GET['DN']!='') {
$account_old =& $_SESSION['account_'.$varkey.'_account_old'];
// get "real" DN from variable
$DN = str_replace("\'", '',$_GET['DN']);
if ($_GET['DN'] == $DN) $DN = str_replace("'", '',$_GET['DN']);
// Load existing host
$account_new = loadhost($DN);
// Get a copy of original host
@ -104,6 +103,7 @@ else if (count($_POST)==0) {
$account_new = loadHostProfile('default');
$account_new ->type = 'host';
$account_new->smb_flags['W'] = 1;
$account_new->smb_flags['X'] = 1;
$account_new->general_homedir = '/dev/null';
$account_new->general_shell = '/bin/false';
}
@ -133,7 +133,7 @@ switch ($_POST['select']) {
// Get copy of hostname so we can check if changes were made
$tempname = $account_new->general_username;
// Check if Hostname contains only valid characters
if ( !eregi('^([a-z0-9_]|[.]|[-]|[$])*$', $account_new->general_username))
if ( !ereg('^([a-z]|[A-Z]|[0-9]|[.]|[-]|[$])*$', $account_new->general_username))
$errors[] = array('ERROR', _('Host name'), _('Hostname contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and .-_ !'));
// Create automatic Hostname with number if original host already exists
@ -178,7 +178,7 @@ switch ($_POST['select']) {
// Check if Name-length is OK. minLength=3, maxLength=20
if ( !ereg('.{3,20}', $account_new->general_username)) $errors[] = array('ERROR', _('Name'), _('Name must contain between 3 and 20 characters.'));
// Check if Name starts with letter
if ( !eregi('^([a-z]).*$', $account_new->general_username))
if ( !ereg('^([a-z]|[A-Z]).*$', $account_new->general_username))
$errors[] = array('ERROR', _('Name'), _('Name contains invalid characters. First character must be a letter.'));
// Set gecos-field to hostname if it's empty
if ($account_new->general_gecos=='') {
@ -217,9 +217,10 @@ switch ($_POST['select']) {
$account_new->smb_flags['N']=true;
}
}
// Check object classes. Display warning if object classes were not found
// Check Objectclasses. Display Warning if objectclasses don'T fot
if (isset($account_old->general_objectClass)) {
if (!in_array('posixAccount', $account_old->general_objectClass)) $errors[] = array('WARN', _('ObjectClass posixAccount not found.'), _('Have to add objectClass posixAccount.'));
if (!in_array('shadowAccount', $account_old->general_objectClass)) $errors[] = array('WARN', _('ObjectClass shadowAccount not found.'), _('Have to add objectClass shadowAccount.'));
if ($config_intern->is_samba3()) {
if (!in_array('sambaSamAccount', $account_old->general_objectClass)) $errors[] = array('WARN', _('ObjectClass sambaSamAccount not found.'), _('Have to add objectClass sambaSamAccount. Host with sambaAccount will be updated.'));
}
@ -260,9 +261,6 @@ do { // X-Or, only one if() can be true
$_SESSION['account_'.$varkey.'_account_new'] = loadHostProfile('default');
$account_new =& $_SESSION['account_'.$varkey.'_account_new'];
$account_new ->type = 'host';
$account_new->smb_flags['W'] = 1;
$account_new->general_homedir = '/dev/null';
$account_new->general_shell = '/bin/false';
break;
}
// Load Profile and reset all attributes to settings in profile
@ -430,49 +428,53 @@ switch ($select_local) {
"</td>\n</tr>\n</table>";
echo _('Values with * are required');
echo "</fieldset>\n";
// Show fieldset with modify, undo and back-button
echo "<fieldset class=\"hostedit-bright\"><legend class=\"hostedit-bright\"><b>";
if ($account_old) echo _('Modify');
else echo _('Create');
echo "</b></legend>\n";
// display undo-button when editing a host
if (isset($account_old)) {
echo "<input name=\"next_reset\" type=\"submit\" value=\""; echo _('Undo changes');
echo "\">\n";
}
echo '&nbsp;<input name="create" type="submit" value="';
if ($account_old) echo _('Modify Account');
else echo _('Create Account');
echo "\">";
echo "</fieldset>\n";
// Show fieldset where to save a new profile
echo "<fieldset class=\"hostedit-dark\"><legend class=\"hostedit-bright\"><b>";
echo _("Save profile");
echo "</b></legend>\n<table border=0 width=\"100%\">\n<tr>\n<td width=\"50%\">";
echo '<input name="f_finish_safeProfile" type="text" size="30" maxlength="50">';
echo '&nbsp;<input name="save" type="submit" value="';
echo '<input name="save" type="submit" value="';
echo _('Save profile');
echo '"></td><td width="30%"></td><td width="20%"><a href="../help.php?HelpNumber=457" target="lamhelp">'._('Help');
echo "</a></td>\n</tr>\n</table>\n</fieldset>";
// Show fieldset with modify, undo and back-button
echo "<fieldset class=\"hostedit-bright\"><legend class=\"hostedit-bright\"><b>";
if ($account_old) echo _('Modify');
else echo _('Create');
echo "</b></legend>\n";
echo "<table border=0 width=\"100%\"><tr><td width=\"50%\">";
// display undo-button when editiing a host
if (isset($account_old)) {
echo "<input name=\"next_reset\" type=\"submit\" value=\""; echo _('Undo changes');
echo "\">\n";
}
echo "</td>\n<td width=\"30%\">";
echo '<input name="create" type="submit" value="';
if ($account_old) echo _('Modify Account');
else echo _('Create Account');
echo "\">\n</td><td width=\"20%\">";
echo "</td></tr></table></fieldset>\n";
break;
case 'finish':
// Final Settings
echo '<input name="select" type="hidden" value="finish">';
echo "<fieldset class=\"hostedit-bright\"><legend class=\"hostedit-bright\"><b>"._('Note')."</b></legend>\n";
if ($account_old) {
printf(_("Host %s has been modified."), $account_new->general_username);
}
else {
printf(_("Host %s has been created."), $account_new->general_username);
}
echo '<br><br>';
if (!$account_old) {
echo '<input name="createagain" type="submit" value="'; echo _('Create another host'); echo '">';
}
echo '<input name="outputpdf" type="submit" value="'; echo _('Create PDF file'); echo '">'.
'&nbsp;<input name="backmain" type="submit" value="'; echo _('Back to host list'); echo '">'.
'</fieldset'."\n";
echo "<table border=0 width=\"100%\"><tr><td>";
echo '<tr><td>';
echo _('Host');
echo ' '.$account_new->general_username.' ';
if ($account_old) echo ' '._('has been modified').'.';
else echo ' '._('has been created').'.';
echo '</td></tr>'."\n".'<tr><td>';
if (!$account_old)
{ echo '<input name="createagain" type="submit" value="'; echo _('Create another host'); echo '">'; }
echo '</td>'."\n".'<td>'.
'<input name="outputpdf" type="submit" value="'; echo _('Create PDF file'); echo '">'.
'</td>'."\n".'<td>'.
'<input name="backmain" type="submit" value="'; echo _('Back to host list'); echo '">'.
'</td></tr></table></fieldset'."\n";
break;
}

View File

@ -79,7 +79,6 @@ if (isset($_GET['DN']) && $_GET['DN']!='') {
$account_old =& $_SESSION['account_'.$varkey.'_account_old'];
// get "real" DN from variable
$DN = str_replace("\'", '',$_GET['DN']);
if ($_GET['DN'] == $DN) $DN = str_replace("'", '',$_GET['DN']);
// Load existing group
$account_new = loaduser($DN);
$account_old = $account_new;
@ -158,12 +157,11 @@ switch ($_POST['select']) {
do { // X-Or, only one if() can be true
if (isset($_POST['allgroups']) && isset($_POST['add'])) { // Add groups to list
// Add new group
if (!is_array($account_new->general_groupadd)) $account_new->general_groupadd = array();
$account_new->general_groupadd = array_merge($account_new->general_groupadd, $_POST['allgroups']);
$account_new->general_groupadd = @array_merge($account_new->general_groupadd, $_POST['allgroups']);
// remove doubles
$account_new->general_groupadd = array_flip($account_new->general_groupadd);
$account_new->general_groupadd = @array_flip($account_new->general_groupadd);
array_unique($account_new->general_groupadd);
$account_new->general_groupadd = array_flip($account_new->general_groupadd);
$account_new->general_groupadd = @array_flip($account_new->general_groupadd);
// sort groups
sort($account_new->general_groupadd);
break;
@ -294,7 +292,7 @@ switch ($_POST['select']) {
$account_new->general_homedir = str_replace('$group', $account_new->general_group, $account_new->general_homedir);
if ($account_new->general_username != '')
$account_new->general_homedir = str_replace('$user', $account_new->general_username, $account_new->general_homedir);
if ($account_new->general_homedir != $_POST['f_general_homedir']) $errors[] = array('INFO', _('Home directory'), _('Replaced $%s or $%s in homedir.'), array('user', 'group'));
if ($account_new->general_homedir != $_POST['f_general_homedir']) $errors[] = array('INFO', _('Home directory'), _('Replaced $user or $group in homedir.'));
if ( !ereg('^[/]([a-z]|[A-Z])([a-z]|[A-Z]|[0-9]|[.]|[-]|[_])*([/]([a-z]|[A-Z])([a-z]|[A-Z]|[0-9]|[.]|[-]|[_])*)*$', $account_new->general_homedir ))
$errors[] = array('ERROR', _('Home directory'), _('Homedirectory contains invalid characters.'));
// Check if UID is valid. If none value was entered, the next useable value will be inserted
@ -312,12 +310,14 @@ switch ($_POST['select']) {
case 'unix':
// Write all general values into $account_new
if (isset($_POST['f_unix_password'])) {
// Encrypt password
// Encraypt password
$iv = base64_decode($_COOKIE["IV"]);
$key = base64_decode($_COOKIE["Key"]);
if ($_POST['f_unix_password'] != $_POST['f_unix_password2']) {
$errors[] = array('ERROR', _('Password'), _('Please enter the same password in both password-fields.'));
unset ($_POST['f_unix_password2']);
}
else $account_new->unix_password = base64_encode($_SESSION['ldap']->encrypt($_POST['f_unix_password']));
else $account_new->unix_password = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $_POST['f_unix_password'], MCRYPT_MODE_ECB, $iv));
}
else $account_new->unix_password = '';
if ($_POST['f_unix_password_no']) $account_new->unix_password_no = true;
@ -333,7 +333,9 @@ switch ($_POST['select']) {
else $account_new->unix_deactivated = false;
if ($_POST['genpass']) {
// Generate a random password if generate-button was pressed
$account_new->unix_password = base64_encode($_SESSION['ldap']->encrypt(genpasswd()));
$iv = base64_decode($_COOKIE["IV"]);
$key = base64_decode($_COOKIE["Key"]);
$account_new->unix_password = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, genpasswd(), MCRYPT_MODE_ECB, $iv));
unset ($_POST['f_unix_password2']);
// Keep unix-page acitve
$select_local = 'unix';
@ -341,7 +343,10 @@ switch ($_POST['select']) {
// Check if values are OK and set automatic values. if not error-variable will be set
else { // account.inc
if ($account_new->unix_password != '') {
$password = $_SESSION['ldap']->decrypt(base64_decode($account_new->unix_password));
$iv = base64_decode($_COOKIE["IV"]);
$key = base64_decode($_COOKIE["Key"]);
$password = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($account_new->unix_password), MCRYPT_MODE_ECB, $iv);
$password = str_replace(chr(00), '', $password);
}
if (!ereg('^([a-z]|[A-Z]|[0-9]|[\|]|[\#]|[\*]|[\,]|[\.]|[\;]|[\:]|[\_]|[\-]|[\+]|[\!]|[\%]|[\&]|[\/]|[\?]|[\{]|[\[]|[\(]|[\)]|[\]]|[\}])*$', $password))
$errors[] = array('ERROR', _('Password'), _('Password contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and #*,.;:_-+!$%&/|?{[()]}= !'));
@ -366,14 +371,9 @@ switch ($_POST['select']) {
if ($_POST['f_smb_useunixpwd']) $account_new->smb_useunixpwd = true;
else $account_new->smb_useunixpwd = false;
$account_new->smb_homedrive = $_POST['f_smb_homedrive'];
if (get_magic_quotes_gpc() == 1) {
$_POST['f_smb_smbhome'] = stripslashes($_POST['f_smb_smbhome']);
$_POST['f_smb_profilePath'] = stripslashes($_POST['f_smb_profilePath']);
$_POST['f_smb_scriptpath'] = stripslashes($_POST['f_smb_scriptpath']);
}
$account_new->smb_scriptPath = $_POST['f_smb_scriptpath'];
$account_new->smb_smbhome = $_POST['f_smb_smbhome'];
$account_new->smb_profilePath = $_POST['f_smb_profilePath'];
$account_new->smb_smbhome = stripslashes($_POST['f_smb_smbhome']);
$account_new->smb_profilePath = stripslashes($_POST['f_smb_profilePath']);
$account_new->smb_displayName = $_POST['f_smb_displayName'];
if ($_POST['f_smb_flagsD']) $account_new->smb_flags['D'] = true;
else $account_new->smb_flags['D'] = false;
@ -412,6 +412,8 @@ switch ($_POST['select']) {
break;
}
}
$iv = base64_decode($_COOKIE["IV"]);
$key = base64_decode($_COOKIE["Key"]);
// Set Samba password
if (isset($_POST['f_smb_password']) && !$account_new->smb_useunixpwd) {
// Encraypt password
@ -419,32 +421,34 @@ switch ($_POST['select']) {
$errors[] = array('ERROR', _('Password'), _('Please enter the same password in both password-fields.'));
unset ($_POST['f_smb_password2']);
}
else $account_new->smb_password = base64_encode($_SESSION['ldap']->encrypt($_POST['f_smb_password']));
else $account_new->smb_password = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $_POST['f_smb_password'], MCRYPT_MODE_ECB, $iv));
}
else $account_new->smb_password = '';
if ( (($account_new->smb_useunixpwd && !$account_old) || ($account_new->smb_useunixpwd && $account_new->unix_password!='')) && isset($account_new->unix_password) ) {
// Set Samba-Password to unix-password if option is set
$smb_password = $_SESSION['ldap']->decrypt(base64_decode($account_new->unix_password));
$account_new->smb_password = base64_encode($_SESSION['ldap']->encrypt($smb_password));
$unix_password = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($account_new->unix_password), MCRYPT_MODE_ECB, $iv);
$smb_password = str_replace(chr(00), '', $unix_password);
$account_new->smb_password = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $smb_password, MCRYPT_MODE_ECB, $iv));
}
// Check values
$account_new->smb_scriptPath = str_replace('$user', $account_new->general_username, $account_new->smb_scriptPath);
$account_new->smb_scriptPath = str_replace('$group', $account_new->general_group, $account_new->smb_scriptPath);
if ($account_new->smb_scriptPath != $_POST['f_smb_scriptpath']) $errors[] = array('INFO', _('Logon script'), _('Inserted user- or groupname in scriptpath.'));
if ($account_new->smb_scriptPath != $_POST['f_smb_scriptpath']) $errors[] = array('INFO', _('Script path'), _('Inserted user- or groupname in scriptpath.'));
$account_new->smb_profilePath = str_replace('$user', $account_new->general_username, $account_new->smb_profilePath);
$account_new->smb_profilePath = str_replace('$group', $account_new->general_group, $account_new->smb_profilePath);
if ($account_new->smb_profilePath != $_POST['f_smb_profilePath']) $errors[] = array('INFO', _('Profile path'), _('Inserted user- or groupname in profilepath.'));
if ($account_new->smb_profilePath != stripslashes($_POST['f_smb_profilePath'])) $errors[] = array('INFO', _('Profile path'), _('Inserted user- or groupname in profilepath.'));
$account_new->smb_smbhome = str_replace('$user', $account_new->general_username, $account_new->smb_smbhome);
$account_new->smb_smbhome = str_replace('$group', $account_new->general_group, $account_new->smb_smbhome);
if ($account_new->smb_smbhome != $_POST['f_smb_smbhome']) $errors[] = array('INFO', _('Home path'), _('Inserted user- or groupname in HomePath.'));
if ( (!$account_new->smb_smbhome=='') && (!ereg('^(([\][\])|(%))([a-z]|[A-Z]|[0-9]|[.]|[-]|[%])+([\]([a-z]|[A-Z]|[0-9]|[.]|[-]|[%]|[ä]|[Ä]|[ö]|[Ö]|[ü]|[Ü]|[ß])+)+$', $account_new->smb_smbhome)))
if ($account_new->smb_smbhome != stripslashes($_POST['f_smb_smbhome'])) $errors[] = array('INFO', _('Home path'), _('Inserted user- or groupname in HomePath.'));
if ( (!$account_new->smb_smbhome=='') && (!ereg('^[\][\]([a-z]|[A-Z]|[0-9]|[.]|[-]|[%])+([\]([a-z]|[A-Z]|[0-9]|[.]|[-]|[%]|[ä]|[Ä]|[ö]|[Ö]|[ü]|[Ü]|[ß])+)+$', $account_new->smb_smbhome)))
$errors[] = array('ERROR', _('Home path'), _('Home path is invalid.'));
if ( !ereg('^([a-z]|[A-Z]|[0-9]|[\|]|[\#]|[\*]|[\,]|[\.]|[\;]|[\:]|[\_]|[\-]|[\+]|[\!]|[\%]|[\&]|[\/]|[\?]|[\{]|[\[]|[\(]|[\)]|[\]]|[\}])*$',
$smb_password)) $errors[] = array('ERROR', _('Password'), _('Password contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and #*,.;:_-+!$%&/|?{[()]}= !'));
if ( (!$account_new->smb_scriptPath=='') && (!eregi('^([\\])*([a-z0-9\\._%äöüß-])+(\\\([a-z0-9\\._%äöüß-])+)*((\.bat)|(\.cmd)|(\.exe))$', $account_new->smb_scriptPath)))
$errors[] = array('ERROR', _('Logon script'), _('Logon script is invalid!'));
if ( (!$account_new->smb_profilePath=='') && (!eregi('^[/][a-z]([a-z]|[0-9]|[.]|[-]|[_]|[%])*([/][a-z]([a-z]|[0-9]|[.]|[-]|[_]|[%])*)*$', $account_new->smb_profilePath))
&& (!eregi('^(([\][\])|(%))([a-z0-9_]|[.]|[-]|[%])+([\]([a-z0-9_]|[.]|[-]|[%])+)+$', $account_new->smb_profilePath)))
if ( (!$account_new->smb_scriptPath=='') && (!ereg('^([/])*([a-z]|[0-9]|[.]|[-]|[_]|[%]|[ä]|[Ä]|[ö]|[Ö]|[ü]|[Ü]|[ß])+([a-z]|[0-9]|[.]|[-]|[_]|[%]|[ä]|[Ä]|[ö]|[Ö]|[ü]|[Ü]|[ß])*'.
'([/]([a-z]|[0-9]|[.]|[-]|[_]|[%]|[ä]|[Ä]|[ö]|[Ö]|[ü]|[Ü]|[ß])+([a-z]|[0-9]|[.]|[-]|[_]|[%]|[ä]|[Ä]|[ö]|[Ö]|[ü]|[Ü]|[ß])*)*(([.][b][a][t])|([.][c][m][d]))$', $account_new->smb_scriptPath)))
$errors[] = array('ERROR', _('Script path'), _('Script path is invalid!'));
if ( (!$account_new->smb_profilePath=='') && (!ereg('^[/][a-z]([a-z]|[0-9]|[.]|[-]|[_]|[%])*([/][a-z]([a-z]|[0-9]|[.]|[-]|[_]|[%])*)*$', $account_new->smb_profilePath))
&& (!ereg('^[\][\]([a-z]|[A-Z]|[0-9]|[.]|[-]|[%])+([\]([a-z]|[A-Z]|[0-9]|[.]|[-]|[%])+)+$', $account_new->smb_profilePath)))
$errors[] = array('ERROR', _('Profile path'), _('Profile path is invalid!'));
if ((!$account_new->smb_domain=='') && (!is_object($account_new->smb_domain)) && !ereg('^([a-z]|[A-Z]|[0-9]|[-])+$', $account_new->smb_domain))
$errors[] = array('ERROR', _('Domain name'), _('Domain name contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and -.'));
@ -493,7 +497,7 @@ switch ($_POST['select']) {
if ( !ereg('^(([0-9]|[A-Z]|[a-z]|[.]|[-]|[_])+[@]([0-9]|[A-Z]|[a-z]|[-])+([.]([0-9]|[A-Z]|[a-z]|[-])+)*)*$', $account_new->personal_mail)) $errors[] = array('ERROR', _('eMail address'), _('Please enter a valid eMail address!'));
if ( !ereg('^([0-9]|[A-Z]|[a-z]|[-]|[ ]|[.]|[Ä]|[ä]|[Ö]|[ö]|[Ü]|[ü]|[ß])*$', $account_new->personal_street)) $errors[] = array('ERROR', _('Street'), _('Please enter a valid street name!'));
if ( !ereg('^([0-9]|[A-Z]|[a-z]|[ ]|[.]|[Ä]|[ä]|[Ö]|[ö]|[Ü]|[ü]|[ß])*$', $account_new->personal_postalAddress)) $errors[] = array('ERROR', _('Postal address'), _('Please enter a valid postal address!'));
if ( !ereg('^([0-9]|[A-Z]|[a-z]|[-]|[ ]|[.]|[Ä]|[ä]|[Ö]|[ö]|[Ü]|[ü]|[ß])*$', $account_new->personal_title)) $errors[] = array('ERROR', _('Job title'), _('Please enter a valid job title!'));
if ( !ereg('^([0-9]|[A-Z]|[a-z]|[-]|[ ]|[.]|[Ä]|[ä]|[Ö]|[ö]|[Ü]|[ü]|[ß])*$', $account_new->personal_title)) $errors[] = array('ERROR', _('Title'), _('Please enter a valid title!'));
if ( !ereg('^([0-9]|[A-Z]|[a-z]|[ ]|[.]|[Ä]|[ä]|[Ö]|[ö]|[Ü]|[ü]|[ß])*$', $account_new->personal_employeeType)) $errors[] = array('ERROR', _('Employee type'), _('Please enter a valid employee type!'));
if ( !ereg('^([0-9]|[A-Z]|[a-z])*$', $account_new->personal_postalCode)) $errors[] = array('ERROR', _('Postal code'), _('Please enter a valid postal code!'));
break;
@ -588,7 +592,7 @@ do { // X-Or, only one if() can be true
$errors[] = array('WARN', _('ObjectClass shadowAccount not found.'), _('Have to add objectClass shadowAccount.'));
if ($config_intern->is_samba3()) {
if (!in_array('sambaSamAccount', $account_old->general_objectClass))
$errors[] = array('WARN', _('ObjectClass sambaSamAccount not found.'), _('Have to add objectClass sambaSamAccount. User with sambaAccount will be updated.'));
$errors[] = array('WARN', _('ObjectClass sambaSamAccount not found.'), _('Have to add objectClass sambaSamAccount. USer with sambaAccount will be updated.'));
}
else {
if (!in_array('sambaAccount', $account_old->general_objectClass))
@ -749,9 +753,8 @@ echo "</title>\n".
"<input name=\"varkey\" type=\"hidden\" value=\"".$varkey."\">\n";
// Display errir-messages
if (is_array($errors)) {
for ($i=0; $i<sizeof($errors); $i++) StatusMessage($errors[$i][0], $errors[$i][1], $errors[$i][2], $errors[$i][3]);
}
if (is_array($errors))
for ($i=0; $i<sizeof($errors); $i++) StatusMessage($errors[$i][0], $errors[$i][1], $errors[$i][2]);
// print_r($account_new);
//print_r($account_old);
@ -775,7 +778,7 @@ switch ($select_local) {
// unset timestamp stored in $temp2[0]
unset($temp2[0]);
// Remove $ from workstations
foreach ($temp2 as $temp) $hosts[] = str_replace("$", '',$temp['uid']);
foreach ($temp2 as $temp) $hosts[] = str_replace("$", '',$temp['cn']);
// sort workstations
sort($hosts, SORT_STRING);
// get workstation array
@ -1031,7 +1034,10 @@ switch ($select_local) {
// Unix Password Settings
// decrypt password
if ($account_new->unix_password != '') {
$password = $_SESSION['ldap']->decrypt(base64_decode($account_new->unix_password));
$iv = base64_decode($_COOKIE["IV"]);
$key = base64_decode($_COOKIE["Key"]);
$password = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($account_new->unix_password), MCRYPT_MODE_ECB, $iv);
$password = str_replace(chr(00), '', $password);
}
else $password='';
// Use dd-mm-yyyy format of date because it's easier to read for humans
@ -1126,7 +1132,7 @@ switch ($select_local) {
if ($_SESSION['ldap']->supports_unix_hosts) {
echo '<tr><td>';
echo _('Unix workstations');
echo '</td>'."\n".'<td><input name="f_unix_host" type="text" size="20" maxlength="200" value="' . $account_new->unix_host . '">'.
echo '</td>'."\n".'<td><input name="f_unix_host" type="text" size="20" maxlength="80" value="' . $account_new->unix_host . '">'.
'</td>'."\n".'<td>'.
'<a href="../help.php?HelpNumber=466" target="lamhelp">'._('Help').
"</a></td>\n</tr>\n";
@ -1139,7 +1145,10 @@ switch ($select_local) {
// Samba Settings
// decrypt password
if ($account_new->smb_password != '') {
$password = $_SESSION['ldap']->decrypt(base64_decode($account_new->smb_password));
$iv = base64_decode($_COOKIE["IV"]);
$key = base64_decode($_COOKIE["Key"]);
$password = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($account_new->smb_password), MCRYPT_MODE_ECB, $iv);
$password = str_replace(chr(00), '', $password);
}
else $password = "";
if ($config_intern->is_samba3()) $samba3domains = $ldap_intern->search_domains($config_intern->get_domainSuffix());
@ -1270,7 +1279,7 @@ switch ($select_local) {
'</td>'."\n".'<td>'.
'<a href="../help.php?HelpNumber=435" target="lamhelp">'._('Help').'</a>'.
'</td></tr>'."\n".'<tr><td>';
echo _('Logon script');
echo _('Script path');
echo '</td>'."\n".'<td><input name="f_smb_scriptpath" type="text" size="20" maxlength="80" value="' . $account_new->smb_scriptPath . '">'.
'</td>'."\n".'<td>'.
'<a href="../help.php?HelpNumber=434" target="lamhelp">'._('Help').'</a>'.
@ -1464,7 +1473,7 @@ switch ($select_local) {
echo "</fieldset></td></tr></table></td>\n<td valign=\"top\">";
echo "<table border=0 width=\"100%\"><tr><td><fieldset class=\"useredit-bright\"><legend class=\"useredit-bright\"><b>"._('Personal properties')."</b></legend>\n";
echo "<table border=0 width=\"100%\"><tr><td>";
echo _('Job title');
echo _('Title');
echo '</td>'."\n".'<td>'.
'<input name="f_personal_title" type="text" size="10" maxlength="10" value="' . $account_new->personal_title . '"> ';
echo $account_new->general_givenname . ' ' . $account_new->general_surname . '</td><td>'.
@ -1532,7 +1541,7 @@ switch ($select_local) {
echo "<input name=\"next_quota\" type=\"submit\""; if (!isset($config_intern->scriptPath)) echo " disabled ";
echo "value=\""; echo _('Quota'); echo "\">\n<br>";
echo "<input name=\"next_personal\" type=\"submit\" value=\""; echo _('Personal'); echo "\">\n<br>";
echo "<input name=\"next_final\" type=\"submit\" disabled value=\""; echo _('Final');
echo "<input name=\"next_final\" type=\"submit\" disabed value=\""; echo _('Final');
echo "\">";
if (isset($account_old)) {
echo "<br><br>";
@ -1545,39 +1554,41 @@ switch ($select_local) {
echo "<table border=0 width=\"100%\">\n<tr>\n<td>";
echo "<table border=0 width=\"100%\"><tr><td><fieldset class=\"useredit-dark\"><legend class=\"useredit-bright\"><b>";
echo _("Save profile");
echo "</b></legend>\n";
echo "</b></legend>\n<table border=0 width=\"100%\">\n<tr>\n<td>";
echo '<input name="f_finish_safeProfile" type="text" size="30" maxlength="50">';
echo "&nbsp;<input name=\"save\" type=\"submit\" $disabled value=\"";
echo "</td><td><input name=\"save\" type=\"submit\" $disabled value=\"";
echo _('Save profile');
echo '">&nbsp;<a href="../help.php?HelpNumber=457" target="lamhelp">'._('Help');
echo "</a>\n</fieldset>\n</td></tr>\n<tr><td>\n";
echo '"></td><td><a href="../help.php?HelpNumber=457" target="lamhelp">'._('Help');
echo "</a></td>\n</tr>\n</table>\n</fieldset>\n</td></tr>\n<tr><td>\n";
echo "<fieldset class=\"useredit-bright\"><legend class=\"useredit-bright\"><b>";
if ($account_old) echo _('Modify');
else echo _('Create');
echo "</b></legend>\n";
echo "<input name=\"create\" type=\"submit\" value=\"";
echo "<table border=0 width=\"100%\">";
echo "<tr><td><input name=\"create\" type=\"submit\" value=\"";
if ($account_old) echo _('Modify Account');
else echo _('Create Account');
echo '">'."\n";
echo "</fieldset>\n</td></tr></table></td></tr></table>\n</tr></table>";
echo "</td></tr></table></fieldset>\n</td></tr></table></td></tr></table>\n</tr></table>";
break;
case 'finish':
// Final Settings
echo '<input name="select" type="hidden" value="finish">';
echo "<fieldset class=\"groupedit-bright\"><legend class=\"useredit-bright\"><b>"._('Note')."</b></legend>\n";
if ($account_old) {
printf(_("User %s has been modified."), $account_new->general_username);
}
else {
printf(_("User %s has been created."), $account_new->general_username);
}
echo '<br><br>';
if (!$account_old) {
echo '<input name="createagain" type="submit" value="'; echo _('Create another user'); echo '">&nbsp;';
}
echo '<input name="outputpdf" type="submit" value="'; echo _('Create PDF file'); echo '">'.
'&nbsp;<input name="backmain" type="submit" value="'; echo _('Back to user list'); echo '">'.
'</fieldset'."\n";
echo "<table border=0 width=\"100%\"><tr><td>";
echo '<tr><td>';
echo _('User ');
echo $account_new->general_username;
if ($account_old) echo ' '._('has been modified').'.';
else echo ' '._('has been created').'.';
echo '</td></tr>'."\n".'<tr><td>';
if (!$account_old)
{ echo '<input name="createagain" type="submit" value="'; echo _('Create another user'); echo '">'; }
echo '</td>'."\n".'<td>'.
'<input name="outputpdf" type="submit" value="'; echo _('Create PDF file'); echo '">'.
'</td>'."\n".'<td>'.
'<input name="backmain" type="submit" value="'; echo _('Back to user list'); echo '">'.
'</td></tr></table></fieldset'."\n";
break;
}

View File

@ -58,11 +58,6 @@ unset($_SESSION['conf_samba3']);
unset($_SESSION['conf_pwdhash']);
unset($_SESSION['conf_filename']);
// remove config wizard settings
unset($_SESSION['confwiz_config']);
unset($_SESSION['confwiz_ldap']);
unset($_SESSION['confwiz_masterpwd']);
echo $_SESSION['header'];
?>
@ -81,28 +76,17 @@ echo $_SESSION['header'];
<hr><br><br>
<!-- form to change existing profiles -->
<form action="confmain.php" method="post">
<table align="center" border="2" rules="none" bgcolor="white">
<table border=0 align="center">
<tr>
<td style="border-style:none" rowspan="3" width="20"></td>
<td style="border-style:none" colspan="2" height="20"></td>
<td style="border-style:none" rowspan="3" width="20"></td>
<td colspan=4 align="center"><b> <?php echo _("Please enter password to change preferences:"); ?> </b></td>
</tr>
<tr>
<td style="border-style:none" colspan=2 align="center"><b> <?php echo _("Please enter password to change preferences:"); ?> </b></td>
</tr>
<tr><td style="border-style:none" colspan=2 >&nbsp;</td></tr>
<tr><td colspan=4 >&nbsp;</td></tr>
<?php
// print message if login was incorrect
if ($message) {
echo ("<tr><td style=\"border-style:none\" rowspan=\"2\"></td>" .
"<td style=\"border-style:none\" colspan=2 align=\"center\"><b><font color=red>" . $message . "</font></b></td>" .
"<td style=\"border-style:none\" rowspan=\"2\"></td></tr>");
echo "<tr><td style=\"border-style:none\" colspan=2 >&nbsp;</td></tr>";
}
if ($message) echo ("<tr><td colspan=4 align=\"center\"><font color=red>" . $message . "</font></td></tr>");
?>
<tr>
<td style="border-style:none" rowspan="4" width="20"></td>
<td style="border-style:none" colspan=2 align="center">
<td>
<select size=1 name="filename">
<?php
$files = getConfigProfiles();
@ -114,29 +98,25 @@ echo $_SESSION['header'];
}
?>
</select>
<input type="password" name="passwd">
<input type="submit" name="submit" value=" <?php echo _("Ok"); ?> ">
<a href="../help.php?HelpNumber=200" target="lamhelp"><?php echo _("Help") ?></a></td>
<td style="border-style:none" rowspan="4" width="20"></td>
</td>
<td align="center"><input type="password" name="passwd"></td>
<td>
<input type="submit" name="submit" value= <?php echo _("Ok"); ?>
</td>
<td><a href="../help.php?HelpNumber=200" target="lamhelp"><?php echo _("Help") ?></a></td>
</tr>
<tr>
<td style="border-style:none"colspan=2>&nbsp;</td>
<td colspan=3>&nbsp;</td>
</tr>
<tr>
<td style="border-style:none" align="left">
<td colspan=3 align="center">
<b><a href="profmanage.php"><?php echo _("Manage profiles") ?></a></b>
</td>
<td style="border-style:none" align="right">
<b><a href="../confwiz/start.php"><?php echo _("Configuration wizard") ?></a></b>
</td>
</tr>
<tr>
<td style="border-style:none" colspan=2 height="20"></td>
</tr>
</table>
</form>
<p><br><br><br><br><br></p>
<p><br><br><br><br><br><br><br></p>
<!-- back to login page -->
<p>

View File

@ -307,14 +307,14 @@ echo ("<p></p>\n");
echo ("<fieldset><legend><b>" . _("Script settings") . "</b></legend>\n");
echo ("<table border=0>\n");
echo ("<tr><td align=\"right\"><b>".
_("Server of external script") . ": </b></td>".
"<td><input size=50 type=\"text\" name=\"scriptserver\" value=\"" . $conf->get_scriptServer() . "\"></td>\n");
echo ("<td><a href=\"../help.php?HelpNumber=211\" target=\"lamhelp\">" . _("Help") . "</a></td></tr>\n");
echo ("<tr><td align=\"right\"><b>".
_("Path to external script") . ": </b></td>".
"<td><input size=50 type=\"text\" name=\"scriptpath\" value=\"" . $conf->get_scriptPath() . "\"></td>\n");
echo ("<td><a href=\"../help.php?HelpNumber=210\" target=\"lamhelp\">" . _("Help") . "</a></td></tr>\n");
echo ("<tr><td align=\"right\"><b>".
_("Server of external script") . ": </b></td>".
"<td><input size=50 type=\"text\" name=\"scriptserver\" value=\"" . $conf->get_scriptServer() . "\"></td>\n");
echo ("<td><a href=\"../help.php?HelpNumber=211\" target=\"lamhelp\">" . _("Help") . "</a></td></tr>\n");
echo ("</table>\n");
echo ("</fieldset>\n");
@ -341,20 +341,22 @@ echo ("<table border=0>\n");
// admin list
echo ("<tr><td align=\"right\"><b>".
_("List of valid users") . " *: </b></td>".
"<td><input size=50 type=\"text\" name=\"admins\" value=\"" . $conf->get_Adminstring() . "\"></td>\n");
"<td colspan=2><input size=50 type=\"text\" name=\"admins\" value=\"" . $conf->get_Adminstring() . "\"></td>\n");
echo ("<td><a href=\"../help.php?HelpNumber=207\" target=\"lamhelp\">" . _("Help") . "</a></td></tr>\n");
echo ("</table>\n");
echo ("<tr><td colspan=3>&nbsp;</td></tr>\n");
echo ("<p></p>\n");
echo ("<table border=0>\n");
// new password
echo ("<tr><td align=\"right\"><font color=\"red\"><b>".
_("New Password") . ": </b></font></td>".
"<td align=\"left\"><input type=\"password\" name=\"passwd1\"></td>\n");
echo ("<tr><td bgcolor=\"red\" align=\"right\"><b>".
_("New Password") . ": </b></td>".
"<td bgcolor=\"red\" align=\"left\"><input type=\"password\" name=\"passwd1\"></td>\n");
echo ("<td rowspan=2><a href=\"../help.php?HelpNumber=212\" target=\"lamhelp\">" . _("Help") . "</a></td></tr>\n");
// reenter password
echo ("<tr><td align=\"right\"><font color=\"red\"><b>".
_("Reenter Password") . ": </b></font></td>".
"<td align=\"left\"><input type=\"password\" name=\"passwd2\"></td></tr>\n");
echo ("<tr><td bgcolor=\"red\" align=\"right\"><b>".
_("Reenter Password") . ": </b></td>".
"<td bgcolor=\"red\" align=\"left\"><input type=\"password\" name=\"passwd2\"></td></tr>\n");
echo ("</table>\n");
echo ("</fieldset>\n");
echo ("<p></p>\n");

View File

@ -71,21 +71,13 @@ if ($passwd != $conf->get_Passwd()) {
echo $_SESSION['header'];
echo "<title>" . _("LDAP Account Manager Configuration") . "</title>\n";
echo "<title>listusers</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "</head><body>\n";
echo ("<p align=\"center\"><a href=\"http://lam.sf.net\" target=\"new_window\">".
"<img src=\"../../graphics/banner.jpg\" border=1 alt=\"LDAP Account Manager\"></a></p><hr><br><br>");
// remove double slashes if magic quotes are on
if (get_magic_quotes_gpc() == 1) {
$suffusers = stripslashes($suffusers);
$suffgroups = stripslashes($suffgroups);
$suffhosts = stripslashes($suffhosts);
$suffdomains = stripslashes($suffdomains);
}
// check new preferences
if (!$conf->set_samba3($samba3)) {
echo ("<font color=\"red\"><b>" . _("Samba version is not defined!") . "</b></font>");
@ -186,7 +178,7 @@ if (!$conf->set_defaultLanguage($lang)) {
}
if (!$conf->set_scriptpath($scriptpath)) {
echo ("<font color=\"red\"><b>" . _("Logon script is invalid!") . "</b></font>");
echo ("<font color=\"red\"><b>" . _("Script path is invalid!") . "</b></font>");
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
exit;
}

View File

@ -1,65 +0,0 @@
<?php
/*
$Id$
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
Copyright (C) 2003 Roland Gruber
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 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Configuration wizard - shows saved settings
*/
include_once('../../lib/config.inc');
include_once('../../lib/ldap.inc');
include_once('../../lib/status.inc');
// start session
session_save_path("../../sess");
@session_start();
setlanguage();
// check master password
$cfg = new CfgMain();
if ($cfg->password != $_SESSION['confwiz_masterpwd']) {
require("../config/conflogin.php");
exit;
}
echo $_SESSION['header'];
echo "<title>" . _("Configuration wizard") . "</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "</head><body>\n";
echo ("<p align=\"center\"><a href=\"http://lam.sf.net\" target=\"new_window\">".
"<img src=\"../../graphics/banner.jpg\" border=1 alt=\"LDAP Account Manager\"></a></p><hr><br><br>\n");
echo ("<b>" . _("The following settings were saved to profile:") . " </b>" . $_SESSION['confwiz_config']->file . "<br><br>");
$_SESSION['confwiz_config']->printconf();
echo ("<br><br><br><br><br><a href=\"../login.php\" target=\"_top\">" . _("Back to Login") . "</a>");
echo("</body></html>");
// remove config wizard settings
unset($_SESSION['confwiz_config']);
unset($_SESSION['confwiz_ldap']);
unset($_SESSION['confwiz_masterpwd']);
?>

View File

@ -1,580 +0,0 @@
<?php
/*
$Id$
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
Copyright (C) 2003 Roland Gruber
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 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Configuration wizard - server settings second part
*/
include_once('../../lib/config.inc');
include_once('../../lib/ldap.inc');
include_once('../../lib/status.inc');
// start session
session_save_path("../../sess");
@session_start();
setlanguage();
// check master password
$cfg = new CfgMain();
if ($cfg->password != $_SESSION['confwiz_masterpwd']) {
require("../config/conflogin.php");
exit;
}
// check if user clicked cancel button
if ($_POST['cancel']) {
@unlink("../../config/" . $_SESSION['confwiz_config']->file . ".conf");
metarefresh('../config/conflogin.php');
}
// check if all suffixes exist
$conf = $_SESSION['confwiz_config'];
$new_suffs = array();
if ($conf->get_UserSuffix() && ($conf->get_UserSuffix() != "")) {
$info = @ldap_search($_SESSION['confwiz_ldap']->server, $conf->get_UserSuffix(), "", array());
$res = @ldap_get_entries($_SESSION['confwiz_ldap']->server, $info);
if (!$res && !in_array($conf->get_UserSuffix(), $new_suffs)) $new_suffs[] = $conf->get_UserSuffix();
}
if ($conf->get_GroupSuffix() && ($conf->get_GroupSuffix() != "")) {
$info = @ldap_search($_SESSION['confwiz_ldap']->server, $conf->get_GroupSuffix(), "", array());
$res = @ldap_get_entries($_SESSION['confwiz_ldap']->server, $info);
if (!$res && !in_array($conf->get_GroupSuffix(), $new_suffs)) $new_suffs[] = $conf->get_GroupSuffix();
}
if ($conf->get_HostSuffix() && ($conf->get_HostSuffix() != "")) {
$info = @ldap_search($_SESSION['confwiz_ldap']->server, $conf->get_HostSuffix(), "", array());
$res = @ldap_get_entries($_SESSION['confwiz_ldap']->server, $info);
if (!$res && !in_array($conf->get_HostSuffix(), $new_suffs)) $new_suffs[] = $conf->get_HostSuffix();
}
if ($conf->is_samba3() && $conf->get_DomainSuffix() && ($conf->get_DomainSuffix() != "")) {
$info = @ldap_search($_SESSION['confwiz_ldap']->server, $conf->get_DomainSuffix(), "", array());
$res = @ldap_get_entries($_SESSION['confwiz_ldap']->server, $info);
if (!$res && !in_array($conf->get_DomainSuffix(), $new_suffs)) $new_suffs[] = $conf->get_DomainSuffix();
}
if (sizeof($new_suffs) > 0) {
// check if user wanted to create suffixes
if ($_POST['createsuff']) {
$fail = array();
$errors = array();
// add entries
for ($i = 0; $i < sizeof($new_suffs); $i++) {
// check if entry is already present
$info = @ldap_search($_SESSION['confwiz_ldap']->server, $new_suffs[$i], "", array());
$res = @ldap_get_entries($_SESSION['confwiz_ldap']->server, $info);
if ($res) continue;
$suff = $new_suffs[$i];
// generate DN and attributes
$tmp = explode(",", $suff);
$name = explode("=", $tmp[0]);
array_shift($tmp);
$end = implode(",", $tmp);
if ($name[0] != "ou") { // add root entry
$attr = array();
$attr[$name[0]] = $name[1];
$attr['objectClass'] = 'organization';
$dn = $suff;
if (!@ldap_add($_SESSION['confwiz_ldap']->server(), $dn, $attr)) {
$fail[] = $suff;
continue;
}
}
else { // add organizational unit
$name = $name[1];
$attr = array();
$attr['objectClass'] = "organizationalunit";
$attr['ou'] = $name;
$dn = $suff;
if (!@ldap_add($_SESSION['confwiz_ldap']->server(), $dn, $attr)) {
// check if we have to add parent entries
if (ldap_errno($_SESSION['confwiz_ldap']->server()) == 32) {
$temp = explode(",", $suff);
$subsuffs = array();
// make list of subsuffixes
for ($k = 0; $k < sizeof($temp); $k++) {
$part = explode("=", $temp[$k]);
if ($part[0] == "ou") $subsuffs[] = implode(",", array_slice($temp, $k));
else {
$subsuffs[] = implode(",", array_slice($temp, $k));
break;
}
}
// create missing entries
for ($k = sizeof($subsuffs) - 1; $k >= 0; $k--) {
// check if subsuffix is present
$info = @ldap_search($_SESSION['confwiz_ldap']->server, $subsuffs[$k], "", array());
$res = @ldap_get_entries($_SESSION['confwiz_ldap']->server, $info);
if (!$res) {
$suffarray = explode(",", $subsuffs[$k]);
$headarray = explode("=", $suffarray[0]);
if ($headarray[0] == "ou") { // add ou entry
$attr = array();
$attr['objectClass'] = 'organizationalunit';
$attr['ou'] = $headarray[1];
$dn = $subsuffs[$k];
if (!@ldap_add($_SESSION['confwiz_ldap']->server(), $dn, $attr)) {
$fail[] = $suff;
$error[] = ldap_error($_SESSION['confwiz_ldap']->server());
break;
}
}
else { // add root entry
$attr = array();
$attr['objectClass'][] = 'organization';
$attr[$headarray[0]] = $headarray[1];
if ($headarray[0] == "dc") {
$attr['o'] = $headarray[1];
$attr['objectClass'][] = 'dcObject';
}
$dn = $subsuffs[$k];
if (!@ldap_add($_SESSION['confwiz_ldap']->server(), $dn, $attr)) {
$fail[] = $suff;
$error[] = ldap_error($_SESSION['confwiz_ldap']->server());
break;
}
}
}
}
}
else {
$fail[] = $suff;
$error[] = ldap_error($_SESSION['confwiz_ldap']->server());
}
}
}
}
// show errors
if (sizeof($fail) > 0) {
echo $_SESSION['header'];
echo "<title>";
echo _("Configuration wizard");
echo "</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "</head><body>\n";
echo "<p align=\"center\"><a href=\"http://lam.sf.net\" target=\"_blank\">\n";
echo "<img src=\"../../graphics/banner.jpg\" border=1 alt=\"LDAP Account Manager\"></a>\n";
echo "</p>\n";
echo "<hr>\n";
echo "<p>&nbsp;</p>\n";
// print failed suffixes
for ($i = 0; $i < sizeof($fail); $i++) {
StatusMessage("ERROR", _("Failed to create entry!") . "<br>" . $error[$i], $fail[$i]);
}
echo "<p>&nbsp;</p>\n";
echo "<p><br><br><a href=\"server2.php\">" . _("Back to server settings") . "</a></p>\n";
echo "</body></html>\n";
exit;
}
}
// show needed suffixes
else {
echo $_SESSION['header'];
echo "<title>";
echo _("Configuration wizard");
echo "</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "</head><body>\n";
echo "<p align=\"center\"><a href=\"http://lam.sf.net\" target=\"_blank\">\n";
echo "<img src=\"../../graphics/banner.jpg\" border=1 alt=\"LDAP Account Manager\"></a>\n";
echo "</p>\n";
echo "<hr>\n";
echo "<p>&nbsp;</p>\n";
echo "<p><font color=\"red\"><b>" . _("The following suffix(es) are missing in LDAP. LAM will create them for you.") . "</b></font></p>\n";
echo "<p>&nbsp;</p>\n";
// print missing suffixes
for ($i = 0; $i < sizeof($new_suffs); $i++) {
echo "<p><b>" . $new_suffs[$i] . "</b></p>\n";
}
echo "<p>&nbsp;</p>\n";
echo "<form action=\"ldaptest.php\" method=\"post\">\n";
echo "<input type=\"submit\" name=\"createsuff\" value=\"" . _("Create") . "\">";
echo "<input type=\"submit\" name=\"cancel\" value=\"" . _("Cancel") . "\">";
echo "</form>\n";
echo "</body></html>\n";
exit;
}
}
// check if domain object is present
if ($_SESSION['confwiz_config']->is_samba3()) {
// get list of domains
$domlist = $_SESSION['confwiz_ldap']->search_domains($_SESSION['confwiz_config']->get_domainSuffix());
if (sizeof($domlist) < 1) {
if ($_POST['createdom']) {
// check input
$suffix = $_SESSION['confwiz_config']->get_DomainSuffix();
$server = $_SESSION['confwiz_ldap']->server;
$filter = "(|(sambasid=" . $_POST['dom_SID'] . ")(sambadomainname=" . $_POST['dom_name'] . "))";
$sr = @ldap_search($server, $suffix, $filter, array());
$info = @ldap_get_entries($_SESSION["confwiz_ldap"]->server, $sr);
$errors = array();
// check for existing domains
if ($info["count"] > 0) {
$errors[] = _("This Samba 3 domain is already present!");
}
// check domain name
if (!eregi("^[a-z0-9_\\-]+$", $_POST['dom_name'])) {
$errors[] = _("Domain name is invalid!");
}
// check SID
if (!eregi("^S-[0-9]-[0-9]-[0-9]{2,2}-[0-9]*-[0-9]*-[0-9]*$", $_POST['dom_SID'])) {
$errors[] = _("Samba 3 domain SID is invalid!");
}
// check numbers
if ($_POST['dom_nextRID'] && !is_numeric($_POST['dom_nextRID'])) {
$errors[] = _("Next RID is not a number!");
}
if ($_POST['dom_nextUserRID'] && !is_numeric($_POST['dom_nextUserRID'])) {
$errors[] = _("Next user RID is not a number!");
}
if ($_POST['dom_nextGroupRID'] && !is_numeric($_POST['dom_nextGroupRID'])) {
$errors[] = _("Next group RID is not a number!");
}
if (!is_numeric($_POST['dom_RIDbase'])) {
$errors[] = _("Algorithmic RID base is not a number!");
}
// try to create domain if no error occured
if (sizeof($errors) < 1) {
$DN = "sambaDomainName" . "=" . $_POST['dom_name'] . "," . $_POST['dom_suffix'];
$attr = array();
$attr['objectclass'] = "sambaDomain";
$attr['sambaDomainName'] = $_POST['dom_name'];
$attr['sambaSID'] = $_POST['dom_SID'];
if ($_POST['dom_nextRID']) $attr['sambaNextRid'] = $_POST['dom_nextRID'];
if ($_POST['dom_nextGroupRID']) $attr['sambaNextGroupRid'] = $_POST['dom_nextGroupRID'];
if ($_POST['dom_nextUserRID']) $attr['sambaNextUserRid'] = $_POST['dom_nextUserRID'];
$attr['sambaAlgorithmicRidBase'] = $_POST['dom_RIDbase'];
// write to LDAP
if (! @ldap_add($_SESSION['confwiz_ldap']->server(), $DN, $attr)) {
$errors[] = _("Failed to add domain!") . "\n<br>" . ldap_error($_SESSION['confwiz_ldap']->server());
}
else {
// remember domain SID
$_SESSION["confwiz_domainsid"] = $_POST['dom_SID'];
}
}
// show error messages
if (sizeof($errors) > 1) {
echo $_SESSION['header'];
echo "<title>";
echo _("Configuration wizard");
echo "</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "</head><body>\n";
echo "<p align=\"center\"><a href=\"http://lam.sf.net\" target=\"_blank\">\n";
echo "<img src=\"../../graphics/banner.jpg\" border=1 alt=\"LDAP Account Manager\"></a>\n";
echo "</p>\n";
echo "<hr>\n";
echo "<p>&nbsp;</p>\n";
// print errors
for ($i = 0; $i < sizeof($errors); $i++) {
StatusMessage("ERROR", $errors[$i], "");
}
echo "<p>&nbsp;</p>\n";
echo "<p><br><br><a href=\"server2.php\">" . _("Back to server settings") . "</a></p>\n";
echo "</body></html>\n";
exit;
}
}
else {
// get possible suffixes
$domsuff = $_SESSION['confwiz_ldap']->search_units($_SESSION['confwiz_config']->get_domainSuffix());
echo $_SESSION['header'];
echo "<title>";
echo _("Configuration wizard");
echo "</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "</head><body>\n";
echo "<p align=\"center\"><a href=\"http://lam.sf.net\" target=\"_blank\">\n";
echo "<img src=\"../../graphics/banner.jpg\" border=1 alt=\"LDAP Account Manager\"></a>\n";
echo "</p>\n";
echo "<hr>\n";
echo "<p>&nbsp;</p>\n";
echo "<p>". _("No domains found, please create one.") . "</p>\n";
echo "<p>&nbsp;</p>\n";
echo "<form action=\"ldaptest.php\" method=\"post\">\n";
echo "<fieldset class=\"domedit\">\n";
echo "<legend class=\"domedit\"><b>" . _("Domain Settings") . "</b></legend>\n";
echo "<table border=0>\n";
// domain name
echo "<tr>\n";
echo "<td>\n";
echo "<b>" . _("Domain name") . ":</b>\n";
echo "</td>\n";
echo "<td>\n";
echo "<input type=\"text\" name=\"dom_name\">\n";
echo "</td>\n";
echo ("<td><a href=\"../help.php?HelpNumber=651\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
echo "</tr>\n";
echo "<tr>\n";
echo "<td>&nbsp;</td><td>&nbsp;</td>\n";
echo "</tr>\n";
// domain SID
echo "<tr>\n";
echo "<td>\n";
echo "<b>" . _("Domain SID") . ": </b>\n";
echo "</td>\n";
echo "<td>\n";
echo "<input type=\"text\" size=\"50\" name=\"dom_SID\">\n";
echo "</td>\n";
echo ("<td><a href=\"../help.php?HelpNumber=653\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
echo "</tr>\n";
echo "<tr>\n";
echo "<td>&nbsp;</td><td>&nbsp;</td>\n";
echo "</tr>\n";
// next RID
echo "<tr>\n";
echo "<td><b>" . _("Next RID") . " " . _("(optional)") . ": </b></td>\n";
echo "<td>\n";
echo "<input type=\"text\" name=\"dom_nextRID\">\n";
echo "</td>\n";
echo ("<td><a href=\"../help.php?HelpNumber=654\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
echo "</tr>\n";
// next user RID
echo "<tr>\n";
echo "<td><b>" . _("Next User RID") . " " . _("(optional)") . ": </b></td>\n";
echo "<td>\n";
echo "<input type=\"text\" name=\"dom_nextUserRID\">\n";
echo "</td>\n";
echo ("<td><a href=\"../help.php?HelpNumber=655\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
echo "</tr>\n";
// next group RID
echo "<tr>\n";
echo "<td><b>" . _("Next Group RID") . " " . _("(optional)") . ": </b></td>\n";
echo "<td>\n";
echo "<input type=\"text\" name=\"dom_nextGroupRID\">\n";
echo "</td>\n";
echo ("<td><a href=\"../help.php?HelpNumber=656\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
echo "</tr>\n";
echo "<tr>\n";
echo "<td>&nbsp;</td><td>&nbsp;</td>\n";
echo "</tr>\n";
// algorithmic RID base
echo "<tr>\n";
echo "<td><b>" . _("Algorithmic RID Base") . ": </b></td>\n";
echo "<td>\n";
echo "<input type=\"text\" name=\"dom_RIDbase\" value=\"1000\">\n";
echo "</td>\n";
echo ("<td><a href=\"../help.php?HelpNumber=657\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
echo "</tr>\n";
echo "<tr>\n";
echo "<td>&nbsp;</td><td>&nbsp;</td>\n";
echo "</tr>\n";
// domain suffix
echo "<tr>\n";
echo "<td>\n";
echo "<b>" . _("Suffix") . ": </b>\n";
echo "</td>\n";
echo "<td>\n";
echo "<select name=\"dom_suffix\">\n";
for ($i = 0; $i < sizeof($domsuff); $i++) {
echo "<option>" . $domsuff[$i] . "</option>\n";
}
echo "</select>";
echo "</td>\n";
echo ("<td><a href=\"../help.php?HelpNumber=652\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
echo "</tr>\n";
echo "<tr>\n";
echo "<td>&nbsp;</td><td>&nbsp;</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</fieldset>\n";
echo "<p>&nbsp;</p>\n";
echo "<input type=\"submit\" name=\"createdom\" value=\"" . _("Create") . "\">";
echo "<input type=\"submit\" name=\"cancel\" value=\"" . _("Cancel") . "\">";
echo "</form>\n";
echo "</body></html>\n";
exit;
}
}
else {
// remember domain SID
$_SESSION["confwiz_domainsid"] = $domlist[0]->SID;
}
}
// check if essential default Samba groups are present
if ($_SESSION['confwiz_config']->is_samba3() && !$_POST['creategroups'] && !$_POST['ignoregroups']) {
$d512 = $d513 = $d514 = false;
$suffix = $_SESSION['confwiz_config']->get_groupSuffix();
$domSID = $_SESSION['confwiz_domainsid'];
$filter = "(objectclass=sambagroupmapping)";
$server = $_SESSION['confwiz_ldap']->server;
$sr = @ldap_search($server, $suffix, $filter, array("sambaSID"));
if ($sr) {
$info = @ldap_get_entries($_SESSION["confwiz_ldap"]->server, $sr);
if ($info) {
// check SIDs
array_shift($info);
for ($i = 0; $i < sizeof($info); $i++) {
if ($info[$i]['sambasid']['0'] == $domSID . "-512") {
$d512 = true;
}
elseif ($info[$i]['sambasid']['0'] == $domSID . "-513") {
$d513 = true;
}
elseif ($info[$i]['sambasid']['0'] == $domSID . "-514") {
$d514 = true;
}
}
}
}
// make a list of missing groups
$missing_groups = array();
if (!$d512) {
$temp = array();
$temp['sambasid'] = $domSID . "-512";
$temp['displayname'] = "Domain Admins";
$temp['cn'] = "domainadmins";
$missing_groups[] = $temp;
}
if (!$d513) {
$temp = array();
$temp['sambasid'] = $domSID . "-513";
$temp['displayname'] = "Domain Users";
$temp['cn'] = "domainusers";
$missing_groups[] = $temp;
}
if (!$d514) {
$temp = array();
$temp['sambasid'] = $domSID . "-514";
$temp['displayname'] = "Domain Guests";
$temp['cn'] = "domainguests";
$missing_groups[] = $temp;
}
$_SESSION['conwiz_missing_groups'] = $missing_groups;
if (sizeof($missing_groups) > 0) {
// show user a list of missing groups
echo $_SESSION['header'];
echo "<title>";
echo _("Configuration wizard");
echo "</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "</head><body>\n";
echo "<p align=\"center\"><a href=\"http://lam.sf.net\" target=\"_blank\">\n";
echo "<img src=\"../../graphics/banner.jpg\" border=1 alt=\"LDAP Account Manager\"></a>\n";
echo "</p>\n";
echo "<hr>\n";
echo "<p>&nbsp;</p>\n";
echo "<p>" . _("LAM detected that one or more essential Samba groups are missing. They are listed below.") .
" " . _("LAM can create them for you or you have to create them manually later.") . "</p>\n";
echo "<p>&nbsp;</p>\n";
for ($i = 0; $i < sizeof($missing_groups); $i++) {
echo "<p><b>" . _("Windows group name") . ": </b>" . $missing_groups[$i]['displayname'] . "<p>\n";
echo "<p><b>" . _("Unix group name") . ": </b>" . $missing_groups[$i]['cn'] . "<p>\n";
echo "<p><b>" . _("Group SID") . ": </b>" . $missing_groups[$i]['sambasid'] . "<p>\n";
echo "<p>&nbsp;</p>\n";
echo "<p>&nbsp;</p>\n";
}
echo "<form action=\"ldaptest.php\" method=\"post\">\n";
echo "<input type=\"submit\" name=\"creategroups\" value=\"" . _("Create") . "\">";
echo "<input type=\"submit\" name=\"ignoregroups\" value=\"" . _("Ignore") . "\">";
echo "<input type=\"submit\" name=\"cancel\" value=\"" . _("Cancel") . "\">";
echo "</form>\n";
echo "</body></html>\n";
exit;
}
}
// create needed Samab groups
if ($_SESSION['confwiz_config']->is_samba3() && $_POST['creategroups']) {
$suffix = $_SESSION['confwiz_config']->get_groupSuffix();
$domSID = $_SESSION['confwiz_domainsid'];
$filter = "(objectclass=posixgroup)";
$server = $_SESSION['confwiz_ldap']->server;
$sr = @ldap_search($server, $suffix, $filter, array("gidnumber"));
if ($sr) {
$info = @ldap_get_entries($_SESSION["confwiz_ldap"]->server, $sr);
if ($info) {
array_shift($info);
// create list of GID numbers
$gid_numbers = array();
for ($i = 0; $i < sizeof($info); $i++) {
// ignore GIDs that are out of range
if ($info[$i]['gidnumber'][0] <= $_SESSION['confwiz_config']->get_maxGID()) {
if ($info[$i]['gidnumber'][0] >= $_SESSION['confwiz_config']->get_minGID()) {
$gid_numbers[] = $info[$i]['gidnumber'][0];
}
}
}
// if no GIDs are used add (minGID -1)
if (sizeof($gid_numbers) < 1) $gid_numbers[] = $_SESSION['confwiz_config']->get_minGID() - 1;
sort($gid_numbers);
$missing_groups = $_SESSION['conwiz_missing_groups'];
$errors = array();
// check if free GID numbers exist
if ($gid_numbers[sizeof($gid_numbers) - 1] < $_SESSION['confwiz_config']->get_maxGID() - 3) {
$gidnumber = $gid_numbers[sizeof($gid_numbers) - 1];
for ($i = 0; $i < sizeof($missing_groups); $i++) {
$gidnumber++;
$attributes = array();
$attributes['objectclass'][] = 'posixGroup';
$attributes['objectclass'][] = 'sambaGroupMapping';
$attributes['sambaGroupType'] = 2;
$attributes['gidnumber'] = $gidnumber;
$attributes['sambaSID'] = $missing_groups[$i]['sambasid'];
$attributes['description'] = $missing_groups[$i]['displayname'];
$attributes['displayname'] = $missing_groups[$i]['displayname'];
$attributes['cn'] = $missing_groups[$i]['cn'];
$dn = 'cn=' . $attributes['cn'] . ',' . $_SESSION['confwiz_config']->get_groupSuffix();
if (!ldap_add($_SESSION['confwiz_ldap']->server(), $dn, $attributes)) {
$errors[] = 'Unable to create group:' . " " . $missing_groups[$i]['cn'];
}
}
}
// not enough free GIDs
else {
$errors[] = 'There are not enough free GID numbers in the GID range!';
}
if (sizeof($errors) < 1) {
metarefresh('final.php');
}
else {
echo $_SESSION['header'];
echo "<title>";
echo _("Configuration wizard");
echo "</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "</head><body>\n";
echo "<p align=\"center\"><a href=\"http://lam.sf.net\" target=\"_blank\">\n";
echo "<img src=\"../../graphics/banner.jpg\" border=1 alt=\"LDAP Account Manager\"></a>\n";
echo "</p>\n";
echo "<hr>\n";
echo "<p>&nbsp;</p>\n";
// print errors
for ($i = 0; $i < sizeof($errors); $i++) {
StatusMessage("ERROR", $errors[$i], '');
}
echo "<p>&nbsp;</p>\n";
echo "<p><br><br><a href=\"server2.php\">" . _("Back to server settings") . "</a></p>\n";
echo "</body></html>\n";
exit;
}
}
}
exit;
}
// if nothing is missing go to last page
metarefresh('final.php');
?>

View File

@ -1,156 +0,0 @@
<?php
/*
$Id$
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
Copyright (C) 2003 Roland Gruber
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 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Configuration wizard - lamdaemon and PDF text
*/
include_once('../../lib/config.inc');
include_once('../../lib/ldap.inc');
include_once('../../lib/status.inc');
// start session
session_save_path("../../sess");
@session_start();
setlanguage();
// check master password
$cfg = new CfgMain();
if ($cfg->password != $_SESSION['confwiz_masterpwd']) {
require("../config/conflogin.php");
exit;
}
// check if user clicked on cancel button
if ($_POST['cancel']) {
@unlink("../../config/" . $_SESSION['confwiz_config']->file . ".conf");
metarefresh('../config/conflogin.php');
exit;
}
// check if user clicked on next button
if ($_POST['submit']) {
$errors = array();
if (!$_SESSION['confwiz_config']->set_scriptpath($_POST['scriptpath'])) {
$errors[] = _("Script path is invalid!");
}
if (!$_SESSION['confwiz_config']->set_scriptserver($_POST['scriptserver'])) {
$errors[] = _("Script server is invalid!");
}
if (!$_SESSION['confwiz_config']->set_pdftext($_POST['pdf_usertext'])) {
$errors[] = _("Saving PDF text failed!");
}
// if no errors save and go back to optional.php
if (sizeof($errors) < 1) {
$_SESSION['confwiz_config']->save();
$_SESSION['confwiz_optional']['daemon'] = 'done';
metarefresh('optional.php');
}
else {
// errors occured
echo $_SESSION['header'];
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "<title>\n";
echo _("Configuration wizard");
echo "</title>\n";
echo "</head><body>\n";
for ($i = 0; $i < sizeof($errors); $i++) {
StatusMessage("ERROR", $errors[$i], "");
}
echo "<p><br><br><a href=\"o_daemon.php\">" . _("Back to lamdaemon and PDF settings") . "</a></p>\n";
echo "</body></html>\n";
exit;
}
}
echo $_SESSION['header'];
echo "<title>\n";
echo _("Configuration wizard");
echo "</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "</head>\n";
echo "<body>\n";
echo "<p align=\"center\"><a href=\"http://lam.sf.net\" target=\"_blank\">\n";
echo "<img src=\"../../graphics/banner.jpg\" border=1 alt=\"LDAP Account Manager\"></a>\n";
echo "</p>\n";
echo "<hr>\n";
// formular
echo "<form action=\"o_daemon.php\" method=\"post\">\n";
echo "<p>&nbsp;</p>\n";
// lamdaemon
echo "<p><b>Lamdaemon.pl:</b></p>\n";
echo "<p>" . _("If you want to manage quotas and homedirectories with LAM you need to setup lamdaemon.pl.") .
"<br>" .
_("This is the server and path where the lamdaemon.pl script is stored. LDAP Account Manager will make a SSH connection to this server with username and password provided at login.") .
"<br><br><font color=red>" . _("Use it at your own risk and read the documentation for lamdaemon before you use it!") . "</font><br><br></p>\n";
echo ("<table border=0>");
echo ("<tr><td align=\"right\"><b>".
_("Server of external script") . ": </b></td>".
"<td><input size=50 type=\"text\" name=\"scriptserver\" value=\"" . $_SESSION['confwiz_config']->get_scriptServer() . "\"></td>\n");
echo ("</tr>\n");
echo ("<tr><td align=\"right\"><b>".
_("Path to external script") . ": </b></td>".
"<td><input size=50 type=\"text\" name=\"scriptpath\" value=\"" . $_SESSION['confwiz_config']->get_scriptPath() . "\"></td>\n");
echo ("</tr>\n");
echo "</table>\n";
echo "<p><br></p>\n";
// PDF text
echo "<p><b>" . _("PDF text") . ":</b></p>\n";
echo "<p>" . _("This text will appear on top of every user PDF file.") . "</p>\n";
echo ("<table border=0>");
echo "<tr>";
echo "<td><textarea name=\"pdf_usertext\" cols=\"80\" rows=\"5\">" . $_SESSION['confwiz_config']->get_pdftext() . "</textarea></td>\n";
echo ("</tr>\n");
echo "</table>\n";
echo "<p><br></p>\n";
// next/cancel button
echo "<p>\n";
echo "<input type=\"submit\" name=\"submit\" value=\"" . _("Next") . "\">\n";
echo "<input type=\"submit\" name=\"cancel\" value=\"" . _("Cancel") . "\">\n";
echo "</p>\n";
echo "</form>\n";
echo "</body>\n</html>\n";
?>

View File

@ -1,176 +0,0 @@
<?php
/*
$Id$
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
Copyright (C) 2003 Roland Gruber
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 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Configuration wizard - language and admins
*/
include_once('../../lib/config.inc');
include_once('../../lib/ldap.inc');
include_once('../../lib/status.inc');
// start session
session_save_path("../../sess");
@session_start();
setlanguage();
// check master password
$cfg = new CfgMain();
if ($cfg->password != $_SESSION['confwiz_masterpwd']) {
require("../config/conflogin.php");
exit;
}
// check if user clicked on cancel button
if ($_POST['cancel']) {
@unlink("../../config/" . $_SESSION['confwiz_config']->file . ".conf");
metarefresh('../config/conflogin.php');
exit;
}
// check if user clicked on next button
if ($_POST['submit']) {
$errors = array();
if (!$_SESSION['confwiz_config']->set_defaultLanguage($_POST['lang'])) {
$errors[] = _("Language is not defined!");
}
if (!$_SESSION['confwiz_config']->set_Adminstring($_POST['admins'])) {
$errors[] = _("List of admin users is empty or invalid!");
}
// if no errors save and go back to optional.php
if (sizeof($errors) < 1) {
$_SESSION['confwiz_config']->save();
$_SESSION['confwiz_optional']['lang'] = 'done';
metarefresh('optional.php');
}
else {
// errors occured
echo $_SESSION['header'];
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "<title>\n";
echo _("Configuration wizard");
echo "</title>\n";
echo "</head><body>\n";
for ($i = 0; $i < sizeof($errors); $i++) {
StatusMessage("ERROR", $errors[$i], "");
}
echo "<p><br><br><a href=\"o_lang.php\">" . _("Back to language and admin settings.") . "</a></p>\n";
echo "</body></html>\n";
exit;
}
}
echo $_SESSION['header'];
echo "<title>\n";
echo _("Configuration wizard");
echo "</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "</head>\n";
echo "<body>\n";
echo "<p align=\"center\"><a href=\"http://lam.sf.net\" target=\"_blank\">\n";
echo "<img src=\"../../graphics/banner.jpg\" border=1 alt=\"LDAP Account Manager\"></a>\n";
echo "</p>\n";
echo "<hr>\n";
// formular
echo "<form action=\"o_lang.php\" method=\"post\">\n";
echo "<p>&nbsp;</p>\n";
// language
echo "<p><b>" . _("Please select your prefered language.") . "</b></p>\n";
echo "<p>" . _("This defines the language of the login window and sets this language as the default language. Users can change the language at login.") .
"<br><br></p>\n";
echo ("<table border=0>");
echo ("<tr>");
echo ("<td><b>" . _("Default language") . ":</b></td><td>\n");
// read available languages
$languagefile = "../../config/language";
if(is_file($languagefile))
{
$file = fopen($languagefile, "r");
$i = 0;
while(!feof($file))
{
$line = fgets($file, 1024);
if($line == "\n" || $line[0] == "#" || $line == "") continue; // ignore comment and empty lines
$languages[$i] = chop($line);
$i++;
}
fclose($file);
// generate language list
echo ("<select name=\"lang\">");
for ($i = 0; $i < sizeof($languages); $i++) {
$entry = explode(":", $languages[$i]);
if ($_SESSION['confwiz_config']->get_defaultLanguage() != $languages[$i]) echo("<option value=\"" . $languages[$i] . "\">" . $entry[2] . "</option>\n");
else echo("<option selected value=\"" . $languages[$i] . "\">" . $entry[2] . "</option>\n");
}
echo ("</select>\n");
}
else
{
echo _("Unable to load available languages. Setting English as default language. For further instructions please contact the Admin of this site.");
}
echo ("</td>\n");
echo ("</tr>\n");
echo "</table>\n";
echo "<p><br></p>\n";
echo "<p><br></p>\n";
// admin users
echo "<p><b>" . _("Valid users") . ":</b></p>\n";
echo "<p>" . _("If you want more than one user to login to LAM please enter its DN(s) here. Multiple entries are seperated by semicolons.") . "</p>\n";
echo "<p><b>" . _("Example") . ": </b>cn=admin,dc=yourdomain,dc=org;cn=manager,dc=yourdomain,dc=org<br><br></p>\n";
echo ("<table border=0>");
echo ("<tr><td align=\"right\"><b>".
_("List of valid users") . ": </b></td>".
"<td colspan=2><input size=50 type=\"text\" name=\"admins\" value=\"" . $_SESSION['confwiz_config']->get_Adminstring() . "\"></td>\n");
echo ("</tr>\n");
echo "</table>\n";
echo "<p><br></p>\n";
// next/cancel button
echo "<p>\n";
echo "<input type=\"submit\" name=\"submit\" value=\"" . _("Next") . "\">\n";
echo "<input type=\"submit\" name=\"cancel\" value=\"" . _("Cancel") . "\">\n";
echo "</p>\n";
echo "</form>\n";
echo "</body>\n</html>\n";
?>

View File

@ -1,160 +0,0 @@
<?php
/*
$Id$
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
Copyright (C) 2003 Roland Gruber
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 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Configuration wizard - list attributes
*/
include_once('../../lib/config.inc');
include_once('../../lib/ldap.inc');
include_once('../../lib/status.inc');
// start session
session_save_path("../../sess");
@session_start();
setlanguage();
// check master password
$cfg = new CfgMain();
if ($cfg->password != $_SESSION['confwiz_masterpwd']) {
require("../config/conflogin.php");
exit;
}
// check if user clicked on cancel button
if ($_POST['cancel']) {
@unlink("../../config/" . $_SESSION['confwiz_config']->file . ".conf");
metarefresh('../config/conflogin.php');
exit;
}
// check if user clicked on next button
if ($_POST['submit']) {
$errors = array();
if (!$_SESSION['confwiz_config']->set_userlistAttributes($_POST['usrlstattr'])) {
$errors[] = _("User list attributes are invalid!");
}
if (!$_SESSION['confwiz_config']->set_grouplistAttributes($_POST['grplstattr'])) {
$errors[] = _("Group list attributes are invalid!");
}
if (!$_SESSION['confwiz_config']->set_hostlistAttributes($_POST['hstlstattr'])) {
$errors[] = _("Host list attributes are invalid!");
}
// if no errors save and go back to optional.php
if (sizeof($errors) < 1) {
$_SESSION['confwiz_config']->save();
$_SESSION['confwiz_optional']['lists'] = 'done';
metarefresh('optional.php');
}
else {
// errors occured
echo $_SESSION['header'];
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "<title>\n";
echo _("Configuration wizard");
echo "</title>\n";
echo "</head><body>\n";
for ($i = 0; $i < sizeof($errors); $i++) {
StatusMessage("ERROR", $errors[$i], "");
}
echo "<p><br><br><a href=\"o_lists.php\">" . _("Back to list settings") . "</a></p>\n";
echo "</body></html>\n";
exit;
}
}
echo $_SESSION['header'];
echo "<title>\n";
echo _("Configuration wizard");
echo "</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "</head>\n";
echo "<body>\n";
echo "<p align=\"center\"><a href=\"http://lam.sf.net\" target=\"_blank\">\n";
echo "<img src=\"../../graphics/banner.jpg\" border=1 alt=\"LDAP Account Manager\"></a>\n";
echo "</p>\n";
echo "<hr>\n";
// formular
echo "<form action=\"o_lists.php\" method=\"post\">\n";
echo "<p>&nbsp;</p>\n";
echo "<p><b>" . _("Please enter which attributes should be displayed in the list views.") . "</b></p>\n";
echo "<p>" . _("This can be a list of predefined attributes which have a description and are translated or you can write your own description.") .
" " . _("Predefined attributes are of type \"#attribute\".") .
" " . _("If you want to input your own description it would look like this: \"attribute:description\".") .
"<br>" . _("The entries are separated by semicolons.") .
"<br><br><br><b>" .
_("Example") .
": </b>#homeDirectory;#uid;#uidNumber;#gidNumber;mail:Mail address<br><br><br><u><b>" .
_("Predefined values") . ":</b></u><br><br><b>" .
_("Users") .
": </b>#uid, #uidNumber, #gidNumber, #cn, #host, #givenName, #sn, #homeDirectory, #loginShell, #mail, #gecos".
"<br><b>" .
_("Groups") .
": </b>#cn, #gidNumber, #memberUID, #member, #description".
"<br><b>" .
_("Hosts") .
": </b>#uid, #cn, #rid, #description" . "<br><br></p>\n";
echo "<p>&nbsp;</p>\n";
echo ("<table border=0>");
// user list attributes
echo ("<tr><td align=\"right\"><b>".
_("Attributes in User List") . ":</b></td>".
"<td><input size=50 type=\"text\" name=\"usrlstattr\" value=\"" . $_SESSION['confwiz_config']->get_userlistAttributes() . "\"></td>");
echo ("</tr>\n");
// group list attributes
echo ("<tr><td align=\"right\"><b>".
_("Attributes in Group List") . ":</b></td>".
"<td><input size=50 type=\"text\" name=\"grplstattr\" value=\"" . $_SESSION['confwiz_config']->get_grouplistAttributes() . "\"></td>");
echo ("</tr>\n");
// host list attributes
echo ("<tr><td align=\"right\"><b>".
_("Attributes in Host List") . ":</b></td>".
"<td><input size=50 type=\"text\" name=\"hstlstattr\" value=\"" . $_SESSION['confwiz_config']->get_hostlistAttributes() . "\"></td>");
echo ("</tr>\n");
echo "</table>\n";
echo "<p><br></p>\n";
// next/cancel button
echo "<p>\n";
echo "<input type=\"submit\" name=\"submit\" value=\"" . _("Next") . "\">\n";
echo "<input type=\"submit\" name=\"cancel\" value=\"" . _("Cancel") . "\">\n";
echo "</p>\n";
echo "</form>\n";
echo "</body>\n</html>\n";
?>

View File

@ -1,164 +0,0 @@
<?php
/*
$Id$
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
Copyright (C) 2003 Roland Gruber
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 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Configuration wizard - UID/GID ranges
*/
include_once('../../lib/config.inc');
include_once('../../lib/ldap.inc');
include_once('../../lib/status.inc');
// start session
session_save_path("../../sess");
@session_start();
setlanguage();
// check master password
$cfg = new CfgMain();
if ($cfg->password != $_SESSION['confwiz_masterpwd']) {
require("../config/conflogin.php");
exit;
}
// check if user clicked on cancel button
if ($_POST['cancel']) {
@unlink("../../config/" . $_SESSION['confwiz_config']->file . ".conf");
metarefresh('../config/conflogin.php');
exit;
}
// check if user clicked on next button
if ($_POST['submit']) {
$errors = array();
if (!$_SESSION['confwiz_config']->set_minUID($_POST['minUID'])) {
$errors[] = _("Minimum UID number is invalid!");
}
if (!$_SESSION['confwiz_config']->set_maxUID($_POST['maxUID'])) {
$errors[] = _("Maximum UID number is invalid!");
}
if (!$_SESSION['confwiz_config']->set_minGID($_POST['minGID'])) {
$errors[] = _("Minimum GID number is invalid!");
}
if (!$_SESSION['confwiz_config']->set_maxGID($_POST['maxGID'])) {
$errors[] = _("Maximum GID number is invalid!");
}
if (!$_SESSION['confwiz_config']->set_minMachine($_POST['minMach'])) {
$errors[] = _("Minimum Machine number is invalid!");
}
if (!$_SESSION['confwiz_config']->set_maxMachine($_POST['maxMach'])) {
$errors[] = _("Maximum Machine number is invalid!");
}
// if no errors save and go back to optional.php
if (sizeof($errors) < 1) {
$_SESSION['confwiz_config']->save();
$_SESSION['confwiz_optional']['ranges'] = 'done';
metarefresh('optional.php');
}
else {
// errors occured
echo $_SESSION['header'];
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "<title>\n";
echo _("Configuration wizard");
echo "</title>\n";
echo "</head><body>\n";
for ($i = 0; $i < sizeof($errors); $i++) {
StatusMessage("ERROR", $errors[$i], "");
}
echo "<p><br><br><a href=\"o_ranges.php\">" . _("Back to range settings") . "</a></p>\n";
echo "</body></html>\n";
exit;
}
}
echo $_SESSION['header'];
echo "<title>\n";
echo _("Configuration wizard");
echo "</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "</head>\n";
echo "<body>\n";
echo "<p align=\"center\"><a href=\"http://lam.sf.net\" target=\"_blank\">\n";
echo "<img src=\"../../graphics/banner.jpg\" border=1 alt=\"LDAP Account Manager\"></a>\n";
echo "</p>\n";
echo "<hr>\n";
// formular
echo "<form action=\"o_ranges.php\" method=\"post\">\n";
echo "<p>&nbsp;</p>\n";
echo "<p><b>" . _("Please enter the UID/GID ranges for your accounts:") . "</b></p>\n";
echo "<p>&nbsp;</p>\n";
echo ("<table border=0>");
// minUID
echo ("<tr><td align=\"right\"><b>".
_("Minimum UID number") . ": </b>".
"<input size=6 type=\"text\" name=\"minUID\" value=\"" . $_SESSION['confwiz_config']->get_minUID() . "\"></td>\n");
// maxUID
echo ("<td align=\"right\"><b>&nbsp;" . _("Maximum UID number") . ": </b>".
"<input size=6 type=\"text\" name=\"maxUID\" value=\"" . $_SESSION['confwiz_config']->get_maxUID() . "\"></td>\n");
// UID text
echo ("<td><a href=\"../help.php?HelpNumber=203\" target=\"lamhelp\">" . _("Help") . "</a></td></tr>\n");
// minGID
echo ("<tr><td align=\"right\"><b>".
_("Minimum GID number") . ": </b>".
"<input size=6 type=\"text\" name=\"minGID\" value=\"" . $_SESSION['confwiz_config']->get_minGID() . "\"></td>\n");
// maxGID
echo ("<td align=\"right\"><b>&nbsp;" . _("Maximum GID number").": </b>".
"<input size=6 type=\"text\" name=\"maxGID\" value=\"" . $_SESSION['confwiz_config']->get_maxGID() . "\"></td>\n");
// GID text
echo ("<td><a href=\"../help.php?HelpNumber=204\" target=\"lamhelp\">" . _("Help") . "</a></td></tr>\n");
// minMach
echo ("<tr><td align=\"right\"><b>".
_("Minimum Machine number") . ": </b>".
"<input size=6 type=\"text\" name=\"minMach\" value=\"" . $_SESSION['confwiz_config']->get_minMachine() . "\"></td>\n");
// maxMach
echo ("<td align=\"right\"><b>&nbsp;" . _("Maximum Machine number") . ": </b>".
"<input size=6 type=\"text\" name=\"maxMach\" value=\"" . $_SESSION['confwiz_config']->get_maxMachine() . "\"></td>\n");
// Machine text
echo ("<td><a href=\"../help.php?HelpNumber=205\" target=\"lamhelp\">" . _("Help") . "</a></td></tr>\n");
echo "</table>\n";
echo "<p><br></p>\n";
// next/cancel button
echo "<p>\n";
echo "<input type=\"submit\" name=\"submit\" value=\"" . _("Next") . "\">\n";
echo "<input type=\"submit\" name=\"cancel\" value=\"" . _("Cancel") . "\">\n";
echo "</p>\n";
echo "</form>\n";
echo "</body>\n</html>\n";
?>

View File

@ -1,80 +0,0 @@
<?php
/*
$Id$
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
Copyright (C) 2003 Roland Gruber
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 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Configuration wizard - optional pages
*/
include_once('../../lib/config.inc');
include_once('../../lib/ldap.inc');
include_once('../../lib/status.inc');
// start session
session_save_path("../../sess");
@session_start();
setlanguage();
// check master password
$cfg = new CfgMain();
if ($cfg->password != $_SESSION['confwiz_masterpwd']) {
require("../config/conflogin.php");
exit;
}
// if no optional pages should be displayed go to ldaptest
if (sizeof($_SESSION['confwiz_optional']) < 1) {
metarefresh('ldaptest.php');
exit;
}
// UID/GID ranges
if ($_SESSION['confwiz_optional']['ranges'] == 'yes') {
metarefresh('o_ranges.php');
exit;
}
// list attributes
if ($_SESSION['confwiz_optional']['lists'] == 'yes') {
metarefresh('o_lists.php');
exit;
}
// language, admins
if ($_SESSION['confwiz_optional']['lang'] == 'yes') {
metarefresh('o_lang.php');
exit;
}
// lamdaemon and PDF text
if ($_SESSION['confwiz_optional']['daemon'] == 'yes') {
metarefresh('o_daemon.php');
exit;
}
// if all pages were displayed go to ldaptest
metarefresh('ldaptest.php');
?>

View File

@ -1,204 +0,0 @@
<?php
/*
$Id$
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
Copyright (C) 2003 Roland Gruber
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 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Configuration wizard - server settings
*/
include_once('../../lib/config.inc');
include_once('../../lib/ldap.inc');
include_once('../../lib/status.inc');
// start session
session_save_path("../../sess");
@session_start();
setlanguage();
// check master password
$cfg = new CfgMain();
if ($cfg->password != $_SESSION['confwiz_masterpwd']) {
require("../config/conflogin.php");
exit;
}
// check if user clicked on buttons
if ($_POST['submit'] || $_POST['cancel']) {
unset($error);
unset($ret);
if ($_POST['cancel']) {
@unlink("../../config/" . $_SESSION['confwiz_config']->file . ".conf");
metarefresh('../config/conflogin.php');
}
else {
// check server URL
if ($_SESSION['confwiz_config']->set_serverURL($_POST['serverurl'])) {
// set Samba version
if ($_POST['sambaversion'] == "2") $_SESSION['confwiz_config']->set_samba3("no");
else $_SESSION['confwiz_config']->set_samba3("yes");
$_SESSION['confwiz_config']->set_Adminstring($_POST['ldapadmin']);
// save settings
$_SESSION['confwiz_config']->save();
// create LDAP object and test connection
$_SESSION['confwiz_ldap'] = new Ldap($_SESSION['confwiz_config']);
$ret = $_SESSION['confwiz_ldap']->connect($_POST['ldapadmin'], $_POST['ldappwd']);
if ($ret === 0) {
metarefresh('server2.php');
exit;
}
elseif ($ret === False) $error = _("Cannot connect to specified LDAP-Server. Please try again.");
elseif ($ret == 81) $error = _("Cannot connect to specified LDAP-Server. Please try again.");
elseif ($ret == 49) $error = _("Wrong Password/Username combination. Try again.");
else $error = _("LDAP error, server says:") . "\n<br>($ret) " . ldap_err2str($ret);
}
else {
$error = _("Server Address is empty!");
}
// print error message if needed
if ($error) {
echo $_SESSION['header'];
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "<title>\n";
echo _("Configuration wizard");
echo "</title>\n";
echo "</head><body>\n";
StatusMessage("ERROR", $error, "");
echo "<p><br><br><a href=\"server.php\">" . _("Back to last page") . "</a></p>\n";
echo "</body></html>\n";
}
// if all ok, go to next page
else {
metarefresh('server2.php');
}
}
exit;
}
// check if back button was pressed
$back = false;
if ($_GET['back'] || $_POST['back']) {
$back = true;
$auth = $_SESSION['confwiz_ldap']->decrypt_login();
}
echo $_SESSION['header'];
echo "<title>\n";
echo _("Configuration wizard");
echo "</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "</head>\n";
echo "<body>\n";
echo "<p align=\"center\"><a href=\"http://lam.sf.net\" target=\"_blank\">\n";
echo "<img src=\"../../graphics/banner.jpg\" border=1 alt=\"LDAP Account Manager\"></a>\n";
echo "</p>\n";
echo "<hr>\n";
// formular
echo "<form action=\"server.php\" method=\"post\">\n";
echo "<br><br>\n";
echo "<table border=0>\n";
// server URL
echo "<tr>\n";
echo "<td colspan=2>\n";
echo _("Please enter the URL of your LDAP server.") . "<br><br><b>" .
_("Examples") . ":</b><br><br>ldap://myserver.mydomain.org<br>ldaps://myserver.mydomain.org<br>localhost:389" . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
echo "<tr>\n";
echo "<td>\n";
echo "<b>" . _("Server address") . ":</b>\n";
echo "</td>\n";
echo "<td>\n";
if ($back) echo "<input type=\"text\" name=\"serverurl\" value =\"" . $_SESSION['confwiz_config']->get_ServerURL() . "\">\n";
else echo "<input type=\"text\" name=\"serverurl\">\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
// admin user+password
echo "<tr>\n";
echo "<td colspan=2>\n";
echo _("To connect to your LDAP server please enter now the DN of your administrative user and the password.") . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
echo "<tr>\n";
echo "<td>\n";
echo "<b>" . _("LDAP admin DN") . ":</b>\n";
echo "</td>\n";
echo "<td>\n";
if ($back) echo "<input type=\"text\" name=\"ldapadmin\" value=\"" . $auth[0] . "\">\n";
else echo "<input type=\"text\" name=\"ldapadmin\">\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>\n";
echo "<b>" . _("Password") . ":</b>\n";
echo "</td>\n";
echo "<td>\n";
if ($back) echo "<input type=\"password\" name=\"ldappwd\" value=\"" . $auth[1] . "\">\n";
else echo "<input type=\"password\" name=\"ldappwd\">\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
// master password
echo "<tr>\n";
echo "<td colspan=2>\n";
echo _("Which Samba version do you use?") . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
echo "<tr>\n";
echo "<td>\n";
echo "<b>" . _("Samba version") . ":</b>\n";
echo "</td>\n";
echo "<td>\n";
echo "<select name=\"sambaversion\">\n";
echo "<option value=3>3</option>";
if ($back && !$_SESSION['confwiz_config']->is_samba3()) echo "<option selected value=2>2.x</option>";
else echo "<option value=2>2.x</option>";
echo "</select>\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<p><br></p>\n";
// next/cancel button
echo "<p>\n";
echo "<input type=\"submit\" name=\"submit\" value=\"" . _("Next") . "\">\n";
echo "<input type=\"submit\" name=\"cancel\" value=\"" . _("Cancel") . "\">\n";
echo "</p>\n";
echo "</form>\n";
echo "</body>\n</html>\n";
?>

View File

@ -1,243 +0,0 @@
<?php
/*
$Id$
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
Copyright (C) 2003 Roland Gruber
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 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Configuration wizard - server settings second part
*/
include_once('../../lib/config.inc');
include_once('../../lib/ldap.inc');
include_once('../../lib/status.inc');
// start session
session_save_path("../../sess");
@session_start();
setlanguage();
// check master password
$cfg = new CfgMain();
if ($cfg->password != $_SESSION['confwiz_masterpwd']) {
require("../config/conflogin.php");
exit;
}
// check if user clicked on buttons
if ($_POST['submit'] || $_POST['cancel'] || $_POST['back']) {
unset($error);
unset($ret);
if ($_POST['cancel']) {
@unlink("../../config/" . $_SESSION['confwiz_config']->file . ".conf");
metarefresh('../config/conflogin.php');
}
elseif ($_POST['back']) {
metarefresh('server.php?back=true');
}
else {
// set input values
$errors = array();
if (!$_SESSION['confwiz_config']->set_UserSuffix($_POST['usersuffix'])) {
$error = _("UserSuffix is invalid!");
}
if (!$_SESSION['confwiz_config']->set_GroupSuffix($_POST['groupsuffix'])) {
$error = _("GroupSuffix is invalid!");
}
if (!$_SESSION['confwiz_config']->set_HostSuffix($_POST['hostsuffix'])) {
$error = _("HostSuffix is invalid!");
}
if ($_SESSION['confwiz_config']->is_samba3() && !$_SESSION['confwiz_config']->set_DomainSuffix($_POST['domainsuffix'])) {
$error = _("DomainSuffix is invalid!");
}
if (!$_SESSION['confwiz_config']->set_pwdhash($_POST['pwdhash'])) {
$error = _("Password hash is invalid!");
}
if (!$_SESSION['confwiz_config']->set_cacheTimeout($_POST['cachetimeout'])) {
$error = _("Cache timeout is invalid!");
}
$_SESSION['confwiz_config']->save();
// print error message if needed
if (sizeof($errors) > 0) {
echo $_SESSION['header'];
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "<title>\n";
echo _("Configuration wizard");
echo "</title>\n";
echo "</head><body>\n";
for ($i = 0; $i < sizeof($errors); $i++) {
StatusMessage("ERROR", $errors[$i], "");
}
echo "<p><br><br><a href=\"server2.php\">" . _("Back to last page") . "</a></p>\n";
echo "</body></html>\n";
}
// if all ok, go to next page
else {
$_SESSION['confwiz_optional'] = array();
if ($_POST['ranges']) $_SESSION['confwiz_optional']['ranges'] = 'yes';
if ($_POST['lists']) $_SESSION['confwiz_optional']['lists'] = 'yes';
if ($_POST['lang']) $_SESSION['confwiz_optional']['lang'] = 'yes';
if ($_POST['daemon']) $_SESSION['confwiz_optional']['daemon'] = 'yes';
metarefresh('optional.php');
}
}
exit;
}
echo $_SESSION['header'];
echo "<title>\n";
echo _("Configuration wizard");
echo "</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "</head>\n";
echo "<body>\n";
echo "<p align=\"center\"><a href=\"http://lam.sf.net\" target=\"_blank\">\n";
echo "<img src=\"../../graphics/banner.jpg\" border=1 alt=\"LDAP Account Manager\"></a>\n";
echo "</p>\n";
echo "<hr>\n";
// formular
echo "<form action=\"server2.php\" method=\"post\">\n";
echo "<br><br>\n";
echo "<table border=0>\n";
// suffixes
echo "<tr>\n";
echo "<td colspan=2>\n";
echo _("Please enter the suffixes of your LDAP tree where LAM should store the accounts.");
echo "</td>\n";
echo "</tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
echo "<tr>\n";
echo "<td>\n";
echo "<b>" . _("UserSuffix") . ":</b>\n";
echo "</td>\n";
echo "<td>\n";
echo "<input type=\"text\" size=50 name=\"usersuffix\" value=\"" . $_SESSION['confwiz_config']->get_userSuffix() . "\">\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>\n";
echo "<b>" . _("GroupSuffix") . ":</b>\n";
echo "</td>\n";
echo "<td>\n";
echo "<input type=\"text\" size=50 name=\"groupsuffix\" value=\"" . $_SESSION['confwiz_config']->get_groupSuffix() . "\">\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>\n";
echo "<b>" . _("HostSuffix") . ":</b>\n";
echo "</td>\n";
echo "<td>\n";
echo "<input type=\"text\" size=50 name=\"hostsuffix\" value=\"" . $_SESSION['confwiz_config']->get_hostSuffix() . "\">\n";
echo "</td>\n";
echo "</tr>\n";
if ($_SESSION['confwiz_config']->is_samba3()) {
echo "<tr>\n";
echo "<td>\n";
echo "<b>" . _("DomainSuffix") . ":</b>\n";
echo "</td>\n";
echo "<td>\n";
echo "<input type=\"text\" size=50 name=\"domainsuffix\" value=\"" . $_SESSION['confwiz_config']->get_domainSuffix() . "\">\n";
echo "</td>\n";
echo "</tr>\n";
}
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
// password hash
echo "<tr>\n";
echo "<td colspan=2>\n";
echo _("LAM supports CRYPT, SHA, SSHA, MD5 and SMD5 to generate the hash value of an user password. SSHA and CRYPT are the most common but CRYPT does not support passwords greater than 8 letters. We do not recommend to use plain text passwords.") . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
echo "<tr>\n";
echo "<td>\n";
echo "<b>" . _("Password hash type") . ":</b>\n";
echo "</td>\n";
echo "<td>\n";
echo "<select name=\"pwdhash\">\n<option selected>" . $_SESSION['confwiz_config']->get_pwdhash() . "</option>\n";
if ($_SESSION['confwiz_config']->get_pwdhash() != "CRYPT") echo("<option>CRYPT</option>\n");
if ($_SESSION['confwiz_config']->get_pwdhash() != "SHA") echo("<option>SHA</option>\n");
if ($_SESSION['confwiz_config']->get_pwdhash() != "SSHA") echo("<option>SSHA</option>\n");
if ($_SESSION['confwiz_config']->get_pwdhash() != "MD5") echo("<option>MD5</option>\n");
if ($_SESSION['confwiz_config']->get_pwdhash() != "SMD5") echo("<option>SMD5</option>\n");
if ($_SESSION['confwiz_config']->get_pwdhash() != "PLAIN") echo("<option>PLAIN</option>\n");
echo ("</select>\n");
echo "</td>\n";
echo "</tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
// cache timeout
echo "<tr>\n";
echo "<td colspan=2>\n";
echo _("LAM caches its LDAP searches, you can set the cache time here. Shorter times will stress LDAP more but decrease the possibility that changes are not identified.") . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
echo "<tr>\n";
echo "<td>\n";
echo "<b>" . _("Cache timeout") . ":</b>\n";
echo "</td>\n";
echo "<td>\n";
echo "<select name=\"cachetimeout\">\n<option selected>".$_SESSION['confwiz_config']->get_cacheTimeout()."</option>\n";
if ($_SESSION['confwiz_config']->get_cacheTimeout() != 0) echo("<option>0</option>\n");
if ($_SESSION['confwiz_config']->get_cacheTimeout() != 1) echo("<option>1</option>\n");
if ($_SESSION['confwiz_config']->get_cacheTimeout() != 2) echo("<option>2</option>\n");
if ($_SESSION['confwiz_config']->get_cacheTimeout() != 5) echo("<option>5</option>\n");
if ($_SESSION['confwiz_config']->get_cacheTimeout() != 10) echo("<option>10</option>\n");
if ($_SESSION['confwiz_config']->get_cacheTimeout() != 15) echo("<option>15</option>\n");
echo ("</select>\n");
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<p><br></p>\n";
// optional pages
echo "<fieldset><legend><b>" . _("Optional settings") . "</b></legend>\n";
echo "<p>" . _("Please select here if you want to make additional changes to your configuration profile or if LAM should use default values.") .
"<br></p>\n";
echo "<input type=\"checkbox\" name=\"ranges\">" . _("Ranges for UID and GID numbers") . "<br>\n";
echo "<input type=\"checkbox\" name=\"lists\">" . _("Attributes in list views") . "<br>\n";
echo "<input type=\"checkbox\" name=\"lang\">" . _("Language and additional admin users") . "<br>\n";
echo "<input type=\"checkbox\" name=\"daemon\">" . _("Lamdaemon settings and PDF text") . "<br>\n";
echo "</fieldset>\n";
echo "<p><br></p>\n";
// next/cancel button
echo "<p>\n";
echo "<input type=\"submit\" name=\"submit\" value=\"" . _("Next") . "\">\n";
echo "<input type=\"submit\" name=\"back\" value=\"" . _("Back") . "\">\n";
echo "<input type=\"submit\" name=\"cancel\" value=\"" . _("Cancel") . "\">\n";
echo "</p>\n";
echo "</form>\n";
echo "</body>\n</html>\n";
?>

View File

@ -1,189 +0,0 @@
<?php
/*
$Id$
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
Copyright (C) 2003 Roland Gruber
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 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, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Start page of configuration wizard.
*/
include_once('../../lib/config.inc');
include_once('../../lib/status.inc');
// start session
session_save_path("../../sess");
@session_start();
setlanguage();
// check if user clicked on buttons
if ($_POST['submit'] || $_POST['cancel']) {
unset($error);
if ($_POST['cancel']) {
metarefresh('../config/conflogin.php');
}
else {
// check if master password is correct
$cfg = new CfgMain();
if ($cfg->password != $_POST['masterpwd']) {
$error = _("Master password is wrong!");
}
// check if passwords are equal and not empty
elseif ($_POST['passwd1'] && ($_POST['passwd1'] != "") && ($_POST['passwd1'] == $_POST['passwd2'])) {
// check if profile name is valid
if (eregi("^[a-z0-9\-_]+$", $_POST['profname']) && !in_array($_POST['profname'], getConfigProfiles())) {
// create new profile file
@copy("../../config/lam.conf_sample", "../../config/" . $_POST['profname'] . ".conf");
@chmod ("../../config/" . $_POST['profname'] . ".conf", 0600);
$file = is_file("../../config/" . $_POST['profname'] . ".conf");
if ($file) {
// load as config and write new password
$conf = new Config($_POST['profname']);
$conf->Passwd = $_POST['passwd1'];
$conf->save();
$_SESSION['confwiz_config'] = $conf;
$_SESSION['confwiz_masterpwd'] = $_POST['masterpwd'];
}
else $error = _("Unable to create new profile!");
}
else $error = _("Profile name is invalid!");
}
else $error = _("Profile passwords are different or empty!");
// print error message if needed
if ($error) {
echo $_SESSION['header'];
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "<title>\n";
echo _("Configuration wizard");
echo "</title>\n";
echo "</head><body>\n";
StatusMessage("ERROR", $error, "");
echo "<p><br><br><a href=\"../config/conflogin.php\">" . _("Back to profile login") . "</a></p>\n";
echo "</body></html>\n";
}
// if all ok, go to next page
else {
metarefresh('server.php');
}
}
exit;
}
// remove variables of older wizard calls
unset($_SESSION['conwiz_masterpwd']);
unset($_SESSION['confwiz_config']);
echo $_SESSION['header'];
echo "<title>\n";
echo _("Configuration wizard");
echo "</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
echo "</head>\n";
echo "<body>\n";
echo "<p align=\"center\"><a href=\"http://lam.sf.net\" target=\"_blank\">\n";
echo "<img src=\"../../graphics/banner.jpg\" border=1 alt=\"LDAP Account Manager\"></a>\n";
echo "</p>\n";
echo "<hr>\n";
// formular
echo "<form action=\"start.php\" method=\"post\">\n";
echo "<h2 align=\"center\">" . _("Welcome to LAM Configuration wizard.") . "</h2>\n";
echo "<p align=\"center\">\n";
echo "This druid will help you to create a configuration file for LAM and set up LDAP.\n";
echo "</p>\n";
echo "<br><br>\n";
echo "<table border=0>\n";
// profile name
echo "<tr>\n";
echo "<td colspan=2>\n";
echo _("Please enter a name for the new profile. The name may contain letters, digits and -_.") . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
echo "<tr>\n";
echo "<td>\n";
echo "<b>" . _("Profile name") . ":</b>\n";
echo "</td>\n";
echo "<td>\n";
echo "<input type=\"text\" name=\"profname\">\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
// password
echo "<tr>\n";
echo "<td colspan=2>\n";
echo _("Configuration profiles are protected with a password from unauthorised access. Please enter it here.") . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
echo "<tr>\n";
echo "<td>\n";
echo "<b>" . _("Password") . ":</b>\n";
echo "</td>\n";
echo "<td>\n";
echo "<input type=\"password\" name=\"passwd1\">\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>\n";
echo "<b>" . _("Reenter Password") . ":</b>\n";
echo "</td>\n";
echo "<td>\n";
echo "<input type=\"password\" name=\"passwd2\">\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
// master password
echo "<tr>\n";
echo "<td colspan=2>\n";
echo _("Please enter your configuration master password. This password is \"lam\" by default.") . "\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr><td colspan=2>&nbsp;</td></tr>\n";
echo "<tr>\n";
echo "<td>\n";
echo "<b>" . _("Master password") . ":</b>\n";
echo "</td>\n";
echo "<td>\n";
echo "<input type=\"password\" name=\"masterpwd\">\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<p><br></p>\n";
// next/cancel button
echo "<p>\n";
echo "<input type=\"submit\" name=\"submit\" value=\"" . _("Next") . "\">\n";
echo "<input type=\"submit\" name=\"cancel\" value=\"" . _("Cancel") . "\">\n";
echo "</p>\n";
echo "</form>\n";
echo "</body>\n</html>\n";
?>

View File

@ -40,6 +40,7 @@ setlanguage();
// use references because session-vars can change in future
$ldap_intern =& $_SESSION['ldap'];
$header_intern =& $_SESSION['header'];
$config_intern =& $_SESSION['config'];
$delete_dn =& $_SESSION['delete_dn'];
@ -52,11 +53,13 @@ if ($_POST['backmain']) {
}
// Print header and part of body
echo $_SESSION['header'];
echo $header_intern;
echo '<title>';
echo _('Delete Account');
echo '</title>'."\n".
'<link rel="stylesheet" type="text/css" href="../style/layout.css">'."\n".
'<meta http-equiv="pragma" content="no-cache">'."\n".
'<meta http-equiv="cache-control" content="no-cache">'."\n".
'</head>'."\n".
'<body>'."\n".
'<form action="delete.php" method="post">'."\n";
@ -106,10 +109,13 @@ if ($_GET['type']) {
}
// Print buttons
echo "<br>\n";
echo '<input name="delete_yes" type="submit" value="' . _('Commit') . '">';
echo '&nbsp;<input name="delete_no" type="submit" value="' . _('Cancel') . '">';
echo "</fieldset>\n";
echo "<br><table border=0>\n";
echo '<tr><td>'.
'<input name="delete_no" type="submit" value="';
echo _('Cancel'); echo '"></td><td></td><td>'.
'<input name="delete_yes" type="submit" value="';
echo _('Commit'); echo '"></td></tr>';
echo "</table></fieldset>\n";
}
@ -132,11 +138,11 @@ if ($_POST['delete_yes']) {
echo "</b></legend>\n";
break;
}
// Store kind of DNs
echo '<input name="type" type="hidden" value="'.$_POST['type'].'">';
echo "<br><table border=0 >\n";
// Loop for every DN which should be deleted
// Store kind of DNs
foreach ($delete_dn as $dn) {
// Loop for every DN which should be deleted
switch ($_POST['type']) {
case 'user':
// Get username from DN
@ -152,13 +158,7 @@ if ($_POST['delete_yes']) {
$success = ldap_mod_del($ldap_intern->server(), ldap_get_dn($ldap_intern->server(), $entry) , array('memberUid' => $username));
// *** fixme add error-message if memberUid couldn't be deleted
$entry = ldap_next_entry($ldap_intern->server(), $entry);
}
if ($config_intern->scriptServer && isset($username)) {
// Remove homedir if required
if ($_POST['f_rem_home']) remhomedir($username);
// Remove quotas if lamdaemon.pl is used
remquotas($username, 'user');
}
}
// Delete user itself
$success = ldap_delete($ldap_intern->server(), $dn);
if (!$success) $error = _('Could not delete user:').' '.$dn;
@ -184,16 +184,18 @@ if ($_POST['delete_yes']) {
// Print error if still users in group
if (!$result) $error = _('Could not delete group. Still users in group:').' '.$dn;
else {
// Remove quotas if lamdaemon.pl is used
if ($config_intern->scriptServer && isset($groupname)) {
remquotas($groupname, 'group');
}
// Delete group itself
$success = ldap_delete($ldap_intern->server(), $dn);
if (!$success) $error = _('Could not delete group:').' '.$dn;
}
break;
}
if ($config_intern->scriptServer && isset($usernames)) {
// Remove homedir if required
if ($_POST['f_rem_home']) remhomedir($usernames);
// Remove quotas if lamdaemon.pl is used
remquotas($usernames, 'user');
}
// Remove DNs from cache-array
if ($success && isset($_SESSION[$_POST['type'].'DN'][$dn])) unset($_SESSION[$_POST['type'].'DN'][$dn]);
// Display success or error-message

View File

@ -40,8 +40,7 @@ if (($_GET['action'] == "edit") || ($_GET['action'] == "new")) {
$domsuff = $_SESSION['ldap']->search_units($_SESSION['config']->get_domainSuffix());
if ($_GET['action'] == "edit") {
// remove "\'"
$_GET['DN'] = str_replace("\\", "", $_GET['DN']);
$_GET['DN'] = str_replace("'", "", $_GET['DN']);
$_GET['DN'] = str_replace("\\'", "", $_GET['DN']);
// load attributes from domain
for ($i = 0; $i < sizeof($domlist); $i++) {
if ($domlist[$i]->dn == $_GET['DN']) {
@ -186,8 +185,7 @@ if (($_GET['action'] == "edit") || ($_GET['action'] == "new")) {
// delete domain, ask if sure
elseif ($_GET['action'] == "delete") {
// remove "\'" and make array
$DNs = str_replace("\\", "", $_GET['DN']);
$DNs = str_replace("'", "", $DNs);
$DNs = str_replace("\\'", "", $_GET['DN']);
$DNs = explode(";", $DNs);
// display page
echo $_SESSION['header'];
@ -226,8 +224,8 @@ elseif ($_POST['sub_save']) {
$suffix = $_SESSION['config']->get_DomainSuffix();
$server = $_SESSION['ldap']->server;
$filter = "(|(sambasid=" . $_POST['dom_SID'] . ")(sambadomainname=" . $_POST['dom_name'] . "))";
$sr = @ldap_search($server, $suffix, $filter, array());
$info = @ldap_get_entries($_SESSION["ldap"]->server, $sr);
$sr = ldap_search($server, $suffix, $filter, array());
$info = ldap_get_entries($_SESSION["ldap"]->server, $sr);
}
if ($_POST['add'] && !eregi("^[a-z0-9_\\-]+$", $_POST['dom_name'])) StatusMessage("ERROR", "", _("Domain name is invalid!"));
elseif ($_POST['add'] && !eregi("^S-[0-9]-[0-9]-[0-9]{2,2}-[0-9]*-[0-9]*-[0-9]*$", $_POST['dom_SID'])) {
@ -256,8 +254,8 @@ elseif ($_POST['sub_save']) {
if ($_POST['dom_DN'] != $newDN) {
$success = ldap_rename($_SESSION['ldap']->server(), $_POST['dom_DN'], $RDN, $_POST['dom_suffix'], true);
}
if ($success) StatusMessage("INFO", _("Domain has been modified."), $DN);
else StatusMessage("ERROR", "", _("Failed to modify domain!"));
if ($success) StatusMessage("INFO", "Domain has been modified.", $DN);
else StatusMessage("ERROR", "", "Failed to modify domain!");
}
// add entry
else {
@ -300,8 +298,8 @@ elseif ($_POST['sub_delete']) {
echo "<body>\n";
// delete DNs
for ($i = 0; $i < sizeof($DNs); $i++) {
if (ldap_delete($_SESSION['ldap']->server(), $DNs[$i])) StatusMessage("INFO", _("Domain deleted successfully."), $DNs[$i]);
else StatusMessage("ERROR", _("Unable to delete domain!"), $DNs[$i]);
if (ldap_delete($_SESSION['ldap']->server(), $DNs[$i])) StatusMessage("INFO", "Domain deleted successfully.", $DNs[$i]);
else StatusMessage("ERROR", "Unable to delete domain!", $DNs[$i]);
}
echo "<p>&nbsp;</p>\n";
echo "<p><a href=\"lists/listdomains.php\">" . _("Back to domain list") . "</a></p>\n";

View File

@ -87,7 +87,7 @@ function displayHelp($helpNumber)
//echo " <p class=\"help\">" . $helpArray[$helpNumber]['Text'] . "</p>\n";
if($helpArray[$helpNumber]["SeeAlso"] <> "")
{
echo " <p class=\"help\">" . _("See also") . ": " . $helpArray[$helpNumber]['SeeAlso'] . "</p>\n";
echo " <p class=\"help\">See also: " . $helpArray[$helpNumber]['SeeAlso'] . "</p>\n";
}
echoHTMLFoot();
}

View File

@ -39,8 +39,7 @@ if ($_POST['add_suff'] || $_POST['cancel']) {
$fail = array();
$errors = array();
$new_suff = $_POST['new_suff'];
$new_suff = str_replace("\\", "", $new_suff);
$new_suff = str_replace("'", "", $new_suff);
$new_suff = str_replace("\\'", "", $new_suff);
$new_suff = explode(";", $new_suff);
// add entries
for ($i = 0; $i < sizeof($new_suff); $i++) {
@ -105,12 +104,8 @@ if ($_POST['add_suff'] || $_POST['cancel']) {
}
else { // add root entry
$attr = array();
$attr['objectClass'][] = 'organization';
$attr['objectClass'] = 'organization';
$attr[$headarray[0]] = $headarray[1];
if ($headarray[0] == "dc") {
$attr['o'] = $headarray[1];
$attr['objectClass'][] = 'dcObject';
}
$dn = $subsuffs[$k];
if (!@ldap_add($_SESSION['ldap']->server(), $dn, $attr)) {
$fail[] = $suff;
@ -177,8 +172,7 @@ if ($_POST['add_suff'] || $_POST['cancel']) {
// first show of page
$new_suff = $_GET['suffs'];
$new_suff = str_replace("\\", "", $new_suff);
$new_suff = str_replace("'", "", $new_suff);
$new_suff = str_replace("\\'", "", $new_suff);
$new_suff = explode(";", $new_suff);
echo $_SESSION['header'];

View File

@ -3,7 +3,7 @@
$Id$
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
Copyright (C) 2003 - 2004 Roland Gruber
Copyright (C) 2003 Roland Gruber
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
@ -53,11 +53,9 @@ if ($_POST['new_domain'] || $_POST['del_domain']){
// search for checkboxes
$domains = array_keys($_POST, "on");
$domainstr = implode(";", $domains);
if ($domainstr) {
metaRefresh("../domain.php?action=delete&amp;DN='$domainstr'");
exit;
metaRefresh("../domain.php?action=delete&amp;DN='$domainstr'");
}
}
exit;
}
echo $_SESSION['header'];
@ -98,7 +96,7 @@ if (! $_GET['norefresh']) {
$attrs = $attr_array;
$sr = @ldap_search($_SESSION["ldap"]->server(), $dom_suffix, $filter, $attrs);
if (ldap_errno($_SESSION["ldap"]->server()) == 4) {
StatusMessage("WARN", _("LDAP sizelimit exceeded, not all entries are shown."), _("See README.openldap.txt to solve this problem."));
StatusMessage("WARN", _("LDAP sizelimit exceeded, not all entries are shown."), "See README.openldap to solve this problem.");
}
if ($sr) {
$dom_info = ldap_get_entries($_SESSION["ldap"]->server, $sr);

View File

@ -3,7 +3,7 @@
$Id$
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
Copyright (C) 2003 - 2004 Roland Gruber
Copyright (C) 2003 Roland Gruber
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
@ -48,17 +48,13 @@ if ($_POST['new_group'] || $_POST['del_group'] || $_POST['pdf_group'] || $_POST[
// add new group
if ($_POST['new_group']){
metaRefresh("../account/groupedit.php");
exit;
}
// delete group(s)
elseif ($_POST['del_group']){
// search for checkboxes
$groups = array_keys($_POST, "on");
$_SESSION['delete_dn'] = $groups;
if (sizeof($groups) > 0) {
metaRefresh("../delete.php?type=group");
exit;
}
metaRefresh("../delete.php?type=group");
}
// PDF for selected groups
elseif ($_POST['pdf_group']){
@ -71,7 +67,7 @@ if ($_POST['new_group'] || $_POST['del_group'] || $_POST['pdf_group'] || $_POST[
}
if (sizeof($list) > 0) {
createGroupPDF($list);
exit;
if ($_SESSION['config']->get_scriptServer()) $list = getquotas($list);
}
}
// PDF for all groups
@ -82,9 +78,10 @@ if ($_POST['new_group'] || $_POST['del_group'] || $_POST['pdf_group'] || $_POST[
}
if (sizeof($list) > 0) {
createGroupPDF($list);
exit;
if ($_SESSION['config']->get_scriptServer()) $list = getquotas($list);
}
}
exit;
}
echo $_SESSION['header'];
@ -156,7 +153,7 @@ if (! $_GET['norefresh']) {
$attrs = $attr_array;
$sr = @ldap_search($_SESSION["ldap"]->server(), $grp_suffix, $filter, $attrs);
if (ldap_errno($_SESSION["ldap"]->server()) == 4) {
StatusMessage("WARN", _("LDAP sizelimit exceeded, not all entries are shown."), _("See README.openldap.txt to solve this problem."));
StatusMessage("WARN", _("LDAP sizelimit exceeded, not all entries are shown."), "See README.openldap to solve this problem.");
}
if ($sr) {
$grp_info = ldap_get_entries($_SESSION["ldap"]->server, $sr);

View File

@ -3,7 +3,7 @@
$Id$
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
Copyright (C) 2003 - 2004 Roland Gruber
Copyright (C) 2003 Roland Gruber
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
@ -48,18 +48,14 @@ if ($_POST['new_host'] || $_POST['del_host'] || $_POST['pdf_host'] || $_POST['pd
// add new host
if ($_POST['new_host']){
metaRefresh("../account/hostedit.php");
exit;
}
// delete host(s)
elseif ($_POST['del_host']){
// search for checkboxes
$hosts = array_keys($_POST, "on");
$_SESSION['delete_dn'] = $hosts;
if (sizeof($hosts) > 0) {
metaRefresh("../delete.php?type=host");
exit;
metaRefresh("../delete.php?type=host");
}
}
// PDF for selected hosts
elseif ($_POST['pdf_host']){
// search for checkboxes
@ -69,10 +65,7 @@ if ($_POST['new_host'] || $_POST['del_host'] || $_POST['pdf_host'] || $_POST['pd
for ($i = 0; $i < sizeof($hosts); $i++) {
$list[$i] = loadhost($hosts[$i]);
}
if (sizeof($list) > 0) {
createHostPDF($list);
exit;
}
if (sizeof($list) > 0) createHostPDF($list);
}
// PDF for all hosts
elseif ($_POST['pdf_all']){
@ -80,11 +73,9 @@ if ($_POST['new_host'] || $_POST['del_host'] || $_POST['pdf_host'] || $_POST['pd
for ($i = 0; $i < sizeof($_SESSION['hst_info']); $i++) {
$list[$i] = loadhost($_SESSION['hst_info'][$i]['dn']);
}
if (sizeof($list) > 0) {
createHostPDF($list);
exit;
}
if (sizeof($list) > 0) createHostPDF($list);
}
exit;
}
echo $_SESSION['header'];
@ -162,7 +153,7 @@ if (! $_GET['norefresh']) {
$attrs = $attr_array;
$sr = @ldap_search($_SESSION["ldap"]->server(), $hst_suffix, $filter, $attrs);
if (ldap_errno($_SESSION["ldap"]->server()) == 4) {
StatusMessage("WARN", _("LDAP sizelimit exceeded, not all entries are shown."), _("See README.openldap.txt to solve this problem."));
StatusMessage("WARN", _("LDAP sizelimit exceeded, not all entries are shown."), "See README.openldap to solve this problem.");
}
if ($sr) {
$hst_info = ldap_get_entries($_SESSION["ldap"]->server, $sr);

Some files were not shown because too many files have changed in this diff Show More