This commit was manufactured by cvs2svn to create tag 'lam_0_4_10'.
|
@ -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 '#'
|
|
@ -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".
|
|
@ -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
|
|
@ -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'
|
|
@ -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.
|
|
@ -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
|
|
@ -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.
|
|
@ -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"
|
|
@ -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".
|
|
@ -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".
|
|
@ -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.
|
340
lam/COPYING
|
@ -1,340 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 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.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, 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 or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
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 give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
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 Program or any portion
|
||||
of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
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 Program, 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 Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) 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; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, 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 executable. However, as a
|
||||
special exception, the source code 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.
|
||||
|
||||
If distribution of executable or 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 counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program 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.
|
||||
|
||||
5. 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 Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program 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 to
|
||||
this License.
|
||||
|
||||
7. 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 Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program 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 Program.
|
||||
|
||||
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.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program 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.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the 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 Program
|
||||
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 Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, 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
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), 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 Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. 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 program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
150
lam/HISTORY
|
@ -1,150 +0,0 @@
|
|||
??? 0.5.rc1
|
||||
- added manager and post office box for inetOrgPerson
|
||||
- Samba 3: added support for logon hours
|
||||
- Samba 3: added sambaSID as possible RDN attribute
|
||||
- improved error handling in profile editor
|
||||
- now quotas can be set on CSV upload
|
||||
- new logo
|
||||
- fixed bugs:
|
||||
-> several fixes for PHP5
|
||||
-> fixes for PDF editor and output
|
||||
-> password changing in tree view did not work
|
||||
|
||||
|
||||
30.06.2005 0.5.alpha2
|
||||
- added documentation about schemas
|
||||
- PDF now uses UTF-8 fonts
|
||||
- added possibility to create plain inetOrgPerson accounts
|
||||
- fixed bugs:
|
||||
-> set DN suffix and RDN on profile loading
|
||||
-> several fixes for PDF editor
|
||||
-> creating Samba hosts now works
|
||||
|
||||
|
||||
11.05.2005 0.5.alpha1
|
||||
- new modular architecture
|
||||
-> possibility to create Unix-only accounts
|
||||
-> plugins for more objectClasses planned
|
||||
-> enhanced PDF output
|
||||
-> enhanced file upload
|
||||
-> enhanced editor for account profiles
|
||||
-> dynamic configuration options (based on modules)
|
||||
- all pages in UTF-8
|
||||
- added developer documentation
|
||||
- PHPDoc formated comments
|
||||
- new plugin for managing MAC addresses (RFE 926017)
|
||||
- new plugin for managing NIS mail aliases (RFE 1050036)
|
||||
- new plugin for managing mail routing with inetLocalMailRecipient (RFE 1092137)
|
||||
- schema browser
|
||||
- tree view
|
||||
|
||||
|
||||
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
|
||||
- support spaces in DNs
|
||||
- PDF text for users
|
||||
- create missing OUs recursivly
|
||||
- fixed bugs:
|
||||
SMD5 passwords were wrong
|
||||
primaryGroupSID wrong if SID has no relation to Algorithmic RID Base
|
||||
Samba 2 accounts could not be created
|
||||
|
||||
|
||||
29.10.2003 0.4 (Beta1)
|
||||
|
||||
- improved design
|
||||
- improved documentation
|
||||
- Fixed possible error which could delete entries if objectclass didn't fit
|
||||
- Fixed many samba 3.0 related bugs, most related to SIDs
|
||||
- edit group members directly
|
||||
- support for several password hashes (CRYPT/SHA/SSHA/MD5/SMD5/PLAIN)
|
||||
- PDF output for groups and hosts
|
||||
|
||||
|
||||
31.08.2003 0.3 (Alpha 3)
|
||||
|
||||
- Samba 3 support
|
||||
- manage Samba 3 domains
|
||||
- multiple configuration files
|
||||
- PDF output
|
||||
- better mass creation
|
||||
|
||||
|
||||
04.07.2003 0.2 (Alpha 2)
|
||||
|
||||
- support for multiple OUs + OU-Editor
|
||||
- account creation via file upload
|
||||
- profile editor
|
||||
- experimental Samba 3 support
|
||||
- fixed a lot of bugs
|
||||
|
||||
|
||||
23.05.2003 0.1 (Alpha 1)
|
||||
|
||||
Initial release
|
65
lam/INSTALL
|
@ -1,65 +0,0 @@
|
|||
|
||||
Installation Instructions for LAM
|
||||
---------------------------------
|
||||
|
||||
|
||||
1. Requirements
|
||||
|
||||
- Apache webserver (SSL optional) with installed PHP-Module (PHP-Module with
|
||||
ldap, gettext, xml, mcrypt+mhash optional)
|
||||
- Perl (optional, needed only for lamdaemon)
|
||||
- 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:
|
||||
|
||||
- Suse: ftp://ftp.suse.com/pub/people/poeml/mod_php4
|
||||
- RedHat: http://ftp.horde.org/pub/RPMS
|
||||
|
||||
|
||||
See docs/README.schema.txt for information about used LDAP schema files.
|
||||
|
||||
|
||||
2. Installation
|
||||
|
||||
* Extract package with:
|
||||
tar xzf ldap-account-manager_<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: lamdaemon.pl must be set executable (See also
|
||||
docs/readme.lamdeamon.txt)
|
||||
|
||||
* 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")
|
||||
|
||||
- Manually:
|
||||
A default config file can be found in /lam/config/lam.conf_sample.
|
||||
Change the necessary entries and rename it to /lam/config/lam.conf.
|
||||
|
||||
|
||||
3. Setting up PHP
|
||||
|
||||
LAM runs with PHP4 or PHP5.
|
||||
|
||||
Needed changes in your php.ini:
|
||||
|
||||
* memory_limit = 32M
|
||||
|
81
lam/README
|
@ -1,81 +0,0 @@
|
|||
|
||||
LAM - Readme
|
||||
============
|
||||
|
||||
A set of PHP-scripts to administrate Unix and Samba accounts in an 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
|
||||
multiple organizational units. LAM supports the Samba 2.x schema and the
|
||||
Samba 3 schema.
|
||||
|
||||
http://sourceforge.net/projects/lam/
|
||||
|
||||
Copyright (C) 2003 - 2004 Michael Duergner <michael@duergner.com>
|
||||
Roland Gruber <post@rolandgruber.de>
|
||||
Tilo Lutz <tilolutz@gmx.de>
|
||||
|
||||
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
|
||||
|
||||
Requirements:
|
||||
PHP4
|
||||
Openldap (2.0 or greater)
|
||||
A web-browser that supports CSS (Netscape 4.x is not recommended)
|
||||
|
||||
Summary:
|
||||
With LAM you can easily manage user, group and machine accounts stored in
|
||||
a LDAP server over a web interface. At the moment it supports:
|
||||
|
||||
- displaying the user/group/host/domain entries
|
||||
- deleting entries
|
||||
- adding new entries
|
||||
- editing entries
|
||||
- filtering and sorting
|
||||
- account profiles
|
||||
- access management
|
||||
- multiple configuration profiles
|
||||
- OU Editor
|
||||
- account creation via file upload
|
||||
- Samba 2 and 3 schema support
|
||||
|
||||
Important:
|
||||
The standard password to edit the configuration options is "lam".
|
||||
|
||||
Download:
|
||||
You can get the newest version at http://sourceforge.net/projects/lam/
|
||||
|
||||
Installation:
|
||||
Please see the INSTALL file.
|
||||
|
||||
Documentation:
|
||||
Basic documentation is available in the directory "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.
|
||||
Debian users can add locales with "dpkg-reconfigure locales".
|
||||
|
||||
Security:
|
||||
It is strongly recommended to use a SSL connection to your web server.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
Have fun!
|
||||
The LAM devel team
|
6
lam/TODO
|
@ -1,6 +0,0 @@
|
|||
|
||||
- document missing parts
|
||||
|
||||
0.5.rc1
|
||||
- change location of PDF profiles
|
||||
|
|
@ -1 +0,0 @@
|
|||
0.5.rc1
|
|
@ -1,4 +0,0 @@
|
|||
<Files ~ *>
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
|
@ -1,5 +0,0 @@
|
|||
# password to add/delete/rename configuration profiles
|
||||
password: lam
|
||||
|
||||
# default profile, without ".conf"
|
||||
default: lam
|
|
@ -1,82 +0,0 @@
|
|||
# LDAP Account Manager configuration
|
||||
|
||||
# server address (e.g. ldap://localhost:389 or ldaps://localhost:636)
|
||||
serverURL: ldap://localhost:389
|
||||
|
||||
# list of users who are allowed to use LDAP Account Manager
|
||||
# names have to be seperated by semicolons
|
||||
# e.g. admins: cn=admin,dc=yourdomain,dc=org;cn=root,dc=yourdomain,dc=org
|
||||
admins: cn=Manager,dc=my-domain,dc=com
|
||||
|
||||
# password to change these preferences via webfrontend
|
||||
passwd: lam
|
||||
|
||||
# suffix of users
|
||||
# e.g. ou=People,dc=yourdomain,dc=org
|
||||
usersuffix: ou=people,dc=my-domain,dc=com
|
||||
|
||||
# suffix of groups
|
||||
# e.g. ou=Groups,dc=yourdomain,dc=org
|
||||
groupsuffix: ou=groups,dc=my-domain,dc=com
|
||||
|
||||
# suffix of Samba hosts
|
||||
# e.g. ou=machines,dc=yourdomain,dc=org
|
||||
hostsuffix: ou=machines,dc=my-domain,dc=com
|
||||
|
||||
# suffix of Samba 3 domains
|
||||
# e.g. ou=domains,dc=yourdomain,dc=org
|
||||
domainsuffix: ou=domains,dc=my-domain,dc=com
|
||||
|
||||
# list of attributes to show in user list
|
||||
# entries can either be predefined values (e.g. '#cn' or '#uid')
|
||||
# or individual ones (e.g. 'uid:User ID' or 'host:Host Name')
|
||||
# values have to be seperated by semicolons
|
||||
userlistAttributes: #uid;#givenName;#sn;#uidNumber;#gidNumber
|
||||
|
||||
# list of attributes to show in group list
|
||||
# entries can either be predefined values (e.g. '#cn' or '#gidNumber')
|
||||
# or individual ones (e.g. 'cn:Group Name')
|
||||
# values have to be seperated by semicolons
|
||||
grouplistAttributes: #cn;#gidNumber;#memberUID;#description
|
||||
|
||||
# list of attributes to show in host list
|
||||
# entries can either be predefined values (e.g. '#cn' or '#uid')
|
||||
# or individual ones (e.g. 'cn:Host Name')
|
||||
# values have to be seperated by semicolons
|
||||
hostlistAttributes: #cn;#description;#uidNumber;#gidNumber
|
||||
|
||||
# maximum number of rows to show in user/group/host lists
|
||||
maxlistentries: 30
|
||||
|
||||
# default language (a line from config/language)
|
||||
defaultLanguage: en_GB:UTF-8:English (Britain)
|
||||
|
||||
# Path to external Script
|
||||
scriptPath:
|
||||
|
||||
# Server of external Script
|
||||
scriptServer:
|
||||
|
||||
# Number of minutes LAM caches LDAP searches.
|
||||
cachetimeout: 5
|
||||
|
||||
# List of used user modules
|
||||
usermodules: shadowAccount,inetOrgPerson,posixAccount,sambaSamAccount
|
||||
|
||||
# List of used group modules
|
||||
groupmodules: posixGroup,sambaGroupMapping
|
||||
|
||||
# List of used host modules
|
||||
hostmodules: account,sambaSamAccount,posixAccount
|
||||
|
||||
# Module settings
|
||||
|
||||
modules: posixAccount_minUID: 10000
|
||||
modules: posixAccount_maxUID: 30000
|
||||
modules: posixAccount_minMachine: 50000
|
||||
modules: posixAccount_maxMachine: 60000
|
||||
modules: posixGroup_minGID: 10000
|
||||
modules: posixGroup_maxGID: 20000
|
||||
modules: posixGroup_pwdHash: SSHA
|
||||
modules: posixAccount_pwdHash: SSHA
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
# LDAP Account Manager language configuration file
|
||||
#
|
||||
# Do not modify!
|
||||
|
||||
# Each line consists of a ":"-seperated entry. The first part is the locale name,
|
||||
# the second is the character encoding and the third the language name.
|
||||
|
||||
# English
|
||||
en_GB.utf8:UTF-8:English (Great Britain)
|
||||
|
||||
# Spanish
|
||||
es_ES.utf8:UTF-8:Español (España)
|
||||
|
||||
# Catalan
|
||||
ca_ES.utf8:UTF-8:Català (Catalunya)
|
||||
|
||||
# French
|
||||
fr_FR.utf8:UTF-8:Français (France)
|
||||
|
||||
# German
|
||||
de_DE.utf8:UTF-8:Deutsch (Deutschland)
|
||||
|
||||
# Hungarian
|
||||
hu_HU.utf8:UTF-8:Magyar (Magyarország)
|
||||
|
||||
# Italian
|
||||
it_IT.utf8:UTF-8:Italiano (Italia)
|
||||
|
||||
# Japanese
|
||||
ja_JP.utf8:UTF-8:日本語 (日本)
|
|
@ -1,8 +0,0 @@
|
|||
<pdf type="group">
|
||||
<section name="_posixGroup_cn">
|
||||
<entry name="main_dn" />
|
||||
<entry name="posixGroup_description" />
|
||||
<entry name="posixGroup_gidNumber" />
|
||||
<entry name="posixGroup_memberUid" />
|
||||
</section>
|
||||
</pdf>
|
|
@ -1,9 +0,0 @@
|
|||
<pdf type="host">
|
||||
<section name="_posixAccount_uid">
|
||||
<entry name="main_dn" />
|
||||
<entry name="posixAccount_description" />
|
||||
<entry name="posixAccount_uidNumber" />
|
||||
<entry name="posixAccount_primaryGroup" />
|
||||
<entry name="sambaAccount_domain" />
|
||||
</section>
|
||||
</pdf>
|
|
@ -1,38 +0,0 @@
|
|||
<pdf type="user">
|
||||
<text name="user" />
|
||||
<section name="Personal user information">
|
||||
<entry name="inetOrgPerson_title" />
|
||||
<entry name="inetOrgPerson_givenName" />
|
||||
<entry name="inetOrgPerson_sn" />
|
||||
<entry name="inetOrgPerson_street" />
|
||||
<entry name="inetOrgPerson_postalCode" />
|
||||
<entry name="inetOrgPerson_postalAddress" />
|
||||
<entry name="inetOrgPerson_mail" />
|
||||
<entry name="inetOrgPerson_telephoneNumber" />
|
||||
<entry name="inetOrgPerson_mobileTelephoneNumber" />
|
||||
<entry name="inetOrgPerson_facsimileTelephoneNumber" />
|
||||
</section>
|
||||
<section name="Unix settings">
|
||||
<entry name="posixAccount_uid" />
|
||||
<entry name="posixAccount_userPassword" />
|
||||
<entry name="posixAccount_primaryGroup" />
|
||||
<entry name="posixAccount_additionalGroups" />
|
||||
<entry name="posixAccount_homeDirectory" />
|
||||
<entry name="posixAccount_loginShell" />
|
||||
<entry name="shadowAccount_shadowExpire" />
|
||||
<entry name="inetOrgPerson_host" />
|
||||
</section>
|
||||
<section name="Windows settings">
|
||||
<entry name="sambaAccount_uid" />
|
||||
<entry name="sambaAccount_password" />
|
||||
<entry name="sambaAccount_homeDrive" />
|
||||
<entry name="sambaAccount_scriptPath" />
|
||||
<entry name="sambaAccount_smbHome" />
|
||||
<entry name="sambaAccount_userWorkstations" />
|
||||
<entry name="sambaAccount_homePath" />
|
||||
<entry name="sambaAccount_domain" />
|
||||
</section>
|
||||
<section name="Quota Settings">
|
||||
<entry name="quota_quotas" />
|
||||
</section>
|
||||
</pdf>
|
Before Width: | Height: | Size: 9.6 KiB |
|
@ -1 +0,0 @@
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
shadowAccount_shadowWarning: 10
|
||||
shadowAccount_shadowInactive: 10
|
||||
shadowAccount_shadowMin: 1
|
||||
shadowAccount_shadowMax: 365
|
||||
sambaAccount_useunixpwd: true
|
||||
sambaAccount_acctFlagsN: false
|
||||
sambaAccount_acctFlagsX: true
|
||||
sambaAccount_acctFlagsD: false
|
||||
sambaAccount_homeDrive: U:
|
||||
sambaSamAccount_useunixpwd: true
|
||||
sambaSamAccount_sambaAcctFlagsN: false
|
||||
sambaSamAccount_sambaAcctFlagsX: true
|
||||
sambaSamAccount_sambaAcctFlagsD: false
|
||||
sambaSamAccount_sambaHomeDrive: U:
|
||||
posixAccount_homeDirectory: /home/$user
|
||||
posixAccount_loginShell: /bin/bash
|
||||
posixAccount_userPassword_no: false
|
||||
posixAccount_userPassword_lock: false
|
|
@ -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
|
104
lam/copyright
|
@ -1,104 +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.
|
||||
|
||||
|
||||
C:
|
||||
|
||||
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream
|
||||
Vera is a trademark of Bitstream, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the fonts accompanying this license ("Fonts") and associated
|
||||
documentation files (the "Font Software"), to reproduce and distribute
|
||||
the Font Software, including without limitation the rights to use,
|
||||
copy, merge, publish, distribute, and/or sell copies of the Font
|
||||
Software, and to permit persons to whom the Font Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright and trademark notices and this permission notice
|
||||
shall be included in all copies of one or more of the Font Software
|
||||
typefaces.
|
||||
|
||||
The Font Software may be modified, altered, or added to, and in
|
||||
particular the designs of glyphs or characters in the Fonts may be
|
||||
modified and additional glyphs or characters may be added to the
|
||||
Fonts, only if the fonts are renamed to names not containing either
|
||||
the words "Bitstream" or the word "Vera".
|
||||
|
||||
This License becomes null and void to the extent applicable to Fonts
|
||||
or Font Software that has been modified and is distributed under the
|
||||
"Bitstream Vera" names.
|
||||
|
||||
The Font Software may be sold as part of a larger software package but
|
||||
no copy of one or more of the Font Software typefaces may be sold by
|
||||
itself.
|
||||
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
|
||||
BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL,
|
||||
OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT
|
||||
SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the names of Gnome, the Gnome
|
||||
Foundation, and Bitstream Inc., shall not be used in advertising or
|
||||
otherwise to promote the sale, use or other dealings in this Font
|
||||
Software without prior written authorization from the Gnome Foundation
|
||||
or Bitstream Inc., respectively. For further information, contact:
|
||||
fonts at gnome dot org.
|
||||
|
||||
|
||||
|
||||
|
||||
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
|
||||
lib/font/Vera* C 2003 Bitstream, Inc.
|
|
@ -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!
|
|
@ -1,286 +0,0 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
|
||||
<TITLE>FAQ</TITLE>
|
||||
<LINK TYPE="text/css" REL="stylesheet" HREF="fpdf.css">
|
||||
</HEAD>
|
||||
<BODY>
|
||||
<H2>FAQ</H2>
|
||||
<B>1.</B> <A HREF='#1'>What's exactly the license of FPDF? Are there any usage restrictions?</A><BR>
|
||||
<B>2.</B> <A HREF='#2'>When I try to create a PDF, a lot of weird characters show on the screen. Why?</A><BR>
|
||||
<B>3.</B> <A HREF='#3'>I try to generate a PDF and IE displays a blank page. What happens?</A><BR>
|
||||
<B>4.</B> <A HREF='#4'>I send parameters using the POST method and the values don't appear in the PDF.</A><BR>
|
||||
<B>5.</B> <A HREF='#5'>When I use a PHP session, IE doesn't display my PDF any more but asks me to download it.</A><BR>
|
||||
<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>
|
||||
<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
|
||||
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
|
||||
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.
|
||||
<BR>
|
||||
To solve the problem, simply quit and restart IE. You can also go to another URL and come
|
||||
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
|
||||
carriage return). You can put an exit statement just after the call to the Output() method to
|
||||
be sure.
|
||||
<BR>
|
||||
If it still doesn't work, it means you're a victim of the "blank page syndrome". IE used in
|
||||
conjunction with the Acrobat plug-in suffers from numerous bugs, in all versions. You should
|
||||
test your application with as many IE versions as possible (at least if you're on the Internet).
|
||||
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:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
||||
<TT>
|
||||
<INPUT TYPE="HIDDEN" NAME="ext" VALUE=".pdf">
|
||||
</TT>
|
||||
</TD></TR></TABLE><BR>
|
||||
The usage of PHP sessions also often causes trouble (avoid using HTTP headers preventing caching).
|
||||
See question 5 for a workaround.
|
||||
<BR>
|
||||
<BR>
|
||||
To avoid all these problems in a reliable manner, two main techniques exist:
|
||||
<BR>
|
||||
<BR>
|
||||
- Disable the plug-in and use Acrobat as a helper application. To do this, launch Acrobat; in
|
||||
the File menu, Preferences, General, uncheck the option "Web Browser Integration" (for Acrobat
|
||||
5: Edit, Preferences, Options, "Display PDF in Browser"). Then, the next time you load a PDF in
|
||||
IE, it displays the dialog box "Open it" or "Save it to disk". Uncheck the option "Always ask
|
||||
before opening this type of file" and choose Open. From now on, PDF files will open
|
||||
automatically in an external Acrobat window.
|
||||
<BR>
|
||||
The drawback of the method is that you need to alter the client configuration, which you can do
|
||||
in an intranet environment but not for the Internet.
|
||||
<BR>
|
||||
<BR>
|
||||
- Use a redirection technique. It consists in generating the PDF in a temporary file on the
|
||||
server and redirect the client on it (by using JavaScript, not the Location HTTP header which
|
||||
also causes trouble). For instance, at the end of the script, you can put the following:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
||||
<TT>
|
||||
//Determine a temporary file name in the current directory<BR>
|
||||
$file=basename(tempnam(getcwd(),'tmp'));<BR>
|
||||
//Save PDF to file<BR>
|
||||
$pdf->Output($file);<BR>
|
||||
//JavaScript redirection<BR>
|
||||
echo "<HTML><SCRIPT>document.location='getpdf.php?f=$file';</SCRIPT></HTML>";
|
||||
</TT>
|
||||
</TD></TR></TABLE><BR>
|
||||
Then create the getpdf.php file with this:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
||||
<TT>
|
||||
<?php<BR>
|
||||
$f=$HTTP_GET_VARS['f'];<BR>
|
||||
//Check file (don't skip it!)<BR>
|
||||
if(substr($f,0,3)!='tmp' or strpos($f,'/') or strpos($f,'\\'))<BR>
|
||||
die('Incorrect file name');<BR>
|
||||
if(!file_exists($f))<BR>
|
||||
die('File does not exist');<BR>
|
||||
//Handle special IE request if needed<BR>
|
||||
if($HTTP_SERVER_VARS['HTTP_USER_AGENT']=='contype')<BR>
|
||||
{<BR>
|
||||
Header('Content-Type: application/pdf');<BR>
|
||||
exit;<BR>
|
||||
}<BR>
|
||||
//Output PDF<BR>
|
||||
Header('Content-Type: application/pdf');<BR>
|
||||
Header('Content-Length: '.filesize($f));<BR>
|
||||
readfile($f);<BR>
|
||||
//Remove file<BR>
|
||||
unlink($f);<BR>
|
||||
exit;<BR>
|
||||
?>
|
||||
</TT>
|
||||
</TD></TR></TABLE><BR>
|
||||
This method works in most cases but IE6 can still experience trouble. The "ultimate" method
|
||||
consists in redirecting directly to the temporary file. The file name must therefore end with .pdf:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
||||
<TT>
|
||||
//Determine a temporary file name in the current directory<BR>
|
||||
$file=basename(tempnam(getcwd(),'tmp'));<BR>
|
||||
rename($file,$file.'.pdf');<BR>
|
||||
$file.='.pdf';<BR>
|
||||
//Save PDF to file<BR>
|
||||
$pdf->Output($file);<BR>
|
||||
//JavaScript redirection<BR>
|
||||
echo "<HTML><SCRIPT>document.location='$file';</SCRIPT></HTML>";
|
||||
</TT>
|
||||
</TD></TR></TABLE><BR>
|
||||
This method turns the dynamic PDF into a static one and avoids all troubles. But you have to do
|
||||
some cleaning in order to delete the temporary files. For instance:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
||||
<TT>
|
||||
function CleanFiles($dir)<BR>
|
||||
{<BR>
|
||||
//Delete temporary files<BR>
|
||||
$t=time();<BR>
|
||||
$h=opendir($dir);<BR>
|
||||
while($file=readdir($h))<BR>
|
||||
{<BR>
|
||||
if(substr($file,0,3)=='tmp' and substr($file,-4)=='.pdf')<BR>
|
||||
{<BR>
|
||||
$path=$dir.'/'.$file;<BR>
|
||||
if($t-filemtime($path)>3600)<BR>
|
||||
@unlink($path);<BR>
|
||||
}<BR>
|
||||
}<BR>
|
||||
closedir($h);<BR>
|
||||
}
|
||||
</TT>
|
||||
</TD></TR></TABLE><BR>
|
||||
This function deletes all files of the form tmp*.pdf older than an hour in the specified
|
||||
directory. You may call it where you want, for instance in the script which generates the PDF.
|
||||
<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
|
||||
session_start():
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
||||
<TT>
|
||||
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>
|
||||
<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.
|
||||
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:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
||||
<TT>
|
||||
function Header()<BR>
|
||||
{<BR>
|
||||
global $title;<BR>
|
||||
<BR>
|
||||
$this->SetFont('Arial','B',15);<BR>
|
||||
$this->Cell(0,10,$title,1,1,'C');<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>
|
||||
<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
|
||||
for convenience:
|
||||
<BR>
|
||||
<BR>
|
||||
<TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
|
||||
<TT>
|
||||
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:
|
||||
<BR>
|
||||
<BR>
|
||||
- The maximum memory size allocated to PHP scripts defaults to 8MB. For very big documents,
|
||||
especially with images, this limit may be reached (the file being built into memory). The
|
||||
parameter is configured in the php.ini file.
|
||||
<BR>
|
||||
<BR>
|
||||
- The maximum execution time allocated defaults to 30 seconds. This limit can of course be easily
|
||||
reached. It is configured in php.ini and may be altered dynamically with set_time_limit().
|
||||
<BR>
|
||||
<BR>
|
||||
- Browsers generally have a 5 minute time-out. If you send the PDF directly to the browser and
|
||||
reach the limit, it will be lost. It is therefore advised for very big documents to
|
||||
generate them in a file, and to send some data to the browser from time to time (for instance
|
||||
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
|
||||
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>
|
||||
<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>
|
||||
<BR>
|
||||
<A HREF="http://thierry.schmit.free.fr/dev/mbtPdfAsm/enMbtPdfAsm2.html" TARGET="_blank">http://thierry.schmit.free.fr/dev/mbtPdfAsm/enMbtPdfAsm2.html</A>
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -1,28 +0,0 @@
|
|||
The attribute "host" is only in objectclass account.
|
||||
Unfortunatly "account" conflicts with
|
||||
"inetorgperson". so there's no perfect way to use
|
||||
both.
|
||||
|
||||
In order to get attribute host working you have to
|
||||
modify schema/inetorgperson and include host:
|
||||
|
||||
|
||||
# inetOrgPerson
|
||||
# The inetOrgPerson represents people who are associated with an
|
||||
# organization in some way. It is a structural class and is derived
|
||||
# from the organizationalPerson which is defined in X.521 [X521].
|
||||
objectclass ( 2.16.840.1.113730.3.2.2
|
||||
NAME 'inetOrgPerson'
|
||||
DESC 'RFC2798: Internet Organizational Person'
|
||||
SUP organizationalPerson
|
||||
STRUCTURAL
|
||||
MAY (
|
||||
audio $ businessCategory $ carLicense $ departmentNumber $
|
||||
displayName $ employeeNumber $ employeeType $ givenName $
|
||||
homePhone $ homePostalAddress $ initials $ jpegPhoto $
|
||||
labeledURI $ mail $ manager $ mobile $ o $ pager $
|
||||
photo $ roomNumber $ secretary $ uid $ userCertificate $
|
||||
x500uniqueIdentifier $ preferredLanguage $
|
||||
userSMIMECertificate $ userPKCS12 $ host )
|
||||
)
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
|
||||
Setting up lamdaemon:
|
||||
|
||||
|
||||
Lamdaemon.pl is used to modify quota and home directories 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.
|
||||
|
||||
Debian users can install Net::SSH:Perl with dh-make-perl:
|
||||
|
||||
apt-get install dh-make-perl
|
||||
dh-make-perl --build --cpan Net::SSH::Perl
|
||||
dpkg -i install libnet-ssh-perl_1.25-1_all.deb
|
||||
|
||||
|
||||
4. Set up SSH
|
||||
Your SSH daemon must offer the password authentication method.
|
||||
To activate it just use this configuration option in /etc/ssh/sshd_config:
|
||||
|
||||
PasswordAuthentication yes
|
||||
|
||||
|
||||
5. 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.
|
||||
|
||||
|
||||
6. Debugging lamdaemon
|
||||
If you set up all things as documented before and still get "Access denied"
|
||||
then you can try to debug the problem.
|
||||
|
||||
- Check /var/log/auth.log or the equivalent on your system
|
||||
This file contains messages about all logins. If the ssh login
|
||||
failed then you will find a description about the reason here.
|
||||
|
||||
- Enable debug output in lamdaemon
|
||||
In line 230 of lamdaemon.pl change the SSH options like this:
|
||||
|
||||
my $ssh = Net::SSH::Perl->new($hostname, options=>[
|
||||
"UserKnownHostsFile /dev/null"],
|
||||
protocol => "2,1",
|
||||
debug => "true" );
|
||||
|
||||
This will produce a lot of output when you do the lamdaemon test.
|
||||
Check that there is a line like this:
|
||||
|
||||
Authentication methods that can continue: publickey,password,keyboard-interactive.
|
||||
|
||||
The "password" is the one which is important.
|
||||
|
||||
- Set sshd in debug mode
|
||||
In /etc/ssh/sshd_conf add these lines:
|
||||
|
||||
SyslogFacility AUTH
|
||||
LogLevel DEBUG3
|
||||
|
||||
Now check /var/log/syslog for messages from sshd.
|
||||
|
||||
- Update Openssh
|
||||
A Suse Linux user reported that upgrading Openssh solved the problem.
|
||||
|
||||
|
||||
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.
|
|
@ -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
|
|
@ -1,51 +0,0 @@
|
|||
|
||||
Here is a list of needed LDAP schema files for the different LAM modules.
|
||||
For OpenLDAP we also provide a source where you can get the files.
|
||||
|
||||
|
||||
1. Unix accounts (modules posixAccount/shadowAccount/posixGroup)
|
||||
|
||||
Schema: nis.schema
|
||||
Source: part of OpenLDAP installation
|
||||
|
||||
Suse Linux: Do not use the rfc2307bis.schema but nis.schema instead.
|
||||
|
||||
|
||||
2. Address book entries (module inetOrgPerson)
|
||||
|
||||
Schema: inetorgperson.schema
|
||||
Source: part of OpenLDAP installation
|
||||
|
||||
|
||||
3. Samba 2/3 accounts (modules sambaAccount/sambaSamAccount)
|
||||
|
||||
Schema: samba.schema
|
||||
Source: part of Samba tarball (examples/LDAP/samba.schema)
|
||||
|
||||
|
||||
4. Quota (module quota)
|
||||
|
||||
Schema: none
|
||||
|
||||
|
||||
5. Mail routing (module inetLocalMailRecipient)
|
||||
|
||||
Schema: misc.schema
|
||||
Source: part of OpenLDAP installation
|
||||
|
||||
|
||||
6. Mail aliases (module nisMailAlias)
|
||||
|
||||
Schema: misc.schema
|
||||
Source: part of OpenLDAP installation
|
||||
|
||||
|
||||
7. MAC addresses (module ieee802device)
|
||||
|
||||
Schema: nis.schema
|
||||
Source: part of OpenLDAP installation
|
||||
|
||||
8. Simple Accounts (module account)
|
||||
|
||||
Schema: cosine.schema
|
||||
Source: part of OpenLDAP installation
|
|
@ -1,36 +0,0 @@
|
|||
|
||||
1. Use of SSL
|
||||
|
||||
The data which is transfered between you and LAM is very sensitive.
|
||||
Please always use SSL encrypted connections between LAM and your browser to
|
||||
protect yourself against network sniffers.
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
||||
3. Chrooted servers
|
||||
|
||||
If your server is chrooted and you have no access to /dev/random or /dev/urandom
|
||||
this can be a security risk. LAM stores your LDAP password encrypted in the session.
|
||||
LAM uses rand() to generate the key if /dev/random and /dev/urandom are not accessible.
|
||||
Therefore the key can be easily guessed.
|
||||
An attaker needs read access to the session file (e.g. by another Apache instance) to
|
||||
exploit this.
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Developer FAQ</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align: center;">
|
||||
<h1>Developer FAQ<br>
|
||||
</h1>
|
||||
<br>
|
||||
<div style="text-align: left;"><big><span style="font-weight: bold;">Q:
|
||||
Where is the ldap/config object?</span></big><br>
|
||||
<br>
|
||||
<big><span style="font-weight: bold;">A:</span></big> The ldap object
|
||||
is in <span style="color: rgb(204, 0, 0); font-weight: bold;">$_SESSION['ldap']</span>
|
||||
and the config object in <span
|
||||
style="font-weight: bold; color: rgb(204, 0, 0);">$_SESSION['config']</span>.<br>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
<div style="text-align: left;"><br>
|
||||
</div>
|
||||
<div style="text-align: left;"><big><span style="font-weight: bold;">Q:
|
||||
How can I make LDAP operations, where is the user name and password?</span></big><br>
|
||||
<br>
|
||||
<span style="font-weight: bold;"><big>A:</big> </span>LAM
|
||||
automatically reconnects to the LDAP server on every page load. You can
|
||||
use <span style="font-weight: bold; color: rgb(204, 0, 0);">$_SESSION['ldap']->server</span>
|
||||
which is the LDAP server handle.<br>
|
||||
Be sure to include ldap.inc before (automatically included for account
|
||||
modules).<br>
|
||||
<br>
|
||||
<span style="font-weight: bold;">Example:</span> ldap_search(<span
|
||||
style="font-weight: bold; color: rgb(204, 0, 0);">$_SESSION['ldap']->server</span><span
|
||||
style="color: rgb(204, 0, 0);"></span>, $suffix, $filter, $attributes)<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<big><span style="font-weight: bold;">Q: What is the LDAP suffix for
|
||||
the different account types?</span></big><br>
|
||||
<br>
|
||||
<big><span style="font-weight: bold;">A:</span></big> Just call <span
|
||||
style="font-weight: bold; color: rgb(204, 0, 0);">$_SESSION['config']->get_Suffix($scope)</span>
|
||||
where $scope is the account type (user,group, ...).<br>
|
||||
Be sure to include ldap.inc before (automatically included for account
|
||||
modules).<br>
|
||||
<br>
|
||||
<span style="font-weight: bold;">Example:</span> $suffix = <span
|
||||
style="font-weight: bold; color: rgb(204, 0, 0);">$_SESSION['config']->get_Suffix('user')</span><br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<big><span style="font-weight: bold;">Q: How can I check if the user is
|
||||
really logged in and not calling the scripts by hand?</span></big><br>
|
||||
<br>
|
||||
<big><span style="font-weight: bold;">A:</span></big> After the user
|
||||
successfully logged in to LAM the variable <span
|
||||
style="font-weight: bold; color: rgb(204, 0, 0);">$_SESSION['loggedIn']</span>
|
||||
is set to true.<br>
|
||||
<br>
|
||||
<big><span style="font-weight: bold;"><br>
|
||||
<br>
|
||||
Q: What is the command for these error/warning/info messages?</span></big><br>
|
||||
<br>
|
||||
<big><span style="font-weight: bold;">A:</span></big> Your script must
|
||||
include status.inc (automatically included for account
|
||||
modules) to display these messages.<br>
|
||||
The command is <span style="font-weight: bold;">StatusMessage(<type>,
|
||||
<headline>, <text>[, <variables>])</span>.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold;">Parameters:</span><br>
|
||||
<ul>
|
||||
<li><span style="font-weight: bold;"><type>:</span> message
|
||||
type ("ERROR", "WARN", "INFO")</li>
|
||||
<li><span style="font-weight: bold;"><headline>:</span>
|
||||
headline for the message (may include format tags)<br>
|
||||
</li>
|
||||
<li><span style="font-weight: bold;"><type>:</span> text for
|
||||
the message (may include format tags)</li>
|
||||
<li><span style="font-weight: bold;"><variables>:</span>
|
||||
optional, array of variables to include in headline/text<br>
|
||||
The positions in headline/text must be marked with %s before.</li>
|
||||
</ul>
|
||||
<br>
|
||||
<span style="font-weight: bold;">Format of special tags:</span><br>
|
||||
<ul>
|
||||
<li><span style="font-weight: bold;">{bold}</span>text<span
|
||||
style="font-weight: bold;">{endbold}:</span> "text" is printed bold</li>
|
||||
<li><span style="font-weight: bold;">{color=#123456}</span>text<span
|
||||
style="font-weight: bold;">{endcolor}:</span> "text" is printed in
|
||||
given color</li>
|
||||
<li><span style="font-weight: bold;">{link=http://nodomain.org}</span>text<span
|
||||
style="font-weight: bold;">{endlink}:</span> This will add a link to
|
||||
http://nodomain.org which will be labeled "text"<br>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,49 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-15"
|
||||
http-equiv="content-type">
|
||||
<title>Account modules</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align: center;">Account modules<br>
|
||||
</h1>
|
||||
<div style="text-align: center;"><img alt="base module"
|
||||
src="images/lam_baseModule.png" style="width: 531px; height: 207px;"><br>
|
||||
</div>
|
||||
<div style="text-align: center;"><br>
|
||||
<div style="text-align: left;">The account modules control all the
|
||||
functionality which is specific for LDAP accounts or parts of them.
|
||||
E.g. they define the account detail pages where the user can edit
|
||||
accounts, the profile editor sections and much more. They are the core
|
||||
of LAM.<br>
|
||||
<br>
|
||||
All account modules are saved in <span style="font-weight: bold;">lib/modules/</span>.<br>
|
||||
If your module needs any include files etc. please save it in <span
|
||||
style="font-weight: bold;">lib/modules/<name of your module>.</span><br>
|
||||
<br>
|
||||
Please take a look at the <a href="mod_index.htm">module HowTo</a> for
|
||||
an example to write your own modules.<br>
|
||||
The complete specification for the module interface can be found <a
|
||||
href="modules-specification.htm">here</a>.<br>
|
||||
<br>
|
||||
<h2>Superclass</h2>
|
||||
All <span style="font-weight: bold;">account modules</span> should be
|
||||
subclasses of the <a href="base_module.htm">baseModule</a>.<br>
|
||||
This allows them to benefit from the meta data in the baseModule and
|
||||
reduces very much the code since not the complete module interface has
|
||||
to be implemented.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Module detection</h2>
|
||||
New modules can simply be copied to <span style="font-weight: bold;">lib/modules</span>.
|
||||
LAM will check what files are inside the directory and provide the user
|
||||
new modules automtically.<br>
|
||||
There is no extra configuration file.<br>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,74 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-15"
|
||||
http-equiv="content-type">
|
||||
<title>Base module</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align: center;">Base module<br>
|
||||
</h1>
|
||||
<div style="text-align: center;"><img alt="base module"
|
||||
src="images/lam_baseModule.png" style="width: 531px; height: 207px;"><br>
|
||||
</div>
|
||||
<div style="text-align: center;"><br>
|
||||
<div style="text-align: left;">The <span style="font-weight: bold;">baseModule</span>
|
||||
is the parent class of all account modules. <br>
|
||||
It implements most functions of the <a
|
||||
href="modules-specification.htm">module interface</a> and provides
|
||||
the possibility to use <span style="font-style: italic;">meta data</span>
|
||||
for the module functions.<br>
|
||||
There are also some class variables which are useful for the child
|
||||
classes.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Meta data</h2>
|
||||
The <span style="font-weight: bold;">baseModule</span> allows you to
|
||||
not implement the <a href="modules-specification.htm">module
|
||||
interface</a> directly but to provide <span style="font-style: italic;">meta
|
||||
data</span> which is interpreted by the <span
|
||||
style="font-weight: bold;">baseModule</span>.<br>
|
||||
If you do not use certain functions of the interface the <span
|
||||
style="font-weight: bold;">baseModule</span> also provides dummy
|
||||
functions. E.g. if your module needs no configuration option you can
|
||||
just skip this function in your code and the <span
|
||||
style="font-weight: bold;">baseModule</span> will tell the
|
||||
configuration part that there is no option.<br>
|
||||
<br>
|
||||
To <span style="font-style: italic;">define meta</span> data you have
|
||||
to implement the function <span
|
||||
style="font-weight: bold; font-style: italic;">get_metaData()</span>.
|
||||
This function must return a hash array with the meta options as array
|
||||
keys.<br>
|
||||
Please refer to the <a href="modules-specification.htm">module
|
||||
interface</a> for details about the format of <span
|
||||
style="font-style: italic;">meta data</span>.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Functions<br>
|
||||
</h2>
|
||||
<span style="font-weight: bold;">get_scope():</span> This function
|
||||
returns the account type ("user", "group", ...) of the module.<br>
|
||||
<br>
|
||||
For a list of <span style="font-style: italic;">meta data</span>
|
||||
functions please refer to the <a href="modules-specification.htm">module
|
||||
interface</a>.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Class variables</h2>
|
||||
<span style="font-weight: bold;">$moduleSettings:</span> This variable
|
||||
contains the configuration settings of all modules.<br>
|
||||
<span style="font-weight: bold;">$base:</span> This is the name of the
|
||||
parent <span style="font-style: italic;">accountContainer</span>
|
||||
($_SESSION[$base]).<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,61 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-15"
|
||||
http-equiv="content-type">
|
||||
<title>config.inc</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align: center;">config.inc</h1>
|
||||
<br>
|
||||
<br>
|
||||
This file includes all functions needed to manage configuration
|
||||
profiles. It includes classes for the profiles itself and the master
|
||||
configuration (default profile, master password, etc.).<br>
|
||||
<br>
|
||||
There are also two global functions for general use: <span
|
||||
style="font-style: italic;">setlanguage</span> and <span
|
||||
style="font-style: italic;">metarefresh</span><br>
|
||||
<br>
|
||||
<h2>Meta refresh</h2>
|
||||
The global function <span
|
||||
style="font-weight: bold; font-style: italic;">metaRefresh()</span>
|
||||
takes an URL as argument and prints all HTML code needed for a meta
|
||||
refresh to this URL.<br>
|
||||
<br>
|
||||
<h2>Language</h2>
|
||||
LAM uses <span style="font-style: italic;">gettext</span> to translate
|
||||
the HTML pages to the different languages. Therefore some preferences
|
||||
need to be set on every page load. This is done by <span
|
||||
style="font-style: italic; font-weight: bold;">setlanguage()</span>.<br>
|
||||
The function should be called directly after starting the session.<br>
|
||||
<br>
|
||||
The list of possible languages is stored in <span
|
||||
style="font-style: italic;">config/language</span>. It includes the
|
||||
locale name, the character encoding an the language name.<br>
|
||||
All languages use UTF-8 as encoding because LDAP also stores values in
|
||||
this format.<br>
|
||||
<br>
|
||||
<h2>Configuration profiles</h2>
|
||||
Each configuration profile is saved in a single file in <span
|
||||
style="font-weight: bold;">config/</span>.<br>
|
||||
<br>
|
||||
There are two types of configuration options:<br>
|
||||
<ul>
|
||||
<li>Static options (LDAP server settings, etc.)<br>
|
||||
</li>
|
||||
<li>Module options (UID/GID ranges)<br>
|
||||
</li>
|
||||
</ul>
|
||||
All static options have a describing comment in the configuration file
|
||||
to make it easier for the user to modify the values. The dynamic
|
||||
options provided by the modules do not include a comment.<br>
|
||||
<br>
|
||||
<h2>Master configuration file</h2>
|
||||
LAM stores the default configuartion profile and a master password in <span
|
||||
style="font-style: italic;">config/config.cfg</span>.<br>
|
||||
The master password is verified when the user wants to create/delete
|
||||
configuration profiles.<br>
|
||||
</body>
|
||||
</html>
|
|
@ -1,44 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-15"
|
||||
http-equiv="content-type">
|
||||
<title>Configuration profiles</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align: center;">Configuration profiles</h1>
|
||||
<br>
|
||||
LAM allows the user to store the configuration settings in <span
|
||||
style="font-weight: bold;">profiles</span>. This makes it easy to
|
||||
manage different LDAP servers. All profile files ae stored in <span
|
||||
style="font-weight: bold;">config/</span> and are named <span
|
||||
style="font-weight: bold;"><span style="font-style: italic;"><name></span>.conf</span>.<br>
|
||||
The <span style="font-weight: bold;">master configuration</span> file <span
|
||||
style="font-style: italic;">config/config.cfg</span> only stores the
|
||||
default profile and master password. It has the same file format as the
|
||||
profiles.<br>
|
||||
<br>
|
||||
<h2>File format</h2>
|
||||
LAM allows to store values and comments in the configuration files.
|
||||
Only one type per line is allowed, it is not possible to mix comments
|
||||
and values in the same line.<br>
|
||||
<br>
|
||||
<h3>Settings<br>
|
||||
</h3>
|
||||
<span style="font-weight: bold;"><identifier>: <value><br>
|
||||
<br>
|
||||
</span>The first word in the line is taken as identifier for the
|
||||
setting. It must be followed by a <span style="font-weight: bold;">":"</span>
|
||||
and a space.<br>
|
||||
The rest of the line is taken as the value for this setting.<br>
|
||||
<br>
|
||||
<h3>Comments</h3>
|
||||
<span style="font-weight: bold;"># Comment</span><br
|
||||
style="font-weight: bold;">
|
||||
<br>
|
||||
Comments always start with a <span style="font-weight: bold;">"#"</span>
|
||||
as first character and end at the line end. LAM will ignore all lines
|
||||
starting with a <span style="font-style: italic;">"#"</span>.<br>
|
||||
</body>
|
||||
</html>
|
|
@ -1,77 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-15"
|
||||
http-equiv="content-type">
|
||||
<title>LAM - Configuration pages</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align: center;">
|
||||
<h1>Configuration pages</h1>
|
||||
</div>
|
||||
<br>
|
||||
<div style="text-align: center;"><img
|
||||
style="width: 620px; height: 319px;" alt="configuration"
|
||||
src="images/lam_config.png"><br>
|
||||
<div style="text-align: left;">
|
||||
<h2>Configuration - Login (conflogin.php):</h2>
|
||||
This is the start page of the configuration editor. The user can select
|
||||
a profile for editing or go to the profile management page.<br>
|
||||
Each account profile is protected with a password which is stored in
|
||||
the profile.<br>
|
||||
The list of possible profiles is returned by <span
|
||||
style="font-style: italic; font-weight: bold;">getConfigProfiles()</span>
|
||||
in config.inc, the default profile is returned by an object of class <span
|
||||
style="font-weight: bold; font-style: italic;">CfgMain</span> from
|
||||
config.inc.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Configuration - Profile management (profmanage.php):</h2>
|
||||
Here the user can add and modify configuration profiles or change the
|
||||
configuration master password. <br>
|
||||
The configuration master password prevents unauthorised users from
|
||||
changing the profiles. The password is saved in config/config.cfg and
|
||||
managed via the <span style="font-style: italic; font-weight: bold;">CfgMain</span>
|
||||
class.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Configuration - Main page (confmain.php):</h2>
|
||||
This page presents all configuration settings for editing.<br>
|
||||
Some of the settings are module independent (e.g. server settings,
|
||||
language, ...) and displayed always.<br>
|
||||
The others are set up by the account modules. Only settings of
|
||||
currently selected modules are displayed.<br>
|
||||
Users may also change the profile password on this page.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Configuration - Module selection (confmodules.php):<br>
|
||||
</h2>
|
||||
On this page the user can select which account modules LAM should use.<br>
|
||||
The list of possible modules is returned by <span
|
||||
style="font-style: italic; font-weight: bold;">getAvailableModules()</span>
|
||||
in modules.inc and checked for dependencies/conflicts with <span
|
||||
style="font-weight: bold; font-style: italic;">check_module_depends()</span>
|
||||
and <span style="font-weight: bold; font-style: italic;">check_module_conflicts()</span>.<br>
|
||||
<br>
|
||||
Each account type needs exactly one <span style="font-style: italic;">base
|
||||
module</span>
|
||||
which is the base of a account by providing a structural object class.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Configuration - Save settings (confsave.php):<br>
|
||||
</h2>
|
||||
This script checks the input and displays possible error messages or an
|
||||
overview of the saved settings.<br>
|
||||
The static settings are set and checked with an object of class <span
|
||||
style="font-style: italic; font-weight: bold;">Config</span> from
|
||||
config.inc.<br>
|
||||
The account modules manage the input validation for their fields and
|
||||
are also able to return error messages. This is done with <span
|
||||
style="font-weight: bold; font-style: italic;">checkConfigOptions()</span>
|
||||
from modules.inc.<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 6.5 KiB |
|
@ -1,103 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>LAM development documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align: center;">
|
||||
<h1>LDAP Account Manager - Code overview</h1>
|
||||
These documents are supposed to give developers who want to modify LAM
|
||||
an overview of the codebase. It focuses mainly on what is done to
|
||||
generate the HTML output and the most important functions provided by
|
||||
the library files.<br>
|
||||
<img src="images/lam_overview.png" alt="overview" align="middle"
|
||||
border="0" height="620" width="877"><br>
|
||||
<br>
|
||||
<div style="text-align: left;">
|
||||
<table style="text-align: left; width: 100%;" border="0" cellpadding="2"
|
||||
cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top; width: 33%;">
|
||||
<h2>Web pages:</h2>
|
||||
<ul>
|
||||
<li><a href="login.htm">Login</a><br>
|
||||
</li>
|
||||
<li><a href="file:///daten/cvs/lam/docs/devel/config_pages.htm">Configuration</a></li>
|
||||
<li><a href="file:///daten/cvs/lam/docs/devel/lists.htm">Account
|
||||
lists</a></li>
|
||||
<li><a href="tree_schema.htm">Tree view</a><br>
|
||||
</li>
|
||||
<li>Account pages</li>
|
||||
<li>Tools</li>
|
||||
<ul>
|
||||
<li><a href="profile_editor.htm">Profile editor</a></li>
|
||||
<li><a href="samba_domains.htm">Samba 3 domains</a></li>
|
||||
<li><a href="upload.htm">File upload</a></li>
|
||||
<li><a href="ou-edit.htm">OU editor</a></li>
|
||||
<li><a href="pdf_editor.htm">PDF editor</a><br>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</td>
|
||||
<td style="vertical-align: top; width: 33%;">
|
||||
<h2>Libraries:</h2>
|
||||
<ul>
|
||||
<li>Account modules (modules.inc)<br>
|
||||
</li>
|
||||
<li>PDF (pdf.inc, pdfstruct.inc)<br>
|
||||
</li>
|
||||
<li><a href="profiles.htm">Account profiles (profiles.inc)</a><br>
|
||||
</li>
|
||||
<li><a href="config.htm">Configuration (config inc)</a><br>
|
||||
</li>
|
||||
<li><a href="file:///daten/cvs/lam/docs/devel/ldap.htm">LDAP
|
||||
(ldap.inc)</a><br>
|
||||
</li>
|
||||
<li><a href="other_libs.htm">other libraries</a></li>
|
||||
<ul>
|
||||
<li><a href="other_libs.htm#lamdaemon">Lamdaemon</a><br>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="other_libs.htm#blowfish">Blowfish</a></li>
|
||||
<li><a href="other_libs.htm#cache">LADP cache</a></li>
|
||||
<li><a href="other_libs.htm#lists">Account lists</a></li>
|
||||
<li><a href="other_libs.htm#status">Status messages</a></li>
|
||||
<li><a href="other_libs.htm#treeSchema">Tree view and schema
|
||||
browser</a><br>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</td>
|
||||
<td style="vertical-align: top; width: 33%;">
|
||||
<h2>Configuration files:</h2>
|
||||
<ul>
|
||||
<li><a href="base_module.htm">Base module</a><br>
|
||||
</li>
|
||||
<li><a href="account_modules.htm">Account modules</a></li>
|
||||
<li><a href="pdf_profiles.htm">PDF templates</a></li>
|
||||
<li><a href="profile_files.htm">Account profiles</a></li>
|
||||
<li><a href="config_files.htm">Configuration profiles</a><br>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Howtos</h2>
|
||||
<ul>
|
||||
<li><a href="mod_index.htm">Writing account modules</a><br>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<h2><a href="FAQ.htm">FAQ</a></h2>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,55 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-15"
|
||||
http-equiv="content-type">
|
||||
<title>ldap.inc</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align: center;">ldap.inc</h1>
|
||||
<br>
|
||||
<br>
|
||||
This library provides the access to the LDAP server and its content.<br>
|
||||
The <span style="font-weight: bold; font-style: italic;">$_SESSION['ldap']</span>
|
||||
object reconnects automatically to the LDAP server on every page load.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>1. Server handle</h2>
|
||||
All PHP functions which access LDAP require a server handle as
|
||||
parameter. This is managed by ldap.inc.<br>
|
||||
You can access it with <span
|
||||
style="font-weight: bold; font-style: italic;">$_SESSION['ldap']->server</span>.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>2. Object classes</h2>
|
||||
Account modules may want to check if the current LDAP server supports
|
||||
all required object classes.<br>
|
||||
<span style="font-weight: bold; font-style: italic;">$_SESSION['ldap']->objectClasses
|
||||
</span>contains a list of object classes and their attributes which is
|
||||
read from the LDAP server.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>3. En-/Decryption</h2>
|
||||
For security reasons sensitive data like user passwords should be
|
||||
encrypted before storing in session.<br>
|
||||
<span style="font-weight: bold; font-style: italic;">$_SESSION['ldap']->encrypt(<string>)</span>
|
||||
encrypts a string and returns a binary object. This can be decrypted
|
||||
with <span style="font-weight: bold; font-style: italic;">$_SESSION['ldap']->decrypt(<object>)</span><br>
|
||||
<br>
|
||||
Ldap.inc will take care for the crypotographic key and if Blowfish or
|
||||
MCrypt/AES is used.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>4. Random values</h2>
|
||||
Ldap.inc contains a random integer value which is much more secure than
|
||||
calling <span style="font-style: italic;">mt_rand()</span>. The value
|
||||
changes on every page load and is accessible in <span
|
||||
style="font-weight: bold; font-style: italic;">$_SESSION['ldap']->rand</span><span
|
||||
style="font-style: italic;">.</span><br>
|
||||
If you need multiple values you can get a new value by calling <span
|
||||
style="font-weight: bold; font-style: italic;">$_SESSION['ldap']->new_rand()</span><span
|
||||
style="font-style: italic;">.</span><br>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
|
@ -1,103 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-15"
|
||||
http-equiv="content-type">
|
||||
<title>LAM - Account lists</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align: center;">Account lists</h1>
|
||||
<br>
|
||||
<div style="text-align: center;"><img
|
||||
style="width: 496px; height: 177px;" alt="Account lists"
|
||||
src="images/lam_lists.png"><br>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
The account lists are all built after the same schema. They provide a
|
||||
list of found accounts which can be restricted by LDAP filters and the
|
||||
LDAP OU (Organizational Unit).<br>
|
||||
<br>
|
||||
The list of LDAP attributes and thus table columns is taken from the
|
||||
configuration profile (<span
|
||||
style="font-weight: bold; font-style: italic;">get_...listAttributes()</span>
|
||||
in config.inc). Each account list has a separate list of attributes.<br>
|
||||
Only these attributes are given the LDAP search as attribute parameter.<br>
|
||||
There is also a predefined description list for the attributes in
|
||||
lists.inc. The user may use other values by setting them in the
|
||||
configuration profile.<br>
|
||||
<br>
|
||||
The number of accounts per page is limited in the configuration profile
|
||||
(<span style="font-weight: bold; font-style: italic;">get_MaxListEntries()</span>
|
||||
in config.inc). There will be links at the beginning and end of the
|
||||
list if more accounts were found.<br>
|
||||
<br>
|
||||
Several common helper functions for sorting and some page elements
|
||||
reside in lists.inc.<br>
|
||||
<br>
|
||||
<h2>1. Getting accounts from LDAP</h2>
|
||||
Each account list has its own LDAP suffix which is saved in the
|
||||
configuration profile. This is used as search base.<br>
|
||||
The account modules provide an LDAP filter (<span
|
||||
style="font-weight: bold; font-style: italic;">get_ldap_filter()</span>
|
||||
in modules.inc) to get only accounts of a special type.<br>
|
||||
<br>
|
||||
This list can be further reduced if the user provides an additional
|
||||
LDAP filter with the filter boxes or selects another LDAP OU with the
|
||||
drop-down-box.<br>
|
||||
<br>
|
||||
<h2>2. Caching LDAP accounts</h2>
|
||||
The lists usually do not ask the LDAP server for an account list every
|
||||
time the user changes the page. The accounts are cached in the session.<br>
|
||||
<br>
|
||||
A new LDAP search is done if the user:<br>
|
||||
<ul>
|
||||
<li>changes to another account list or tool</li>
|
||||
<li>adds/modifies an account</li>
|
||||
<li>selects the "refresh" button</li>
|
||||
<li>adds additional LDAP filters or changes the LDAP OU<br>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
It is <span style="font-style: italic;">not</span> done if the user:<br>
|
||||
<ul>
|
||||
<li>changes the list pages if there are more accounts than what can
|
||||
be shown</li>
|
||||
<li>sorts the list</li>
|
||||
</ul>
|
||||
<br>
|
||||
<h2>3. Adding/Editing accounts</h2>
|
||||
There are buttons at the end of the page to add/delete accounts. Adding
|
||||
accounts is done by account/edit.php and deleting by delete.php.<br>
|
||||
<br>
|
||||
The user can use the link in each account row to modify (in
|
||||
accounts/edit.php) the account. This can also be done by double
|
||||
clicking the row if Java Script is enabled.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>4. Export to PDF</h2>
|
||||
The user can generate PDF files for the accounts. This is done by the <span
|
||||
style="font-style: italic; font-weight: bold;">createModulePDF()</span>
|
||||
function from pdf.inc.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>5. Special abilities of some lists</h2>
|
||||
<h3>5.1. The user list</h3>
|
||||
If the attribute <span style="font-style: italic;">gidNumber</span> is
|
||||
shown as table column then there will be an additional checkbox to
|
||||
translate the GID to the group name.<br>
|
||||
This checkbox is hidden if <span style="font-style: italic;">gidNumber</span>
|
||||
is not part of the attribute list.<br>
|
||||
<br>
|
||||
<h3>5.2. The group list</h3>
|
||||
If the attribute memberUID is shown as table column then all values of
|
||||
this attribute are shown as links.<br>
|
||||
These links redirect to userlink.php which tries to find the given user
|
||||
and redirects to account/edit.php for account modifying.<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
|
@ -1,70 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-15"
|
||||
http-equiv="content-type">
|
||||
<title>Login</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align: center;">Login<br>
|
||||
</h1>
|
||||
<div style="text-align: center;"><br>
|
||||
</div>
|
||||
<div style="text-align: center;"><br>
|
||||
<div style="text-align: left;">The <span style="font-style: italic;">login</span>
|
||||
page is the first page the user sees when opening LAM. It manages LDAP
|
||||
authentication and checks the environment of the user.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>login.php</h2>
|
||||
The login page offers authentication, language selection and profile
|
||||
selection. There are also some environment checks.<br>
|
||||
<br>
|
||||
<h3>Authentication</h3>
|
||||
The list of possible users is loaded from the current active profile.
|
||||
Only the RDN value is offered for selection by the user.<br>
|
||||
When the user submits his password then a new <span
|
||||
style="font-style: italic;">Ldap</span> object is created and LAM
|
||||
tries to connect to the LDAP server.<br>
|
||||
If the connection was successful the user is forwarded to the main
|
||||
frame (main.php). The session variable <span
|
||||
style="font-weight: bold; font-style: italic;">$_SESSION['loggedIn']</span>
|
||||
is set to <span style="font-style: italic;">true</span>. This informs
|
||||
the other PHP scripts that a valid user is connected (e.g. the user is
|
||||
allowed to create account profiles).<br>
|
||||
<br>
|
||||
<h3>Language selection</h3>
|
||||
The list of possible languages is read from <span
|
||||
style="font-weight: bold;">config/language</span>. The current active
|
||||
profile defines the preselected language and the language of the login
|
||||
page itself.<br>
|
||||
<br>
|
||||
<h3>Profile selection<br>
|
||||
</h3>
|
||||
The user can change the active configuration profile at login. A list
|
||||
of possible profiles is retrieved by <span
|
||||
style="font-weight: bold; font-style: italic;">getConfigProfiles()</span>.<br>
|
||||
If the profile is changed then the login replaces the config object in <span
|
||||
style="font-weight: bold; font-style: italic;">$_SESSION['config']</span>
|
||||
by a new one. Then the main login page is loaded and uses the new
|
||||
values.<br>
|
||||
<br>
|
||||
<h3>Environment checks</h3>
|
||||
LAM checks if all needed PHP extensions are installed.<br>
|
||||
<ul>
|
||||
<li><span style="font-weight: bold;">LDAP:</span> PHP needs LDAP
|
||||
support</li>
|
||||
<li><span style="font-weight: bold;">MHash:</span> needed for
|
||||
password creation</li>
|
||||
<li><span style="font-weight: bold;">Gettext:</span> needed for
|
||||
translation<br>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,420 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Module HowTo - Account pages</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align: center;">
|
||||
<h1>Module HowTo - Account pages<br>
|
||||
</h1>
|
||||
<br>
|
||||
<br>
|
||||
<div style="text-align: left;"><br>
|
||||
<h2>1. Loading the LDAP attributes<br>
|
||||
</h2>
|
||||
Every time the user selects an existing account to modify LAM will load
|
||||
the complete LDAP entry of it. Your module then should select the
|
||||
attributes which are useful for it.<br>
|
||||
There are two variables in <span style="font-style: italic;">baseModule</span>
|
||||
which should be used to store the attributes. The <span
|
||||
style="font-weight: bold;">$attributes</span> variable stores the
|
||||
current attributes including changes the user made. The <span
|
||||
style="font-weight: bold;">$orig</span> variable stores the attributes
|
||||
as they were originally when the account was loaded. This allows you to
|
||||
see what changes were made.<br>
|
||||
<br>
|
||||
The <span style="font-weight: bold;">load_attributes()</span> function
|
||||
in your module gets the complete attribute list from LDAP.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The <span style="font-style: italic;">ieee802Device</span> uses an
|
||||
object class and the <span style="font-style: italic;">'macAddress'</span>
|
||||
attribute. Therefore we will save this two values.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* This function loads all needed attributes into the
|
||||
object.<br>
|
||||
*<br>
|
||||
* @param array $attr an array as it is retured from
|
||||
ldap_get_attributes<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span> <span
|
||||
style="color: rgb(255, 0, 0);">load_attributes</span>($attr) {<br>
|
||||
|
||||
$this->attributes['objectClass'] = array();<br>
|
||||
|
||||
$this->attributes['macAddress'] = array();<br>
|
||||
$this->orig['objectClass'] =
|
||||
array();<br>
|
||||
$this->orig['macAddress'] =
|
||||
array();<br>
|
||||
if (isset($attr['objectClass'])) {<br>
|
||||
|
||||
unset($attr['objectClass']['count']);<br>
|
||||
|
||||
$this->attributes['objectClass'] = $attr['objectClass'];<br>
|
||||
|
||||
$this->orig['objectClass'] = $attr['objectClass'];<br>
|
||||
}<br>
|
||||
if (isset($attr['macAddress'])) {<br>
|
||||
|
||||
unset($attr['macAddress']['count']);<br>
|
||||
|
||||
$this->attributes['macAddress'] = $attr['macAddress'];<br>
|
||||
|
||||
$this->orig['macAddress'] = $attr['macAddress'];<br>
|
||||
}<br>
|
||||
return 0;<br>
|
||||
}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>2. Defining pages<br>
|
||||
</h2>
|
||||
You can define multiple subpages for your account page. Usually one
|
||||
page is enough but you may display certain attribute settings on an
|
||||
extra page (e.g. Unix group memberships are on a second page).<br>
|
||||
<br>
|
||||
The page names are set by <span style="font-weight: bold;">pages() </span>which
|
||||
returns an array of names.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The
|
||||
<span style="font-style: italic;">ieee802Device</span>
|
||||
module needs only one page which is called <span
|
||||
style="font-style: italic;">'attributes'</span>.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* This function returns a list of all account pages
|
||||
in this module.<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span> <span
|
||||
style="color: rgb(255, 0, 0);">pages</span>() {<br>
|
||||
return array('attributes');<br>
|
||||
}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>3. Page display</h2>
|
||||
Now that you have defined your subpages you will need one function for
|
||||
each page to display it. The function must return <span
|
||||
style="font-style: italic;">meta HTML code</span> as defined in the <span
|
||||
style="font-style: italic;">modules specification</span>.<br>
|
||||
This function is called <span style="font-weight: bold;">display_html_<page
|
||||
name>()</span> where <span style="font-style: italic;"><page
|
||||
name></span> is the name of your subpage.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The
|
||||
<span style="font-style: italic;">ieee802Device</span>
|
||||
module has only one subpage called <span style="font-style: italic;">'attributes'</span>.<br>
|
||||
<br>
|
||||
The first half of the code displays the existing MAC addresses and the
|
||||
second an input field for new values.<br>
|
||||
The variable <span style="font-style: italic;">$this->attributes</span>
|
||||
contains the LDAP attributes which are useful for this module.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* This function will create the meta HTML code to
|
||||
show a page with all attributes.<br>
|
||||
*<br>
|
||||
* @param array $post HTTP-POST values<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span> <span
|
||||
style="color: rgb(255, 0, 0);">display_html_attributes</span>($post) {<br>
|
||||
$return = array();<br>
|
||||
// list current MACs<br>
|
||||
for ($i = 0; $i <
|
||||
sizeof($this->attributes['macAddress']); $i++) {<br>
|
||||
$return[] =
|
||||
array(<br>
|
||||
|
||||
0 => array('kind' => 'text', 'text' =>
|
||||
_('MAC address')),<br>
|
||||
|
||||
1 => array('kind' => 'input', 'name' =>
|
||||
'macAddress' . $i, 'type' => 'text', 'size' => '17', 'maxlength'
|
||||
=> '17', 'value' => $this->attributes['macAddress'][$i]),<br>
|
||||
|
||||
2 => array('kind' => 'input', 'type' =>
|
||||
'submit', 'name' => 'delMAC' . $i, 'value' => _("Remove")),<br>
|
||||
|
||||
3 => array('kind' => 'help', 'value' =>
|
||||
'mac'));<br>
|
||||
}<br>
|
||||
// input box for new MAC<br>
|
||||
$return[] = array(<br>
|
||||
0 =>
|
||||
array('kind' => 'text', 'text' => _('New MAC address')),<br>
|
||||
1 =>
|
||||
array('kind' => 'input', 'name' => 'macAddress', 'type' =>
|
||||
'text', 'size' => '17', 'maxlength' => '17', 'value' => ''),<br>
|
||||
2 =>
|
||||
array('kind' => 'input', 'type' => 'submit', 'name' =>
|
||||
'addMAC', 'value' => _("Add")),<br>
|
||||
3 =>
|
||||
array('kind' => 'help', 'value' => 'mac'),<br>
|
||||
4 =>
|
||||
array('kind' => 'input', 'type' => 'hidden', 'value' =>
|
||||
sizeof($this->attributes['macAddress']), 'name' => 'mac_number'));<br>
|
||||
return $return;<br>
|
||||
}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>4. Processing input data<br>
|
||||
</h2>
|
||||
Every time the user clicks on a submit button while your page is
|
||||
displayed LAM will call a function in your module.<br>
|
||||
This function is called <span style="font-weight: bold;">process_<page
|
||||
name>()</span> where <span style="font-style: italic;"><page
|
||||
name></span> is the name of your subpage.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The
|
||||
<span style="font-style: italic;">ieee802Device</span>
|
||||
module has only one subpage called <span style="font-style: italic;">'attributes'</span>
|
||||
and therefore only <span style="font-style: italic;">process_attributes()</span>.<br>
|
||||
<br>
|
||||
The function checks the input fields and fills the LDAP attributes. If
|
||||
all is ok it will enable the user to move to another module page.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Write variables into object and do some regex
|
||||
checks<br>
|
||||
*<br>
|
||||
* @param array $post HTTP-POST values<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span> <span
|
||||
style="color: rgb(255, 0, 0);">process_attributes</span>($post) {<br>
|
||||
$this->triggered_messages =
|
||||
array();<br>
|
||||
|
||||
$this->attributes['macAddress'] = array();<br>
|
||||
// check old MACs<br>
|
||||
if (isset($post['mac_number'])) {<br>
|
||||
for ($i = 0;
|
||||
$i < $post['mac_number']; $i++) {<br>
|
||||
|
||||
if (isset($post['delMAC' . $i])) continue;<br>
|
||||
|
||||
if (isset($post['macAddress' . $i]) &&
|
||||
($post['macAddress' . $i] != "")) {<br>
|
||||
|
||||
// check if address has correct
|
||||
format<br>
|
||||
|
||||
if (!get_preg($post['macAddress'
|
||||
. $i], 'macAddress')) {<br>
|
||||
|
||||
$message =
|
||||
$this->messages['mac'][0];<br>
|
||||
|
||||
$message[] =
|
||||
$post['macAddress' . $i];<br>
|
||||
|
||||
|
||||
$this->triggered_messages[] = array($message);<br>
|
||||
|
||||
}<br>
|
||||
|
||||
|
||||
$this->attributes['macAddress'][] = $post['macAddress' . $i];<br>
|
||||
|
||||
}<br>
|
||||
}<br>
|
||||
}<br>
|
||||
// check new MAC<br>
|
||||
if (isset($post['macAddress'])
|
||||
&& ($post['macAddress'] != "")) {<br>
|
||||
// check if
|
||||
address has correct format<br>
|
||||
if
|
||||
(get_preg($post['macAddress'], 'macAddress')) {<br>
|
||||
|
||||
$this->attributes['macAddress'][] =
|
||||
$post['macAddress'];<br>
|
||||
}<br>
|
||||
else {<br>
|
||||
|
||||
$message =
|
||||
$this->messages['mac'][0];<br>
|
||||
|
||||
$message[] = $post['macAddress'];<br>
|
||||
|
||||
$this->triggered_messages[] =
|
||||
array($message);<br>
|
||||
}<br>
|
||||
}<br>
|
||||
|
||||
$this->attributes['macAddress'] =
|
||||
array_unique($this->attributes['macAddress']);<br>
|
||||
if
|
||||
(sizeof($this->triggered_messages) > 0) {<br>
|
||||
|
||||
$this->inputCorrect = false;<br>
|
||||
return
|
||||
$this->triggered_messages;<br>
|
||||
}<br>
|
||||
else {<br>
|
||||
|
||||
$this->inputCorrect = true;<br>
|
||||
return 0;<br>
|
||||
}<br>
|
||||
}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>5. Defining that your module is ready for LDAP add/modify</h2>
|
||||
Before a new account can be created or modified all modules are asked
|
||||
if they are ready.<br>
|
||||
There are two functions which control the module status. The <span
|
||||
style="font-weight: bold;">module_ready()</span> function has to
|
||||
return <span style="font-style: italic;">true</span> if the user may
|
||||
move to another module page. If it is <span style="font-style: italic;">false</span>
|
||||
the user will be redirected to your module page. The second function is
|
||||
<span style="font-weight: bold;">module_complete()</span>. The user
|
||||
cannot do the LDAP operation if one or modules return <span
|
||||
style="font-style: italic;">false</span>.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The
|
||||
<span style="font-style: italic;">ieee802Device</span>
|
||||
module uses a global variable to store the status: <span
|
||||
style="font-style: italic;">$this->inputCorrect</span>. It is set
|
||||
in <span style="font-style: italic;">process_attributes()</span>. The
|
||||
variable can be preset to <span style="font-style: italic;">true</span>
|
||||
because the MAC address is optional.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /** used for
|
||||
account pages, true if input data is correct */<br>
|
||||
<span style="font-weight: bold;">var</span>
|
||||
$inputCorrect = true;<br>
|
||||
<br>
|
||||
/**<br>
|
||||
* This function returns true if all needed settings
|
||||
are done.<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span> <span
|
||||
style="color: rgb(255, 0, 0);">module_complete</span>() {<br>
|
||||
return $this->inputCorrect;<br>
|
||||
}<br>
|
||||
<br>
|
||||
/**<br>
|
||||
* Returns true if all settings on module page are
|
||||
correct.<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span> <span
|
||||
style="color: rgb(255, 0, 0);">module_ready</span>() {<br>
|
||||
return $this->inputCorrect;<br>
|
||||
}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>6. Saving the LDAP attributes<br>
|
||||
</h2>
|
||||
When all modules report that they are ready for LDAP add/modify and the
|
||||
user clicks on the add/modify button your module will be asked what
|
||||
changes have to be made.<br>
|
||||
This is done in the function <span style="font-weight: bold;">save_attributes()</span>
|
||||
which must be implemented by your module.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The <span style="font-style: italic;">ieee802Device</span>
|
||||
module saves the attribute states in <span style="font-style: italic;">$attributes</span>
|
||||
and <span style="font-style: italic;">$orig</span> and there are no
|
||||
other DNs which may be modified. Therefore we can use the <span
|
||||
style="font-weight: bold;">save_module_attributes()</span> function in
|
||||
<span style="font-weight: bold;">accountContainer</span>. You can
|
||||
always access the current <span style="font-weight: bold;">accountContainer</span>
|
||||
with <span style="font-weight: bold;">$_SESSION[$this->base]</span>.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Returns a list of modifications which have to be
|
||||
made to the LDAP account.<br>
|
||||
*<br>
|
||||
* @return array list of modifications<br>
|
||||
* <br>This function returns an array with 3
|
||||
entries:<br>
|
||||
* <br>array( DN1 ('add' => array($attr),
|
||||
'remove' => array($attr), 'modify' => array($attr)), DN2 .... )<br>
|
||||
* <br>DN is the DN to change. It may be
|
||||
possible to change several DNs (e.g. create a new user and add him to
|
||||
some groups via attribute memberUid)<br>
|
||||
* <br>"add" are attributes which have to be
|
||||
added to LDAP entry<br>
|
||||
* <br>"remove" are attributes which have to be
|
||||
removed from LDAP entry<br>
|
||||
* <br>"modify" are attributes which have to
|
||||
been modified in LDAP entry<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span> <span
|
||||
style="color: rgb(255, 0, 0);">save_attributes</span>() {<br>
|
||||
return
|
||||
$_SESSION[$this->base]->save_module_attributes($this->attributes,
|
||||
$this->orig);<br>
|
||||
}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<span style="font-weight: bold;"></span>
|
||||
<h2><span style="font-weight: bold;"></span></h2>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,109 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Module HowTo - Basic concepts</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align: center;">
|
||||
<h1>Module HowTo - Basic concepts<br>
|
||||
</h1>
|
||||
<br>
|
||||
<br>
|
||||
<div style="text-align: left;"><br>
|
||||
<h2>1. Licensing</h2>
|
||||
LAM is licensed under the <a href="http://www.gnu.org/licenses/gpl.txt">GNU
|
||||
General Public License</a>. This means your plugins need a compatible
|
||||
license.<br>
|
||||
LAM is distributed with a copy of the GPL license.<br>
|
||||
<br>
|
||||
<h2>2. Naming and position in directory structure</h2>
|
||||
<br>
|
||||
Module names are usually named after the object class they manage.
|
||||
However, you can use any name you want, it should be short and
|
||||
containing only a-z and 0-9. The module name is only shown in the
|
||||
configuration dialog, on all other pages LAM will show a provided <span
|
||||
style="font-style: italic;">alias</span> name.<br>
|
||||
All account modules are stored in <span style="font-weight: bold;">lib/modules</span>.
|
||||
The filename must end with <span style="font-weight: bold;">.inc</span>
|
||||
and the file must have the same name as its inside class.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span>
|
||||
Our example module will provide the <span style="font-weight: bold;">class
|
||||
ieee802Devic</span><span style="font-style: italic; font-weight: bold;">e</span>,
|
||||
therefore the file will be called <span style="font-weight: bold;">lib/modules/ieee802Devic</span><span
|
||||
style="font-style: italic; font-weight: bold;">e.inc</span>.<span
|
||||
style="font-style: italic;"></span><br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>3. Defining the class</h2>
|
||||
All module classes have <span style="font-weight: bold;">baeModule</span>
|
||||
as parent class. This provides common functionality and dummy functions
|
||||
for all required class functions.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold;">Example:</span><br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;">/**<br>
|
||||
* Provides MAC addresses for hosts.<br>
|
||||
*<br>
|
||||
* @package modules<br>
|
||||
*/<span style="font-weight: bold;"><br>
|
||||
class</span> <span style="color: rgb(255, 0, 0);">ieee802Device</span>
|
||||
<span style="font-style: italic;">extends </span><span
|
||||
style="font-weight: bold;">baseModule</span> {<br>
|
||||
<br>
|
||||
}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<h2>4. Meta data</h2>
|
||||
The module interface inludes a lot of required and optional functions.
|
||||
Many of these functions do not need to be implemented directly in the
|
||||
module, you can define <span style="font-weight: bold;">meta data</span>
|
||||
for them and the <span style="font-weight: bold;">baseModule</span>
|
||||
will do the rest.<br>
|
||||
Providing <span style="font-weight: bold;">meta data</span> is
|
||||
optional, you can implement the required functions in your class, too.<br>
|
||||
<br>
|
||||
The <span style="font-weight: bold;">baseModule</span> reads the <span
|
||||
style="font-weight: bold;">meta data</span> by calling <span
|
||||
style="font-weight: bold;">get_metaData()</span> in your class.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Returns meta data that is interpreted by parent
|
||||
class<br>
|
||||
*<br>
|
||||
* @return array array with meta data<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span> <span
|
||||
style="color: rgb(255, 0, 0);">get_metaData</span>() {<br>
|
||||
$return = array();<br>
|
||||
// manages host accounts<br>
|
||||
$return["account_types"] =
|
||||
array("host");<br>
|
||||
}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
You will see this functions several times in the next parts of this
|
||||
HowTo.<br>
|
||||
<br>
|
||||
<h2><span style="font-weight: bold;"></span></h2>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,253 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Module HowTo - Configuration options</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align: center;">
|
||||
<h1>Module HowTo - Configuration options<br>
|
||||
</h1>
|
||||
<div style="text-align: left;"><br>
|
||||
There might be situations where you want to give the user the
|
||||
possibility to make general settings which are not useful to place on
|
||||
the account detail pages or profile editor.<br>
|
||||
Therefore LAM allows the modules to define their own configuration
|
||||
options. E.g. the <span style="font-style: italic;">posixAccount</span>
|
||||
module uses this to define the ranges for the UIDs.<br>
|
||||
LAM will display your configuration options only if the user also
|
||||
selected your module.<br>
|
||||
</div>
|
||||
<div style="text-align: left;"><br>
|
||||
<h2>1. Defining configuration options<br>
|
||||
</h2>
|
||||
First you have to define what options you want to offer the user. LAM
|
||||
will display all options in one fieldset for each module. Please notice
|
||||
that there will be no separation on account types if you module is
|
||||
suitable for different account types.<br>
|
||||
<br>
|
||||
The configuration options are specified with <span
|
||||
style="font-weight: bold;">get_configOptions()</span>
|
||||
or <span style="font-weight: bold;">meta['config_options']</span>.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The <span style="font-style: italic;">posixGroup</span> module offers
|
||||
three configuration options. The min/maximum values for GIDs and the
|
||||
password hash type.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Returns meta data that is interpreted by parent
|
||||
class<br>
|
||||
*<br>
|
||||
* @return array array with meta data<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;"> function</span>
|
||||
get_metaData() {<br>
|
||||
$return = array();<br>
|
||||
// configuration options<br>
|
||||
$return[<span
|
||||
style="color: rgb(255, 0, 0);">'config_options'</span>][<span
|
||||
style="color: rgb(255, 0, 0);">'group'</span>] = array(<br>
|
||||
array(<br>
|
||||
|
||||
0 => array('kind' => 'text', 'text' => '<b>' .
|
||||
_('Minimum GID number') . " *: </b>"),<br>
|
||||
|
||||
1 => array('kind' => 'input', 'name' =>
|
||||
'posixGroup_minGID', 'type' => 'text', 'size' => '10',
|
||||
'maxlength' => '255'),<br>
|
||||
|
||||
2 => array('kind' => 'text', 'value' => '&nbsp;'),<br>
|
||||
|
||||
3 => array('kind' => 'text', 'text' => '<b>' .
|
||||
_('Maximum GID number') . " *: </b>"),<br>
|
||||
|
||||
4 => array('kind' => 'input', 'name' =>
|
||||
'posixGroup_maxGID', 'type' => 'text', 'size' => '10',
|
||||
'maxlength' => '255'),<br>
|
||||
|
||||
5 => array('kind' => 'help', 'value' => 'minMaxGID')),<br>
|
||||
array(<br>
|
||||
|
||||
0 => array('kind' => 'text', 'text' => '<b>' .
|
||||
_("Password hash type") . ': &nbsp;</b>'),<br>
|
||||
|
||||
1 => array('kind' => 'select', 'name' =>
|
||||
'posixGroup_pwdHash', 'size' => '1',<br>
|
||||
|
||||
'options' => array("CRYPT", "SHA", "SSHA", "MD5", "SMD5",
|
||||
"PLAIN"), 'options_selected' => array('SSHA')),<br>
|
||||
|
||||
2 => array('kind' => 'text', 'value' => '&nbsp;'),<br>
|
||||
|
||||
3 => array('kind' => 'text', 'value' => '&nbsp;'),<br>
|
||||
|
||||
4 => array('kind' => 'text', 'value' => '&nbsp;'),<br>
|
||||
|
||||
5 => array('kind' => 'help', 'value' => 'pwdHash'))<br>
|
||||
);<br>
|
||||
[...]<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
The min/maximum GID numbers are defined with simple text boxes. The
|
||||
password hash is selected with a drop down box and SSHA as default
|
||||
value.<br>
|
||||
You should make sure that the column count (here: 6) is the same for
|
||||
each row. Otherwise the configuration page might be badly rendered by
|
||||
the browser.<br>
|
||||
<br>
|
||||
<h2>2. Checking user input</h2>
|
||||
Probably you also want to check if the input data is syntactically
|
||||
correct.<br>
|
||||
The <span style="font-style: italic;">baseModule</span> already
|
||||
provides different checks which can be activated with <span
|
||||
style="font-style: italic;">meta data</span>. However you can also do
|
||||
the checking in the module.<br>
|
||||
Implementing the function <span style="font-weight: bold;">check_configOptions()</span>
|
||||
in your module will allow you to do the checks yourself. Basic checks
|
||||
can be defined with <span style="font-weight: bold;">meta['config_checks']</span>.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The <span style="font-style: italic;">posixGroup</span> module only
|
||||
needs to check if the GID numbers are correct. The password hash type
|
||||
needs not to be checked as it is a selection.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Returns meta data that is interpreted by parent
|
||||
class<br>
|
||||
*<br>
|
||||
* @return array array with meta data<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;"> function</span>
|
||||
get_metaData() {<br>
|
||||
$return = array();<br>
|
||||
// configuration checks<br>
|
||||
$return[<span
|
||||
style="color: rgb(255, 0, 0);">'config_checks'</span>][<span
|
||||
style="color: rgb(255, 0, 0);">'group'</span>]['posixGroup_minGID'] =
|
||||
array (<br>
|
||||
'type' =>
|
||||
'ext_preg',<br>
|
||||
'regex' =>
|
||||
'digit',<br>
|
||||
'required'
|
||||
=> true,<br>
|
||||
|
||||
'required_message' => $this->messages['gidNumber'][5],<br>
|
||||
|
||||
'error_message' => $this->messages['gidNumber'][5]);<br>
|
||||
$return[<span
|
||||
style="color: rgb(255, 0, 0);">'config_checks'</span>][<span
|
||||
style="color: rgb(255, 0, 0);">'group'</span>]['posixGroup_maxGID'] =
|
||||
array (<br>
|
||||
'type' =>
|
||||
'ext_preg',<br>
|
||||
'regex' =>
|
||||
'digit',<br>
|
||||
'required'
|
||||
=> true,<br>
|
||||
|
||||
'required_message' => $this->messages['gidNumber'][6],<br>
|
||||
|
||||
'error_message' => $this->messages['gidNumber'][6]);<br>
|
||||
$return[<span
|
||||
style="color: rgb(255, 0, 0);">'config_checks'</span>][<span
|
||||
style="color: rgb(255, 0, 0);">'group'</span>]['cmpGID'] = array (<br>
|
||||
'type' =>
|
||||
'int_greater',<br>
|
||||
'cmp_name1'
|
||||
=> 'posixGroup_maxGID',<br>
|
||||
'cmp_name2'
|
||||
=> 'posixGroup_minGID',<br>
|
||||
|
||||
'error_message' => $this->messages['gidNumber'][7]);<br>
|
||||
[...]<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
The type <span style="font-weight: bold;">"ext_preg"</span> means that
|
||||
the <span style="font-style: italic;">baseModule</span> will use the <span
|
||||
style="font-style: italic;">get_preg()</span> function in <span
|
||||
style="font-style: italic;">lib/account.inc</span> for the syntax
|
||||
check. This function already contains regular expressions for the most
|
||||
common cases.<br>
|
||||
To check if the minimum GID is smaller than the maximum GID we define a
|
||||
check for the nonexistant option "cmpGID" and define it as optional.
|
||||
This will do the comparison check.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>3. Descriptions</h2>
|
||||
What is still missing is a descriptive title for the fieldset in the
|
||||
configuration editor and a description for each configuration option
|
||||
which is displayed when the user saves the settings.<br>
|
||||
<br>
|
||||
These descriptions are defined with <span style="font-weight: bold;">get_configDescriptions()</span>
|
||||
or <span style="font-weight: bold;">meta['config_descriptions']</span>.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The <span style="font-style: italic;">posixGroup</span> module will
|
||||
set a title for the fieldset and a description for the three
|
||||
configuration options.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Returns meta data that is interpreted by parent
|
||||
class<br>
|
||||
*<br>
|
||||
* @return array array with meta data<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;"> function</span>
|
||||
get_metaData() {<br>
|
||||
$return = array();<br>
|
||||
// configuration descriptions<br>
|
||||
$return[<span
|
||||
style="color: rgb(255, 0, 0);">'config_descriptions'</span>] = array(<br>
|
||||
'legend' =>
|
||||
_("GID ranges for Unix groups"),<br>
|
||||
'descriptions'
|
||||
=> array(<br>
|
||||
|
||||
'posixGroup_minGID' => _("Minimum GID number for Unix groups"),<br>
|
||||
|
||||
'posixGroup_maxGID' => _("Maximum GID number for Unix groups"),<br>
|
||||
|
||||
'posixGroup_pwdHash' => _("Password hash type for Unix
|
||||
groups"),<br>
|
||||
)<br>
|
||||
);<br>
|
||||
[...]<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
This will set the fieldset title to "GID ranges for Unix groups" and
|
||||
the descriptions for the settings list.<br>
|
||||
<span style="font-weight: bold;"></span>
|
||||
<h2><span style="font-weight: bold;"></span></h2>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,242 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Module HowTo - General module options</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align: center;">
|
||||
<h1>Module HowTo - General module options<br>
|
||||
</h1>
|
||||
<br>
|
||||
<br>
|
||||
<div style="text-align: left;"><br>
|
||||
<h2>1. Account types<br>
|
||||
</h2>
|
||||
LAM currently provides three account types: <span
|
||||
style="font-weight: bold;">users, groups, hosts<br>
|
||||
</span>A module can manage one or more account types.<br>
|
||||
<br>
|
||||
The types are specified with <span style="font-weight: bold;">can_manage()</span>
|
||||
or <span style="font-weight: bold;">meta['account_types']</span>.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
Our <span style="font-style: italic;">ieee802Device</span>
|
||||
module will be used only for host accounts.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Returns meta data that is interpreted by parent
|
||||
class<br>
|
||||
*<br>
|
||||
* @return array array with meta data<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span>
|
||||
get_metaData() {<br>
|
||||
$return = array();<br>
|
||||
// manages host accounts<br>
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
$return["account_types"] = array("host");</span><br
|
||||
style="color: rgb(255, 0, 0);">
|
||||
return $return;<br>
|
||||
}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>2. Base modules<br>
|
||||
</h2>
|
||||
In LDAP every entry needs exactly one <span style="font-style: italic;">structural
|
||||
object class</span>. Therefore all modules which provide a <span
|
||||
style="font-style: italic;">structural object class</span> are marked
|
||||
as <span style="font-weight: bold;">base module</span>.<br>
|
||||
<br>
|
||||
This is done with <span style="font-weight: bold;">is_base_module()</span>
|
||||
or <span style="font-weight: bold;">meta['is_base']</span>.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The <span style="font-style: italic;">inetOrgPerson</span>
|
||||
module manages the structural object class "inetOrgPerson" and
|
||||
therefore is a <span style="font-weight: bold;">base module</span>.<br>
|
||||
If your module is not a base module you can skip the meta data for
|
||||
this, default is <span style="font-style: italic;">false</span>.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Returns meta data that is interpreted by parent
|
||||
class<br>
|
||||
*<br>
|
||||
* @return array array with meta data<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span>
|
||||
get_metaData() {<br>
|
||||
$return = array();<br>
|
||||
// base module<br>
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
$return["is_base"] = true;</span><br
|
||||
style="color: rgb(255, 0, 0);">
|
||||
return $return;<br>
|
||||
}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>3. Alias name</h2>
|
||||
The module name is very limited, therefore every module has an <span
|
||||
style="font-style: italic;">alias name</span>. This <span
|
||||
style="font-style: italic;">alias name</span> has no limitations and
|
||||
can be translated. It may contain special characters but make sure that
|
||||
it does not contain HTML special characters like "<".<br>
|
||||
The <span style="font-style: italic;">alias name </span>can be the
|
||||
same for all managed <span style="font-style: italic;">account types</span>
|
||||
or differ for each type.<br>
|
||||
<br>
|
||||
The <span style="font-style: italic;">alias name</span> is specified
|
||||
with <span style="font-weight: bold;">get_alias()</span>
|
||||
or <span style="font-weight: bold;">meta['alias']</span>.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
Our <span style="font-style: italic;">ieee802Device</span>
|
||||
module will get the alias MAC address.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Returns meta data that is interpreted by parent
|
||||
class<br>
|
||||
*<br>
|
||||
* @return array array with meta data<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span>
|
||||
get_metaData() {<br>
|
||||
$return = array();<br>
|
||||
// manages host accounts<br>
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
</span>$return["account_types"] = array("host");<br
|
||||
style="color: rgb(255, 0, 0);">
|
||||
// alias name<br>
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
$return["alias"] = _("MAC address");</span><br
|
||||
style="color: rgb(255, 0, 0);">
|
||||
return $return;<br>
|
||||
}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>4. Dependencies</h2>
|
||||
Modules can depend on eachother. This is useful if you need to access
|
||||
attributes from other modules or the managed object classes of your
|
||||
module are not structural.<br>
|
||||
<br>
|
||||
The dependencies are specified with <span style="font-weight: bold;">get_dependencies()</span>
|
||||
or <span style="font-weight: bold;">meta['dependencies']</span>.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
Our <span style="font-style: italic;">ieee802Device</span>
|
||||
module depends on the account module (because it is the only structural
|
||||
module at this time).<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Returns meta data that is interpreted by parent
|
||||
class<br>
|
||||
*<br>
|
||||
* @return array array with meta data<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span>
|
||||
get_metaData() {<br>
|
||||
$return = array();<br>
|
||||
// manages host accounts<br>
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
</span>$return["account_types"] = array("host");<br
|
||||
style="color: rgb(255, 0, 0);">
|
||||
// alias name<br>
|
||||
$return["alias"] = _("MAC
|
||||
address");<br>
|
||||
// module dependencies<br>
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
$return['dependencies'] = array('depends' =>
|
||||
array('account'), 'conflicts' => array());</span><br
|
||||
style="color: rgb(255, 0, 0);">
|
||||
return $return;<br>
|
||||
}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>5. Messages</h2>
|
||||
There are many situations where you will display messages to the user.
|
||||
The modules should define such messages at a common place to make it
|
||||
easier to modify them without searching the complete file.<br>
|
||||
The <span style="font-style: italic;">baseModule</span> offers the $<span
|
||||
style="font-weight: bold;">messages</span> variable for this. It
|
||||
should be filled by a function called <span style="font-weight: bold;">load_Messages()</span>.<br>
|
||||
The <span style="font-style: italic;">baseModule</span> will
|
||||
automatically check if you have implemented this function and call it
|
||||
at construction time.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
Now let our <span style="font-style: italic;">ieee802Device</span>
|
||||
module define a message.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* This function fills the error message array with
|
||||
messages<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span> <span
|
||||
style="color: rgb(255, 0, 0);">load_Messages</span>() {<br>
|
||||
$this->messages['mac'][0] =
|
||||
array('ERROR', 'MAC address is invalid!'); // third array value
|
||||
is set dynamically<br>
|
||||
}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2><br>
|
||||
</h2>
|
||||
<h2></h2>
|
||||
<br>
|
||||
<br>
|
||||
<span style="font-weight: bold;"></span>
|
||||
<h2><span style="font-weight: bold;"></span></h2>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,88 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Module HowTo - Help entries</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align: center;">
|
||||
<h1>Module HowTo - Help entries<br>
|
||||
</h1>
|
||||
<br>
|
||||
<br>
|
||||
<div style="text-align: left;"><br>
|
||||
<h2>1. Defining help entries<br>
|
||||
</h2>
|
||||
Your module should provide help for all input fields and other
|
||||
important things.<br>
|
||||
The LAM help system defines an extra ID range for each module. So you
|
||||
are free in defining your own IDs.<br>
|
||||
<br>
|
||||
The help entries are specified with <span style="font-weight: bold;">get_help()</span>
|
||||
or <span style="font-weight: bold;">meta['help']</span>.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The <span style="font-style: italic;">ieee802Device</span>
|
||||
module needs help entries for the MAC address.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Returns meta data that is interpreted by parent
|
||||
class<br>
|
||||
*<br>
|
||||
* @return array array with meta data<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span>
|
||||
get_metaData() {<br>
|
||||
$return = array();<br>
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
// help Entries</span><br
|
||||
style="color: rgb(255, 0, 0);">
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
$return['help'] = array(</span><br
|
||||
style="color: rgb(255, 0, 0);">
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
'mac' => array(</span><br
|
||||
style="color: rgb(255, 0, 0);">
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
"Headline"
|
||||
=> _("MAC address"),</span><br style="color: rgb(255, 0, 0);">
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
"Text" =>
|
||||
_("This is the MAC address of the network card of the device (e.g.
|
||||
00:01:02:DE:EF:18).")</span><br style="color: rgb(255, 0, 0);">
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
),</span><br
|
||||
style="color: rgb(255, 0, 0);">
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
'macList' => array(</span><br
|
||||
style="color: rgb(255, 0, 0);">
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
"Headline"
|
||||
=> _("MAC address list"),</span><br style="color: rgb(255, 0, 0);">
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
"Text" =>
|
||||
_("This is a comma separated list of MAC addresses.")</span><br
|
||||
style="color: rgb(255, 0, 0);">
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
));</span><br
|
||||
style="color: rgb(255, 0, 0);">
|
||||
return $return;<br>
|
||||
}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<span style="font-weight: bold;"></span>
|
||||
<h2><span style="font-weight: bold;"></span></h2>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,58 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>LAM module HowTo</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align: center;">
|
||||
<h1>Module HowTo</h1>
|
||||
<br>
|
||||
<br>
|
||||
<div style="text-align: left;">
|
||||
<h2>Basic functions</h2>
|
||||
<br>
|
||||
</div>
|
||||
<div style="text-align: left;">LAM can be easily extended to support
|
||||
additional LDAP object classes and attributes.<br>
|
||||
This document provides a step-by-step description to build an account
|
||||
module. The <span style="font-style: italic;">ieee802Device</span>
|
||||
module which provides MAC addresses for hosts is used as example.<br>
|
||||
<br>
|
||||
<h3><a href="mod_basics.htm">1. Basic concepts</a><br>
|
||||
</h3>
|
||||
<br>
|
||||
<h3><a href="mod_general.htm">2. General module options</a></h3>
|
||||
<br>
|
||||
<h3><a href="mod_accountPages.htm">3. Account pages</a></h3>
|
||||
<br>
|
||||
<h3><a href="mod_help.htm">4. Help entries<br>
|
||||
</a></h3>
|
||||
<br>
|
||||
<h3><a href="mod_pdf.htm">5. PDF output<br>
|
||||
</a></h3>
|
||||
<br>
|
||||
<h3><a href="mod_upload.htm">6. File upload</a></h3>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<hr style="width: 100%; height: 2px;"><br>
|
||||
<br>
|
||||
<h2>Advanced functions</h2>
|
||||
This part covers additional functionality of the modules which are only
|
||||
needed by a minority of modules. The examples are taken from different
|
||||
existing modules.<br>
|
||||
<br>
|
||||
<h3><a href="mod_profiles.htm">1. Account profiles</a></h3>
|
||||
<br>
|
||||
<h3><a href="mod_config.htm">2. Configuration options</a></h3>
|
||||
<br>
|
||||
<h3><a href="mod_upload2.htm">3. Advanced upload options</a></h3>
|
||||
<br>
|
||||
<h3><a href="mod_rdn.htm">4. Defining the RDN</a></h3>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,106 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Module HowTo - PDF output</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align: center;">
|
||||
<h1>Module HowTo - PDF output<br>
|
||||
</h1>
|
||||
<br>
|
||||
<br>
|
||||
<div style="text-align: left;"><br>
|
||||
<h2>1. Defining possible PDF values<br>
|
||||
</h2>
|
||||
The first step to PDF output is defining what values your module
|
||||
provides. This is needed for the PDF editor, otherwise the user will
|
||||
not be able to select values from your module.<br>
|
||||
<br>
|
||||
The PDF values are specified with <span style="font-weight: bold;">get_pdfFields()</span>
|
||||
or <span style="font-weight: bold;">meta['PDF_fields']</span>.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The <span style="font-style: italic;">ieee802Device</span>
|
||||
module has only one attribute and therefore one PDF value: the MAC
|
||||
address.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Returns meta data that is interpreted by parent
|
||||
class<br>
|
||||
*<br>
|
||||
* @return array array with meta data<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span>
|
||||
get_metaData() {<br>
|
||||
$return = array();<br>
|
||||
[...]<br>
|
||||
// available PDF fields<br>
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
$return['PDF_fields'] = array(</span><br
|
||||
style="color: rgb(255, 0, 0);">
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
'macAddress'</span><br
|
||||
style="color: rgb(255, 0, 0);">
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
);</span><br style="color: rgb(255, 0, 0);">
|
||||
return $return;<br>
|
||||
}<br>
|
||||
<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>2. Providing data to put into the PDF file<br>
|
||||
</h2>
|
||||
When the user wants to create a PDF file the LDAP account is loaded and
|
||||
you module is asked for data to put into the PDF file.<br>
|
||||
<br>
|
||||
This is done with <span style="font-weight: bold;">get_pdfEntries()</span>.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The <span style="font-style: italic;">ieee802Device</span>
|
||||
module will return the MAC address list of the account.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Returns a list of PDF entries<br>
|
||||
*/<br>
|
||||
function get_pdfEntries() {<br>
|
||||
$return = array();<br>
|
||||
if
|
||||
(sizeof($this->attributes['macAddress']) > 0) {<br>
|
||||
|
||||
$return['ieee802Device_macAddress'] = '<block><key>' .
|
||||
_('MAC address list') . '</key><value>' . implode(', ',
|
||||
$this->attributes['macAddress']) . '</value></block>';<br>
|
||||
}<br>
|
||||
return $return;<br>
|
||||
}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<span style="font-weight: bold;"></span>
|
||||
<h2><span style="font-weight: bold;"></span></h2>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,208 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Module HowTo - Account profiles</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align: center;">
|
||||
<h1>Module HowTo - Account profiles<br>
|
||||
</h1>
|
||||
<div style="text-align: left;"><br>
|
||||
Account profiles make it easy to set default values for new accounts
|
||||
and even to reset an existing account to default values.<br>
|
||||
Your module should provide the possibility to define default values for
|
||||
all attributes which do not differ for each account.<br>
|
||||
</div>
|
||||
<div style="text-align: left;"><br>
|
||||
<h2>1. Defining possible profile options<br>
|
||||
</h2>
|
||||
The first step to account profiles is defining the attributes for which
|
||||
the user can set default values. You will also have to define the type
|
||||
(text, checkbox, ...) of the profile options.<br>
|
||||
The profile editor then will display a fieldset for each module
|
||||
containing its profile options.<br>
|
||||
<br>
|
||||
The profile options are specified with <span style="font-weight: bold;">get_profileOptions()</span>
|
||||
or <span style="font-weight: bold;">meta['profile_options']</span>.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The <span style="font-style: italic;">inetOrgPerson</span>
|
||||
module has only two attributes which may be set to a default value: job
|
||||
title and employee type.<br>
|
||||
The other attributes are account specific and not useful as profile
|
||||
options.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Returns meta data that is interpreted by parent
|
||||
class<br>
|
||||
*<br>
|
||||
* @return array array with meta data<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span>
|
||||
get_metaData() {<br>
|
||||
$return = array();<br>
|
||||
// profile elements<br>
|
||||
$return[<span
|
||||
style="color: rgb(255, 0, 0);">'profile_options'</span>] = array(<br>
|
||||
array(<br>
|
||||
|
||||
0 => array('kind' => 'text', 'text' =>
|
||||
_('Job title') . ":"),<br>
|
||||
|
||||
1 => array('kind' => 'input', 'name' =>
|
||||
'inetOrgPerson_title', 'type' => 'text', 'size' => '30',
|
||||
'maxlength' => '255'),<br>
|
||||
|
||||
2 => array('kind' => 'help', 'value' =>
|
||||
'title')),<br>
|
||||
array(<br>
|
||||
|
||||
0 => array('kind' => 'text', 'text' =>
|
||||
_('Employee type') . ":"),<br>
|
||||
|
||||
1 => array('kind' => 'input', 'name' =>
|
||||
'inetOrgPerson_employeeType', 'type' => 'text', 'size' => '30',
|
||||
'maxlength' => '255'),<br>
|
||||
|
||||
2 => array('kind' => 'help', 'value' =>
|
||||
'employeeType'))<br>
|
||||
);<br>
|
||||
[...]<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
This defines two text boxes in the profile editor, one for the job
|
||||
title and one for the employee type.<br>
|
||||
Your profile options should also provide a help link if the description
|
||||
of the input element might be not enough.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>2. Checking user input</h2>
|
||||
Probably you also want to check if the input data is syntactically
|
||||
correct.<br>
|
||||
The <span style="font-style: italic;">baseModule</span> already
|
||||
provides different checks which can be activated with <span
|
||||
style="font-style: italic;">meta data</span>. However you can also do
|
||||
the checking in the module.<br>
|
||||
Implementing the function <span style="font-weight: bold;">check_profileOptions()</span>
|
||||
in your module will allow you to do the checks yourself. Basic checks
|
||||
can be defined with <span style="font-weight: bold;">meta['profile_checks']</span>.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The <span style="font-style: italic;">inetOrgPerson</span> module only
|
||||
needs some regular expression checks on the input. This can be done by
|
||||
the <span style="font-style: italic;">baseModule</span>.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Returns meta data that is interpreted by parent
|
||||
class<br>
|
||||
*<br>
|
||||
* @return array array with meta data<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span>
|
||||
get_metaData() {<br>
|
||||
$return = array();<br>
|
||||
// profile checks<br>
|
||||
$return[<span
|
||||
style="color: rgb(255, 0, 0);">'profile_checks'</span>][<span
|
||||
style="color: rgb(255, 0, 0);">'inetOrgPerson_title'</span>] = array(<br>
|
||||
'type' =>
|
||||
'ext_preg',<br>
|
||||
'regex' =>
|
||||
'title',<br>
|
||||
|
||||
'error_message' => $this->messages['title'][0]);<br>
|
||||
$return[<span
|
||||
style="color: rgb(255, 0, 0);">'profile_checks'</span>][<span
|
||||
style="color: rgb(255, 0, 0);">'inetOrgPerson_employeeType'</span>] =
|
||||
array(<br>
|
||||
'type' =>
|
||||
'ext_preg',<br>
|
||||
'regex' =>
|
||||
'employeeType',<br>
|
||||
|
||||
'error_message' => $this->messages['employeeType'][0]);<br>
|
||||
[...]<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
The type <span style="font-weight: bold;">"ext_preg"</span> means that
|
||||
the <span style="font-style: italic;">baseModule</span> will use the <span
|
||||
style="font-style: italic;">get_preg()</span> function in <span
|
||||
style="font-style: italic;">lib/account.inc</span> for the syntax
|
||||
check. This function already contains regular expressions for the most
|
||||
common cases.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>3. Loading an account profile</h2>
|
||||
When an account profile is loaded the modules have to check what values
|
||||
they need for their internal data structures.<br>
|
||||
The <span style="font-style: italic;">baseModule</span> already
|
||||
provides the possibility to store profile values directly as LDAP
|
||||
attributes in <span style="font-style: italic;">$this->attributes</span>.
|
||||
This is done by defining profile-attribute mappings in <span
|
||||
style="font-weight: bold;">meta['profile_mappings']</span>.<br>
|
||||
If you have other values than LDAP attributes or need some post
|
||||
processing you can implement the function <span
|
||||
style="font-weight: bold;">load_profile()</span> in your module.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The <span style="font-style: italic;">inetLocalMailRecipient</span>
|
||||
module only
|
||||
needs a static mapping. This can be done by
|
||||
the <span style="font-style: italic;">baseModule</span>.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Returns meta data that is interpreted by parent
|
||||
class<br>
|
||||
*<br>
|
||||
* @return array array with meta data<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span>
|
||||
get_metaData() {<br>
|
||||
$return = array();<br>
|
||||
// profile mappings<br>
|
||||
$return[<span
|
||||
style="color: rgb(255, 0, 0);">'profile_mappings'</span>] = array(<br>
|
||||
|
||||
'inetLocalMailRecipient_host' => 'mailHost'<br>
|
||||
);<br>
|
||||
[...]<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
In this example the profile option "inetLocalMailRecipient_host" is
|
||||
stored as LDAP attribute "mailHost".<br>
|
||||
<br>
|
||||
<br>
|
||||
<span style="font-weight: bold;"></span>
|
||||
<h2><span style="font-weight: bold;"></span></h2>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,59 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Module HowTo - Defining the RDN</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align: center;">
|
||||
<h1>Module HowTo - Defining the RDN<br>
|
||||
</h1>
|
||||
<div style="text-align: left;"><br>
|
||||
Every LDAP DN starts with a RDN (relative DN). This is the value of a
|
||||
LDAP attribute. Users usually use "uid", groups use "cn".<br>
|
||||
You can provide a list of suitable RDN attributes for your module and
|
||||
give them a priority, too.<br>
|
||||
<br>
|
||||
</div>
|
||||
<div style="text-align: left;">You will need to implement the function <span
|
||||
style="font-weight: bold;">get_RDNAttributes()</span> or use <span
|
||||
style="font-weight: bold;">meta['RDN']</span>.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The <span style="font-style: italic;">posixAccount</span> module
|
||||
offers to create accounts with DNs uid=foo,dc=.... and cn=foo,dc=...<br>
|
||||
The uid attribute has a higher priority as it is the usual attribute
|
||||
for Unix accounts.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Returns meta data that is interpreted by parent
|
||||
class<br>
|
||||
*<br>
|
||||
* @return array array with meta data<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;"> function</span>
|
||||
get_metaData() {<br>
|
||||
$return = array();<br>
|
||||
// RDN attributes<br>
|
||||
$return["RDN"] = array("uid"
|
||||
=> "normal", "cn" => "low");<br>
|
||||
[...]<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<span style="font-weight: bold;"></span>
|
||||
<h2><span style="font-weight: bold;"></span></h2>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,171 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Module HowTo - File upload</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align: center;">
|
||||
<h1>Module HowTo - File upload<br>
|
||||
</h1>
|
||||
<br>
|
||||
<br>
|
||||
<div style="text-align: left;"><br>
|
||||
<h2>1. Defining upload columns<br>
|
||||
</h2>
|
||||
If you want to support account creation via file upload you have to
|
||||
define columns in the CSV file.<br>
|
||||
Each column has an non-translated identifier, a description, help entry
|
||||
and several other values.<br>
|
||||
<br>
|
||||
The upload columns are specified with <span style="font-weight: bold;">get_uploadColumns()</span>
|
||||
or <span style="font-weight: bold;">meta['upload_columns']</span>.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The <span style="font-style: italic;">ieee802Device</span>
|
||||
module has only one attribute and therefore one column: the MAC address.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Returns meta data that is interpreted by parent
|
||||
class<br>
|
||||
*<br>
|
||||
* @return array array with meta data<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span>
|
||||
get_metaData() {<br>
|
||||
$return = array();<br>
|
||||
// manages host accounts<br>
|
||||
|
||||
$return["account_types"] = array("host");<br>
|
||||
// upload fields<br>
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
$return['upload_columns'] = array(</span><br
|
||||
style="color: rgb(255, 0, 0);">
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
array(</span><br
|
||||
style="color: rgb(255, 0, 0);">
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
'name' =>
|
||||
'ieee802Device_mac',</span><br style="color: rgb(255, 0, 0);">
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
'description'
|
||||
=> _('MAC address'),</span><br style="color: rgb(255, 0, 0);">
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
'help' =>
|
||||
'mac',</span><br style="color: rgb(255, 0, 0);">
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
'example'
|
||||
=> '00:01:02:DE:EF:18'</span><br style="color: rgb(255, 0, 0);">
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
)</span><br
|
||||
style="color: rgb(255, 0, 0);">
|
||||
<span style="color: rgb(255, 0, 0);">
|
||||
);</span><br>
|
||||
return $return;<br>
|
||||
}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>2. Building the accounts<br>
|
||||
</h2>
|
||||
When the user has uploaded the CSV file the modules have to transform
|
||||
the input data to LDAP accounts.<br>
|
||||
<br>
|
||||
This is done with <span style="font-weight: bold;">build_uploadAccounts()</span>.
|
||||
The function gets the input data and a list of LDAP accounts as
|
||||
parameter.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The <span style="font-style: italic;">ieee802Device</span>
|
||||
module has only one LDAP attribute - <span style="font-style: italic;">'macAddress'</span>
|
||||
- and the <span style="font-style: italic;">'ieee802Device'</span>
|
||||
objectClass which is added to all accounts.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* In this function the LDAP account is built up.<br>
|
||||
*<br>
|
||||
* @param array $rawAccounts list of hash arrays
|
||||
(name => value) from user input<br>
|
||||
* @param array $partialAccounts list of hash arrays
|
||||
(name => value) which are later added to LDAP<br>
|
||||
* @param array $ids list of IDs for column position
|
||||
(e.g. "posixAccount_uid" => 5)<br>
|
||||
* @return array list of error messages if any<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span> <span
|
||||
style="color: rgb(255, 0, 0);">build_uploadAccounts</span>($rawAccounts,
|
||||
$ids, &$partialAccounts) {<br>
|
||||
$messages = array();<br>
|
||||
for ($i = 0; $i <
|
||||
sizeof($rawAccounts); $i++) {<br>
|
||||
// add object
|
||||
class<br>
|
||||
if
|
||||
(!in_array("ieee802Device", $partialAccounts[$i]['objectClass']))
|
||||
$partialAccounts[$i]['objectClass'][] = "ieee802Device";<br>
|
||||
// add MACs<br>
|
||||
if
|
||||
($rawAccounts[$i][$ids['ieee802Device_mac']] != "") {<br>
|
||||
|
||||
$macs = explode(',',
|
||||
$rawAccounts[$i][$ids['ieee802Device_mac']]);<br>
|
||||
|
||||
// check format<br>
|
||||
|
||||
for ($m = 0; $m < sizeof($macs); $m++) {<br>
|
||||
|
||||
if (get_preg($macs[$m],
|
||||
'macAddress')) {<br>
|
||||
|
||||
|
||||
$partialAccounts[$i]['macAddress'][] = $macs[$m];<br>
|
||||
|
||||
}<br>
|
||||
|
||||
else {<br>
|
||||
|
||||
$errMsg =
|
||||
$this->messages['mac'][1];<br>
|
||||
|
||||
|
||||
array_push($errMsg, array($i));<br>
|
||||
|
||||
$messages[] =
|
||||
$errMsg;<br>
|
||||
|
||||
}<br>
|
||||
|
||||
}<br>
|
||||
}<br>
|
||||
}<br>
|
||||
return $messages;<br>
|
||||
}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<span style="font-weight: bold;"></span>
|
||||
<h2><span style="font-weight: bold;"></span></h2>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,122 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Module HowTo - Advanced upload options</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align: center;">
|
||||
<h1>Module HowTo - Advanced upload options<br>
|
||||
</h1>
|
||||
<div style="text-align: left;"><br>
|
||||
The <span style="font-style: italic;">ieee802Device</span> module only
|
||||
needs the basic upload functions for its functionality.<br>
|
||||
However there are more possibilities for the modules to control the
|
||||
file upload.<br>
|
||||
</div>
|
||||
<div style="text-align: left;"><br>
|
||||
<h2>1. Module order<br>
|
||||
</h2>
|
||||
Your module might depend on the input values of another module. In this
|
||||
case you probably want that your module is called as the second one.<br>
|
||||
<br>
|
||||
You can define dependencies to other modules with the function <span
|
||||
style="font-weight: bold;">get_uploadPreDepends()</span> or <span
|
||||
style="font-weight: bold;">meta['upload_preDepends']</span>.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The <span style="font-style: italic;">sambaGroupMapping</span> module
|
||||
needs the group name to set the default <span
|
||||
style="font-style: italic;">displayName</span>. Therefore it depends
|
||||
on the <span style="font-style: italic;">posixGroup</span> module<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* Returns meta data that is interpreted by parent
|
||||
class<br>
|
||||
*<br>
|
||||
* @return array array with meta data<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;"> function</span>
|
||||
get_metaData() {<br>
|
||||
$return = array();<br>
|
||||
// upload dependencies<br>
|
||||
$return[<span
|
||||
style="color: rgb(255, 0, 0);">'upload_preDepends'</span>] =
|
||||
array('posixGroup');<br>
|
||||
[...]<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h2>2. Upload post actions<br>
|
||||
</h2>
|
||||
If your module does not only create an account but relates the account
|
||||
with other existing LDAP entries you can do these modifications after
|
||||
the account was created.<br>
|
||||
This is useful for adding users to groups or setting quotas.<br>
|
||||
<br>
|
||||
You have to implement the function <span style="font-weight: bold;">doUploadPostActions()</span>
|
||||
in your module. Since post actions are very special there is no <span
|
||||
style="font-style: italic;">meta data</span> for this.<br>
|
||||
<br>
|
||||
<span style="font-weight: bold; text-decoration: underline;">Example:</span><br
|
||||
style="font-weight: bold; text-decoration: underline;">
|
||||
<br>
|
||||
The <span style="font-style: italic;">posixAccount</span> module
|
||||
offers to put the user account in additional groups. This is done in
|
||||
the post actions.<br>
|
||||
<br>
|
||||
<table style="width: 100%; text-align: left;" class="mod-code"
|
||||
border="0" cellpadding="2" cellspacing="2">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align: top;"> /**<br>
|
||||
* This function executes one post upload action.<br>
|
||||
*<br>
|
||||
* @param array $data array containing one account in
|
||||
each element<br>
|
||||
* @param array $ids array(<column_name> =>
|
||||
<column number>)<br>
|
||||
* @param array $failed list of accounts which were
|
||||
not created successfully<br>
|
||||
* @param array $temp variable to store temporary
|
||||
data between two post actions<br>
|
||||
* @return array current status<br>
|
||||
* <br> array (<br>
|
||||
* <br> 'status' => 'finished' |
|
||||
'inProgress'<br>
|
||||
* <br> 'progress' => 0..100<br>
|
||||
* <br> 'errors' => array (<array
|
||||
of parameters for StatusMessage>)<br>
|
||||
* <br> )<br>
|
||||
*/<br>
|
||||
<span style="font-weight: bold;">function</span> <span
|
||||
style="color: rgb(255, 0, 0);">doUploadPostActions</span>($data, $ids,
|
||||
$failed, &$temp) {<br>
|
||||
[...]<br>
|
||||
}<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
Please make sure that the actions in one call of <span
|
||||
style="font-weight: bold;">doUploadPostActions()</span> are not very
|
||||
time consuming (only one LDAP operation). Your function will be called
|
||||
repeatedly until you give back the status "finished".<br>
|
||||
This allows LAM to avoid running longer than the maximum execution time
|
||||
by sending meta refreshes to the browser.<br>
|
||||
<span style="font-weight: bold;"></span>
|
||||
<h2><span style="font-weight: bold;"></span></h2>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,55 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-15"
|
||||
http-equiv="content-type">
|
||||
<title>Other libraries</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align: center;">Other libraries<br>
|
||||
</h1>
|
||||
<br>
|
||||
<h2><a name="lamdaemon"></a>Lamdaemon (lamdaemon.pl)<br>
|
||||
</h2>
|
||||
<h2><a name="blowfish"></a>Blowfish (blowfish.inc)</h2>
|
||||
If MCrypt is not available LAM uses the Blowfish algorithm to store
|
||||
sensitive data in the session file.<br>
|
||||
This file was copied from the <span style="font-style: italic;">Horde</span>
|
||||
project and modified to fit LAM's needs.<br>
|
||||
<br>
|
||||
<h2><a name="cache"></a>LDAP cache (cache.inc)</h2>
|
||||
<br>
|
||||
<h2><a name="lists"></a>Account lists (lists.inc)</h2>
|
||||
This file provides basic functions used by the account lists. They
|
||||
cover major parts of the HTML output.<br>
|
||||
There is also one list of LDAP attribute descriptions per account type.
|
||||
They allow to have translated descriptions of the most common
|
||||
attributes.<br>
|
||||
<br>
|
||||
<h2><a name="status"></a>Status messages (status.inc)</h2>
|
||||
Status.inc provides the function <span
|
||||
style="font-weight: bold; font-style: italic;">StatusMessage()</span>
|
||||
which can be used to display error, warning and information messages.<br>
|
||||
The function uses preg_replace() to convert the special tags to HTML
|
||||
tags. The message variables are included with printf().<br>
|
||||
<br>
|
||||
The parameters of <span style="font-weight: bold; font-style: italic;">StatusMessage()
|
||||
</span>are described in the developer FAQ.<br>
|
||||
<br>
|
||||
<h2><a name="treeSchema"></a>Tree view and schema browser</h2>
|
||||
The files tree.inc and schema.inc contain functions which are needed by
|
||||
the tree view and the schema browser.<br>
|
||||
These functions were copied from <a
|
||||
href="http://sourceforge.net/projects/phpldapadmin/">phpLDAPadmin</a>
|
||||
(PLA).<br>
|
||||
<br>
|
||||
<ul>
|
||||
<li><span style="font-weight: bold;">tree.inc:</span> tree functions
|
||||
(from functions.php and some other files in PLA)</li>
|
||||
<li><span style="font-weight: bold;">schema.inc:</span> for schema
|
||||
browser (from schema_functions.php in PLA)<br>
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
|
@ -1,31 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-15"
|
||||
http-equiv="content-type">
|
||||
<title>OU editor</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align: center;">OU editor<br>
|
||||
</h1>
|
||||
<br>
|
||||
<br>
|
||||
This is a simple tool for creating and deleting organizational units
|
||||
(OU) inside the LDAP tree.<br>
|
||||
OUs can be managed for the LDAP suffixes of all account types.<br>
|
||||
<br>
|
||||
<h2>1. Creating OUs<br>
|
||||
</h2>
|
||||
<span style="font-weight: bold; font-style: italic;"></span>The user
|
||||
provides the name of the new OU which can include a-z, 0-9, "_", "-"
|
||||
and " ".<br>
|
||||
LAM will then create a new OU object under the selected LDAP suffix.<br>
|
||||
<br>
|
||||
<h2>2. Deleting OUs</h2>
|
||||
If the user selects to delete an OU he will be asked if he is really
|
||||
sure and then the OU is deleted.<br>
|
||||
There is no recursive deletion.<br>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
|
@ -1,107 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-15"
|
||||
http-equiv="content-type">
|
||||
<title>PDF editor</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align: center;">PDF editor<br>
|
||||
</h1>
|
||||
<div style="text-align: center;"><br>
|
||||
<img alt="" src="images/lam_pdfEditor.png"
|
||||
style="width: 443px; height: 162px;"><br>
|
||||
</div>
|
||||
<div style="text-align: center;"><br>
|
||||
<br>
|
||||
<div style="text-align: left;">The <span style="font-style: italic;">PDF
|
||||
editor</span> allows the user to create templates for the PDF output.<br>
|
||||
These templates are saved as files in <span style="font-weight: bold;">config/pdf</span>.<br>
|
||||
<br>
|
||||
<h2>Pdfmain.php<br>
|
||||
</h2>
|
||||
This is the start page of the <span style="font-style: italic;">PDF
|
||||
editor</span>. The user can select to add/modify/remove selected PDF
|
||||
profiles.<br>
|
||||
<br>
|
||||
The list of existing PDF profiles is returned by <span
|
||||
style="font-weight: bold;">getPDFStructureDefinitions()</span> in <span
|
||||
style="font-style: italic;">pdfstruct.inc</span>. It includes all
|
||||
structure names without file extensions for a given account type.<br>
|
||||
<br>
|
||||
Depending on the selection of the user he is forwarded to pdfpage.php
|
||||
or pdfdelete.php.<br>
|
||||
<br>
|
||||
<h2>Pdfpage.php<br>
|
||||
</h2>
|
||||
The user can edit the PDF structures on this page.<br>
|
||||
<br>
|
||||
The structure is loaded with <span style="font-weight: bold;">loadPDFStructureDefinitions()</span>
|
||||
from <span style="font-style: italic;">pdfstruct.inc</span>. If it
|
||||
does not yet exist then the default structure is loaded.<br>
|
||||
It is stored in <span style="font-weight: bold; font-style: italic;">$_SESSION['currentPDFStructure']</span>
|
||||
(sections) and <span style="font-weight: bold; font-style: italic;">$_SESSION['currentPageDefinitions']</span>
|
||||
(head line and logo).<br>
|
||||
<br>
|
||||
At the top of the page the head line and logo can be edited. The list
|
||||
of available logos is retrieved with <span style="font-weight: bold;">getAvailableLogos()</span>
|
||||
from <span style="font-style: italic;">pdfstruct.inc</span>.<br>
|
||||
<br>
|
||||
The sections on the left side are displayed like they are defined in <span
|
||||
style="font-weight: bold; font-style: italic;">$_SESSION['currentPDFStructure']</span>.
|
||||
Each item has links to move or delete it. Section titles may be changed.<br>
|
||||
<br>
|
||||
The list of available PDF entries on the right side is retrieved from <span
|
||||
style="font-weight: bold;">getAvailablePDFFields()</span> in <span
|
||||
style="font-style: italic;">modules.inc</span>.<br>
|
||||
<br>
|
||||
Near the bottom there the user can add a new section. The list of
|
||||
available PDF entries is retrieved as above.<br>
|
||||
<br>
|
||||
When the user pushes one of the buttons or clicks on a link then there
|
||||
are several actions:<br>
|
||||
<ul>
|
||||
<li><span style="font-weight: bold;">Abort button:</span> The user is
|
||||
redirected back to <span style="font-style: italic;">pdfmain.php</span>.<br>
|
||||
</li>
|
||||
<li><span style="font-weight: bold;">Save button:</span> The
|
||||
structure name is checked for correctness and the file is saved with <span
|
||||
style="font-weight: bold;">savePDFStructureDefinitions()</span>
|
||||
from <span style="font-style: italic;">pdfstruct.inc</span><span
|
||||
style="font-weight: bold;">.</span></li>
|
||||
<li><span style="font-weight: bold;">Add section button:</span> LAM
|
||||
adds a static text or section to the structure.</li>
|
||||
<li><span style="font-weight: bold;">Add entry button:</span> Adds a
|
||||
new entry to the selected section.</li>
|
||||
<li><span style="font-weight: bold;">Change name button:</span>
|
||||
Changes the name of the section title or the section attribute.</li>
|
||||
<li><span style="font-weight: bold;">Remove entry link:</span> If the
|
||||
entry is a section then all parts of this section are removed.
|
||||
Otherwise a single entry is removed.</li>
|
||||
<li><span style="font-weight: bold;">Move up/down links:</span> The
|
||||
entry or section is moved up or down.</li>
|
||||
</ul>
|
||||
<br>
|
||||
<span style="font-weight: bold; font-style: italic;">$_SESSION['currentPDFStructure']</span>
|
||||
is an array that contains all XML tags of the PDF structure. If you
|
||||
want to modify the structure always remember to put the opening and
|
||||
closing tags at the right place.<br>
|
||||
<br>
|
||||
<h2>Pdfdelete.php</h2>
|
||||
When the user selected to delete a structure in <span
|
||||
style="font-style: italic;">pdfmain.php</span> he is redirected to
|
||||
this page.<br>
|
||||
<br>
|
||||
LAM will ask once again if the user is sure to delete the structure. If
|
||||
this is the case the structure will be deleted with <span
|
||||
style="font-weight: bold;">deletePDFStructureDefinition()</span> from <span
|
||||
style="font-style: italic;">pdfstruct.inc</span>.<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,99 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-15"
|
||||
http-equiv="content-type">
|
||||
<title>PDF templates</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align: center;">PDF templates<br>
|
||||
</h1>
|
||||
<br>
|
||||
Every PDF structure is saved as a single file in <span
|
||||
style="font-weight: bold;">config/pdf</span>. The
|
||||
file extension is the account type (user, group, ...) plus ".xml" (e.g.
|
||||
default.user.xml).<br>
|
||||
<br>
|
||||
<h2>Format</h2>
|
||||
The root tag is <span style="font-weight: bold;"><pdf></span>
|
||||
with the attributes <span
|
||||
style="font-weight: bold; font-style: italic;">filename</span> for the
|
||||
logo and <span style="font-weight: bold; font-style: italic;">headline</span>
|
||||
for the title.<br>
|
||||
<br>
|
||||
There are two types of subentries in <pdf>:<br>
|
||||
<ul>
|
||||
<li>sections</li>
|
||||
<li>text<br>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Sections:</h3>
|
||||
Sections are parts of the PDF file where data from the account profiles
|
||||
(e.g. LDAP attributes) is shown. Each section has a title and a list of
|
||||
entries.<br>
|
||||
<br>
|
||||
The title is defined with the <span
|
||||
style="font-weight: bold; font-style: italic;">name</span> attribute
|
||||
inside the section tag. If the title begins with a "_" then LAM
|
||||
interprets it as entry. This means that LAM will insert the value part
|
||||
of this entry here.<br>
|
||||
<br>
|
||||
Each section has a list of subentries which are defined with the <span
|
||||
style="font-weight: bold;"><entry></span> tag. The have only one
|
||||
attribute which is <span style="font-weight: bold;">name</span> and
|
||||
contains the identifier of this entry.<br>
|
||||
<br>
|
||||
<h3>Text:</h3>
|
||||
LAM allows to display a fixed text in the PDF which is defined with the
|
||||
<span style="font-weight: bold;"><text></span> tag. The text is
|
||||
just written inside the tags.<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<span style="font-weight: bold;">Example:</span><br
|
||||
style="font-weight: bold;">
|
||||
<br>
|
||||
<pdf type="user" filename="printLogo.jpg" headline="LDAP Account
|
||||
Manager"><br>
|
||||
<text>This document includes your personal
|
||||
account settings.</text><br>
|
||||
<section name="Personal User Infos"><br>
|
||||
<entry
|
||||
name="inetOrgPerson_givenName" /><br>
|
||||
<entry name="inetOrgPerson_sn"
|
||||
/><br>
|
||||
<entry
|
||||
name="inetOrgPerson_street" /><br>
|
||||
<entry
|
||||
name="inetOrgPerson_postalCode" /><br>
|
||||
<entry
|
||||
name="inetOrgPerson_postalAddress" /><br>
|
||||
<entry
|
||||
name="inetOrgPerson_mail" /><br>
|
||||
<entry
|
||||
name="inetOrgPerson_telephoneNumber" /><br>
|
||||
<entry
|
||||
name="inetOrgPerson_mobileTelephoneNumber" /><br>
|
||||
<entry
|
||||
name="inetOrgPerson_facsimileTelephoneNumber" /><br>
|
||||
</section><br>
|
||||
<section name="Unix User Settings"><br>
|
||||
<entry name="posixAccount_uid"
|
||||
/><br>
|
||||
<entry
|
||||
name="posixAccount_userPassword" /><br>
|
||||
<entry
|
||||
name="posixAccount_primaryGroup" /><br>
|
||||
<entry
|
||||
name="posixAccount_additionalGroups" /><br>
|
||||
<entry
|
||||
name="posixAccount_homeDirectory" /><br>
|
||||
<entry
|
||||
name="posixAccount_loginShell" /><br>
|
||||
</section><br>
|
||||
</pdf><br>
|
||||
<br>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
|
@ -1,84 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-15"
|
||||
http-equiv="content-type">
|
||||
<title>Profile editor</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align: center;">Profile editor<br>
|
||||
</h1>
|
||||
<div style="text-align: center;"><img alt=""
|
||||
src="images/lam_profedit.png" style="width: 354px; height: 236px;"><br>
|
||||
</div>
|
||||
<div style="text-align: center;"><br>
|
||||
<div style="text-align: left;">The <span style="font-style: italic;">profile
|
||||
editor</span> allows the user to set default values for new accounts.<br>
|
||||
These defaults are saved as files in <span style="font-weight: bold;">config/profiles</span>.<br>
|
||||
<br>
|
||||
<h2>Profilemain.php<br>
|
||||
</h2>
|
||||
This is the start page of the <span style="font-style: italic;">profile
|
||||
editor</span>. The user can select to add/modify/remove selected
|
||||
account profiles.<br>
|
||||
<br>
|
||||
The list of existing account profiles is returned by <span
|
||||
style="font-weight: bold;">getAccountProfiles()</span> in <span
|
||||
style="font-style: italic;">modules.inc</span>. It includes all
|
||||
profile names without file extensions.<br>
|
||||
<br>
|
||||
<h2>Profilepage.php<br>
|
||||
</h2>
|
||||
This script is used to display the account profile to the user. <br>
|
||||
<br>
|
||||
The profile options include the LDAP OU suffix and options provided by
|
||||
the account modules.<br>
|
||||
<br>
|
||||
The values for the OU selection are read with <span
|
||||
style="font-weight: bold;">search_units()</span>.<br>
|
||||
<br>
|
||||
The <span style="font-style: italic;">account modules</span> provide
|
||||
all other profile options. The profile editor displays a separate
|
||||
fieldset for each module containing its options.<br>
|
||||
The function <span style="font-weight: bold;">print_option()</span>
|
||||
manages the display of the different option types (checkbox, select,
|
||||
...). The type of each option is saved in <span
|
||||
style="font-weight: bold;">$_SESSION['profile_types']</span>.<br>
|
||||
See the <a href="modules-specification.htm">modules specification</a>
|
||||
for a complete list of supported types.<br>
|
||||
<br>
|
||||
The profiles have unique names under which they are saved. If a profile
|
||||
with the same name already exists it will be overwritten.<br>
|
||||
<br>
|
||||
When the user selects to save the profile then
|
||||
profilepage.php will check the input for correctness.<br>
|
||||
First the values are converted to the correct type (checkbox ->
|
||||
Boolean) by checking <span style="font-weight: bold;">$_SESSION['profile_types']</span>.
|
||||
Then LAM will replace all "\'" with "'" if <span
|
||||
style="font-style: italic;">magic_quotes_gpc</span> is on. Now the
|
||||
input data is checked for correctness by calling <span
|
||||
style="font-weight: bold;">checkProfileOptions()</span>.<br>
|
||||
The <span style="font-style: italic;">account modules</span> return a
|
||||
list of
|
||||
error messages if one or more options are incorrect. If there are
|
||||
errors they will be displayed, otherwise the profile is
|
||||
saved by calling <span style="font-weight: bold;">saveAccountProfile()</span>.<br>
|
||||
<br>
|
||||
<h2>Profiledelete.php</h2>
|
||||
When the user selected to delete a profile in <span
|
||||
style="font-style: italic;">profilemain.php</span> he is redirected to
|
||||
this page.<br>
|
||||
<br>
|
||||
LAM will ask once again if the user is sure to delete the profile. If
|
||||
this is the case the profile will be deleted with <span
|
||||
style="font-weight: bold;">delAccountProfile()</span> from <span
|
||||
style="font-style: italic;">profiles.inc</span>.<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,36 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-15"
|
||||
http-equiv="content-type">
|
||||
<title>Account profiles</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align: center;">Account profiles</h1>
|
||||
<br>
|
||||
Every account profile is saved as single file in <span
|
||||
style="font-weight: bold;">config/profiles</span>. The
|
||||
file extension is the account type (user, group, ...).<br>
|
||||
In contrast to the configuration profiles the account profiles are not
|
||||
designed to be editable by hand. They do not allow to add comments and
|
||||
have a simpler format.<br>
|
||||
<br>
|
||||
<h2>Format</h2>
|
||||
There is one option per line which is formated: <identifier>:
|
||||
<value><br>
|
||||
<br>
|
||||
Identifier is the option's name, value is the rest of the line after
|
||||
the first <span style="font-weight: bold;">": "</span>.<br>
|
||||
Some options are multi-valued, the sub-values are separated by <span
|
||||
style="font-weight: bold;">"+::+"</span>.<br>
|
||||
<br>
|
||||
<br>
|
||||
<span style="font-weight: bold;">Examples:</span><br
|
||||
style="font-weight: bold;">
|
||||
<br>
|
||||
posixAccount_primaryGroup: group1<br>
|
||||
posixAccount_additionalGroup: group3+::+group4+::+group5+::+group6<br>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
|
@ -1,25 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-15"
|
||||
http-equiv="content-type">
|
||||
<title>Account profiles</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align: center;">profiles.inc</h1>
|
||||
<br>
|
||||
This file includes all functions to manage <a href="profile_files.htm">account
|
||||
profiles</a>. You can read/store/list/delete profiles.<br>
|
||||
<br>
|
||||
Profile names may contain letters, numbers, "_" and "-". All functions
|
||||
which have a profile name as parameter check this.<br>
|
||||
Functions which modify the filesystem (<span style="font-style: italic;">saveAccountProfile,
|
||||
delAccountProfile</span>) also check if the user is logged in to LAM
|
||||
for security reasons. This is done by reading <span
|
||||
style="font-style: italic;">$_SESSION['logedIn']</span>.<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
|
@ -1,35 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-15"
|
||||
http-equiv="content-type">
|
||||
<title>Samba 3 domains</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align: center;">Samba 3 domains<br>
|
||||
</h1>
|
||||
<div style="text-align: center;"><br>
|
||||
</div>
|
||||
<div style="text-align: center;"><br>
|
||||
<div style="text-align: left;">The <span style="font-style: italic;">Samba
|
||||
3 domain list</span> is based on the other account lists. The
|
||||
difference is that there are no filter boxes and the displayed
|
||||
attributes are fixed (name, SID, DN).<br>
|
||||
<br>
|
||||
If the user selects to edit or create a domain he will be redirected to
|
||||
<span style="font-weight: bold;">domain.php</span> which manages the
|
||||
domain objects in LDAP.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>domain.php</h2>
|
||||
This script manages domain objects. It allows the user to create
|
||||
domains or to modify values.<br>
|
||||
The domain name, SID and RIDbase cannot be changed by the user because
|
||||
this could cause trouble on the clients.<br>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,57 +0,0 @@
|
|||
/*
|
||||
$Id$
|
||||
|
||||
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
|
||||
Copyright (C) 2004 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 detaexils.
|
||||
|
||||
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
|
||||
|
||||
*/
|
||||
|
||||
/* CSS layout for LAM development documentation */
|
||||
|
||||
|
||||
|
||||
h1,h2,h3,h4 {
|
||||
color:#0c12b7;
|
||||
}
|
||||
|
||||
/* links */
|
||||
a {
|
||||
color:blue;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color:blue;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color:red;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
a:active {
|
||||
color:red;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
|
||||
/* module HowTo */
|
||||
|
||||
table.mod-code {
|
||||
background-color:#fffde2;
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-15"
|
||||
http-equiv="content-type">
|
||||
<title>Tree view and schema browser</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align: center;">Tree view and schema browser<br>
|
||||
</h1>
|
||||
<br>
|
||||
<br>
|
||||
These parts are based on <a
|
||||
href="http://sourceforge.net/projects/phpldapadmin/">phpLDAPadmin</a>.<br>
|
||||
The two tools are located in <span
|
||||
style="font-weight: bold; font-style: italic;">templates/schema</span>
|
||||
and <span style="font-weight: bold; font-style: italic;">templates/tree</span>.<br>
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
|
@ -1,102 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=ISO-8859-15"
|
||||
http-equiv="content-type">
|
||||
<title>File upload</title>
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 style="text-align: center;">File upload<br>
|
||||
</h1>
|
||||
<br>
|
||||
<div style="text-align: center;"><img
|
||||
style="width: 886px; height: 162px;" alt="upload"
|
||||
src="images/lam_upload.png"><br>
|
||||
<div style="text-align: left;"><br>
|
||||
<h2>Account selection (masscreate.php)<br>
|
||||
</h2>
|
||||
This is the initial page of the file upload. The user selects the
|
||||
account type for the new upload.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Attribute overview (masscreate.php)</h2>
|
||||
After the account selection LAM will display an overview of the
|
||||
possible and required input columns.<br>
|
||||
The <span style="font-style: italic;">DN</span> attributes (<span
|
||||
style="font-style: italic;">DN suffix</span> and <span
|
||||
style="font-style: italic;">RDN</span>) are static and are always
|
||||
displayed. The default suffix is read from config with <span
|
||||
style="font-weight: bold;">getAccountSuffix()</span> and the list of
|
||||
RDN possibilities is taken from modules.inc - <span
|
||||
style="font-weight: bold;">getRDNAttributes()</span>.<br>
|
||||
The next attributes are read from modules.inc - <span
|
||||
style="font-weight: bold;">getUploadColumns()</span>. LAM will display
|
||||
all attributes of one module in a separate fieldset. The <span
|
||||
style="font-weight: bold;">getUploadColumns()</span> function also
|
||||
returns if an attribute is required and additional information like an
|
||||
example value.<br>
|
||||
<br>
|
||||
After clicking the upload button the user will be forwarded to the
|
||||
account building page.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Account building (massBuildAccounts.php)<br>
|
||||
</h2>
|
||||
This part takes the submitted <span style="font-weight: bold;">CSV file</span>
|
||||
and generates the LDAP accounts.<br>
|
||||
<br>
|
||||
The scripts separates the head row from the data rows in the CSV file.
|
||||
The head array is used to find the position of the input values. The
|
||||
data array contains one subarray for each account.<br>
|
||||
<br>
|
||||
After the data has been extracted there are some basic checks done,
|
||||
e.g. checking required and unique columns. The modules provide the
|
||||
necessary information for this.<br>
|
||||
<br>
|
||||
Then all data is given to the modules with <span
|
||||
style="font-weight: bold;">buildUploadAccounts()</span> in
|
||||
modules.inc. They return a list of accounts which can be uploaded with <span
|
||||
style="font-style: italic;">ldap-add()</span> and generate possible
|
||||
error messages.<br>
|
||||
<br>
|
||||
If the accounts are built the script will give the user the possibility
|
||||
to check the result with an <span style="font-style: italic;">LDIF-file</span>
|
||||
or to do the upload.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>LDIF export (massBuildAccounts.php)<br>
|
||||
</h2>
|
||||
LAM simply takes the built accounts and generates an <span
|
||||
style="font-style: italic;">LDIF-file</span> from them. This is passed
|
||||
to the user's browser.<br>
|
||||
The <span style="font-style: italic;">LDIF-file</span> will only
|
||||
contain the accounts itself. If modules do additional tasks after the
|
||||
upload (e.g. adding users to groups) this will not be covered.<br>
|
||||
<br>
|
||||
<br>
|
||||
<h2>Account creation (massDoUpload.php)<br>
|
||||
</h2>
|
||||
This script finally uploads the LDAP accounts with <span
|
||||
style="font-style: italic;">ldap_add()</span>.<br>
|
||||
<br>
|
||||
The upload can last longer than the maximum execution time of PHP.
|
||||
Therefore the script will check regulary how much time is left and
|
||||
pause the upload. This is resumed with a meta refresh which loads the
|
||||
script again.<br>
|
||||
<br>
|
||||
After all accounts were created in LDAP the modules may do additional
|
||||
tasks. LAM will call <span style="font-weight: bold;">doUploadPostActions()</span>
|
||||
and also provide a list of failed accounts which can be ignored. The
|
||||
function is called as long the returned status is <span
|
||||
style="font-style: italic;">"inProgress"</span>. The script uses again
|
||||
a
|
||||
meta refresh to handle the maximum execution time.<br>
|
||||
Typical post actions are setting quotas or adding an user to groups.<br>
|
||||
<br>
|
||||
A progress bar is shown for the LDAP adding and the module actions to
|
||||
give the user a hint how long it will still take.<br>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 528 B |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 141 B |
Before Width: | Height: | Size: 500 B |
Before Width: | Height: | Size: 856 B |
Before Width: | Height: | Size: 364 B |
Before Width: | Height: | Size: 380 B |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 440 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 746 B |
Before Width: | Height: | Size: 844 B |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 733 B |
Before Width: | Height: | Size: 751 B |
Before Width: | Height: | Size: 1.2 KiB |