Compare commits

..

3 Commits

Author SHA1 Message Date
ncpfs archive import
f6ac693f98 Import ncpfs 2.2.3 2026-04-28 20:39:59 +02:00
ncpfs archive import
cf0c5e59af Import ncpfs 2.2.2 2026-04-28 20:39:59 +02:00
ncpfs archive import
82706139bf Import ncpfs 2.2.1 2026-04-28 20:39:59 +02:00
551 changed files with 177370 additions and 12705 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

435
ABOUT-NLS Normal file
View File

@@ -0,0 +1,435 @@
Notes on the Free Translation Project
*************************************
Free software is going international! The Free Translation Project
is a way to get maintainers of free software, translators, and users all
together, so that will gradually become able to speak many languages.
A few packages already provide translations for their messages.
If you found this `ABOUT-NLS' file inside a distribution, you may
assume that the distributed package does use GNU `gettext' internally,
itself available at your nearest GNU archive site. But you do _not_
need to install GNU `gettext' prior to configuring, installing or using
this package with messages translated.
Installers will find here some useful hints. These notes also
explain how users should proceed for getting the programs to use the
available translations. They tell how people wanting to contribute and
work at translations should contact the appropriate team.
When reporting bugs in the `intl/' directory or bugs which may be
related to internationalization, you should tell about the version of
`gettext' which is used. The information can be found in the
`intl/VERSION' file, in internationalized packages.
Quick configuration advice
==========================
If you want to exploit the full power of internationalization, you
should configure it using
./configure --with-included-gettext
to force usage of internationalizing routines provided within this
package, despite the existence of internationalizing capabilities in the
operating system where this package is being installed. So far, only
the `gettext' implementation in the GNU C library version 2 provides as
many features (such as locale alias, message inheritance, automatic
charset conversion or plural form handling) as the implementation here.
It is also not possible to offer this additional functionality on top
of a `catgets' implementation. Future versions of GNU `gettext' will
very likely convey even more functionality. So it might be a good idea
to change to GNU `gettext' as soon as possible.
So you need _not_ provide this option if you are using GNU libc 2 or
you have installed a recent copy of the GNU gettext package with the
included `libintl'.
INSTALL Matters
===============
Some packages are "localizable" when properly installed; the
programs they contain can be made to speak your own native language.
Most such packages use GNU `gettext'. Other packages have their own
ways to internationalization, predating GNU `gettext'.
By default, this package will be installed to allow translation of
messages. It will automatically detect whether the system already
provides the GNU `gettext' functions. If not, the GNU `gettext' own
library will be used. This library is wholly contained within this
package, usually in the `intl/' subdirectory, so prior installation of
the GNU `gettext' package is _not_ required. Installers may use
special options at configuration time for changing the default
behaviour. The commands:
./configure --with-included-gettext
./configure --disable-nls
will respectively bypass any pre-existing `gettext' to use the
internationalizing routines provided within this package, or else,
_totally_ disable translation of messages.
When you already have GNU `gettext' installed on your system and run
configure without an option for your new package, `configure' will
probably detect the previously built and installed `libintl.a' file and
will decide to use this. This might be not what is desirable. You
should use the more recent version of the GNU `gettext' library. I.e.
if the file `intl/VERSION' shows that the library which comes with this
package is more recent, you should use
./configure --with-included-gettext
to prevent auto-detection.
The configuration process will not test for the `catgets' function
and therefore it will not be used. The reason is that even an
emulation of `gettext' on top of `catgets' could not provide all the
extensions of the GNU `gettext' library.
Internationalized packages have usually many `po/LL.po' files, where
LL gives an ISO 639 two-letter code identifying the language. Unless
translations have been forbidden at `configure' time by using the
`--disable-nls' switch, all available translations are installed
together with the package. However, the environment variable `LINGUAS'
may be set, prior to configuration, to limit the installed set.
`LINGUAS' should then contain a space separated list of two-letter
codes, stating which languages are allowed.
Using This Package
==================
As a user, if your language has been installed for this package, you
only have to set the `LANG' environment variable to the appropriate
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
and `CC' is an ISO 3166 two-letter country code. For example, let's
suppose that you speak German and live in Germany. At the shell
prompt, merely execute `setenv LANG de_DE' (in `csh'),
`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
This can be done from your `.login' or `.profile' file, once and for
all.
You might think that the country code specification is redundant.
But in fact, some languages have dialects in different countries. For
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
country code serves to distinguish the dialects.
The locale naming convention of `LL_CC', with `LL' denoting the
language and `CC' denoting the country, is the one use on systems based
on GNU libc. On other systems, some variations of this scheme are
used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
locales supported by your system for your country by running the command
`locale -a | grep '^LL''.
Not all programs have translations for all languages. By default, an
English message is shown in place of a nonexistent translation. If you
understand other languages, you can set up a priority list of languages.
This is done through a different environment variable, called
`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
for the purpose of message handling, but you still need to have `LANG'
set to the primary language; this is required by other parts of the
system libraries. For example, some Swedish users who would rather
read translations in German than English for when Swedish is not
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
In the `LANGUAGE' environment variable, but not in the `LANG'
environment variable, `LL_CC' combinations can be abbreviated as `LL'
to denote the language's main dialect. For example, `de' is equivalent
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
(Portuguese as spoken in Portugal) in this context.
Translating Teams
=================
For the Free Translation Project to be a success, we need interested
people who like their own language and write it well, and who are also
able to synergize with other translators speaking the same language.
Each translation team has its own mailing list. The up-to-date list of
teams can be found at the Free Translation Project's homepage,
`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
area.
If you'd like to volunteer to _work_ at translating messages, you
should become a member of the translating team for your own language.
The subscribing address is _not_ the same as the list itself, it has
`-request' appended. For example, speakers of Swedish can send a
message to `sv-request@li.org', having this message body:
subscribe
Keep in mind that team members are expected to participate
_actively_ in translations, or at solving translational difficulties,
rather than merely lurking around. If your team does not exist yet and
you want to start one, or if you are unsure about what to do or how to
get started, please write to `translation@iro.umontreal.ca' to reach the
coordinator for all translator teams.
The English team is special. It works at improving and uniformizing
the terminology in use. Proven linguistic skill are praised more than
programming skill, here.
Available Packages
==================
Languages are not equally supported in all packages. The following
matrix shows the current state of internationalization, as of August
2002. The matrix shows, in regard of each package, for which languages
PO files have been submitted to translation coordination, with a
translation percentage of at least 50%.
Ready PO files be bg ca cs da de el en eo es et fi fr
+----------------------------------------+
a2ps | [] [] [] [] |
ap-utils | |
bash | [] [] [] [] |
bfd | [] [] |
binutils | [] [] |
bison | [] [] [] [] |
clisp | |
clisp | [] [] [] [] |
clisplow | |
cpio | [] [] [] [] |
darkstat | () |
diffutils | [] [] [] [] [] [] |
enscript | [] [] |
error | [] [] [] |
fetchmail | [] () [] [] [] () |
fileutils | [] [] [] [] [] |
findutils | [] [] [] [] [] [] |
flex | [] [] [] [] [] |
gas | [] [] |
gawk | [] [] [] |
gcal | [] [] |
gcc | [] [] |
gettext | [] [] [] [] [] |
gnupg | [] [] [] [] [] [] [] |
gprof | [] [] |
gpsdrive | () () () () () |
grep | [] [] [] [] [] [] [] [] |
gretl | [] |
gthumb | () () () |
hello | [] [] [] [] [] [] [] [] [] |
id-utils | [] [] [] |
indent | [] [] [] [] [] |
jpilot | () [] [] [] |
jwhois | [] [] |
kbd | [] [] [] |
ld | [] [] |
libc | [] [] [] [] [] [] [] [] |
libiconv | [] [] [] [] |
lifelines | () () |
lilypond | [] [] |
lingoteach | [] [] |
lingoteach_lessons| () () |
lynx | [] [] [] [] [] |
m4 | [] [] [] [] [] |
make | [] [] [] [] |
man-db | [] () () [] () () |
mysecretdiary | [] [] [] |
nano | [] () [] [] [] [] |
nano_1_0 | [] () [] [] [] [] |
opcodes | [] [] [] |
parted | [] [] [] [] [] |
ptx | [] [] [] [] [] [] [] |
python | |
recode | [] [] [] [] [] [] |
sed | [] [] [] [] [] [] [] [] [] [] |
sh-utils | [] [] [] [] |
sharutils | [] [] [] [] [] [] [] |
sketch | () [] () |
soundtracker | [] [] [] |
sp | [] |
tar | [] [] [] [] [] [] |
texinfo | [] [] [] [] [] |
textutils | [] [] [] [] [] |
util-linux | [] [] [] [] [] [] |
vorbis-tools | [] |
wastesedge | |
wdiff | [] [] [] [] [] [] |
wget | [] [] [] [] [] [] [] [] [] [] |
+----------------------------------------+
be bg ca cs da de el en eo es et fi fr
0 2 19 10 30 44 9 1 12 44 17 6 53
gl he hr hu id it ja ko lv nb nl nn
+-------------------------------------+
a2ps | () () [] |
ap-utils | |
bash | [] |
bfd | [] |
binutils | [] |
bison | [] [] [] [] |
clisp | |
clisp | [] |
clisplow | |
cpio | [] [] [] [] |
darkstat | |
diffutils | [] [] [] [] [] |
enscript | [] [] |
error | [] |
fetchmail | [] |
fileutils | [] [] [] |
findutils | [] [] [] [] [] [] [] [] |
flex | [] |
gas | |
gawk | [] |
gcal | |
gcc | [] |
gettext | [] [] |
gnupg | [] [] [] [] |
gprof | [] |
gpsdrive | [] () () |
grep | [] [] [] [] [] [] [] |
gretl | |
gthumb | () () |
hello | [] [] [] [] [] [] [] [] [] [] [] [] |
id-utils | [] [] |
indent | [] [] [] [] |
jpilot | () () |
jwhois | [] [] |
kbd | |
ld | |
libc | [] [] [] [] |
libiconv | [] [] [] |
lifelines | |
lilypond | [] |
lingoteach | [] |
lingoteach_lessons| |
lynx | [] [] [] [] |
m4 | [] [] [] [] |
make | [] [] [] [] [] [] |
man-db | () () |
mysecretdiary | [] |
nano | [] [] [] [] |
nano_1_0 | [] [] [] [] [] |
opcodes | [] [] |
parted | [] [] [] |
ptx | [] [] [] [] [] |
python | |
recode | [] [] [] |
sed | [] [] [] [] [] [] [] [] |
sh-utils | [] [] [] |
sharutils | [] [] [] |
sketch | () |
soundtracker | [] [] |
sp | |
tar | [] [] [] [] [] [] |
texinfo | [] [] [] |
textutils | [] [] [] [] |
util-linux | () [] |
vorbis-tools | [] |
wastesedge | |
wdiff | [] [] [] |
wget | [] [] [] [] [] [] |
+-------------------------------------+
gl he hr hu id it ja ko lv nb nl nn
23 9 12 19 16 13 26 9 1 7 19 3
no pl pt pt_BR ru sk sl sv tr uk zh_CN zh_TW
+----------------------------------------------+
a2ps | () () () [] [] [] [] [] | 10
ap-utils | () | 0
bash | [] | 6
bfd | [] [] | 5
binutils | [] [] | 5
bison | [] [] [] [] | 12
clisp | | 0
clisp | | 5
clisplow | | 0
cpio | [] [] [] [] | 12
darkstat | [] [] () () | 2
diffutils | [] [] [] [] [] [] | 17
enscript | [] [] [] [] | 8
error | [] [] [] | 7
fetchmail | () () [] | 6
fileutils | [] [] [] [] [] [] | 14
findutils | [] [] [] [] [] [] [] | 21
flex | [] [] [] | 9
gas | [] | 3
gawk | [] [] | 6
gcal | [] [] | 4
gcc | [] | 4
gettext | [] [] [] [] [] [] | 13
gnupg | [] [] [] | 14
gprof | [] [] | 5
gpsdrive | [] [] | 3
grep | [] [] [] [] [] | 20
gretl | | 1
gthumb | () () [] | 1
hello | [] [] [] [] [] [] [] | 28
id-utils | [] [] [] [] | 9
indent | [] [] [] [] [] | 14
jpilot | () () [] [] | 5
jwhois | [] () () [] [] | 7
kbd | [] [] | 5
ld | [] [] | 4
libc | [] [] [] [] [] [] | 18
libiconv | [] [] [] [] [] | 12
lifelines | [] | 1
lilypond | [] | 4
lingoteach | [] [] | 5
lingoteach_lessons| () | 0
lynx | [] [] [] [] | 13
m4 | [] [] [] [] | 13
make | [] [] [] [] [] | 15
man-db | | 3
mysecretdiary | [] [] [] | 7
nano | [] [] [] [] | 13
nano_1_0 | [] [] [] [] | 14
opcodes | [] [] [] | 8
parted | [] [] [] [] | 12
ptx | [] [] [] [] [] [] [] | 19
python | | 0
recode | [] [] [] [] [] [] | 15
sed | [] [] [] [] [] [] | 24
sh-utils | [] [] | 9
sharutils | [] [] [] [] | 14
sketch | [] () [] | 4
soundtracker | [] | 6
sp | | 1
tar | [] [] [] [] [] [] [] | 19
texinfo | [] [] | 10
textutils | [] [] [] [] [] | 14
util-linux | [] [] [] | 10
vorbis-tools | [] | 3
wastesedge | | 0
wdiff | [] [] [] [] [] | 14
wget | [] [] [] [] [] [] [] [] | 24
+----------------------------------------------+
37 teams no pl pt pt_BR ru sk sl sv tr uk zh_CN zh_TW
68 domains 4 15 2 28 28 12 10 49 43 4 1 9 609
Some counters in the preceding matrix are higher than the number of
visible blocks let us expect. This is because a few extra PO files are
used for implementing regional variants of languages, or language
dialects.
For a PO file in the matrix above to be effective, the package to
which it applies should also have been internationalized and
distributed as such by its maintainer. There might be an observable
lag between the mere existence a PO file and its wide availability in a
distribution.
If August 2002 seems to be old, you may fetch a more recent copy of
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
matrix with full percentage details can be found at
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
Using `gettext' in new packages
===============================
If you are writing a freely available program and want to
internationalize it you are welcome to use GNU `gettext' in your
package. Of course you have to respect the GNU Library General Public
License which covers the use of the GNU `gettext' library. This means
in particular that even non-free programs can use `libintl' as a shared
library, whereas only free software can use `libintl' as a static
library or use modified versions of `libintl'.
Once the sources are changed appropriately and the setup can handle
to use of `gettext' the only thing missing are the translations. The
Free Translation Project is also available for packages which are not
developed inside the GNU project. Therefore the information given above
applies also for every other Free Software Project. Contact
`translation@iro.umontreal.ca' to make the `.pot' files available to
the translation teams.

21
BUGS
View File

@@ -3,6 +3,9 @@ them to be bugs.
But there are really problems that might be fixed in the future.
If you find some problem unlisted in this file, contact me at
"Petr Vandrovec" <vandrove@vc.cvut.cz>.
-------------------------------------------------------------------------------
You might experience lockups of ncpfs volumes. It happens especially
@@ -38,12 +41,22 @@ These are a bit annoying, but completely harmless.
Known bugs:
- It returns error 255 during bindery login on one site... I do not know why.
- If GetNearsetServer returns invalid (nonexistant, downed) server, all
utilities gives up. VLM/Client32 in this situation tries randomly choosen
server after 30 secs timeout. You have to fix your routers at this time.
Sorry.
- NFS namespace does not work on Netware Storage Services volume... Sorry,
it is not my fault and I did not found any workaround (maybe that I have
workaround for NSS from NW5Beta3)
- nwdplist does nothing good. This tool will be finished after nwnet.c...
- manpages names for 3ncp section are too long... Is there a way to
define page header or ...
-------------------------------------------------------------------------------
Known incompatibilities:
PROBLEM: ncpfs is not compatible with NSS volumes of beta releases of NW5
SOLUTION: Upgrade your NW5 to production NW5 version.
PROBLEM: ncpfs cannot access LinWare server
SOLUTION: LinWare does not support namespace calls used by ncpfs. Because of
LinWare is currently not maintained, you should fix it yourself or
move your server to MarsNWE or Caldera's NetWare for Linux.

794
Changes
View File

@@ -1,329 +1,591 @@
I only began this file with ncpfs-0.12. If you're interested in older
versions, you can find them on ftp.gwdg.de:/pub/linux/misc/ncpfs/old.
ChangeSet@1.254, 2003-03-13 15:54:06+01:00
ncpfs-2.2.3
TAG: ncpfs-2.2.3
[Versions ncpfs-2.0.12.x are available at ftp://platan.vc.cvut.cz/pub/linux/ncpfs]
ChangeSet@1.253, 2003-03-13 15:37:42+01:00
When user presents name with context to login prompt, it is not good idea
to append context once more to the username...
Also add leading dot to the FQDN so that ncpmount works even if /etc/ncpfs.conf
is not empty.
ncpfs-2.0.12.10 -> ncpfs-2.2.0
- VANA: minor cleanup
ChangeSet@1.252, 2003-03-13 15:10:12+01:00
Add -L option to pam_ncp_auth to ignore services restrictions based on access point.
ncpfs-2.0.12.9 -> ncpfs-2.0.12.10
- VANA: you can now access NDS server without replica of its conteiner
(TODO: access to server if server has R/W replica of your account but
does not have replica of itself)
- VANA: Alpha still no go :-(
ChangeSet@1.251, 2003-03-13 15:00:45+01:00
Fix typo in logged ncpmount command line in pam_ncp_auth.
ncpfs-2.0.12.8 -> ncpfs-2.0.12.9
- Eloy A. Paris: Fixes in library code
ChangeSet@1.250, 2003-03-13 14:50:52+01:00
Ignore failure in initgroups(). Spotted by Mikael.
ncpfs-2.0.12.7 -> ncpfs-2.0.12.8
- VANA: bugfix, now it works again without ipxripd
- VANA: still cleaning up, ncp_open() and NDS byte ordering
ChangeSet@1.249, 2003-03-13 14:31:55+01:00
Ignore prefix "/dev/" in tty name. Spotted by Mikael.
ncpfs-2.0.12.6 -> ncpfs-2.0.12.7
- VANA: bugfixes, nwpurge
ChangeSet@1.248, 2003-02-25 22:56:17+01:00
Allow short -p/-i variants for --auto_primary/--auto_interface. Also allow
--auto-primary/--auto-interface.
Allow 0/1 as OFF/ON equivalent.
ncpfs-2.0.12.5 -> ncpfs-2.0.12.6
- VANA: ncpmount supports NCP over IP (no incoming broadcast at this time)
ChangeSet@1.247, 2003-02-25 21:57:38+01:00
Fix signed/unsigned char problems on arm, ppc and s390. Fixes Debian bug #182162.
ncpfs-2.0.12.4 -> ncpfs-2.0.12.5
- Eloy A. Paris: Makefile bugfix
ChangeSet@1.246, 2003-02-15 10:29:01+01:00
ncpfs-2.2.2
TAG: ncpfs-2.2.2
ncpfs-2.0.12.3 -> ncpfs-2.0.12.4
- VANA: Bugfixes
- VANA: Alpha stage of native NCP over IP support (no kernel at this time)
ChangeSet@1.245, 2003-02-15 10:14:01+01:00
Update Czech translations.
ncpfs-2.0.12.2 -> ncpfs-2.0.12.3
- VANA: Major makefile changes, compile warning cleanup
ChangeSet@1.244, 2003-02-15 09:59:55+01:00
Honor default name context setting in ncpmount, and in file and
print utilities.
ncpfs-2.0.12.1 -> ncpfs-2.0.12.2
- Eloy A. Paris <peloy@ven.ra.rockwell.com>: Makefile cleanup
- VANA: More merging sutil/ncplib.c and lib/ncplib.c, not fully functional yet
ChangeSet@1.243, 2003-02-14 10:58:30+01:00
Teach nds_login to honor character encoding specified in context.
Teach nds_login_auth to use default name context specified in
configuration file.
ncpfs-2.0.12 -> ncpfs-2.0.12.1
- Dave, VANA: Bindery logins for all utilities (-b)
- VANA: Specify signature level for ncpmount (-i number)
- VANA: Start of merging sutil/*lib* with lib/*lib*
ChangeSet@1.242, 2003-02-14 10:25:31+01:00
Fix few compile warnings...
ncpfs-2.0.11.19 -> ncpfs-2.0.12
- Polished for release 2.0.12
- Dave: pserver fixes, including addition of %d flag.
ChangeSet@1.241, 2003-02-14 10:21:06+01:00
Make authenticators user configurable, some people may want to
disable bindery (or NDS) authentication.
ncpfs-2.0.11.18 -> ncpfs-2.0.11.19
- Dave, VANA: new userspace utilities - pqstat and pqrm
ChangeSet@1.240, 2003-02-14 09:28:28+01:00
Learn pqlist to use default name context from /etc/ncpfs.conf.
ncpfs-2.0.11.17 -> ncpfs-2.0.11.18 (no userspace change)
- Dave: getwd() did not work on 2.1.x
- VANA: Volumes are now always listed lowercased on 2.1.x
ChangeSet@1.239, 2003-02-14 09:27:26+01:00
Do not store compiled ipxdump and ipxparse in BitKeeper...
ncpfs-2.0.11.16 -> ncpfs-2.0.11.17
- David Woodhouse <Dave@imladris.demon.co.uk>: Patch to pserver,
ncp_get_broadcast_message
- VANA & Dave: Cleanup for glibc, I hope that complete (xcpt. few warnings
about long int vs. u_int32_t)
ChangeSet@1.238, 2003-02-14 09:26:02+01:00
Update /etc/ncpfs.conf format to allow unquoted values with embeded
spaces. We'll need that in future for 'NDS BIND' without quotes...
ncpfs-2.0.11.15 -> ncpfs-2.0.11.16
- VANA: Removed symlink latest from archive :-)
- VANA: Added ncp_send_broadcast2
ChangeSet@1.237, 2003-02-13 10:20:37+01:00
Store session key also for temporary connections, so NDS aware utilities
as for example pqstat or nprint can do what they promise.
Please note bindery authentication is tried first, and if you are
bindery authenticated then there is no session key, and thus no background
authentication. So you may want to use FQDN instead of short name for
pqstat or nprint.
ncpfs-2.0.11.14 -> ncpfs-2.0.11.15
- VANA: Fixed bug: wrong completion code returned when login to server without
r/w replica of logged-in user
- VANA: It is possible to disable NFS and/or OS2 namespace support in mount
ChangeSet@1.236, 2003-02-13 10:16:18+01:00
Retrieve queue name and job owner in pqstat from NDS. Reported by
Jimmy Kaplowitz.
ncpfs-2.0.11.13 -> ncpfs-2.0.11.14
- VANA: One source for 2.0 and 2.1 kernels
- Chirstian Groessler <cpg@aladdin.de>: Added strong mounts
ChangeSet@1.235, 2003-02-13 09:03:01+01:00
Remove references to RSA patent #4,405,829 from README.NDS. Patent expired
more than two years ago... Reported by Ken Conrad.
ncpfs-2.0.11.12 -> ncpfs-2.0.11.13
- Arne: Signatures added to ncpfs-nds-0.06
- VANA: Synchronized sources with Arne
ChangeSet@1.234, 2003-02-11 10:36:50+01:00
Add GIVEN_NAME to the list of known text properties.
ncpfs-2.0.11.11 -> ncpfs-2.0.11.12
- VANA: Fixed compilation error if compiled against kernel without signatures
even if SIGNATURES = 0 set
ChangeSet@1.233, 2003-02-09 04:59:37+01:00
Learn BitKeeper to ignore temporary products of --with-included-gettext.
ncpfs-2.0.11.10 -> ncpfs-2.0.11.11
- VANA: Fixed segfault on invalid user name in NDS mode
- VANA: Added locking features (through ncpfs-specific ioctl(2))
ChangeSet@1.232, 2003-02-09 04:57:06+01:00
Fix dependencies for --with-included-gettext build. Spotted
by David Walser.
ncpfs-2.0.11.9 -> ncpfs-2.0.11.10
- VANA: Synchronized with nds-patches-0.05 from Arne de Bruijn <Arne@knoware.nl>
ChangeSet@1.231, 2003-02-09 04:38:09+01:00
Create directory for pam_ncp module during install. Spotted and fixed
by David Walser.
ncpfs-2.0.11.8 -> ncpfs-2.0.11.9
- VANA: Added call to lock connection (dropped in 2.0.11.7, sorry)
ChangeSet@1.230, 2003-02-08 11:30:40+01:00
ncpfs-2.2.1 released
TAG: ncpfs-2.2.1
ncpfs-2.0.11.7 -> ncpfs-2.0.11.8
- VANA: Can be correctly compiled without signatures support in kernel (I hope)
- VANA: Fix in kernel in setting task number
ChangeSet@1.229, 2003-02-08 11:06:50+01:00
Ignore editor backup files *~
ncpfs-2.0.11.6 -> ncpfs-2.0.11.7
- VANA: Codebase synchronized with Arne de Bruijn <Arne@knoware.nl>
- ARNE: Gracelogins on NDS
- VANA: Removed some (one) compilation warnings
ChangeSet@1.228, 2003-02-08 11:06:15+01:00
Fix problems in ncpfs-nwuid area.
ncpfs-2.0.11.5 -> ncpfs-2.0.11.6
- VANA: Support for NDS login accross servers
ChangeSet@1.227, 2003-02-08 10:56:50+01:00
Add proper version to new library symbols.
ncpfs-2.0.11.4 -> ncpfs-2.0.11.5
- VANA: Cleanup in ndscrypt
- VANA: Bugfix: empty password for NDS login is now allowed & works
ChangeSet@1.226, 2003-02-08 10:32:45+01:00
Sanitize ncp_open_2 calling convention...
ncpfs-2.0.11.3 -> ncpfs-2.0.11.4
- Enabled some buffer cleaning
- Added parameter "-b" to ncpmount for bindery login to NDS server
ChangeSet@1.225, 2003-02-08 10:24:39+01:00
Pass API errors through in ncp_login_conn, instead of always
returning EACCES.
Make password optional for nwfsinfo.
ncpfs-2.0.11.2 -> ncpfs-2.0.11.3
- Added NDS support by Arne de Bruijn <Arne@knoware.nl>; small fixes in code;
moved sections to do same things as DOS login does.
ChangeSet@1.224, 2003-02-08 09:52:31+01:00
Update PHP's autoconf and libtool environment.
ncpfs-2.0.11.1 -> ncpfs-2.0.11.2
- VANA: Fixed that some error conditions in LOGIN should start packet signatures
ChangeSet@1.223, 2003-02-08 09:28:27+01:00
Debian's lintian prefers relative symlinks over absolute...
ncpfs-2.0.11 -> ncpfs-2.0.11.1
- VANA: Added packet signatures by Arne de Bruijn <Arne@knoware.nl>
ncpfs-2.0.10 -> ncpfs-2.0.11
- Added Martin's patch to Linux 2.0.30 to get rid of the lockups.
MANY thanks to Martin Stover!
ChangeSet@1.222, 2003-02-08 09:27:27+01:00
Debian's lintian complains that manpages are not gzip -9 ed...
ncpfs-2.0.9 -> ncpfs-2.0.10
- Made nwtrustee hopefully work ;-)
- Made the manpages a little bit prettier
ChangeSet@1.221, 2003-02-08 09:26:42+01:00
Add ncp_find_conn_spec3: ncp_find_conn_spec2 with sane calling convention.
Change ncp_find_conn_spec* users to use ncp_find_conn_spec3.
Change calling convention for ncp_fopen_nwc.
Fix ncp_find_conn_spec* error reporting when stdin/stdout are not
terminal. Spotted by Andre Holzhey.
ncpfs-2.0.8 -> ncpfs-2.0.9
- Added patches directory
- Added nwvolinfo and nwtrustee. Thanks to Jacek Stepniewski <cunio@gazeta.pl>
- nwpasswd can change other's passwords. Thanks to Martin Stover.
ChangeSet@1.220, 2003-01-27 09:45:09+01:00
Add NDS support to nwdir.
ncpfs-2.0.7 -> ncpfs-2.0.8
- Fixed util/Makefile for easier optimization handling. Thanks to Rik
Faith <faith@cs.unc.edu> for this one
- added nwfstime. You can now set the file server date and time from Linux.
- added the contrib directory. Feel free to add more!
ChangeSet@1.219, 2003-01-27 09:20:19+01:00
Add basic NWDSSearch demo to contrib/testing.
ncpfs-2.0.6 -> ncpfs-2.0.7
- Hopefully removed one security problem in ncpumount.
- Added command line flag to pserver.c
- Heavily reconstructed ncpfs utils. Created the lib/ dir.
- Separated the uid utils in sutil
- Add nwsfind to enable users to use ncpfs safely without setting
the utils setuid root.
ChangeSet@1.218, 2003-01-27 09:18:46+01:00
Regenerate autoconf system.
ncpfs-2.0.5 -> ncpfs-2.0.6
- Added a short description of a problem that I need help with to the
file BUGS. If you know a bit of the linux networking code, please
take a look at it. Thanks a lot.
- Added canonic output format to nwpbvalues and the command nwbpset. I
would like to invite you to help building capable bindery management
utilities. For little examples, look at the manual page of nwbpset.
- Added some values to ipxparse. Those interested in NDS should take a
look at it. It's really not much, but maybe it's a beginning.
ChangeSet@1.217, 2003-01-27 09:15:36+01:00
Update configure.ac for autoconf2.57.
ncpfs-2.0.4 -> ncpfs-2.0.5
- Removed another bug in nwbpvalues.
- Cleaned up man/Makefile
- Some manpage typos fixed. Thanks to Jim Van Zandt
<jrv@mbunix.mitre.org>
- added nwrights
ChangeSet@1.216, 2003-01-27 08:49:01+01:00
Make PHP module compilable even if ncpfs is not installed. Found by
jukka.huhta@helsinki.fi.
ncpfs-2.0.3 -> ncpfs-2.0.4
- Changed name of npasswd to nwpasswd, as npasswd collides with
RedHat. Thanks to Mike Slater <mslater@nfinity.com> for pointing me
at this one.
- Put '\r\n' into nwmsg, because sometimes it did not print
correctly. Thanks to Petr Vandrovec Ing. VTEI
<VANDROVE@vcnet.vc.cvut.cz> for this one.
- Improved the ELF Makefile for ELF support. Thanks to Uwe Bonnes
<bon@elektron.ikp.physik.th-darmstadt.de>.
- Removed a very embarassing bug in nwpvalues :-(.
- Added a some routines to nwbpvalues.
ChangeSet@1.215, 2003-01-11 21:45:09+01:00
Fix wcsrev() to do string reverse instead of core dump.
ncpfs-2.0.2 -> ncpfs-2.0.3
- Removed the kernel-2.0 directory. Linus took the patch into 2.0.8.
So, if you want to use long file name support, upgrade to Linux
kernel version 2.0.8.
- Applied the lfn patch to the kernel-1.2 module with some light
testing. If you experience problems, tell it to me, and use the
ncpfs-2.0.2 kernel module, or upgrade to Linux 2.0.8.
- Added unencrypted login when no crypt key is returned.
- Hopefully improved error messages a bit
- Added some values to ipxparse
- For ELF systems, moved ncplib to /lib/libncp.so.1.x. This saves
about 1MB of disk space. As ncpfs grows, the saving will
increase. Please look at the Makefile to enable this.
- Enhanced nwfsinfo a bit. (Even with a manpage!)
- Added nwuserlist.
ChangeSet@1.214, 2003-01-11 21:43:53+01:00
Print correct number of leaked connections. Spotted by Patrick Pollet.
ncpfs-2.0.1 -> ncpfs-2.0.2
- Added some values to ipxparse.
- Added a patch against 2.0.7 for long file names support. I did not
apply this change to the 1.2-module. Please upgrade to 2.0.7 if you
want to use long file names.
- nwbpvalues can print ITEM properties
ChangeSet@1.213, 2003-01-11 21:41:59+01:00
Simplify DS iteration handle library.
Do not leak connection in NWDSSearch. Found and tracked down by Patrick Pollet.
ncpfs-2.0.0 -> ncpfs-2.0.1
- Added some values to ipxparse.
- Added the little bindery utilities. Maybe someone has the time to
write a shellscript named 'nwadduser' ?
- Fixed a bug that made the __255 message reappear. Many thanks to
Guntram Blom for his detailed bug report.
- Fixed a bug that made ncpfs incompatible with W95's server
capabilities. Thanks to Tomasz Babczynski
<faster@dino.ict.pwr.wroc.pl> for this one.
ChangeSet@1.212, 2003-01-11 17:53:37+01:00
Enable ncp-debug in "sample" configuration.
ncpfs-0.24 -> ncpfs-2.0.0
- Changed the numbering scheme :-).
- Added npasswd. Many thanks to Guntram Blom for his work!
- Hopefully improved error messages a bit
- Hopefully made slist a bit more robust
ChangeSet@1.211, 2003-01-11 17:52:42+01:00
Add NWGetNLMLoadedList function and use it in nwfsinfo.
ncpfs-0.23 -> ncpfs-0.24
- Fixed a bug that made it impossible to umount a filesystem after you
tried 'mkdir .' or 'mkdir ..'.
- Fixed a bad race condition when opening files.
- Made the default timeout values more robust.
ChangeSet@1.210, 2002-11-25 23:39:53+01:00
Make pqlist/pqstat/pqrm/nprint really working with NDS queues. It did not
work correctly if queue was on different server than one you specified with
-S option.
ncpfs-0.22 -> ncpfs-0.23
- Fixed a memory allocation problem in nwmsg.c. Thanks to
Andrew Ross <anr1001@hermes.cam.ac.uk>
- slist hopefully does not ask for a password anymore.
- cleaned up error messages a bit.
- ncpmount now calls modprobe instead of insmod.
ChangeSet@1.209, 2002-11-25 19:35:42+01:00
Use "Unknown user" instead of "Unknown server". Pointed out by Radovan Garabik.
Fixes Debian bug #170694.
ncpfs-0.21 -> ncpfs-0.22
- removed a bad race condition in kernel-1.2/src/dir.c.
- handle 0x9999-responses from the ncp server correctly.
- Bindery functions in ncplib.c by Brian G. Reid (breid@tim.com)
- set blocksize to 512 to satisfy 'du -k'
ChangeSet@1.208, 2002-11-19 22:59:52+01:00
Add -o pass-fd=X option to ncpmount and ncplogin. It is
simplest way how to pass password to these commands.
ncpfs-0.20 -> ncpfs-0.21
- Included two bugfixes in ncplib.c found by Jeff Buhrt
<buhrt@iquest.net>.
- Included a bugfix in kernel code that could only show for servers
that do not support namespace calls. I should have tried ncpfs
against lwared... Thanks to Neil Turton <ndt1001@chu.cam.ac.uk> for
this fix.
ChangeSet@1.207, 2002-11-19 18:11:39+01:00
Install nwmsg always as sbin/nwmsg, even if sbin does not exist.
ncpfs-0.19 -> ncpfs-0.20
- Changed the home site for ncpfs from linux01.gwdg.de:/pub/ncpfs
to ftp.gwdg.de:/pub/linux/misc/ncpfs. linux01 will remain available,
but we would like to reduce the load on that machine. Sites
mirroring linux01 please redirect your mirror software to
ftp.gwdg.de. Thanks.
- Removed a bug in ncplib.c that made slist require a full
login. Thanks to Neil Turton <ndt1001@chu.cam.ac.uk> for the hint.
- The first real user contribution: ncopy by Brian G. Reid
(breid@tim.com) and Tom C. Henderson (thenderson@tim.com). Many
thanks to you! If you find bugs in ncopy, tell them, not me ;-)
- Handle expired passwords. Thanks to "Mathew Lim" <M.Lim@sp.ac.sg>
for the hint.
ChangeSet@1.206, 2002-11-18 23:22:05+01:00
Remove unneeded includes from ncplogin/ncpmount.
ncpfs-0.18 -> ncpfs-0.19
ChangeSet@1.205, 2002-11-18 23:15:21+01:00
More merging of ncplogin and ncpmount.
- hacked around in ncplib.[ch] quite heavily.
- SAP handling in ipxparse.c. Thanks to Jeff Buhrt <buhrt@iquest.net>
- Changed error handling to use the com_err library. This should
eventually provide better error messages, because it's now much
easier to define nice messages.
- If no server is active, report this correctly
- added nsend
ChangeSet@1.204, 2002-11-18 22:50:20+01:00
Move common code from ncplogin.c and ncpmount.c to mount_login.c.
Reindent ncplogin.c.
ncpfs-0.17 -> ncpfs-0.18
ChangeSet@1.203, 2002-11-18 21:15:48+01:00
2.5.x kernels have /proc/net/ipx/interface instead of /proc/net/ipx_interface.
- Another attempt at solving the problem that -n is not working.
- Forgot nprint in 0.17 util/Makefile.
- nprint left connections open when it fails
- added options -r and -t to ncpmount to tune ncpfs connections.
ChangeSet@1.202, 2002-10-19 01:28:20+02:00
pam_ncp_auth: Fix doublefree when using bindery authentication and user's home directory
is found.
ncpfs-0.16 -> ncpfs-0.17
ChangeSet@1.201, 2002-10-19 01:13:39+02:00
pam_ncp_auth: Reindent.
- Changed the name of fsinfo to nwfsinfo, to avoid a name clash with
the X windows utility. Thanks to Henning Brockfeld
<Henning.Brockfeld@lrz.uni-muenchen.de> for this hint. (still
waiting for your scripts.. :-))
- made nwmsg available. This enables you to receive NetWare user
broadcast messages. Please note that you need at least kernel 1.3.68
for this feature.
- pserver now prints debugging output via syslog().
- Included ipxdump, a nice little utility, that has helped some
people.
ChangeSet@1.200, 2002-10-19 00:00:15+02:00
pam_ncp_auth: Close connection to server immediately after opening session or
changing password. Currently there is no need to keep connection open.
Originally by Patrick Pollet.
- And now the big one: you can re-export ncpfs-mounted directories
with nfsd! You have to mount single volumes by specifying -V volume
to ncpmount, and call nfsd and mountd with the option --re-export.
See the manual page of ncpmount for more information. Please note
that I will send Linus the required patch on 1. March 1996, so you
will have to use kernel 1.2.13 or wait at least for 1.3.70.
ChangeSet@1.199, 2002-10-18 23:42:26+02:00
pam_ncp_auth: Do not return errors from close session...
ncpfs-0.15 -> ncpfs-0.16
ChangeSet@1.198, 2002-10-18 23:16:53+02:00
pam_ncp_auth: Return correct error code when code detects buffer overflow attack.
- Included ipx-1.0, made available by Greg Page <greg@caldera.com>,
Caldera
- Made -n work for password-less accounts. Thanks to Alexander Jolk
<jolk@ap-pc513b.physik.uni-karlsruhe.de>.
- Fixed the kerneld support.
- Fixed the NetWare 4.1 problem. Many thanks to
Chatchai JANTARAPRIM <chat@ratree.psu.ac.th> and
hitesh.soneji@industry.net for their patience.
ChangeSet@1.197, 2002-10-18 23:07:39+02:00
pam_ncp_auth: Consume whole option string passed to -z/-Z.
ncpfs-0.14 -> ncpfs-0.15
ChangeSet@1.196, 2002-10-18 22:58:56+02:00
Fix typo in pam_ncp_auth.c. By Patrick Pollet.
- A bug fixed that made normal mounting impossible. It was too late
yesterday. Sorry
- Manpage for pserver.c
ChangeSet@1.195, 2002-10-18 22:19:23+02:00
Emit value separators also between NWDSRead, not only between
values read by NWDSRead in ncpreadprops tcl helper. By Patrick Pollet.
ncpfs-0.13 -> ncpfs-0.14
ChangeSet@1.194, 2002-10-06 02:29:50+02:00
Include missing stdarg.h in ncpm_common.h.
By Roy Bixler.
- Improvements of manual pages by B. Galliart <bgallia@luc.edu> and
Terry Dawson <terry@perf.no.itg.telecom.com.au>
- fsinfo
- pserver.c. Please see this as ALPHA software. There is no
documentation, and it is not tested enough. But it might be useful for
you.
ChangeSet@1.193, 2002-09-19 22:37:15+02:00
Oops, use NCP_DIRSTYLE_DIRBASE and not NCP_DIRSTYLE_NOHANDLE in nwpurge tool and
in dirlist2 demo program.
ncpfs-0.12 -> ncpfs-0.13
ChangeSet@1.192, 2002-09-19 22:36:29+02:00
NCP search for file set always returns filename, even if we did not asked for one.
Let's always ask for name, so there is no surprise with some other/future server
implementations.
- support for automatic loading of ncpfs.o by kerneld.
Thanks to Steven N. Hirsch <hirsch@emba.uvm.edu>.
- A subtle problem in the read routines has been removed by Uwe Bonnes
<bon@elektron.ikp.physik.th-darmstadt.de>. Thanks a lot.
ChangeSet@1.191, 2002-09-15 00:27:15+02:00
Fix big-endian problems by using nw_info_struct2 instead of nw_info_struct.
API always returned nw_info_struct in "NCP" (little-endian) byte order, but when structure
was passed to API, it expected volume and directory entry numbers to be in native byte order.
In addition to the problem above, nobody except nwdir get byte order completely right - some
forgot to byteswap volume number, and some both.
ChangeSet@1.190, 2002-09-15 00:18:14+02:00
Allow for passing "human readable" paths to ncp_ns_* API.
ChangeSet@1.189, 2002-09-09 22:01:03+02:00
More bigendian fixes. From Roy Bixler...
ChangeSet@1.188, 2002-09-09 21:48:50+02:00
Few big-endian fixes. Found by Roy Bixler.
ChangeSet@1.187, 2002-09-09 21:30:08+02:00
Upgrade for (patched) SWIG 1.3.14
ChangeSet@1.186, 2002-08-31 15:16:44+02:00
Use aTHX_ instead of aTHX when needed. Discovered by perl 5.8.
ChangeSet@1.185, 2002-08-31 13:40:29+02:00
Really add support for NCP_DEBUG=all.
ChangeSet@1.184, 2002-08-30 21:48:10+02:00
Fix few compile warnings introduced in last changeset.
ChangeSet@1.183, 2002-08-30 21:44:23+02:00
Add code which prints connections not closed on library shutdown. Build ncpfs with
--enable-ncp-debug, and then set environment variable NCP_DEBUG to cleanup.
ChangeSet@1.182, 2002-08-30 21:29:22+02:00
There is no install-dev in Makefile generated in contrib/php.
ChangeSet@1.181, 2002-08-30 21:19:35+02:00
Regenerate .gmo files.
ChangeSet@1.180, 2002-08-30 21:19:08+02:00
Fix complaints in german translation: %s do not match in one pair of c-format strings.
ChangeSet@1.179, 2002-08-30 21:17:52+02:00
Update Czech translation.
ChangeSet@1.178, 2002-08-30 21:17:04+02:00
Update gettext to 0.11.5 + regenerate autoconf.
ChangeSet@1.177, 2002-08-30 14:42:33+02:00
Fix builds on hosts without locale.h/libintl.h, when using --disable-nls.
ChangeSet@1.176, 2002-08-23 00:12:28+02:00
Update ncpmount/ncplogin/ncpmap for mount version 5. Main change is that
we now handle Netware messages in IP environment - of course only if you
have appropriate kernel...
ChangeSet@1.175, 2002-08-23 00:01:59+02:00
Add NWCancelWait - NCP 112.
ChangeSet@1.174, 2002-08-22 17:14:53+02:00
Simplify mount protocol version handling.
ChangeSet@1.173, 2002-08-22 16:16:15+02:00
Add new, text based, mount option format.
ChangeSet@1.172, 2002-08-21 21:55:02+02:00
Kill now unused variable in nwsfind.
ChangeSet@1.171, 2002-08-21 21:48:15+02:00
Kill libncpsu. Only difference between libncp and libncpsu was ipx_make_reachable. Now
library contains both suid and non-suid versions, and appropriate one is selected at
runtime.
Modify nwsfind to always call suid version, even if nwsfind is not installed suid.
ChangeSet@1.170, 2002-08-21 19:52:15+02:00
Split reply buffer from request buffer. Since we verify signatures on replies we must be
able to retry requests after we receive reply (with wrong signature), and so we cannot
receive reply into request's buffer.
Create NCP request header in the do_ncp_call, and not in its callers, so callers do not have
to touch sequence numbers, connection numbers, and so on.
ChangeSet@1.169, 2002-08-21 19:42:29+02:00
Change x_recv/x_recvfrom to return err and pass length through additional parameter,
instead of returning length and passing err indirectly.
ChangeSet@1.168, 2002-08-20 23:39:58+02:00
NCP/UDP signs replies differently than NCP/IPX, it does not sign error code
and connection status. Oops.
ChangeSet@1.167, 2002-08-20 21:40:17+02:00
Verify packet signatures on replies received from server.
ChangeSet@1.166, 2002-08-20 19:21:09+02:00
Kill few warnings here and there:
Add missing prototypes.
Remove < 0 compares on unsigned values.
Explicitly cast int to size_t in comparsions.
ChangeSet@1.165, 2002-08-20 18:50:13+02:00
Packet signatures for NCP/TCP. Length in the signed data is in big-endian format,
while NCP/UDP and NCP/IPX use little-endian and I oversight this difference...
ChangeSet@1.164, 2002-08-19 01:42:44+02:00
Fix ncp signatures negotiation code. NCP/TCP signatures still do not work.
ChangeSet@1.163, 2002-08-19 01:40:06+02:00
Use NCP_OBSOLETE for obsolete APIs.
ChangeSet@1.162, 2002-08-06 20:15:37+02:00
Exit from pserver when broken connection is detected.
Helps a lot if you are running pserver with -d from inittab as a respawn task.
ChangeSet@1.161, 2002-08-06 18:48:44+02:00
Make sure that we round all keys up to the unitsize boundary. Otherwise modmult endlessly loops.
ChangeSet@1.160, 2002-07-28 02:16:29+02:00
Ignore user and nouser mount options.
ChangeSet@1.159, 2002-07-28 00:54:55+02:00
Add NWGetUserInfo function.
Extend nwuserlist to print information obtained by NWGetUserInfo.
ChangeSet@1.158, 2002-07-12 23:48:25+02:00
Allow setting of file offset in large filesize demo. BTW, abend
when writting to large files is fixed internally at Novell.
ChangeSet@1.157, 2002-07-06 18:28:31+02:00
Update czech translation.
Regenerate i18n files.
ChangeSet@1.156, 2002-07-06 18:26:32+02:00
Mark "yes" and "no" strings in nwfsinfo eligible for i18n.
ChangeSet@1.155, 2002-07-06 18:25:05+02:00
stuil/ncpm_common.c contains i18n strings too.
ChangeSet@1.154, 2002-07-06 18:05:33+02:00
Fix coredump in nwmsg when mountpoint is not listed in /etc/mtab.
Clean up nwmsg code.
Refresh tknwmsg.
ChangeSet@1.153, 2002-07-06 16:33:34+02:00
Exclusive locking is NCP_PHYSREC_EX... (in physlock.c demo)
ChangeSet@1.152, 2002-07-06 16:32:11+02:00
Added demo for NW*Semaphore API.
ChangeSet@1.151, 2002-07-05 00:30:26+02:00
Ignore generated contrib/testing/physlock.
ChangeSet@1.150, 2002-07-05 00:25:44+02:00
Add physical records locking API.
Add test program for physical records locks.
Tests for locking above 4GB fails on my beta NW6SP2 test server. I believe it is server bug, because of same API suceeds with offsets < 4GB...
ChangeSet@1.149, 2002-07-03 23:37:44+02:00
Welcome, 64bit NCPs... Tested with nw6nss1c. Test it only in test environment,
read+get file length works fine, but write abends server when UDP or TCP transport is used.
Only IPX works correctly...
ChangeSet@1.148, 2002-07-03 01:36:29+02:00
Update config.guess and config.sub from autotools-dev 20020621.1
ChangeSet@1.147, 2002-07-03 01:34:57+02:00
Add ncp_get_file_server_information_2 API.
Extend nwfsinfo to print NW5+ information.
ChangeSet@1.146, 2002-06-25 23:19:12+02:00
pam_ncp_auth: Strip leading dot from generated context when doing contextless login.
ChangeSet@1.145, 2002-06-25 15:17:22+02:00
pam_ncp_auth: Fix buffer overflow I created in last changeset. We store string plus comma, so we have to count comma too.
ChangeSet@1.144, 2002-06-24 01:17:36+02:00
Bind and SAP resolver are case insensitive.
ChangeSet@1.143, 2002-06-23 21:36:44+02:00
Clean all files generated in contrib/php.
ChangeSet@1.142, 2002-06-23 00:58:05+02:00
pam_ncp_auth: Fix couple of warnings and make contextless code faster.
ChangeSet@1.141, 2002-06-23 00:42:21+02:00
pam_ncp_auth: By Patrick Pollet.
Extended -Z option to allow some zenflags to be turned OFF on that workstation:
with -Z all zenflags are off, but with -ZABCD, only flags ABCD are off.
ChangeSet@1.140, 2002-06-23 00:23:22+02:00
pam_ncp_auth: Contextless login and IP support. By Jean-François Burdet.
ChangeSet@1.139, 2002-06-23 00:18:43+02:00
Make parameter "value" to NWDSAddFilterToken() constant.
ChangeSet@1.138, 2002-06-22 23:51:37+02:00
pam_ncp_auth: By Patrick Pollet
Add create homedir/do not create homedir option.
Add mount Netware in homedir or somewhere else option.
ChangeSet@1.137, 2002-06-22 23:23:21+02:00
pam_ncp_auth fixes. By Patrick Pollet.
Fixed possible buffer overflow in mount_nwhome in verbose mode.
Fixed remote access granting table for samba >= 2.07 (pam_tty=samba and
pam_rhost=hostname, was null, null in samba 2.06).
ChangeSet@1.136, 2002-06-22 23:13:29+02:00
tcl: Parse /etc/ndsclient.conf in all programs, pass -l to ncpmap when requested.
ChangeSet@1.135, 2002-06-22 22:55:11+02:00
Allow ncpmap mountpoint relocation by -l option. By Patrick Pollet.
ChangeSet@1.134, 2002-06-22 21:24:57+02:00
Use all supported namespaces when parsing ncpmount/ncpmap -V option.
ChangeSet@1.133, 2002-06-22 18:51:08+02:00
Pass username from ndsspace.tcl to ncpvrest explicitly. By Patrick Pollet.
ChangeSet@1.132, 2002-06-22 18:48:10+02:00
Bug in reading password expiration date. Fixed context problem. By Patrick Pollet.
ChangeSet@1.131, 2002-06-22 18:39:57+02:00
Added ndsexporter.pl into tcl-utils. By Patrick Pollet.
ChangeSet@1.130, 2002-06-22 18:38:53+02:00
Fix nwwhoami's -fc/-fD behavior. By Patrick Pollet.
ChangeSet@1.129, 2002-06-22 18:26:41+02:00
Emit value separator between multiple values. By Patrick Pollet.
ChangeSet@1.128, 2002-06-22 03:59:24+02:00
Fix "make distclean" failure in contrib/php.
ChangeSet@1.127, 2002-06-21 23:46:07+02:00
Fix ncpmount -o tcp brokeness.
ChangeSet@1.126, 2002-06-20 22:34:04+02:00
Check for php-config correctly
ChangeSet@1.125, 2002-06-18 19:46:49+02:00
Fix bug that all commands without -A option worked on
nearest server instead of on one specified by -S.
ChangeSet@1.124, 2002-06-18 19:44:46+02:00
tracencp requires -ldl
ChangeSet@1.123, 2002-06-16 00:25:12+02:00
Put code common to ncpmount/ncplogin/ncpmap into ncpm_common.
Add ncp_find_server_addr.
ChangeSet@1.122, 2002-06-05 22:51:51+02:00
Give descriptive names to _StartNLM arguments.
ChangeSet@1.121, 2002-05-28 22:00:35+02:00
Add autodetection to PHP module configuration
ChangeSet@1.120, 2002-05-28 20:09:04+02:00
contrib/php/Makefile.in is now autogenerated.
contrib/php/config_vars.mk and contrib/php/libs.mk are autogenerated, I commited them by mistake.
ChangeSet@1.119, 2002-05-28 19:33:02+02:00
Fix char*/const char* in ipxdump
ChangeSet@1.118, 2002-05-28 19:31:56+02:00
Use NCPFS_PACKAGE instead of PACKAGE
Remove config.h where not needed
Build PHP module through phpize
ChangeSet@1.117, 2002-05-09 02:42:38+02:00
Create unified name resolving functions and use them.
ChangeSet@1.116, 2002-05-09 02:32:06+02:00
NWScanObject and NWReadPropertyValue added.
ChangeSet@1.115, 2002-05-09 02:29:03+02:00
Use poll() instead of select().
Specify timeout in miliseconds and not in microseconds.
ChangeSet@1.114, 2002-05-09 02:22:33+02:00
Ignore all *.o and *.do object files.
ChangeSet@1.113, 2002-05-09 02:21:13+02:00
Use u_int64_t instead of long long.
ChangeSet@1.112, 2002-04-26 18:28:04+02:00
NDS print queue names can be very long... (from Jean-Francois.Burdet@adm.unige.ch)
ChangeSet@1.111, 2002-04-26 17:56:18+02:00
Updated german translation (from Wolfram Pienkoss <wp@bszh.de>)
ChangeSet@1.110, 2002-04-25 19:22:30+02:00
Enable logging, we are going multiuser...
ChangeSet@1.109, 2002-04-21 00:07:02+02:00
Use gcc to create proper dependencies
ChangeSet@1.108, 2002-04-20 00:39:21+02:00
Update PHP module for post sep-2001 API.
ChangeSet@1.107, 2002-04-19 12:37:10+02:00
Fix iconv_wchar_t_to_external issues.
Add -A option to the ncpmount and ncplogin help text.
ChangeSet@1.106, 2002-02-27 19:11:44+01:00
Erase password from command line. Better process name change code.
ChangeSet@1.105, 2002-02-27 19:05:36+01:00
Fix core dump when no username is specified to ncplogin.
ChangeSet@1.104, 2002-02-27 17:36:20+01:00
Update configure stuff with 2002-02-25 updates
ChangeSet@1.103, 2002-02-22 00:01:49+01:00
Ignore files built by make process
ChangeSet@1.102, 2002-02-17 03:07:49+01:00
nwdir.c:
Do not dump core on files without locks, change date/id format.
ChangeSet@1.101, 2002-02-17 03:04:33+01:00
Fix volume number handling.
ChangeSet@1.100, 2002-02-17 02:57:44+01:00
PAM update - possible buffer overflows.
ChangeSet@1.99, 2002-02-16 04:16:09+01:00
Update version numbers.
TAG: ncpfs-2.2.0.19.1
ChangeSet@1.98, 2002-02-16 04:11:36+01:00
PAM and DS stream updates from Patrick Pollet.
ChangeSet@1.97, 2002-02-16 04:07:55+01:00
Show LastAccess time on directories, NSS supports that.
ChangeSet@1.96, 2002-02-16 04:06:48+01:00
Do not allow attribute names longer than MAX_SCHEMA_NAME_BYTES.
ChangeSet@1.95, 2002-02-16 04:05:17+01:00
Inline x_recv.
ChangeSet@1.94, 2002-02-16 04:04:03+01:00
Handle connection abort from ncpd gracefully
ChangeSet@1.93, 2002-02-16 04:02:08+01:00
Require writeable replica for DS streams
ChangeSet@1.92, 2002-02-16 04:00:38+01:00
Clean make error message
ChangeSet@1.91, 2002-02-16 03:48:15+01:00
Many files:
Import patch ncpfs-2.2.0.18-to-2.2.0.19
TAG: ncpfs-2.2.0.19
For older entries please see Changes.old

553
Changes.old Normal file
View File

@@ -0,0 +1,553 @@
I only began this file with ncpfs-0.12. If you're interested in older
versions, you can find them on ftp.gwdg.de:/pub/linux/misc/ncpfs/old.
[Versions ncpfs-2.2.0.x are available at ftp://platan.vc.cvut.cz/pub/linux/ncpfs]
ncpfs-2.2.0.18 -> ncpfs-2.2.0.19
- VANA: Added -r, recursive, option to ncopy.
- VANA: Started NCP/TCP implementation.
- VANA: Dereference aliases during authentication.
- VANA: Configuration is read from /etc/ncpfs.conf file.
- VANA: Local codepage is read from /etc/ncpfs.conf file.
- VANA: Added INSTALL document.
- Wolfram Pienkoss <wp@bszh.de>: New de.po translations, changed email address.
- Wolfram Pienkoss: SuSE startup/shutdown scripts.
- Karl M. Hegbloom <karlheg@bittersweet.inetarena.com>: tags/TAGS make target
added.
- VANA: Added handling of DS names to nwgrant and nwrevoke.
- VANA: Updated nwdir to print sizes of MAC resource forks.
- VANA: Added handling of replicaless servers.
- Bruno Browning <bruno@lss.wisc.edu>: Fixed nprint.
- VANA: Enhandced NCP pam module.
- VANA: PHP NCP authentication module.
- Patrick Pollet: Enterprise PAM module.
- Patrick Pollet: GTK wrappers around some utilities.
- Patrick Pollet: Enhandcements in PHP module.
- Patrick Pollet: Wrappers around some NDS and NCP calls.
- VANA (+swig): Perl interface to most of NCP functions.
- Hans Grobler: Contributed ncp_ns_delete_entry, pointed out problem in NWDSFilter*
API.
- VANA, Patrick, others: See individual changelog entries in each file.
ncpfs-2.2.0.17 -> ncpfs-2.2.0.18
- VANA: Do not forget to do "make install-dev" if you want compile 3rd party
programs for ncpfs.
- VANA: Added GPL license and revision history to all files. If you are not
mentioned in some file, contact me.
- RYP: Couple of bugfixes, new options to ncptest.
- VANA: Fixed daemonizing of printserver.
- VANA: Fixed signal handling for temporary connections.
- VANA: Enhandcements to pam module (NDS groups).
- VANA: ncp_get_file_size added.
- VANA: ncopy copies MAC resource forks too.
- Wolfram Pienkoss: New de.po translations.
- VANA: I hope that all names returned from nwnet functions fit into
array of MAX_DN_BYTES bytes (or error is returned).
- VANA: Added NDS print queues support into nprint and pqlist. Needs more
polishing.
- VANA: Support for 32-bit uids in kernels after 2.3.40.
- VANA: NWDSAbortPartitionOperation, NWDSAddObject, NWDSAddReplica,
NWDSAuthenticateConn, NWDSChangeObjectPassword, NWDSChangeReplicaType,
NWDSCloseIteration, NWDSCompare, NWDSDuplicateContextHandle,
NWDSExtSyncList, NWDSExtSyncRead, NWDSExtSyncSearch,
NWDSGenerateObjectKeyPair, NWDSGenerateObjectKeyPair2,
NWDSGetAttrCount, NWDSGetAttrName, NWDSGetAttrVal, NWDSGetAttrValFlags,
NWDSGetAttrValModTime, NWDSGetBinderyContext,
NWDSGetCountByClassAndName, NWDSGetDSIInfo, NWDSGetDSVerInfo,
NWDSGetEffectiveRigths, NWDSGetObjectCount, NWDSGetObjectName,
NWDSGetObjectNameAndInfo, NWDSGetNDSStatistics,
NWDSGetPartitionExtInfo, NWDSGetPartitionExtInfoPtr,
NWDSGetPartitionInfo, NWDSGetPartitionRoot, NWDSGetServerName,
NWDSInitBuf, NWDSJoinPartitions, NWDSList,
NWDSListAttrsEffectiveRights, NWDSListByClassAndName,
NWDSListContainers, NWDSListPartitions, NWDSListPartitionsExtInfo,
NWDSModifyDN, NWDSModifyObject, NWDSModifyRDN, NWDSMoveObject,
NWDSPartitionReceiveAllUpdates, NWDSPartitionSendAllUpdates,
NWDSPutAttrName, NWDSPutAttrNameAndVal, NWDSPutAttrVal, NWDSPutChange,
NWDSPutChangeAndVal, NWDSRead, NWDSReadObjectDSIInfo,
NWDSReadObjectInfo, NWDSReloadDS, NWDSRemoveObject,
NWDSRemovePartition, NWDSRemoveReplica, NWDSRepairTimeStamps,
NWDSResetNDSStatistics, NWDSSearch, NWDSSplitPartition,
NWDSSyncPartition, NWDSVerifyObjectPassword added.
You must enable 'NDS authentication support' in kernel if you
want to fully utilize them.
- VANA: NWGetFileServerUTCTime added.
- Bruce Richardson <brichardson@lineone.net>: ncp_perms_to_str and ncp_str_to_perms
added. Modified nwgrant to use these.
- VANA: Modified nwrights to use ncp_perms_to_str.
- VANA: Changed pam module so that it works with bindery only if you specifically
asks.
- VANA: Added chauttok method to pam module. Use with care.
- VANA: All tools except ncpmount: If server specified by '-S' is not found
through IPX, name is retried as DNS name.
ncpfs-2.2.0.16 -> ncpfs-2.2.0.17
- VANA: Add nwtrustee2; it lists also NDS trustees
- RYP: Change in library code for correct using of 'dir_style'.
- RYP: change options on nwtrustee '-o' to '-O' and '-O' to '-o',
to use options like other utils.
- RYP: improved perfomance.
- RYP: fix bug in gettext macros.
- Paul Rensing <paulr@dragonsys.com>: Fixed ncpmount signal handling
- VANA: ncpmount now calls /sbin/nwmsg, as did 2.0.x kernel code
- VANA: Fixes in directory scanning code
- Philip R. Wilson <prw@home.com>: Added DCK_CONFIDENCE flag.
- VANA: Some internal library changes
- VANA: new ncp_ns_* function group
- VANA: better ncopy, nwgrant, nwrevoke; NDS support next time
- VANA: threading support for operations working on single connection; that
is, NWDS* group of function cannot be used in multithreaded environment
yet (unless you'll have separate connections for each thread).
- VANA: versioned symbols
- VANA: pam_ncp_auth enhandced with code & ideas I found in pam_nw_auth 1.0.0
created by Brian Hammond <hammond@cba.uga.edu> (multiple server=,
-d=debug, -v=verbose, -q=quiet (you really want -q if you have
multiple server= options, but I left verbose as default for backward
compatibility))
ncpfs-2.2.0.15 -> ncpfs-2.2.0.16
- VANA: NWVerifyObjectPassword, NWDSCanonicalizeName, NWDSAbbreviateName,
NWDSRemoveAllTypes, NWCCOpenConnByAddr added
- VANA: ported to AIX (4.3.2). You have to use GNU make and GNU cc. There are
some warnings due to 64 bit environment, but it works (over UDP).
It caused couple of fixes and enhandcements (--disable-ipx now really
does not use any IPX header, --disable-kernel now really does not use
any linux-specific header)
- VANA: added install-dev, this moves headers to /usr/include/ncp and installs
libncp.a and libncp.so symlink
ncpfs-2.2.0.14 -> ncpfs-2.2.0.15
- VANA: (reported by couple of peoples): fixed 'slist' when there are no
connections
- VANA: fixed packet signatures on big-endian machines (stupid kernel bug,
fortunately userspace workaround available, so I do not have to bother
Linus)
- VANA: ipx_cmd added. You must have 'my' ipx in kernel or last, 2.2.8 kernel.
In older kernels ethertap is unusable for IPX (Rx is OK, but Tx does
not work). Do not forget to 'set Reply To Get Nearest Server = on'
on SCMD server... Otherwise you'll get 'No server' error :-(
- VANA: nwdpvalues now does something reasonable (not too much, but does)
ncpfs-2.2.0.13 -> ncpfs-2.2.0.14
- Philippe Anderson <philippe_anderson@ste.scitex.com>: nsend to groups,
'From ....' appended to message
- VANA: when I was editing nsend, I did also:
handles connections > 255 (thus some new nwcalls stuff added)
sends to connection specified by number or object ID
handles wildcards in object name (see manpage)
- VANA: nwauth accepts '-P' password option (per user request)
- VANA: added some *.3ncp pages, installed by 'make install-dev'. I'm not
sure whether I write some formatted documentation in future, probably
only short paragraphs about each function will be enough? I wrote
code, so I do not know, what is unclear and so on...
- VANA: libncp completely localized. If you are using libncp for
programms outside ncpfs package, you must link your code with `-lintl'
from now (make install installs it) if gettext is not in libc.
Sorry. You can build ncpfs package with `--disable-nls', of course.
Shared version of libintl is not available.
- VANA: kernel symlinks stuff splitted to two options:
symlink do symlinks
extras do shared files (world readable)
ncpfs-2.2.0.12 -> ncpfs-2.2.0.13
- VANA: moved to 'configure' script
- VANA: completely fixed for glibc2.1; I tested one libc5(linux-2.0.33) and
one glibc2(linux-2.1.125) systems and it looks like that configure
does its job well, but...
- VANA: warning, library interface changed: com_err removed, ncp_request (and
others) now always return error code:
0..1023 : UNIX errno
0x8700-0x87FF : ncplib specific error
0x8800-0x88FF : local errors
0x8900-0x89FF : server errors
-256..-800 : NDS / UNICODE errors
-1..-255 : if occurs, it is bug, they should be mapped
to range 0x8900-0x89FF
NCP library version number bumped from 2/2.2.0 to 2.3/2.3.0
because of incompatible changes in function return values
- VANA: added pam_ncp_auth into package (configure --enable-pam)
- VANA: fixed NWParsePath and NWGetNSEntryInfo
ncpfs-2.2.0.11 -> ncpfs-2.2.0.12
- VANA: fixed debian bugreport #29006 - exit code for nprint
- VANA: fixed debian bugreport #30293 - man pages update
- VANA: fixed some bugreport about popen("nwsfind")
- VANA: added nwfsctrl tool
- VANA: fixed debian bugreport #33214 - missing NR_OPEN for glibc2.1
ncpfs-2.2.0.10 -> ncpfs-2.2.0.11
- VANA: mount.ncp, new option -o in ncpmount, updated manpage ncpmount(8)
- VANA: manpages moved to /usr/man, compressed; it should fix problems
on standard distributions
ncpfs-2.2.0.9 -> ncpfs-2.2.0.10
- Wolfram Pienkoss <wp@bszh.de>: NLS support
ncpfs-2.2.0.8 -> ncpfs-2.2.0.9
- Eloy A. Paris: reordered ncpmount initialization to suppress unneeded
ask for password
ncpfs-2.2.0.7 -> ncpfs-2.2.0.8
- VANA: nwfsctrl - down file server and/or open/close bindery
ncpfs-2.2.0.6 -> ncpfs-2.2.0.7
- VANA: Get connection from current directory if -S not specified on commandline.
ncpfs-2.2.0.5 -> ncpfs-2.2.0.6
- VANA: Bugfix. Username was limited to 48 chars. It is not true for NDS.
TODO: Review bindery code and limit outgoing usernames to
48 chars.
ncpfs-2.2.0.4 -> ncpfs-2.2.0.5
- VANA: it now compiles on libc5 again (undefined socklen_t in ncplib.h)
- VANA: it works (with patched Makefiles*, added missing linux/* headers and
without kernel support (i.e. only native IP and without ncpmount,
ncpumount, nwdir and nwpurge) on SGI IRIX (IRIX64 sgi 6.2 03131016
IP25). So I hope that it now works on Linux-SGI and Linux-Sparc too.
Please test and report success/failure... NDS code and NCP signatures
should work, nwpurge and nwdir probably should not... But I cannot test
kernel code because of that machine is not mine and its owner is happy
with IRIX. So I'm sorry.
* happy owner has not GNU Make on that machine... He has, fortunately,
gcc... It is impossible to compile ncpfs with IRIX's CC...
ncpfs-2.2.0.3 -> ncpfs-2.2.0.4
- VANA: more Alpha changes (sizeof(size_t) != sizeof(u_int32_t) :-( )
Many thanks go to David Woodhouse and his Alpha CPU...
- VANA: IPX support can be commented out
ncpfs-2.2.0.2 -> ncpfs-2.2.0.3
- VANA: now it works on Alpha
- VANA: changes in DS encryption code (getting rid of error -669)
ncpfs-2.2.0.1 -> ncpfs-2.2.0.2
- Milan Vandrovec <vandr@fel.cvut.cz>: nwdir tool
ncpfs-2.2.0 -> ncpfs-2.2.0.1
- Dave & VANA: new shared library numbering
- Dave & VANA: workarounds for RedHat's glibc-2.0.7
ncpfs-2.0.12.10 -> ncpfs-2.2.0
- VANA: minor cleanup
ncpfs-2.0.12.9 -> ncpfs-2.0.12.10
- VANA: you can now access NDS server without replica of its conteiner
(TODO: access to server if server has R/W replica of your account but
does not have replica of itself)
- VANA: Alpha still no go :-(
ncpfs-2.0.12.8 -> ncpfs-2.0.12.9
- Eloy A. Paris: Fixes in library code
ncpfs-2.0.12.7 -> ncpfs-2.0.12.8
- VANA: bugfix, now it works again without ipxripd
- VANA: still cleaning up, ncp_open() and NDS byte ordering
ncpfs-2.0.12.6 -> ncpfs-2.0.12.7
- VANA: bugfixes, nwpurge
ncpfs-2.0.12.5 -> ncpfs-2.0.12.6
- VANA: ncpmount supports NCP over IP (no incoming broadcast at this time)
ncpfs-2.0.12.4 -> ncpfs-2.0.12.5
- Eloy A. Paris: Makefile bugfix
ncpfs-2.0.12.3 -> ncpfs-2.0.12.4
- VANA: Bugfixes
- VANA: Alpha stage of native NCP over IP support (no kernel at this time)
ncpfs-2.0.12.2 -> ncpfs-2.0.12.3
- VANA: Major makefile changes, compile warning cleanup
ncpfs-2.0.12.1 -> ncpfs-2.0.12.2
- Eloy A. Paris <peloy@ven.ra.rockwell.com>: Makefile cleanup
- VANA: More merging sutil/ncplib.c and lib/ncplib.c, not fully functional yet
ncpfs-2.0.12 -> ncpfs-2.0.12.1
- Dave, VANA: Bindery logins for all utilities (-b)
- VANA: Specify signature level for ncpmount (-i number)
- VANA: Start of merging sutil/*lib* with lib/*lib*
ncpfs-2.0.11.19 -> ncpfs-2.0.12
- Polished for release 2.0.12
- Dave: pserver fixes, including addition of %d flag.
ncpfs-2.0.11.18 -> ncpfs-2.0.11.19
- Dave, VANA: new userspace utilities - pqstat and pqrm
ncpfs-2.0.11.17 -> ncpfs-2.0.11.18 (no userspace change)
- Dave: getwd() did not work on 2.1.x
- VANA: Volumes are now always listed lowercased on 2.1.x
ncpfs-2.0.11.16 -> ncpfs-2.0.11.17
- David Woodhouse <Dave@imladris.demon.co.uk>: Patch to pserver,
ncp_get_broadcast_message
- VANA & Dave: Cleanup for glibc, I hope that complete (xcpt. few warnings
about long int vs. u_int32_t)
ncpfs-2.0.11.15 -> ncpfs-2.0.11.16
- VANA: Removed symlink latest from archive :-)
- VANA: Added ncp_send_broadcast2
ncpfs-2.0.11.14 -> ncpfs-2.0.11.15
- VANA: Fixed bug: wrong completion code returned when login to server without
r/w replica of logged-in user
- VANA: It is possible to disable NFS and/or OS2 namespace support in mount
ncpfs-2.0.11.13 -> ncpfs-2.0.11.14
- VANA: One source for 2.0 and 2.1 kernels
- Christian Groessler <cpg@aladdin.de>: Added strong mounts
ncpfs-2.0.11.12 -> ncpfs-2.0.11.13
- Arne: Signatures added to ncpfs-nds-0.06
- VANA: Synchronized sources with Arne
ncpfs-2.0.11.11 -> ncpfs-2.0.11.12
- VANA: Fixed compilation error if compiled against kernel without signatures
even if SIGNATURES = 0 set
ncpfs-2.0.11.10 -> ncpfs-2.0.11.11
- VANA: Fixed segfault on invalid user name in NDS mode
- VANA: Added locking features (through ncpfs-specific ioctl(2))
ncpfs-2.0.11.9 -> ncpfs-2.0.11.10
- VANA: Synchronized with nds-patches-0.05 from Arne de Bruijn <Arne@knoware.nl>
ncpfs-2.0.11.8 -> ncpfs-2.0.11.9
- VANA: Added call to lock connection (dropped in 2.0.11.7, sorry)
ncpfs-2.0.11.7 -> ncpfs-2.0.11.8
- VANA: Can be correctly compiled without signatures support in kernel (I hope)
- VANA: Fix in kernel in setting task number
ncpfs-2.0.11.6 -> ncpfs-2.0.11.7
- VANA: Codebase synchronized with Arne de Bruijn <Arne@knoware.nl>
- ARNE: Gracelogins on NDS
- VANA: Removed some (one) compilation warnings
ncpfs-2.0.11.5 -> ncpfs-2.0.11.6
- VANA: Support for NDS login accross servers
ncpfs-2.0.11.4 -> ncpfs-2.0.11.5
- VANA: Cleanup in ndscrypt
- VANA: Bugfix: empty password for NDS login is now allowed & works
ncpfs-2.0.11.3 -> ncpfs-2.0.11.4
- Enabled some buffer cleaning
- Added parameter "-b" to ncpmount for bindery login to NDS server
ncpfs-2.0.11.2 -> ncpfs-2.0.11.3
- Added NDS support by Arne de Bruijn <Arne@knoware.nl>; small fixes in code;
moved sections to do same things as DOS login does.
ncpfs-2.0.11.1 -> ncpfs-2.0.11.2
- VANA: Fixed that some error conditions in LOGIN should start packet signatures
ncpfs-2.0.11 -> ncpfs-2.0.11.1
- VANA: Added packet signatures by Arne de Bruijn <Arne@knoware.nl>
ncpfs-2.0.10 -> ncpfs-2.0.11
- Added Martin's patch to Linux 2.0.30 to get rid of the lockups.
MANY thanks to Martin Stover!
ncpfs-2.0.9 -> ncpfs-2.0.10
- Made nwtrustee hopefully work ;-)
- Made the manpages a little bit prettier
ncpfs-2.0.8 -> ncpfs-2.0.9
- Added patches directory
- Added nwvolinfo and nwtrustee. Thanks to Jacek Stepniewski <cunio@gazeta.pl>
- nwpasswd can change other's passwords. Thanks to Martin Stover.
ncpfs-2.0.7 -> ncpfs-2.0.8
- Fixed util/Makefile for easier optimization handling. Thanks to Rik
Faith <faith@cs.unc.edu> for this one
- added nwfstime. You can now set the file server date and time from Linux.
- added the contrib directory. Feel free to add more!
ncpfs-2.0.6 -> ncpfs-2.0.7
- Hopefully removed one security problem in ncpumount.
- Added command line flag to pserver.c
- Heavily reconstructed ncpfs utils. Created the lib/ dir.
- Separated the uid utils in sutil
- Add nwsfind to enable users to use ncpfs safely without setting
the utils setuid root.
ncpfs-2.0.5 -> ncpfs-2.0.6
- Added a short description of a problem that I need help with to the
file BUGS. If you know a bit of the linux networking code, please
take a look at it. Thanks a lot.
- Added canonic output format to nwpbvalues and the command nwbpset. I
would like to invite you to help building capable bindery management
utilities. For little examples, look at the manual page of nwbpset.
- Added some values to ipxparse. Those interested in NDS should take a
look at it. It's really not much, but maybe it's a beginning.
ncpfs-2.0.4 -> ncpfs-2.0.5
- Removed another bug in nwbpvalues.
- Cleaned up man/Makefile
- Some manpage typos fixed. Thanks to Jim Van Zandt
<jrv@mbunix.mitre.org>
- added nwrights
ncpfs-2.0.3 -> ncpfs-2.0.4
- Changed name of npasswd to nwpasswd, as npasswd collides with
RedHat. Thanks to Mike Slater <mslater@nfinity.com> for pointing me
at this one.
- Put '\r\n' into nwmsg, because sometimes it did not print
correctly. Thanks to Petr Vandrovec Ing. VTEI
<VANDROVE@vcnet.vc.cvut.cz> for this one.
- Improved the ELF Makefile for ELF support. Thanks to Uwe Bonnes
<bon@elektron.ikp.physik.th-darmstadt.de>.
- Removed a very embarassing bug in nwpvalues :-(.
- Added a some routines to nwbpvalues.
ncpfs-2.0.2 -> ncpfs-2.0.3
- Removed the kernel-2.0 directory. Linus took the patch into 2.0.8.
So, if you want to use long file name support, upgrade to Linux
kernel version 2.0.8.
- Applied the lfn patch to the kernel-1.2 module with some light
testing. If you experience problems, tell it to me, and use the
ncpfs-2.0.2 kernel module, or upgrade to Linux 2.0.8.
- Added unencrypted login when no crypt key is returned.
- Hopefully improved error messages a bit
- Added some values to ipxparse
- For ELF systems, moved ncplib to /lib/libncp.so.1.x. This saves
about 1MB of disk space. As ncpfs grows, the saving will
increase. Please look at the Makefile to enable this.
- Enhanced nwfsinfo a bit. (Even with a manpage!)
- Added nwuserlist.
ncpfs-2.0.1 -> ncpfs-2.0.2
- Added some values to ipxparse.
- Added a patch against 2.0.7 for long file names support. I did not
apply this change to the 1.2-module. Please upgrade to 2.0.7 if you
want to use long file names.
- nwbpvalues can print ITEM properties
ncpfs-2.0.0 -> ncpfs-2.0.1
- Added some values to ipxparse.
- Added the little bindery utilities. Maybe someone has the time to
write a shellscript named 'nwadduser' ?
- Fixed a bug that made the __255 message reappear. Many thanks to
Guntram Blom for his detailed bug report.
- Fixed a bug that made ncpfs incompatible with W95's server
capabilities. Thanks to Tomasz Babczynski
<faster@dino.ict.pwr.wroc.pl> for this one.
ncpfs-0.24 -> ncpfs-2.0.0
- Changed the numbering scheme :-).
- Added npasswd. Many thanks to Guntram Blom for his work!
- Hopefully improved error messages a bit
- Hopefully made slist a bit more robust
ncpfs-0.23 -> ncpfs-0.24
- Fixed a bug that made it impossible to umount a filesystem after you
tried 'mkdir .' or 'mkdir ..'.
- Fixed a bad race condition when opening files.
- Made the default timeout values more robust.
ncpfs-0.22 -> ncpfs-0.23
- Fixed a memory allocation problem in nwmsg.c. Thanks to
Andrew Ross <anr1001@hermes.cam.ac.uk>
- slist hopefully does not ask for a password anymore.
- cleaned up error messages a bit.
- ncpmount now calls modprobe instead of insmod.
ncpfs-0.21 -> ncpfs-0.22
- removed a bad race condition in kernel-1.2/src/dir.c.
- handle 0x9999-responses from the ncp server correctly.
- Bindery functions in ncplib.c by Brian G. Reid (breid@tim.com)
- set blocksize to 512 to satisfy 'du -k'
ncpfs-0.20 -> ncpfs-0.21
- Included two bugfixes in ncplib.c found by Jeff Buhrt
<buhrt@iquest.net>.
- Included a bugfix in kernel code that could only show for servers
that do not support namespace calls. I should have tried ncpfs
against lwared... Thanks to Neil Turton <ndt1001@chu.cam.ac.uk> for
this fix.
ncpfs-0.19 -> ncpfs-0.20
- Changed the home site for ncpfs from linux01.gwdg.de:/pub/ncpfs
to ftp.gwdg.de:/pub/linux/misc/ncpfs. linux01 will remain available,
but we would like to reduce the load on that machine. Sites
mirroring linux01 please redirect your mirror software to
ftp.gwdg.de. Thanks.
- Removed a bug in ncplib.c that made slist require a full
login. Thanks to Neil Turton <ndt1001@chu.cam.ac.uk> for the hint.
- The first real user contribution: ncopy by Brian G. Reid
(breid@tim.com) and Tom C. Henderson (thenderson@tim.com). Many
thanks to you! If you find bugs in ncopy, tell them, not me ;-)
- Handle expired passwords. Thanks to "Mathew Lim" <M.Lim@sp.ac.sg>
for the hint.
ncpfs-0.18 -> ncpfs-0.19
- hacked around in ncplib.[ch] quite heavily.
- SAP handling in ipxparse.c. Thanks to Jeff Buhrt <buhrt@iquest.net>
- Changed error handling to use the com_err library. This should
eventually provide better error messages, because it's now much
easier to define nice messages.
- If no server is active, report this correctly
- added nsend
ncpfs-0.17 -> ncpfs-0.18
- Another attempt at solving the problem that -n is not working.
- Forgot nprint in 0.17 util/Makefile.
- nprint left connections open when it fails
- added options -r and -t to ncpmount to tune ncpfs connections.
ncpfs-0.16 -> ncpfs-0.17
- Changed the name of fsinfo to nwfsinfo, to avoid a name clash with
the X windows utility. Thanks to Henning Brockfeld
<Henning.Brockfeld@lrz.uni-muenchen.de> for this hint. (still
waiting for your scripts.. :-))
- made nwmsg available. This enables you to receive NetWare user
broadcast messages. Please note that you need at least kernel 1.3.68
for this feature.
- pserver now prints debugging output via syslog().
- Included ipxdump, a nice little utility, that has helped some
people.
- And now the big one: you can re-export ncpfs-mounted directories
with nfsd! You have to mount single volumes by specifying -V volume
to ncpmount, and call nfsd and mountd with the option --re-export.
See the manual page of ncpmount for more information. Please note
that I will send Linus the required patch on 1. March 1996, so you
will have to use kernel 1.2.13 or wait at least for 1.3.70.
ncpfs-0.15 -> ncpfs-0.16
- Included ipx-1.0, made available by Greg Page <greg@caldera.com>,
Caldera
- Made -n work for password-less accounts. Thanks to Alexander Jolk
<jolk@ap-pc513b.physik.uni-karlsruhe.de>.
- Fixed the kerneld support.
- Fixed the NetWare 4.1 problem. Many thanks to
Chatchai JANTARAPRIM <chat@ratree.psu.ac.th> and
hitesh.soneji@industry.net for their patience.
ncpfs-0.14 -> ncpfs-0.15
- A bug fixed that made normal mounting impossible. It was too late
yesterday. Sorry
- Manpage for pserver.c
ncpfs-0.13 -> ncpfs-0.14
- Improvements of manual pages by B. Galliart <bgallia@luc.edu> and
Terry Dawson <terry@perf.no.itg.telecom.com.au>
- fsinfo
- pserver.c. Please see this as ALPHA software. There is no
documentation, and it is not tested enough. But it might be useful for
you.
ncpfs-0.12 -> ncpfs-0.13
- support for automatic loading of ncpfs.o by kerneld.
Thanks to Steven N. Hirsch <hirsch@emba.uvm.edu>.
- A subtle problem in the read routines has been removed by Uwe Bonnes
<bon@elektron.ikp.physik.th-darmstadt.de>. Thanks a lot.

73
ConfigFile Normal file
View File

@@ -0,0 +1,73 @@
Configuration files for ncpfs
=============================
There are two configuration files for ncpfs, local and global. Local
configuration file lives in ${HOME}/.nwclient, global one lives in
/etc/ncpfs.conf. File is in UTF8 encoding.
Local configuration file is split into two parts - non-sectioned and sectioned.
Non-sectioned contains old contents of .nwclient file - "server/user password"
triplets (eventually with user or password ommited).
Sectioned part (and whole /etc/ncpfs.conf file) contains couple of sections.
Each section is started with "[Section Name]" line, lines in section are in
format "Key Name = value". If value contains hash (#) or semicolon (;), you
must either prefix these characters with backslash (\) or enclose value into
quotes (') or double quotes ("). If value contains backslash (\), you must
prefix it with backslash. If value in quotes contains same quote, you must prefix
it with backslash. Code knows two special values, "\n" for LF and "\r" for CR
- although currently there is no reason for embed them into values.
Comments begin with hash (#) or semicolon (;) and can occur on any place
outside quotes.
Following four examples mean same thing:
Strange Value = Strange Value "1
Strange Value = Strange\ Value\ "1
Strange Value = "Strange Value \"1"
Strange Value = 'Strange Value "1'
Currently known configuration options:
[Requester]
Local Charset = <charset name>
Charset name is in internal system form, for glibc 2.1
it is codepage name with two trailing slashes ("//").
On non-iconv systems (such as libc5/libc6.0) you can
use only "WCHAR_T//", "ISO-8859-1//" and "UTF-8//"
charsets.
On glibc2.1 systems, you must add line
"alias WCHAR_T// INTERNAL" at the end of
"/usr/lib/gconv/gconv-modules" file. Without this,
iconv will not work on little-endian machines, such
as ix86.
On glibc2.2 systems you can use any encoding reported
by "iconv -l".
If you'll use encoding which can contain zero bytes
in the middle of string (such as UTF-16, UCS2 or
UCS4), supplied utilities may not work correctly.
Also, output of utilities is based on localization
files and not on selected codepage.
Default: "ISO-8859-1//"
Default Tree Name = <tree name>
Tree name is specified without trailing underscores.
Default: no default, system will complain when trying to use
default tree name
Default Name Context = <default name context>
Default name context is specified relative to [Root].
Default: "[Root]"
NetWare Protocol = <authenticators>
List of authenticators, separated by spaces or commas.
Currently two authenticators are known, "NDS" and "BIND".
Default: "NDS BIND"
[Tree <tree name>]
Default Name Context = <default name context>
Default name context is specified relative to [Root].
Default: value specified for Default Name Context in
[Requester] section.

9
FAQ
View File

@@ -37,6 +37,8 @@ packet signatures on the 4.1 server, as ncpfs does not support them.
Note: ncpfs, as of 2.0.12, and kernel 2.1.89, does now support packet
signatures.
Note2: My test environment currently consist of couple of NW4.11/NW5 servers.
I have no 3.x servers around anymore.
-------------------------------------------------------------------------------
@@ -64,3 +66,10 @@ A: You are probably connecting into Netware 4.x or IntraNetware. If you want a
temporary workaround, add the option "-b" to the ncpmount commandline.
For the future you should determine your Directory Services user name and
use that instead of your bindery name.
-------------------------------------------------------------------------------
Q: I found bug. What I should do?
A: Report it to "Petr Vandrovec" <vandrove@vc.cvut.cz>.

196
INSTALL Normal file
View File

@@ -0,0 +1,196 @@
Compiling and installing ncpfs
==============================
0. Quick start
--------------
Run "./configure", then "make install install-dev" and wait for successfull
completion. You can omit "install-dev" if you do not plan to compile other
libncp based programs, such as apache NDS authorization module.
1. Configuration
----------------
Except usual configuration options, you can add some of these options to
configure commandline:
--enable-warnings Enable very verbose build warnings. Please do not
report these warnings as a bugs. They are all
intentionaly left in sources. Disabled by default.
--enable-pam Build PAM NCP authentication module. You must have
installed PAM headers in your standard include
directories. By default PAM directory is
automatically determined (in /lib/security,
/usr/lib/security, or /usr/local/lib/security) from
place of already installed modules. You can override
this with adding path after enable-pam. For example:
--enable-pam=/lib/pam/modules
--disable-ipx-tools Disables building of ipx tools. By default tools are
enabled. Use this only if you are using some else
ipx-tools package or if your system does not support
IPX.
--disable-udp Disable NCP/UDP and NCP/TCP. By default they are
enabled. Use this only for systems which do not
have IP at all. Otherwise you'll get very crippled
version of ncpfs - with full version you can access
servers anywhere on the Internet if there is no
firewall on port 524...
--disable-ipx Disable NCP/IPX. By default IPX is enabled. Do not
disable IPX unless your system does not support
IPX at all.
--disable-signatures Disable packet signing code. By default signatures
are enabled. Do not disable this, connecting without
signatures is very dangerous.
--disable-nds Disable NDS support. By default NDS is enabled.
Disable it only if you are not sure that you can
use RSA for authorization purposes. Library produced
with this option is very limited in functionality
and 3rd party programs may not work with your
library.
--disable-mount-v2 Disable support for Linux 2.0. Support is enabled
by default and you should not disable it.
--disable-mount-v3 Disable support for Linux 2.2 and Linux 2.4. Support
is enabled by default and you should not disable it.
--disable-kernel Do not use kernel interface. Use this only if there
is no ncpfs for your kernel (such as on AIX or IRIX).
--disable-reentrant Do not compile threading support into library. By
default it is autodetected - if library compiled
with pthreads can run without them, support is enabled.
Disable this only if you are 100% sure that you'll not
use libncp in any multithreaded application, or if
your system does not support pthreads at all.
--disable-versions Do not use version symbols in library. By default
enabled if your system supports it. If you'll disable
it, you may have troubles with binary compatibility
when upgrading to newer versions.
--disable-function-sections Do not use -ffunction-sections and
-fdata-sections for static libraries. Enabled whenever
binutils can do this. If you disable this, all
statically linked programs are larger than they
really need.
--enable-trace Enable trace of ncp calls. Do not enable it unless
you are debugging ncpfs. Each libncp call then spews
tons of data to stdout/stderr.
--disable-nls Do not use Native Language Support. See ABOUT-NLS for
details.
--with-included-gettext Use the GNU gettext library included here. See
ABOUT-NLS for details.
--with-catgets Use catgets functions if available. See ABOUT-NLS for
details.
2. Compilation
--------------
Just type "make" in top of directory structure. You need GNU make and GNU gcc.
3. Installation
---------------
As root, type "make install" to install shared library and utilities. If you
plan to compile other programs for ncpfs, also run "make install-dev". This
installs ncpfs headers and static library.
4. Runtime
----------
4.1. Configuration
------------------
You can configure system behavior with global configuration file,
/etc/ncpfs.conf, and local configuration files, ~/.nwclient. See ConfigFile
for details about contents of these files.
4.2. Limitations
----------------
4.2.1. Available transports
--------------------------
Temporary connections always support all available transports you
compiled.
Persistent (ncpmount) connection capabilities are constrained by your
kernel. 2.0.x kernels support only NCP over IPX, 2.[123].x kernels support
NCP over IPX or UDP, and 2.4.x kernels support NCP over any of IPX, UDP or
TCP.
4.2.2. NDS support
------------------
For full NDS support (background authentication) you must enable 'NDS
authentication support' in kernel configuration. This option is available
only in 2.[34].x kernels. In 2.2.x kernels you can make option available
by simple uncommenting this option in linux/fs/ncpfs/Config.in (option is
commented out because of at the time 2.2.0 was released there was no
userspace support). If you have older kernel, you should upgrade if you
need such support.
4.2.3. Internationalization support
-----------------------------------
Currently only available localizations are English, Germany and Czech.
4.2.4. Codepages support
------------------------
Codepage converting support is limited by underlying iconv implementation.
If no usable iconv is found, built in support for ISO-8859-1 and UTF-8
is used.
NOTE: glibc2.1 implementation is treated as unusable on little endian
machines, unless you add "alias WCHAR_T// INTERNAL" at the end of
"/usr/lib/gconv/gconv-modules" file. Without this alias wchar_t format
used by wc* function group is unavailable to iconv. Clueless programmers.
glibc2.2 provides WCHAR_T encoding, so you should upgrade if you need codepage
not listed above.
5. Something went wrong
-----------------------
If things do not work as expected, make sure that you installed ncpfs
correctly. By default, ncp tools are installed into /usr/local, while
distributions put them into /usr. So you can end up with new tool using
old shared library. And it does not work...
Also, look into BUGS, FAQ, README and README.NDS. If you'll not find
answer here, try asking on linware@sh.cvut.cz list (listserv@sh.cvut.cz).
If you are sure that problem is in ncpfs implementation, send me bugreport
or patch (unified diff preferred).
--
Trhovy Stepanov, March 10th, 2001
Petr Vandrovec <vandrove@vc.cvut.cz>

60
Make.rules.in Normal file
View File

@@ -0,0 +1,60 @@
# ########################################################
INSTALL := @INSTALL@
INSTALL_DATA := @INSTALL_DATA@
CC := @CC@
prefix := @prefix@
exec_prefix := @exec_prefix@
bindir := @bindir@
sbindir := @sbindir@
libsodir := @libdir@
#libsodir := /lib
libadir := @libdir@
mandir := @mandir@
srcdir := @srcdir@
includedir := @includedir@
sysconfdir := @sysconfdir@
localedir := @localedir@
VPATH = @srcdir@
NDS_SUPPORT := @NDS_SUPPORT@
SIGNATURES := @SIGNATURES@
PACKAGE := @PACKAGE_NAME@
VERSION := @PACKAGE_VERSION@
CC_WARNINGS := @CC_WARNINGS@
ifeq ($(CC_WARNINGS),yes)
#CWARN := -Wall -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Waggregate-return -Wnested-externs -Winline -Wbad-function-cast -W #-Werror #-Wwrite-strings -Wtraditional -Wshadow
#CWARN := -Wall -Wstrict-prototypes -Wcast-qual -Waggregate-return -Wnested-externs -Winline -Wbad-function-cast -W #-Wpointer-arith #-Werror #-Wwrite-strings -Wtraditional -Wshadow
CWARN := -Wall -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-noreturn -Wredundant-decls -Wstrict-prototypes -Wcast-qual -Waggregate-return -Wnested-externs -Winline -Wbad-function-cast -W #-Wpointer-arith #-Werror #-Wwrite-strings -Wtraditional -Wshadow
else
CWARN :=
endif
# ########################################################
INCLUDES := -I$(top_srcdir)/include -I$(top_srcdir)/intl -I$(top_builddir)/include
CFLAGS_OPTIONS += @CFLAGS@
CFLAGS_OPTIONS += $(CWARN)
CFLAGS_DEFINES := -DN_PLAT_LINUX -DLOCALEDIR=\"${localedir}\" -DNCPFS_VERSION=\"${VERSION}\" -DNCPFS_PACKAGE=\"${PACKAGE}\"
CCFLAGS := $(CFLAGS_DEFINES) $(CFLAGS_OPTIONS) $(INCLUDES)
# If your system is ELF, either also do a 'make install', or append the util/
# directory where the dynamic library resides to the environment
# variable LD_LIBRARY_PATH
HAVE_ELF := @ELF_TARGET@
VERSION_SOLIB := 2.3.0
VERSION_SONAME := 2.3
NEED_DEP := yes
ifneq ($(MAKECMDGOALS),)
ifeq ($(filter-out clean distclean mrproper, $(MAKECMDGOALS)),)
NEED_DEP := no
endif
endif

View File

@@ -1,81 +0,0 @@
#
# Makefile for the linux ncp-filesystem routines.
#
# If your system is ELF, either also do a 'make install', or append the util/
# directory where the dynamic library resides to the environment
# variable LD_LIBRARY_PATH
HAVE_ELF=$(shell file `whereis gcc|cut -d ' ' -f 2`| \
grep ELF >/dev/null && echo -n yes )
TOPDIR = $(shell pwd)
include ./Makeinit
EXECSUBDIRS = lib-static-su sutil util ipx-1.0
SUBDIRS := $(EXECSUBDIRS) lib-shared lib-static man
INSTALL_SUBDIRS := util sutil man ipx-1.0
ifeq ($(HAVE_ELF),yes)
EXECSUBDIRS := lib-shared $(EXECSUBDIRS)
INSTALL_SUBDIRS := lib-shared $(INSTALL_SUBDIRS)
else
EXECSUBDIRS := lib-static $(EXECSUBDIRS)
INSTALL_SUBDIRS := lib-static $(INSTALL_SUBDIRS)
endif
export INCLUDES VERSION HAVE_ELF CFLAGS
all:
set -e; for i in $(EXECSUBDIRS); do make -C $$i all; done
@if [ "$(HAVE_ELF)" = yes ] ;\
then \
echo ; echo ; echo ;\
echo Please add \'`pwd`/lib\' to the environment ; \
echo variable LD_LIBRARY_PATH by executing ; \
echo ;\
echo export LD_LIBRARY_PATH=\"\$$LD_LIBRARY_PATH:`pwd`/lib\" ; \
echo ;\
echo or do a \'make install\'. ;\
echo ;\
fi
dep:
for i in $(SUBDIRS); do make -C $$i dep; done
install:
for i in $(INSTALL_SUBDIRS); do make -C $$i install; done
clean_me:
rm -f `find -name '*.out'`
rm -f `find -name '*~'`
rm -f *.tgz
clean: clean_me
for i in $(SUBDIRS); do make -C $$i clean; done
mrproper: clean_me
for i in $(SUBDIRS) ipxdump; do make -C $$i mrproper; done
modules: ncpfs.o
SRCPATH=$(shell pwd)
SRCDIR=$(shell basename $(SRCPATH))
DISTFILE=$(SRCDIR).tgz
dist: tgz
make dep
make all
tgz:
indent -kr -i8 `find . -name '*.[ch]'`
make mrproper
(cd ..; \
tar cvf - $(SRCDIR) | \
gzip -9 > $(DISTFILE); \
mv $(DISTFILE) $(SRCDIR))
#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif

98
Makefile.in Normal file
View File

@@ -0,0 +1,98 @@
#
# Makefile for the linux ncp-filesystem routines.
#
top_srcdir = @top_srcdir@
top_builddir = .
include ${top_builddir}/Make.rules
.PHONY : all dep install install-dev clean mrproper distclean
.PHONY : tags TAGS clean_me dist tgz
BASE_SUBDIRS := lib sutil util man @ADDON_SUBDIRS@
EXECSUBDIRS = intl @POSUB@ $(BASE_SUBDIRS)
SUBDIRS := $(EXECSUBDIRS)
INSTALL_SUBDIRS := $(SUBDIRS)
INSTALL_DEV_SUBDIRS := lib sutil util man @ADDON_DEV_SUBDIRS@
CLEAN_SUBDIRS := lib sutil util man intl @POSUB@ ipxdump ipx-1.0 ipx-1.0/Samples contrib/testing \
contrib/testing/pp contrib/tests contrib/libtrace contrib/nss64 \
contrib/tcl-utils contrib/php contrib/pam
export INCLUDES VERSION HAVE_ELF CFLAGS
all:
set -e; for i in $(EXECSUBDIRS); do make -C $$i all; done
@if [ "$(HAVE_ELF)" = yes ] ;\
then \
echo ; echo ; echo ;\
echo Please add \'`pwd`/lib\' to the environment ; \
echo variable LD_LIBRARY_PATH by executing ; \
echo ;\
echo export LD_LIBRARY_PATH=\"\$$LD_LIBRARY_PATH:`pwd`/lib\" ; \
echo ;\
echo or do a \'make install\'. ;\
echo ;\
fi
dep:
for i in $(SUBDIRS); do make -C $$i dep; done
tags: TAGS
TAGS:
etags --lang=c $$(find include lib sutil util ipx-1.0 ipxdump '*.[ch]')
install:
for i in $(INSTALL_SUBDIRS); do make -C $$i install; done
install-dev:
for i in $(INSTALL_DEV_SUBDIRS); do make -C $$i install-dev; done
clean_me:
rm -f `find -name '*.out'`
rm -f `find -name '*~'`
rm -f *.tgz
clean: clean_me
for i in $(CLEAN_SUBDIRS); do make -C $$i clean; done
mrproper: clean_me
for i in $(CLEAN_SUBDIRS); do make -C $$i mrproper; done
distclean:
for i in $(CLEAN_SUBDIRS); do [ -f $$i/Makefile ] && make -C $$i distclean; done
rm -f contrib/pam/Makefile contrib/tknwmsg/Makefile
rm -f contrib/testing/pp/Makefile contrib/testing/Makefile
rm -f contrib/tcl-utils/Makefile contrib/tests/Makefile
rm -f contrib/php/.deps contrib/php/Makefile.in contrib/php/libs.mk contrib/php/config.nice contrib/php/conftest*
rm -rf contrib/php/modules
rm -f ipx-1.0/Samples/Makefile ipx-1.0/Makefile
rm -f ipxdump/Makefile
rm -f intl/Makefile po/Makefile po/Makefile.in
rm -f lib/Makefile man/Makefile sutil/Makefile util/Makefile
rm -f include/config.h
rm -f include/ncp/ext/socket.h include/ncp/ext/stdint.h
rm -f include/ncp/kernel/fs.h
rm -f include/ncp/kernel/if.h include/ncp/kernel/route.h include/ncp/kernel/types.h
rm -f include/ncp/kernel/ipx.h
rm -f include/ncp/nwnet.h
rm -f config.cache config.log config.status
rm -f Make.rules
rm -f Makefile
SRCPATH=$(shell pwd)
SRCDIR=$(shell basename $(SRCPATH))
DISTFILE=$(SRCDIR).tgz
dist: tgz
make dep
make all
tgz:
indent -kr -i8 `find . -name '*.[ch]'`
make mrproper
(cd ..; \
tar cvf - $(SRCDIR) | \
gzip -9 > $(DISTFILE); \
mv $(DISTFILE) $(SRCDIR))

View File

@@ -1,79 +0,0 @@
VERSION = 2.2.0
# If you want to include NDS support for ncpmount uncomment this:
# WARNING! NDS support is very beta, uncomment only if you are testing
# because anything can happen (like crashing the linux box or nw server).
NDS_SUPPORT = 1
# If you want to include packet signature support uncomment this:
# WARNING! packet signature support is in beta stage, uncomment only when you
# know what you are doing, anything can happen (like crashing the linux box or
# netware server).
# When enabling, make sure you have applied the kernel patches too,
# otherwise the packet signatures won't work.
SIGNATURES = 1
# If you want to eat only one NDS connection. Does not work at this time.
# (waiting for Novell...)
NDS_PRIVATEKEY = 1
# If you want native IP support, uncomment CONFIG_NATIVEIP
# Do not forget that it is VERY ALPHA code, with almost no support
# Enable only if you are interested in NCP over IP and you want help
# me. -A ip.address is your friend. At this time you have to silently
# ignore Login to server XXXX as YYYY - think that XXXX is ip.address and
# not one taken from .nwclient. Also, if you have not .nwclient, you have
# to add -S DUMMY on commandline.
CONFIG_NATIVE_IP = 1
# Include code for Linux2.0.x
MOUNT2 = 1
# Include code for Linux2.1.x
MOUNT3 = 1
# ########################################################
BINDIR = /usr/bin
SBINDIR = /sbin
LIBSODIR = /lib
LIBADIR = /usr/lib
MANDIR = /usr/local/man
CC = gcc
COPT = -O2
CWARN = -Wall
# CWARN = -Wall -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Waggregate-return -Wnested-externs -Winline -Wbad-function-cast -W #-Werror #-Wwrite-strings -Wtraditional -Wshadow
# ########################################################
ifdef SIGNATURES
CFLAGS_DEFINES += -DSIGNATURES
endif
ifdef NDS_SUPPORT
CFLAGS_DEFINES += -DNDS_SUPPORT
endif
ifdef CONFIG_NATIVE_IP
CFLAGS_DEFINES += -DCONFIG_NATIVE_IP
endif
ifdef MOUNT2
CFLAGS_DEFINES += -DMOUNT2
endif
ifdef MOUNT3
CFLAGS_DEFINES += -DMOUNT3
endif
CFLAGS_DEFINES += -DNCPFS_VERSION=\"$(VERSION)\"
CFLAGS_OPTIONS += $(COPT)
CFLAGS_OPTIONS += $(CWARN)
CCFLAGS = $(CFLAGS_DEFINES) $(CFLAGS_OPTIONS) -I../include
# If your system is ELF, either also do a 'make install', or append the util/
# directory where the dynamic library resides to the environment
# variable LD_LIBRARY_PATH
HAVE_ELF=$(shell file `whereis gcc|cut -d ' ' -f 2`| \
grep ELF >/dev/null && echo -n yes )
#HAVE_ELF=yes
TOPDIR = $(shell pwd)
INCLUDES=-I$(TOPDIR)/include

41
Performance.txt Normal file
View File

@@ -0,0 +1,41 @@
Author: Roumen Petrov (RYP) 7 jul 1999
A. I change old "PACKAL" like style for put data into packet to "C" style.
I added only for test purposes this function:
/* ------------------------------------ */
test (struct ncp_conn *_conn,
__u8 _dir_handle, const char *_name,
__u32 _object_id, __u16 _rights, __u16 _rights_mask)
{
long result;
ncp_init_request_s(_conn, 12);
ncp_add_byte(_conn, 0); /*??? name space */
ncp_add_byte(_conn, 0); /*??? */
ncp_add_word_lh(_conn, 0x8000); /*??? search attribs */
ncp_add_word_lh(_conn, _rights_mask); /* lh or hl ? */
ncp_add_byte(_conn, 1); /*??? */
ncp_add_byte(_conn, 0); /*??? */
ncp_add_byte(_conn, _dir_handle);
ncp_add_dword_lh(_conn, 0x00000000); /* lh or hl ? */
ncp_add_pstring2(_conn, _name, 299);
ncp_add_dword_hl(_conn, _object_id);
ncp_add_word_lh(_conn, _rights);
/* result = ncp_request(_conn, 87); */
ncp_unlock_conn(_conn);
return result;
}
/* ------------------------------------ */
into ../lib/ncplib.c in version 2.2.0. Then in a loop of
1000 * 10000 times I call this function and result is 221 [sec] to
154 [sec] over i486(120 Mhz).
In new version time for fill of packet is only 69.68% of time of old version.
B. I renamed old function ncp_add_XXX to assert_ncp_add_XXX and
make new ncp_add_XXX without call to assert_conn_locked(....).

36
README
View File

@@ -15,12 +15,6 @@ probably it's more clever to use nfs between two Linux machines.
The user-space utilities such as nprint and the bindery utils should
work with all versions of NetWare.
ncpfs does NOT support access to the NDS, so if you want to mount
volumes exported by a NetWare 4.x server, you will have to install the
bindery emulation on that server. If you need access to the NDS, ask
Caldera for their CND. See http://www.caldera.com for more
information.
INSTALLATION
@@ -29,20 +23,20 @@ support compiled in. When 'make config' asks you for
The IPX protocol (CONFIG_IPX) [N/y/m/?]
simply answer 'y'. Probably you do not need the full internal net that
you are asked for next.
simply answer 'y' or 'm'. Probably you do not need the full internal net
that you are asked for next.
If you are not using 2.0.x kernels, you can comment out MOUNT2=1 line
in the Makeinit.
If you are not using 2.1.x kernels, you can comment out MOUNT3=1 line
in the Makeinit.
Run 'configure', 'make' and, as root, 'make install'. That's all.
If you are not using NDS access, you can comment out NDS_SUPPORT=1 in
the Makeinit.
If you are not using packet signatures, you can comment out SIGNATURES=1
in the Makeinit.
After you adapted your Makeinit, type 'make' and, as root, 'make install'.
Before installing new version of ncpfs, you should stop all users of
old version, to release libncp.so from memory. Run as root:
umount -v -a -tncpfs
Command above unmounts all your ncpfs mounted volumes. Of course,
it is not necessary if you agree that disk space occupied by old
libncp.so will be released after reboot and that currently mounted
shares will continue using old libncp.so until unmount.
See shell script file "contrib/scripts/rc.ipxnet" for other details.
HELP
@@ -106,7 +100,7 @@ ncpfs.
The most enthusiastic user and tester is certainly Uwe Bonnes
<bon@elektron.ikp.physik.th-darmstadt.de>. So far he's the only one
who has contributed something, namely manpages and corretions to
who has contributed something, namely manpages and corrections to
existing manpages.
Ales Dyrak has written lwared, which was the initial start for ncpfs.
@@ -126,5 +120,5 @@ directory.
Have fun with ncpfs!
Volker
lendecke@namu01.gwdg.de
Volker, lendecke@namu01.gwdg.de (original author)
Petr Vandrovec, vandrove@vc.cvut.cz (current maintainer)

View File

@@ -1,8 +1,3 @@
The NDS login code uses the RSA public key cryptosystem. Because of a patent
right on this algorithm (U.S. patent #4,405,829, issued 20 Sep 1983), you
are probably not allowed to use this code in the U.S.A. and Canada, and
possibly neither in other countries. Check this before you use NDS logins!
The mpilib.c, mpilib.h, platform.h, and usuals.h in the lib/ directory are
taken from the PGP 2.3 source distribution (Copyright 1986-92 by Philip
Zimmermann), which is distributed under the GPL, as stated below.
@@ -11,8 +6,5 @@ Excerpt from pgpdoc2.txt (contained in pgp23src.zip):
"All the source code for PGP is available for free under the "Copyleft"
General Public License from the Free Software Foundation (FSF)."
For more details on the RSA patent see the pgp23src archive, or more recent
PGP packages.
Arne de Bruijn
arne@knoware.nl

587
acinclude.m4 Normal file
View File

@@ -0,0 +1,587 @@
# gettext.m4 serial 17 (gettext-0.11.5)
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
dnl
dnl This file can can be used in projects which are not available under
dnl the GNU General Public License or the GNU Library General Public
dnl License but which still want to provide support for the GNU gettext
dnl functionality.
dnl Please note that the actual code of the GNU gettext library is covered
dnl by the GNU Library General Public License, and the rest of the GNU
dnl gettext package package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
dnl Macro to add for using GNU gettext.
dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
dnl default (if it is not specified or empty) is 'no-libtool'.
dnl INTLSYMBOL should be 'external' for packages with no intl directory,
dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
dnl If INTLSYMBOL is 'use-libtool', then a libtool library
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
dnl depending on --{enable,disable}-{shared,static} and on the presence of
dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
dnl $(top_builddir)/intl/libintl.a will be created.
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
dnl implementations (in libc or libintl) without the ngettext() function
dnl will be ignored. If NEEDSYMBOL is specified and is
dnl 'need-formatstring-macros', then GNU gettext implementations that don't
dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
dnl INTLDIR is used to find the intl libraries. If empty,
dnl the value `$(top_builddir)/intl/' is used.
dnl
dnl The result of the configuration is one of three cases:
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
dnl and used.
dnl Catalog format: GNU --> install in $(datadir)
dnl Catalog extension: .mo after installation, .gmo in source tree
dnl 2) GNU gettext has been found in the system's C library.
dnl Catalog format: GNU --> install in $(datadir)
dnl Catalog extension: .mo after installation, .gmo in source tree
dnl 3) No internationalization, always use English msgid.
dnl Catalog format: none
dnl Catalog extension: none
dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
dnl The use of .gmo is historical (it was needed to avoid overwriting the
dnl GNU format catalogs when building on a platform with an X/Open gettext),
dnl but we keep it in order not to force irrelevant filename changes on the
dnl maintainers.
dnl
AC_DEFUN([AM_GNU_GETTEXT],
[
dnl Argument checking.
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
])])])])])
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
])])])])
define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
AC_REQUIRE([AM_PO_SUBDIRS])dnl
ifelse(gt_included_intl, yes, [
AC_REQUIRE([AM_INTL_SUBDIR])dnl
])
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
dnl Sometimes libintl requires libiconv, so first search for libiconv.
dnl Ideally we would do this search only after the
dnl if test "$USE_NLS" = "yes"; then
dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
dnl the configure script would need to contain the same shell code
dnl again, outside any 'if'. There are two solutions:
dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
dnl documented, we avoid it.
ifelse(gt_included_intl, yes, , [
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
])
AC_MSG_CHECKING([whether NLS is requested])
dnl Default is enabled NLS
AC_ARG_ENABLE(nls,
[ --disable-nls do not use Native Language Support],
USE_NLS=$enableval, USE_NLS=yes)
AC_MSG_RESULT($USE_NLS)
AC_SUBST(USE_NLS)
ifelse(gt_included_intl, yes, [
BUILD_INCLUDED_LIBINTL=no
USE_INCLUDED_LIBINTL=no
])
LIBINTL=
LTLIBINTL=
POSUB=
dnl If we use NLS figure out what method
if test "$USE_NLS" = "yes"; then
gt_use_preinstalled_gnugettext=no
ifelse(gt_included_intl, yes, [
AC_MSG_CHECKING([whether included gettext is requested])
AC_ARG_WITH(included-gettext,
[ --with-included-gettext use the GNU gettext library included here],
nls_cv_force_use_gnu_gettext=$withval,
nls_cv_force_use_gnu_gettext=no)
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
])
dnl User does not insist on using GNU NLS library. Figure out what
dnl to use. If GNU gettext is available we use this. Else we have
dnl to fall back to GNU NLS library.
dnl Add a version number to the cache macros.
define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
[AC_TRY_LINK([#include <libintl.h>
]ifelse([$2], [need-formatstring-macros],
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
#endif
changequote(,)dnl
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
changequote([,])dnl
], [])[extern int _nl_msg_cat_cntr;
extern int *_nl_domain_bindings;],
[bindtextdomain ("", "");
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
gt_cv_func_gnugettext_libc=yes,
gt_cv_func_gnugettext_libc=no)])
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
dnl Sometimes libintl requires libiconv, so first search for libiconv.
ifelse(gt_included_intl, yes, , [
AM_ICONV_LINK
])
dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
dnl even if libiconv doesn't exist.
AC_LIB_LINKFLAGS_BODY([intl])
AC_CACHE_CHECK([for GNU gettext in libintl],
gt_cv_func_gnugettext_libintl,
[gt_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $INCINTL"
gt_save_LIBS="$LIBS"
LIBS="$LIBS $LIBINTL"
dnl Now see whether libintl exists and does not depend on libiconv.
AC_TRY_LINK([#include <libintl.h>
]ifelse([$2], [need-formatstring-macros],
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
#endif
changequote(,)dnl
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
changequote([,])dnl
], [])[extern int _nl_msg_cat_cntr;
extern
#ifdef __cplusplus
"C"
#endif
const char *_nl_expand_alias ();],
[bindtextdomain ("", "");
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
gt_cv_func_gnugettext_libintl=yes,
gt_cv_func_gnugettext_libintl=no)
dnl Now see whether libintl exists and depends on libiconv.
if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
LIBS="$LIBS $LIBICONV"
AC_TRY_LINK([#include <libintl.h>
]ifelse([$2], [need-formatstring-macros],
[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
#endif
changequote(,)dnl
typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
changequote([,])dnl
], [])[extern int _nl_msg_cat_cntr;
extern
#ifdef __cplusplus
"C"
#endif
const char *_nl_expand_alias ();],
[bindtextdomain ("", "");
return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
[LIBINTL="$LIBINTL $LIBICONV"
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
gt_cv_func_gnugettext_libintl=yes
])
fi
CPPFLAGS="$gt_save_CPPFLAGS"
LIBS="$gt_save_LIBS"])
fi
dnl If an already present or preinstalled GNU gettext() is found,
dnl use it. But if this macro is used in GNU gettext, and GNU
dnl gettext is already preinstalled in libintl, we update this
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
if test "$gt_cv_func_gnugettext_libc" = "yes" \
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
&& test "$PACKAGE" != gettext; }; then
gt_use_preinstalled_gnugettext=yes
else
dnl Reset the values set by searching for libintl.
LIBINTL=
LTLIBINTL=
INCINTL=
fi
ifelse(gt_included_intl, yes, [
if test "$gt_use_preinstalled_gnugettext" != "yes"; then
dnl GNU gettext is not found in the C library.
dnl Fall back on included GNU gettext library.
nls_cv_use_gnu_gettext=yes
fi
fi
if test "$nls_cv_use_gnu_gettext" = "yes"; then
dnl Mark actions used to generate GNU NLS library.
INTLOBJS="\$(GETTOBJS)"
BUILD_INCLUDED_LIBINTL=yes
USE_INCLUDED_LIBINTL=yes
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
fi
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
dnl Mark actions to use GNU gettext tools.
CATOBJEXT=.gmo
fi
])
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
AC_DEFINE(ENABLE_NLS, 1,
[Define to 1 if translation of program messages to the user's native language
is requested.])
else
USE_NLS=no
fi
fi
if test "$USE_NLS" = "yes"; then
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
AC_MSG_CHECKING([how to link with libintl])
AC_MSG_RESULT([$LIBINTL])
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
fi
dnl For backward compatibility. Some packages may be using this.
AC_DEFINE(HAVE_GETTEXT, 1,
[Define if the GNU gettext() function is already present or preinstalled.])
AC_DEFINE(HAVE_DCGETTEXT, 1,
[Define if the GNU dcgettext() function is already present or preinstalled.])
fi
dnl We need to process the po/ directory.
POSUB=po
fi
ifelse(gt_included_intl, yes, [
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
dnl to 'yes' because some of the testsuite requires it.
if test "$PACKAGE" = gettext; then
BUILD_INCLUDED_LIBINTL=yes
fi
dnl Make all variables we use known to autoconf.
AC_SUBST(BUILD_INCLUDED_LIBINTL)
AC_SUBST(USE_INCLUDED_LIBINTL)
AC_SUBST(CATOBJEXT)
AC_SUBST(INTLOBJS)
dnl For backward compatibility. Some configure.ins may be using this.
nls_cv_header_intl=
nls_cv_header_libgt=
dnl For backward compatibility. Some Makefiles may be using this.
DATADIRNAME=share
AC_SUBST(DATADIRNAME)
dnl For backward compatibility. Some Makefiles may be using this.
INSTOBJEXT=.mo
AC_SUBST(INSTOBJEXT)
dnl For backward compatibility. Some Makefiles may be using this.
GENCAT=gencat
AC_SUBST(GENCAT)
dnl Enable libtool support if the surrounding package wishes it.
INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
])
dnl For backward compatibility. Some Makefiles may be using this.
INTLLIBS="$LIBINTL"
AC_SUBST(INTLLIBS)
dnl Make all documented variables known to autoconf.
AC_SUBST(LIBINTL)
AC_SUBST(LTLIBINTL)
AC_SUBST(POSUB)
])
dnl Checks for all prerequisites of the po subdirectory,
dnl except for USE_NLS.
AC_DEFUN([AM_PO_SUBDIRS],
[
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
dnl Perform the following tests also if --disable-nls has been given,
dnl because they are needed for "make dist" to work.
dnl Search for GNU msgfmt in the PATH.
dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
dnl The second test excludes FreeBSD msgfmt.
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
(if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
:)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
dnl Search for GNU xgettext 0.11 or newer in the PATH.
dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
dnl The second test excludes FreeBSD xgettext.
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
(if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
:)
dnl Remove leftover from FreeBSD xgettext call.
rm -f messages.po
dnl Search for GNU msgmerge 0.11 or newer in the PATH.
AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
[$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
dnl Test whether we really found GNU msgfmt.
if test "$GMSGFMT" != ":"; then
dnl If it is no GNU msgfmt we define it as : so that the
dnl Makefiles still can work.
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
(if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
: ;
else
GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
AC_MSG_RESULT(
[found $GMSGFMT program is not GNU msgfmt; ignore it])
GMSGFMT=":"
fi
fi
dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
dnl Test whether we really found GNU xgettext.
if test "$XGETTEXT" != ":"; then
dnl If it is no GNU xgettext we define it as : so that the
dnl Makefiles still can work.
if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
(if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
: ;
else
AC_MSG_RESULT(
[found xgettext program is not GNU xgettext; ignore it])
XGETTEXT=":"
fi
dnl Remove leftover from FreeBSD xgettext call.
rm -f messages.po
fi
AC_CONFIG_COMMANDS([[gettext]],[[
for ac_file in $CONFIG_FILES; do
# Support "outfile[:infile[:infile...]]"
case "$ac_file" in
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
esac
# PO directories have a Makefile.in generated from Makefile.in.in.
case "$ac_file" in */Makefile.in)
# Adjust a relative srcdir.
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
# In autoconf-2.13 it is called $ac_given_srcdir.
# In autoconf-2.50 it is called $srcdir.
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
case "$ac_given_srcdir" in
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
/*) top_srcdir="$ac_given_srcdir" ;;
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
esac
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
rm -f "$ac_dir/POTFILES"
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
# ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
# on $ac_dir but don't depend on user-specified configuration
# parameters.
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
# The LINGUAS file contains the set of available languages.
if test -n "$ALL_LINGUAS"; then
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
fi
ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
# Hide the ALL_LINGUAS assigment from automake.
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
fi
case "$ac_given_srcdir" in
.) srcdirpre= ;;
*) srcdirpre='$(srcdir)/' ;;
esac
POFILES=
GMOFILES=
UPDATEPOFILES=
DUMMYPOFILES=
for lang in $ALL_LINGUAS; do
POFILES="$POFILES $srcdirpre$lang.po"
GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
done
# CATALOGS depends on both $ac_dir and the user's LINGUAS
# environment variable.
INST_LINGUAS=
if test -n "$ALL_LINGUAS"; then
for presentlang in $ALL_LINGUAS; do
useit=no
if test "%UNSET%" != "$LINGUAS"; then
desiredlanguages="$LINGUAS"
else
desiredlanguages="$ALL_LINGUAS"
fi
for desiredlang in $desiredlanguages; do
# Use the presentlang catalog if desiredlang is
# a. equal to presentlang, or
# b. a variant of presentlang (because in this case,
# presentlang can be used as a fallback for messages
# which are not translated in the desiredlang catalog).
case "$desiredlang" in
"$presentlang"*) useit=yes;;
esac
done
if test $useit = yes; then
INST_LINGUAS="$INST_LINGUAS $presentlang"
fi
done
fi
CATALOGS=
if test -n "$INST_LINGUAS"; then
for lang in $INST_LINGUAS; do
CATALOGS="$CATALOGS $lang.gmo"
done
fi
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
if test -f "$f"; then
case "$f" in
*.orig | *.bak | *~) ;;
*) cat "$f" >> "$ac_dir/Makefile" ;;
esac
fi
done
fi
;;
esac
done]],
[# Capture the value of obsolete ALL_LINGUAS because we need it to compute
# POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
# from automake.
eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
# Capture the value of LINGUAS because we need it to compute CATALOGS.
LINGUAS="${LINGUAS-%UNSET%}"
])
])
dnl Checks for all prerequisites of the intl subdirectory,
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
AC_DEFUN([AM_INTL_SUBDIR],
[
AC_REQUIRE([AC_PROG_INSTALL])dnl
AC_REQUIRE([AM_MKINSTALLDIRS])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_PROG_RANLIB])dnl
AC_REQUIRE([AC_ISC_POSIX])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
AC_REQUIRE([AC_C_CONST])dnl
AC_REQUIRE([AC_C_INLINE])dnl
AC_REQUIRE([AC_TYPE_OFF_T])dnl
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
AC_REQUIRE([AC_FUNC_MMAP])dnl
AC_REQUIRE([jm_GLIBC21])dnl
AC_REQUIRE([gt_INTDIV0])dnl
AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
AC_REQUIRE([gt_INTTYPES_PRI])dnl
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
stdlib.h string.h unistd.h sys/param.h])
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
AM_ICONV
AM_LANGINFO_CODESET
if test $ac_cv_header_locale_h = yes; then
AM_LC_MESSAGES
fi
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
dnl because plural.y uses bison specific features. It requires at least
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
dnl compile.
dnl bison is only needed for the maintainer (who touches plural.y). But in
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
dnl the rule in general Makefile. Now, some people carelessly touch the
dnl files or have a broken "make" program, hence the plural.c rule will
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
dnl present or too old.
AC_CHECK_PROGS([INTLBISON], [bison])
if test -z "$INTLBISON"; then
ac_verc_fail=yes
else
dnl Found it, now check the version.
AC_MSG_CHECKING([version of bison])
changequote(<<,>>)dnl
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
changequote([,])dnl
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
esac
AC_MSG_RESULT([$ac_prog_version])
fi
if test $ac_verc_fail = yes; then
INTLBISON=:
fi
])
AC_DEFUN([AM_MKINSTALLDIRS],
[
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
dnl Try to locate is.
MKINSTALLDIRS=
if test -n "$ac_aux_dir"; then
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
fi
if test -z "$MKINSTALLDIRS"; then
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
fi
AC_SUBST(MKINSTALLDIRS)
])
dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])

1930
aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

17
conf Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
AUTOTOOLS_DIR=/usr/share/misc
if [ -f "${AUTOTOOLS_DIR}/config.guess" ]; then
cp -p "${AUTOTOOLS_DIR}/config.guess" config.guess
fi
if [ -f "${AUTOTOOLS_DIR}/config.sub" ]; then
cp -p "${AUTOTOOLS_DIR}/config.sub" config.sub
fi
aclocal
# Do not use space between -W and all, otherwise Debian's auto*-wrapper
# brokes...
autoconf -Wall
autoheader -Wall
rm -f config.cache config.status config.log

1409
config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

513
config.rpath Executable file
View File

@@ -0,0 +1,513 @@
#! /bin/sh
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
# Copyright 1996-2002 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# 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.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
#
# The first argument passed to this file is the canonical host specification,
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
# should be set by the caller.
#
# The set of defined variables is at the end of this script.
# All known linkers require a `.a' archive for static linking (except M$VC,
# which needs '.lib').
libext=a
shlibext=
host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
wl=
if test "$GCC" = yes; then
wl='-Wl,'
else
case "$host_os" in
aix3* | aix4* | aix5*)
wl='-Wl,'
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
;;
irix5* | irix6*)
wl='-Wl,'
;;
linux*)
echo '__INTEL_COMPILER' > conftest.$ac_ext
if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null
then
:
else
# Intel icc
wl='-Qoption,ld,'
fi
;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
solaris*)
wl='-Wl,'
;;
sunos4*)
wl='-Qoption ld '
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
if test "x$host_vendor" = xsni; then
wl='-LD'
else
wl='-Wl,'
fi
;;
esac
fi
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
hardcode_minus_L=no
case "$host_os" in
cygwin* | mingw* | pw32*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
if test "$GCC" != yes; then
with_gnu_ld=no
fi
;;
openbsd*)
with_gnu_ld=no
;;
esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
case "$host_os" in
aix3* | aix4* | aix5*)
# On AIX, the GNU linker is very broken
ld_shlibs=no
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
# that the semantics of dynamic libraries on AmigaOS, at least up
# to version 4, is to share data among multiple programs linked
# with the same dynamic library. Since this doesn't match the
# behavior of shared libraries on other platforms, we can use
# them.
ld_shlibs=no
;;
beos*)
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
cygwin* | mingw* | pw32*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
;;
solaris* | sysv5*)
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
sunos4*)
hardcode_direct=yes
;;
*)
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
esac
if test "$ld_shlibs" = yes; then
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
fi
else
case "$host_os" in
aix3*)
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
if test "$GCC" = yes; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
fi
;;
aix4* | aix5*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
else
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
break
fi
done
esac
fi
hardcode_direct=yes
hardcode_libdir_separator=':'
if test "$GCC" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" && \
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
hardcode_direct=yes
else
# We have old collect2
hardcode_direct=unsupported
hardcode_minus_L=yes
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
esac
fi
if test "$aix_use_runtimelinking" = yes; then
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
else
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
fi
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# see comment about different semantics on the GNU ld section
ld_shlibs=no
;;
cygwin* | mingw* | pw32*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec=' '
libext=lib
;;
darwin* | rhapsody*)
hardcode_direct=yes
;;
freebsd1*)
ld_shlibs=no
;;
freebsd2.2*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
freebsd2*)
hardcode_direct=yes
hardcode_minus_L=yes
;;
freebsd*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
hpux9* | hpux10* | hpux11*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
hardcode_minus_L=yes # Not in the search PATH, but as the default
# location of the library.
;;
irix5* | irix6*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
netbsd*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
newsos6)
hardcode_direct=yes
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
openbsd*)
hardcode_direct=yes
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
else
case "$host_os" in
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
hardcode_libdir_flag_spec='-R$libdir'
;;
*)
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
esac
fi
;;
os2*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
osf3*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*)
if test "$GCC" = yes; then
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
# Both cc and cxx compiler support -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
fi
hardcode_libdir_separator=:
;;
sco3.2v5*)
;;
solaris*)
hardcode_libdir_flag_spec='-R$libdir'
;;
sunos4*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
;;
sysv4)
if test "x$host_vendor" = xsno; then
hardcode_direct=yes # is this really true???
else
hardcode_direct=no # Motorola manual says yes, but my tests say they lie
fi
;;
sysv4.3*)
;;
sysv5*)
hardcode_libdir_flag_spec=
;;
uts4*)
hardcode_libdir_flag_spec='-L$libdir'
;;
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
sysv4*MP*)
if test -d /usr/nec; then
ld_shlibs=yes
fi
;;
sysv4.2uw2*)
hardcode_direct=yes
hardcode_minus_L=no
;;
sysv5uw7* | unixware7*)
;;
*)
ld_shlibs=no
;;
esac
fi
# Check dynamic linker characteristics
libname_spec='lib$name'
sys_lib_dlsearch_path_spec="/lib /usr/lib"
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
case "$host_os" in
aix3*)
shlibext=so
;;
aix4* | aix5*)
shlibext=so
;;
amigaos*)
shlibext=ixlibrary
;;
beos*)
shlibext=so
;;
bsdi4*)
shlibext=so
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
;;
cygwin* | mingw* | pw32*)
case $GCC,$host_os in
yes,cygwin*)
shlibext=dll.a
;;
yes,mingw*)
shlibext=dll
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
;;
yes,pw32*)
shlibext=dll
;;
*)
shlibext=dll
;;
esac
;;
darwin* | rhapsody*)
shlibext=dylib
;;
freebsd1*)
;;
freebsd*)
shlibext=so
;;
gnu*)
shlibext=so
;;
hpux9* | hpux10* | hpux11*)
shlibext=sl
;;
irix5* | irix6*)
shlibext=so
case "$host_os" in
irix5*)
libsuff= shlibsuff=
;;
*)
case $LD in
*-32|*"-32 ") libsuff= shlibsuff= ;;
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 ;;
*-64|*"-64 ") libsuff=64 shlibsuff=64 ;;
*) libsuff= shlibsuff= ;;
esac
;;
esac
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
;;
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
;;
linux-gnu*)
shlibext=so
;;
netbsd*)
shlibext=so
;;
newsos6)
shlibext=so
;;
openbsd*)
shlibext=so
;;
os2*)
libname_spec='$name'
shlibext=dll
;;
osf3* | osf4* | osf5*)
shlibext=so
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
sco3.2v5*)
shlibext=so
;;
solaris*)
shlibext=so
;;
sunos4*)
shlibext=so
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
shlibext=so
case "$host_vendor" in
motorola)
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
;;
esac
;;
uts4*)
shlibext=so
;;
dgux*)
shlibext=so
;;
sysv4*MP*)
if test -d /usr/nec; then
shlibext=so
fi
;;
esac
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_sys_lib_search_path_spec=`echo "X$sys_lib_search_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_sys_lib_dlsearch_path_spec=`echo "X$sys_lib_dlsearch_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
# How to pass a linker flag through the compiler.
wl="$escaped_wl"
# Static library suffix (normally "a").
libext="$libext"
# Shared library suffix (normally "so").
shlibext="$shlibext"
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator="$hardcode_libdir_separator"
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
# resulting binary.
hardcode_direct="$hardcode_direct"
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L="$hardcode_minus_L"
# Compile-time system search path for libraries
sys_lib_search_path_spec="$escaped_sys_lib_search_path_spec"
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec="$escaped_sys_lib_dlsearch_path_spec"
EOF

1473
config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

12371
configure vendored Executable file

File diff suppressed because it is too large Load Diff

1153
configure.ac Normal file

File diff suppressed because it is too large Load Diff

25
contrib/libtrace/Makefile Normal file
View File

@@ -0,0 +1,25 @@
#
#
#
top_srcdir = ../..
top_builddir = ../..
this_srcdir = ${top_srcdir}/contrib/libtrace
include ${top_builddir}/Make.rules
.PHONY : all clean distclean mrproper
all: tracencp.so
tracencp.so: tracencp.c allsyms.c
$(CC) $(CFLAGS) -o tracencp.so -shared tracencp.c -L${top_builddir}/lib -lncp -ldl
allsyms.c: ${top_builddir}/lib/libncp.so
objdump -T ${top_builddir}/lib/libncp.so | grep 'DF .text' | rev | cut -d" " -f1 | rev | sed 's/^\(.*\)$$/DO_ASM_SYMBOL_EASY(\1)/' > allsyms.c
clean:
-rm -f allsyms.c tracencp.so
distclean: clean
mrproper: clean

96
contrib/libtrace/README Normal file
View File

@@ -0,0 +1,96 @@
Hello everybody,
ltrace does not trace calls made to dynamically loaded objects,
and this made my testing of ncpfs Perl wrapper very hard, as
I was not able to confirm what's going inside without adding
debugging prints into either ncpfs or into generated wrapper...
I found this unacceptable, and so I cooked this code. You can
use it to create wrapper around any library you want, it just
must be dynamic library, not a static one.
Usage is simple:
NCP_TRACE_FILE=demo.trc LD_PRELOAD=./tracencp.so demo.pl
and enjoy demo.trc file.
I hope that in future I'll be able to persuade SWIG to create
trace_in_* and trace_out_* wrappers for me automatically - but
of course you can do it yourself meanwhile.
trace_in_XXX function has same arguments as XXX function, with
two parameters added in front of the list - const char* functionName
and void* caller. trace_out_XXX function has also arguments of
wrapped function - with added int returnValue and void* caller.
So for example for NWDSFreeContext() you have:
NWDSCCODE NWDSFreeContext(NWDSContextHandle ctx);
void trace_in_NWDSFreeContext(const char* name, void* addr, NWDSContextHandle ctx);
void trace_out_NWDSFreeContext(NWDSCCODE err, void* addr, NWDSContextHandle ctx);
You should not modify arguments passed to you - depending on
optimization level your changes may be visible to function you
are wrapping and/or to caller. And you should use logprintf()
in trace_in_* and resprintf() in trace_out_*. These functions
take a care of automatic indenting and printing address of caller.
And of course, currently there are several limitations:
- only i386 version exists... Write your own assembly code, and send me it
if you want this on your architecture.
- you cannot create C wrappers around functions which return 64bit
quantities (if you'll cook wrapper in assembly, you'll find upper
32bits in %edx register).
- on callchain deeper than 256 levels it dies.
- versioned symbols are not properly wrapped with version, they
are wrapped without version information.
- maybe more... Use of weak symbols is intentional feature and not a bug.
Example (this example also shows that context handle is automatically
destroyed when it is no longer referenced from Perl - this is why
I wrote this tracer...):
$ NCP_TRACE_FILE=demo.trc LD_PRELOAD=./tracencp.so demo.pl
NWDSCreateContext() = ok, ctx=ncpfs::NWDSContextHandle=SCALAR(0x80f6408)
NWDSDuplicateContext(ctx) = ok, nctx=ncpfs::NWDSContextHandle=SCALAR(0x80f6444)
$ cat demo.trc
402B593D: NWDSCreateContext() = ...
401E3787: NWDSCreateContextHandle() = ...
401E3242: NWDSInitRequester() = ...
401E22B2: my_iconv() = 0
401E22C0: my_iconv_close() = 0
(cont'd.) ... = 0
401E3377: NWDSSetContext() = ...
401E39B3: my_iconv_open() = 135390952
401E39D6: my_iconv_open() = 135305312
(cont'd.) ... = 0
401E33CA: NWDSSetTransport() = 0
(cont'd.) ... = 0
(cont'd.) ... = 137280664
402B5BB0: NWDSDuplicateContext() = ...
401E37BE: NWDSDuplicateContextHandle() = ...
401E3508: NWDSSetContext() = ...
401E39B3: my_iconv_open() = 135292056
401E39D6: my_iconv_open() = 135291776
(cont'd.) ... = 0
401E360E: NWDSSetContext() = ...
401E39B3: my_iconv_open() = 135404088
401E39D6: my_iconv_open() = 135733664
401E3A05: my_iconv_close() = 0
401E3A22: my_iconv_close() = 0
(cont'd.) ... = 0
(cont'd.) ... = 0
(cont'd.) ... = 136991752
40255E93: NWDSFreeContext() = ...
401E36A1: my_iconv_close() = 0
401E36B5: my_iconv_close() = 0
(cont'd.) ... = 0
40255E93: NWDSFreeContext() = ...
401E36A1: my_iconv_close() = 0
401E36B5: my_iconv_close() = 0
(cont'd.) ... = 0
$
Enjoy,
Petr Vandrovec
vandrove@vc.cvut.cz

24
contrib/libtrace/demo.pl Executable file
View File

@@ -0,0 +1,24 @@
#! /usr/bin/perl -w
use strict;
use diagnostics;
use ncpfs;
my ($err,$ctx);
print 'NWDSCreateContext() = ';
$ctx = ncpfs::NWDSCreateContext();
if (not defined($ctx)) {
print "failed\n";
} else {
my ($nctx);
print "ok, ctx=$ctx\n";
print 'NWDSDuplicateContext(ctx) = ';
$nctx = ncpfs::NWDSDuplicateContext($ctx);
if (not defined($nctx)) {
print "failed\n";
} else {
print "ok, nctx=$nctx\n";
}
}

35
contrib/libtrace/demo.trc Normal file
View File

@@ -0,0 +1,35 @@
402B593D: NWDSCreateContext() = ...
401E3787: NWDSCreateContextHandle() = ...
401E3242: NWDSInitRequester() = ...
401E22B2: my_iconv() = 0
401E22C0: my_iconv_close() = 0
(cont'd.) ... = 0
401E3377: NWDSSetContext() = ...
401E39B3: my_iconv_open() = 135390952
401E39D6: my_iconv_open() = 135305312
(cont'd.) ... = 0
401E33CA: NWDSSetTransport() = 0
(cont'd.) ... = 0
(cont'd.) ... = 137280664
402B5BB0: NWDSDuplicateContext() = ...
401E37BE: NWDSDuplicateContextHandle() = ...
401E3508: NWDSSetContext() = ...
401E39B3: my_iconv_open() = 135292056
401E39D6: my_iconv_open() = 135291776
(cont'd.) ... = 0
401E360E: NWDSSetContext() = ...
401E39B3: my_iconv_open() = 135404088
401E39D6: my_iconv_open() = 135733664
401E3A05: my_iconv_close() = 0
401E3A22: my_iconv_close() = 0
(cont'd.) ... = 0
(cont'd.) ... = 0
(cont'd.) ... = 136991752
40255E93: NWDSFreeContext() = ...
401E36A1: my_iconv_close() = 0
401E36B5: my_iconv_close() = 0
(cont'd.) ... = 0
40255E93: NWDSFreeContext() = ...
401E36A1: my_iconv_close() = 0
401E36B5: my_iconv_close() = 0
(cont'd.) ... = 0

139
contrib/libtrace/tracencp.c Normal file
View File

@@ -0,0 +1,139 @@
#define _GNU_SOURCE
#include <dlfcn.h>
#include <errno.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
static void* freestack[256];
static void** RetAddrPtr = freestack;
static int infunc = 0;
static FILE* tracefile = NULL;
static void linesetup(void) {
int x;
x = RetAddrPtr - freestack;
while (x--) {
fprintf(tracefile, " ");
}
}
static void logprintf(void* calladdr, const char * message, ...) {
va_list va;
if (!tracefile) {
char* x = getenv("NCP_TRACE_FILE");
if (x) {
tracefile = fopen(x, "wt");
}
if (!tracefile)
tracefile = stderr;
}
if (infunc) {
fprintf(tracefile, "...\n");
}
fprintf(tracefile, "%08lX: ", (unsigned long)calladdr);
linesetup();
va_start(va, message);
vfprintf(tracefile, message, va);
va_end(va);
infunc = 1;
}
static void resprintf(const char * message, ...) {
va_list va;
if (!infunc) {
fprintf(tracefile, "(cont'd.) ");
linesetup();
fprintf(tracefile, "... = ");
}
va_start(va, message);
vfprintf(tracefile, message, va);
va_end(va);
infunc = 0;
}
#define DO_ASM_SYMBOL(SYMBOL) \
asm( \
".data \n" \
" .align 4 \n" \
" .type .L99" #SYMBOL "_wrap,@object \n" \
" .size .L99" #SYMBOL "_wrap,4 \n" \
".L99" #SYMBOL "_wrap: \n" \
" .long 0 \n" \
".section .rodata \n" \
".LC0" #SYMBOL ": \n" \
" .string \"" #SYMBOL "\" \n" \
".text \n" \
" .align 4 \n" \
".globl " #SYMBOL " \n" \
" .type " #SYMBOL ",@function \n" \
#SYMBOL ": \n" \
" movl $trace_in_" #SYMBOL ",%eax \n" \
" testl %eax,%eax \n" \
" jne .L8" #SYMBOL " \n" \
" movl $trace_default_in,%eax \n" \
".L8" #SYMBOL ": \n" \
" pushl $.LC0" #SYMBOL " \n" \
" call *%eax \n" \
" addl $4,%esp \n" \
".L3" #SYMBOL ": \n" \
" cmpl $0,.L99" #SYMBOL "_wrap \n" \
" jne .L4" #SYMBOL " \n" \
" pushl $.LC0" #SYMBOL " \n" \
" pushl $-1 \n" \
" call dlsym \n" \
" addl $8,%esp \n" \
" movl %eax,.L99" #SYMBOL "_wrap \n" \
" testl %eax,%eax \n" \
" jne .L4" #SYMBOL " \n" \
" call __errno_location \n" \
" movl $-38,(%eax) \n" \
" movl $-1,%eax \n" \
" jmp .L6" #SYMBOL " \n" \
" .p2align 4,,7 \n" \
".L4" #SYMBOL ": \n" \
" movl RetAddrPtr,%eax \n" \
" popl (%eax) \n" \
" addl $4,RetAddrPtr \n" \
" pushl $.L99" #SYMBOL "_continue \n" \
" jmp *.L99" #SYMBOL "_wrap \n" \
".L99" #SYMBOL "_continue: \n" \
" addl $-4,RetAddrPtr \n" \
" movl RetAddrPtr,%ecx \n" \
" pushl (%ecx) \n" \
" movl $trace_out_" #SYMBOL ",%ecx \n" \
" testl %ecx,%ecx \n" \
" jne .L7" #SYMBOL " \n" \
" movl $trace_default_out,%ecx \n" \
".L7" #SYMBOL ": \n" \
" pushl %eax \n" \
" call *%ecx \n" \
" popl %eax \n" \
".L6" #SYMBOL ": \n" \
" ret \n" \
".Lfe1" #SYMBOL ": \n" \
" .size " #SYMBOL ",.Lfe1" #SYMBOL "-" #SYMBOL "\n"\
" .weak trace_out_" #SYMBOL " \n" \
" .weak trace_in_" #SYMBOL " \n");
#define DO_ASM_SYMBOL_EASY(SYMBOL) \
DO_ASM_SYMBOL(SYMBOL)
void trace_default_in(const char* funcname, void* calladdr) {
logprintf(calladdr, "%s() = ", funcname);
}
void trace_default_out(int result) {
resprintf("%d\n", result);
}
#include "allsyms.c"
void trace_out_strnwerror(const char* result) {
resprintf("%s\n", result);
}

27
contrib/nss64/Makefile Normal file
View File

@@ -0,0 +1,27 @@
NWSDK = /mnt/novell/nwsdk
#NWSDK = /usr/src/ndk
CFLAGS = -DN_PLAT_NLM -nostdinc -fpack-struct -I${NWSDK}/include/nlm -I${NWSDK}/include -W -Wall -Winline -O2 -fomit-frame-pointer -mpreferred-stack-boundary=2 -fverbose-asm
#SERVER = /vana2/sys
SERVER = /nw5/sys
ncphook.nlm: ncphook.o ncphook.def prelude.o
nlmconv -T ncphook.def -l ld
prelude.o: prelude.c
$(CC) $(CFLAGS) -c -o prelude.o prelude.c
ncphook.o: ncphook.s
$(CC) $(CFLAGS) -c ncphook.s
ncphook.s: ncphook.c ncphook.h
$(CC) $(CFLAGS) -S ncphook.c
clean:
rm -f *.o *.s *.nlm
mrproper: clean
distclean: mrproper
install: ncphook.nlm
cp ncphook.nlm ${SERVER}/ncphook.nlm

663
contrib/nss64/ncphook.c Normal file
View File

@@ -0,0 +1,663 @@
#include "ncphook.h"
#include <stddef.h>
#include <signal.h>
#include <nwadv.h>
#include <nwthread.h>
#include <string.h>
#include <stdio.h>
static unsigned char NSS2NCPErrorTable[5000];
static void InitNSS2NCPErrorTable(void) {
memset(NSS2NCPErrorTable, 0xFF, sizeof(NSS2NCPErrorTable));
NSS2NCPErrorTable[ 0] = 0x96;
NSS2NCPErrorTable[ 1] = 0xFD;
NSS2NCPErrorTable[ 2] = 0xFD;
NSS2NCPErrorTable[ 4] = 0x77;
NSS2NCPErrorTable[ 7] = 0xFB;
NSS2NCPErrorTable[ 99] = 0xFC;
NSS2NCPErrorTable[ 101] = 0x83;
NSS2NCPErrorTable[ 102] = 0x83;
NSS2NCPErrorTable[ 103] = 0x01;
NSS2NCPErrorTable[ 104] = 0x01;
NSS2NCPErrorTable[ 300] = 0x9C;
NSS2NCPErrorTable[ 400] = 0x9C;
NSS2NCPErrorTable[ 401] = 0x88;
NSS2NCPErrorTable[ 402] = 0x9B;
NSS2NCPErrorTable[ 404] = 0x9E;
NSS2NCPErrorTable[ 405] = 0x9C;
NSS2NCPErrorTable[ 406] = 0x9C;
NSS2NCPErrorTable[ 408] = 0x9C;
NSS2NCPErrorTable[ 409] = 0x9C;
NSS2NCPErrorTable[ 410] = 0x9C;
NSS2NCPErrorTable[ 411] = 0x98;
NSS2NCPErrorTable[ 417] = 0xA0;
NSS2NCPErrorTable[ 421] = 0x01;
NSS2NCPErrorTable[ 438] = 0x82;
NSS2NCPErrorTable[ 439] = 0x9D;
NSS2NCPErrorTable[ 440] = 0x9C;
NSS2NCPErrorTable[ 444] = 0x9C;
NSS2NCPErrorTable[ 445] = 0x2D;
NSS2NCPErrorTable[ 499] = 0x9C;
NSS2NCPErrorTable[ 500] = 0x8E;
NSS2NCPErrorTable[ 501] = 0x8D;
NSS2NCPErrorTable[ 502] = 0x90;
NSS2NCPErrorTable[ 503] = 0x8F;
NSS2NCPErrorTable[ 504] = 0x92;
NSS2NCPErrorTable[ 505] = 0x91;
NSS2NCPErrorTable[ 506] = 0x8B;
NSS2NCPErrorTable[ 507] = 0xA4;
NSS2NCPErrorTable[ 508] = 0x9A;
NSS2NCPErrorTable[ 550] = 0xBE;
NSS2NCPErrorTable[ 601] = 0xCF;
NSS2NCPErrorTable[ 650] = 0x17;
NSS2NCPErrorTable[ 651] = 0x11;
NSS2NCPErrorTable[ 652] = 0x18;
NSS2NCPErrorTable[ 653] = 0x95;
NSS2NCPErrorTable[ 654] = 0x95;
NSS2NCPErrorTable[ 700] = 0xBF;
NSS2NCPErrorTable[ 701] = 0xBF;
NSS2NCPErrorTable[ 702] = 0xBF;
NSS2NCPErrorTable[ 703] = 0xBF;
NSS2NCPErrorTable[ 800] = 0x98;
NSS2NCPErrorTable[ 801] = 0x98;
NSS2NCPErrorTable[ 804] = 0x78;
NSS2NCPErrorTable[ 850] = 0x8C;
NSS2NCPErrorTable[ 851] = 0x84;
NSS2NCPErrorTable[ 856] = 0xFE;
NSS2NCPErrorTable[ 857] = 0x9C;
NSS2NCPErrorTable[ 859] = 0xA8;
NSS2NCPErrorTable[ 860] = 0x94;
NSS2NCPErrorTable[ 861] = 0x93;
NSS2NCPErrorTable[ 862] = 0x8A;
NSS2NCPErrorTable[ 863] = 0x8A;
NSS2NCPErrorTable[ 867] = 0xFC;
NSS2NCPErrorTable[ 868] = 0x8E;
NSS2NCPErrorTable[ 869] = 0x85;
NSS2NCPErrorTable[ 870] = 0x84;
NSS2NCPErrorTable[ 900] = 0xA2;
NSS2NCPErrorTable[ 901] = 0x80;
NSS2NCPErrorTable[ 903] = 0xFE;
NSS2NCPErrorTable[ 905] = 0x80;
NSS2NCPErrorTable[ 906] = 0x80;
NSS2NCPErrorTable[ 907] = 0x80;
NSS2NCPErrorTable[ 908] = 0x80;
NSS2NCPErrorTable[ 1303] = 0x01;
NSS2NCPErrorTable[ 1503] = 0x01;
NSS2NCPErrorTable[ 2000] = 0xA5;
}
static LONG NSS2NCPError(nuint32 ec) {
if (ec) {
if (ec < 20000 || ec >= 20000 + sizeof(NSS2NCPErrorTable)) {
return 0xFF;
}
return NSS2NCPErrorTable[ec - 20000];
}
return 0;
}
static nuint32 nlmHandle;
static nuint32 NCPRTag;
//static nuint32 AllocRTag;
static int ncpHooked = 0;
static inline void cachePut(struct cacheblk* cacheBlock) {
if (!--cacheBlock->pinCount) {
cacheUnpinned(cacheBlock);
}
}
static inline void releaseReadReply(struct largeReadControl* lrc) {
struct largeReadControlFrag* lrcf;
unsigned int i;
lrcf = lrc->frags + 1;
for (i = lrc->fragCount; --i; ) {
struct cacheblk* cacheBlock;
cacheBlock = lrcf->cacheBlock;
if (cacheBlock) {
cachePut(cacheBlock);
}
lrcf++;
}
return;
}
static void sendDone(struct ncpSendCacheCB* sendCb) {
struct largeReadControlFrag* lrcf;
struct largeReadControl* lrc;
unsigned int i;
lrc = (**NW_connectionTable)[sendCb->connNum]->largeReadControl;
lrcf = lrc->frags + 1;
for (i = lrc->fragCount; --i; ) {
mailInterrupt(cachePut, lrcf->cacheBlock);
lrcf++;
}
return;
}
static inline void __LBL_sSignal(struct semaphore* sem) {
if (!--sem->value && sem->queue) {
LBL_sSignal(sem);
}
}
static inline void readAsyncCallback(struct LB_async* req) {
struct largeReadControlFrag* lrcf;
lrcf = req->frag;
if (req->errorCode) {
lrcf->fragAddr = NULL;
lrcf->cacheBlock = NULL;
SetErrno(req->sema->data, req->errorCode);
} else {
struct cacheblk* cacheBlock = req->cacheBlock;
cacheBlock->pinCount++;
cacheRelease(cacheBlock);
lrcf->fragAddr = cacheBlock->address + (nuint32)lrcf->fragAddr;
lrcf->cacheBlock = cacheBlock;
}
__LBL_sSignal(req->sema);
LB_freeAsyncio(req);
}
static inline void __LBL_sWait(struct semaphore* sem) {
if (sem->value) {
if (sem->value < 0 || sem->queue) {
LBL_sWait(sem);
} else {
sem->value++;
}
} else {
sem->value = 1;
}
}
static inline void __LBL_cntSignal(struct semaphore* sem, int val) {
sem->value += val;
if (sem->queue) {
LBL_cntSignal(sem, val);
}
}
static inline void __LBL_cntWait(struct semaphore* sem, int val) {
if (sem->value < val) {
LBL_cntWait(sem, val);
} else {
sem->value -= val;
}
}
static inline int __LBL_xIsLocked(struct semaphore* sem) {
return sem->value;
}
static inline void __LBL_xSignal(struct semaphore* sem) {
sem->value = 0;
if (sem->queue) {
LBL_xSignal(sem);
}
}
static inline void __LBL_xWait(struct semaphore* sem) {
if (sem->value) {
LBL_xWait(sem);
} else {
sem->value = -1;
}
}
static nuint32 nssReadEnter;
static nuint32 nssReadExit;
static nuint32 nssGetSizeEnter;
static nuint32 nssGetSizeExit;
static inline unsigned long long shr(unsigned long long val, unsigned int shift) {
return val >> shift;
}
void Case72(struct ncpReqInfo* info, struct ncpSend* send, nuint32 unk, nuint32 reqLen,
void* workspace, nuint32 workspaceLen);
struct fhOffsLen {
nuint16 filehandle_l PACKED;
nuint32 filehandle_h PACKED;
nuint16 rsvd PACKED;
unsigned long long offset PACKED;
unsigned long long length PACKED;
nuint8 data[1];
};
struct fhReq {
nuint16 filehandle_l PACKED;
nuint32 filehandle_h PACKED;
nuint16 rsvd PACKED;
};
static void NWSARead(struct ncpReqInfo* info, struct ncpSend* send, struct fhOffsLen* rq,
void* workspace, nuint32 workspaceLen) {
struct fh* nssFD;
nuint32 connNum;
struct zComnFile zFile;
struct zComnInfo zInfo;
nssReadEnter++;
zFile.fileHandle = rq->filehandle_h;
zFile.nssHandle = 0;
Inst.readRequests++;
connNum = info->conn;
zInfo.errorcode = 0;
zInfo.connection = connNum;
zInfo.conn = NULL;
zInfo.reserved2 = 0;
zInfo.reserved3 = 2;
__LBL_cntWait(&ReserveResource, 32);
if (zFile.nssHandle == NULL) {
nssFD = COMN_DoResolveFileHandle(&zInfo, &zFile);
} else {
nssFD = zFile.nssHandle;
}
if (nssFD) {
if ((nssFD->accessMode & zRR_READ_ACCESS) == 0) {
SetErrno(&zInfo, zERR_NO_READ_PRIVILEGE);
} else {
unsigned long long file_offset;
nuint32 read_length;
unsigned long long file_size;
unsigned long long requestEnd;
unsigned long long pageNumber;
nuint32 firstByte;
struct largeReadControl* lrc;
nuint32 was_read;
struct largeReadControlFrag* lrcf_base;
nuint8 cacheShift;
struct nwconnection* conn;
nuint32 pagesRead;
nuint32 cacheBlockSize;
struct fh2* nssFH2;
struct fh2* nssFH1;
struct semaphore readDoneSema;
struct nxt* fh;
struct largeReadControlFrag* lrcf;
nuint32 readBytes;
file_offset = rq->offset;
read_length = rq->length > 65536 ? 65536 : rq->length;
nssFH1 = nssFD->nssFH;
__LBL_sWait(&nssFH1->sema);
if (((nssFH1->volume->flags & zATTR_COW) == 0) || ((nssFD->x2C & 4) == 0) || ((nssFH2 = nssFH1->altFH) == NULL)) {
nssFH2 = NULL;
file_size = nssFH1->file_size;
} else {
__LBL_sWait(&nssFH2->sema);
file_size = nssFH2->file_size;
}
if (file_size <= file_offset) {
__LBL_cntSignal(&ReserveResource, 32);
if (nssFH2) {
__LBL_sSignal(&nssFH2->sema);
}
__LBL_sSignal(&nssFH1->sema);
*(nuint64*)workspace = 0;
send->ReplyKeep(info, 0, 1, workspace, 8);
goto quit;
}
if (file_size < file_offset + read_length) {
read_length = file_size - file_offset;
}
cacheShift = nssFH1->cacheShift;
cacheBlockSize = 1 << cacheShift;
firstByte = file_offset & (cacheBlockSize - 1);
// asm __volatile__ (" int $3\n");
pageNumber = shr(file_offset, cacheShift);
readBytes = cacheBlockSize - firstByte;
requestEnd = file_offset + read_length - 1;
requestEnd = shr(requestEnd, cacheShift) - pageNumber;
conn = (**NW_connectionTable)[zInfo.connection];
if (requestEnd > conn->maxReadCacheBuf) {
read_length = (conn->maxReadCacheBuf - 1) << cacheShift;
}
if (read_length > conn->ncpDataSize - 8) {
read_length = conn->ncpDataSize - 8;
}
fh = &nssFH1->locks;
if (fh->next != fh) {
if (COMN_IsSharedByteRange(&zInfo, nssFH1, file_offset, read_length)) {
SetErrno(&zInfo, zERR_IOLOCK_ERROR);
if (nssFH2) {
__LBL_sSignal(&nssFH2->sema);
}
__LBL_sSignal(&nssFH1->sema);
goto errexit;
}
}
lrc = conn->largeReadControl;
lrc->info = info;
lrc->connNum = connNum;
lrc->send = send;
lrcf_base = lrc->frags;
lrcf_base->cacheBlock = NULL;
lrcf_base->fragLen = 8;
lrcf_base->fragAddr = lrcf_base->buffer;
*(unsigned long long*)(lrcf_base->buffer) = read_length;
was_read = 0;
readDoneSema.queue = 0;
readDoneSema.value = 0;
readDoneSema.data = &zInfo;
pagesRead = 0;
lrcf = lrcf_base + 1;
while (1) {
struct fh2* nssFH;
struct cacheblk* cacheBlock;
if (readBytes > read_length) {
readBytes = read_length;
}
if (!--PeriodicYieldCount) {
++Inst.readYieldRequests;
PeriodicYieldCount = 16;
CYieldIfNeeded();
}
if (nssFH2 && COMN_ReadSnapOrDontCopyToSnap(nssFH1, pageNumber)) {
nssFH = nssFH2;
} else {
nssFH = nssFH1;
}
cacheBlock = fastReadCache(&nssFH->netwareFH, pageNumber);
if (cacheBlock) {
cacheBlock->pinCount++;
cacheRelease(cacheBlock);
lrcf->cacheBlock = cacheBlock;
lrcf->fragAddr = cacheBlock->address + firstByte;
} else {
struct LB_async* req;
readDoneSema.value++;
req = LB_getAsyncio();
req->errorCode = 0;
req->netwareFH = &nssFH->netwareFH;
req->cacheBlock = NULL;
req->x50 = 0;
req->x54 = 0;
req->frag = lrcf;
req->sema = &readDoneSema;
req->pageNumber = pageNumber;
lrcf->fragAddr = (void*)firstByte;
asyncReadFileBlk(req, readAsyncCallback);
}
lrcf->fragLen = readBytes;
lrcf++;
was_read += readBytes;
read_length -= readBytes;
if (read_length == 0) {
break;
}
pageNumber++;
pagesRead++;
firstByte = 0;
readBytes = 1 << nssFH1->x94;
}
lrc->fragCount = pagesRead + 2;
++nssFH1->opsCount;
if (__LBL_xIsLocked(&readDoneSema)) {
__LBL_xWait(&readDoneSema);
__LBL_xSignal(&readDoneSema);
}
__LBL_cntSignal(&ReserveResource, 32);
if (nssFH2) {
__LBL_sSignal(&nssFH2->sema);
}
__LBL_sSignal(&nssFH1->sema);
if (zInfo.errorcode) {
COMN_Release(&nssFH1);
/* __LBL_cntSignal(&ReserveResource, 32); */
releaseReadReply(lrc);
send->ReplyKeepNoFragments(info, NSS2NCPError(zERR_HARD_READ_ERROR));
goto quit;
}
Inst.readBytes += was_read;
if (zInfo.conn) {
zInfo.conn->bytesRead += was_read;
}
// asm __volatile__ (" int $3\n");
send->ReplyReleaseWithFragments(connNum, info, sendDone);
if (pagesRead == pageNumber - nssFD->nextReadAheadPage) {
if (pagesRead) {
nssFD->x2D >>= pagesRead;
nssFD->nextReadAheadPage = pageNumber + 1;
}
if (nssFD->x2D == 0) {
asyncReadAhead(nssFD);
}
}
COMN_Release(&nssFH1);
goto quit;
}
}
errexit:;
__LBL_cntSignal(&ReserveResource, 32);
send->ReplyKeepNoFragments(info, NSS2NCPError(zInfo.errorcode));
quit:;
COMN_DoReleaseFileHandleIDP(&zInfo, &zFile);
nssReadExit++;
return;
}
static void NWSAGetSize(struct ncpReqInfo* info, struct ncpSend* send, struct fhReq* rq,
void* workspace, nuint32 workspaceLen) {
struct fh* nssFD;
nuint32 connNum;
struct zComnFile zFile;
struct zComnInfo zInfo;
nssGetSizeEnter++;
zFile.fileHandle = rq->filehandle_h;
zFile.nssHandle = 0;
connNum = info->conn;
zInfo.errorcode = 0;
zInfo.connection = connNum;
zInfo.conn = NULL;
zInfo.reserved2 = 0;
zInfo.reserved3 = 2;
__LBL_cntWait(&ReserveResource, 32);
if (zFile.nssHandle == NULL) {
nssFD = COMN_DoResolveFileHandle(&zInfo, &zFile);
} else {
nssFD = zFile.nssHandle;
}
if (nssFD) {
struct fh2* nssFH2;
struct fh2* nssFH1;
nssFH1 = nssFD->nssFH;
__LBL_sWait(&nssFH1->sema);
if (((nssFH1->volume->flags & zATTR_COW) == 0) || ((nssFD->x2C & 4) == 0) || ((nssFH2 = nssFH1->altFH) == NULL)) {
nssFH2 = NULL;
*(nuint64*)workspace = nssFH1->file_size;
} else {
__LBL_sWait(&nssFH2->sema);
*(nuint64*)workspace = nssFH2->file_size;
}
__LBL_cntSignal(&ReserveResource, 32);
if (nssFH2) {
__LBL_sSignal(&nssFH2->sema);
}
__LBL_sSignal(&nssFH1->sema);
send->ReplyKeep(info, 0, 1, workspace, 8);
} else {
__LBL_cntSignal(&ReserveResource, 32);
send->ReplyKeepNoFragments(info, NSS2NCPError(zInfo.errorcode));
}
COMN_DoReleaseFileHandleIDP(&zInfo, &zFile);
nssGetSizeExit++;
return;
}
static void nss64NCP(struct ncpReqInfo* i, struct ncpSend* ncpsend, nuint32 unknown, nuint32 reqLen,
void* workspace, nuint32 workspaceLen) {
nuint32 err;
struct nwconnection* conn;
conn = (**NW_connectionTable)[i->conn];
/* Why this happens?! Netware's NCP write suffers from this bug too - you can force it to
write random parts of memory to disk by issuing write command which says that
60KB of data is going to be written... MTU..60000 bytes will contain random garbage */
/* We prevent this by truncating request */
err = 0x7E;
// asm __volatile__ (" int $3\n");
if (reqLen < offsetof(struct ncpReqInfo, request) + 2) {
goto errquit;
}
reqLen -= offsetof(struct ncpReqInfo, request) - 2;
if (reqLen > conn->ncpDataSize - 8) {
if (i->request[1] == 2) {
reqLen = conn->ncpDataSize - 8;
} else {
goto errquit;
}
}
switch (i->request[1]) {
case 1:
if (reqLen < 8 + 8 + 8) {
break;
}
{
struct fhOffsLen* rq = (struct fhOffsLen*)(i->request + 2);
err = 0xFF;
if (rq->rsvd != 0) {
break;
}
err = 0x84;
if (((rq->filehandle_l - 1U) & 0xFFFF) != (rq->filehandle_h & 0xFFFF)) {
break;
}
if (!(rq->filehandle_h & 0x80000000U)) {
/* only NSS handles allowed... We have to do some fallback here... */
break;
}
NWSARead(i, ncpsend, rq, workspace, workspaceLen);
}
return;
case 2:
if (reqLen < 8 + 8 + 8) {
break;
}
reqLen -= 24;
{
struct zComnInfo info;
struct zComnFile file;
struct zComnPosition pos;
struct fhOffsLen* rq = (struct fhOffsLen*)(i->request + 2);
// asm __volatile__ (" int $3\n");
if (rq->length > reqLen) {
rq->length = reqLen;
}
err = 0xFF;
if (rq->rsvd != 0) {
break;
}
err = 0x84;
if (((rq->filehandle_l - 1U) & 0xFFFF) != (rq->filehandle_h & 0xFFFF)) {
break;
}
if (!(rq->filehandle_h & 0x80000000U)) {
/* only NSS handles allowed... We have to do some fallback here... */
break;
}
Inst.writeRequests++;
info.errorcode = 0;
info.connection = i->conn;
info.conn = NULL;
info.reserved2 = 0;
info.reserved3 = 2;
file.fileHandle = rq->filehandle_h;
file.nssHandle = NULL;
pos.written = 0;
if (rq->length) {
pos.offset = rq->offset;
pos.length = rq->length;
pos.buffer = rq->data;
pos.reserved1 = 0;
COMN_Write(&info, &pos, &file);
Inst.writtenBytes += pos.written;
if (info.conn) {
info.conn->bytesWritten += pos.written;
}
} else {
COMN_SetDataSize(&info, &file, rq->offset, 0);
}
if (info.errorcode) {
ncpsend->ReplyKeepNoFragments(i, NSS2NCPError(info.errorcode));
} else {
unsigned long long len = pos.written;
ncpsend->ReplyKeep(i, 0, 1, &len, sizeof(len));
}
COMN_DoReleaseFileHandleIDP(&info, &file);
}
return;
case 3:
if (reqLen < 8) {
break;
}
{
struct fhReq* rq = (struct fhReq*)(i->request + 2);
err = 0xFF;
if (rq->rsvd != 0) {
break;
}
err = 0x84;
if (((rq->filehandle_l - 1U) & 0xFFFF) != (rq->filehandle_h & 0xFFFF)) {
break;
}
if (!(rq->filehandle_h & 0x80000000U)) {
/* only NSS handles allowed... We have to do some fallback here... */
break;
}
NWSAGetSize(i, ncpsend, rq, workspace, workspaceLen);
}
return;
default:
break;
}
errquit:;
ncpsend->ReplyKeepNoFragments(i, err);
}
static void termFn(int dummy) {
if (ncpHooked) {
ncpHooked = 0;
ReleaseNCPVerb(NCPRTag, NCP_NSS64Verb);
}
}
int main(int argc, char* argv[]) {
int err;
signal(SIGINT, termFn);
signal(SIGTERM, termFn);
InitNSS2NCPErrorTable();
nlmHandle = GetNLMHandle();
// AllocRTag = AllocateResourceTag(nlmHandle, "Buffer memory", AllocSignature);
NCPRTag = AllocateResourceTag(nlmHandle, "64-bit Linux NCP calls", NCPVerbRTag);
err = HookNCPVerb(NCPRTag, NCP_NSS64Verb, nss64NCP);
if (err) {
printf("Cannot hook NCP 0x%02X, error = %u!\r\n", NCP_NSS64Verb, err);
return 0;
}
ncpHooked = 1;
ExitThread(TSR_THREAD, 0);
}

22
contrib/nss64/ncphook.def Normal file
View File

@@ -0,0 +1,22 @@
SCREENNAME "none"
VERSION 1 0 1
COPYRIGHT "(c) 2001 Petr Vandrovec"
DESCRIPTION "NCPs for 64bit file access"
OS_DOMAIN
PSEUDOPREEMPTION
IMPORT memset,printf,signal
IMPORT _SetupArgv,_StartNLM,_TerminateNLM
IMPORT AllocateResourceTag,ExitThread,GetNLMHandle,CYieldIfNeeded
IMPORT HookNCPVerb,ReleaseNCPVerb
IMPORT COMN_Write,COMN_SetDataSize,COMN_DoReleaseFileHandleIDP,COMN_Release
IMPORT COMN_IsSharedByteRange,COMN_DoResolveFileHandle,COMN_ReadSnapOrDontCopyToSnap
IMPORT asyncReadAhead,asyncReadFileBlk,fastReadCache,mailInterrupt
IMPORT cacheUnpinned,cacheRelease
IMPORT LB_getAsyncio,LB_freeAsyncio
IMPORT LBL_sSignal,LBL_sWait,LBL_cntSignal,LBL_cntWait,LBL_xSignal,LBL_xWait
IMPORT SetErrno
IMPORT ReserveResource,NW_connectionTable,PeriodicYieldCount
#MODULE CLIB,MBNWSA
INPUT prelude.o
INPUT ncphook.o
OUTPUT ncphook.nlm

223
contrib/nss64/ncphook.h Normal file
View File

@@ -0,0 +1,223 @@
#ifndef __NCP_HOOK_H__
#define __NCP_HOOK_H__
#include <ntypes.h>
#include <nwtypes.h>
typedef unsigned long long nuint64;
LONG AllocateResourceTag(LONG NLMHandle, const unsigned char* description, LONG resourceType);
unsigned int GetNLMHandle(void);
void* Alloc(LONG len, nuint32 rTag);
#define PACKED __attribute__((packed))
#define NCPVerbRTag 0x5650434E
struct ncpReqInfo {
nuint8 reserved1[33] PACKED;
nuint16 conn PACKED;
nuint8 task PACKED;
nuint8 request[1] PACKED;
};
struct ncpConnInfo {
nuint8 reserved1[0x86] PACKED;
nuint32 bytesRead PACKED;
nuint32 bytesWritten PACKED;
};
struct ncpSend {
void (*ReplyKeep)(struct ncpReqInfo*, nuint32 error, nuint32 fragCount, void* addr, nuint32 len, ...);
void (*ReplyDisgard)(struct ncpReqInfo*, nuint32 error, nuint32 fragCount, void* addr, nuint32 len, ...);
void (*ReplyKeepNoFragments)(struct ncpReqInfo*, nuint32 error);
void* (*GetReplyKeepBuffer)(struct ncpReqInfo*);
void (*ReplyKeepBufferFilledOut)(struct ncpReqInfo*, nuint32 len);
void (*ReplyKeepNoFragmentsWithStation)(nuint32 conn, nuint32 error);
void (*ReplyUsingAllocBuffer)(struct ncpReqInfo*, nuint32 error, void* base, nuint32 len);
void (*ReplyKeepWithBufferAndFreePtr)(struct ncpReqInfo*, nuint32 error, void* toFree, nuint32 fragCount, void* addr, nuint32 len, ...);
void (*ReplyReleaseWithFragments)(nuint32 conn, struct ncpReqInfo*, void (*fn)());
};
nuint32 HookNCPVerb(nuint32 rTag, nuint32 ncpVerb, void (*ncpFunc)(struct ncpReqInfo*, struct ncpSend*, nuint32, nuint32 reqLen,
void* workspace, nuint32 workspaceLen));
nuint32 ReleaseNCPVerb(nuint32 rTag, nuint32 ncpVerb);
struct cacheblk {
void* address PACKED;
nuint8 y4[0x7B-0x04] PACKED;
nuint8 pinCount PACKED;
};
void cacheUnpinned(struct cacheblk*);
struct ncpSendCacheCB {
nuint8 y0[0x24-0x00] PACKED;
nuint32 connNum PACKED;
};
struct largeReadControlFrag {
nuint8 y0[0x04-0x00] PACKED;
void* fragAddr PACKED;
struct cacheblk* cacheBlock PACKED;
nuint32 fragLen PACKED;
nuint8 y10[0x14-0x10] PACKED;
nuint8 buffer[12] PACKED;
};
struct largeReadControl {
struct ncpReqInfo* info PACKED;
nuint32 connNum PACKED;
struct ncpSend* send PACKED;
nuint8 y0C[0x14-0x0C] PACKED;
nuint32 fragCount PACKED;
nuint32 y18 PACKED;
struct largeReadControlFrag frags[0] PACKED;
};
struct semaphore {
void* queue PACKED;
int value PACKED;
void* data PACKED;
};
struct nxt {
struct nxt* next PACKED;
};
struct nssVolume {
nuint8 y[0x168-0x00] PACKED;
nuint32 flags PACKED;
};
struct fh2 {
nuint8 y0[0x08-0x00] PACKED;
unsigned long long file_size PACKED;
nuint8 y10[0x14-0x10] PACKED;
nuint8 cacheShift PACKED;
nuint8 y15[0x1C-0x15] PACKED;
nuint32 opsCount PACKED;
nuint8 y20[0x38-0x20] PACKED;
struct fh2* altFH PACKED;
nuint8 y3C[0x44-0x3C] PACKED;
struct nssVolume* volume PACKED;
nuint8 y48[0x4C-0x48] PACKED;
nuint32 netwareFH PACKED;
nuint8 y50[0x60-0x50] PACKED;
struct semaphore sema PACKED;
nuint8 y6C[0x94-0x6C] PACKED;
nuint8 x94 PACKED;
nuint8 y95[0xD8-0x95] PACKED;
struct nxt locks PACKED;
};
struct fh {
nuint8 y0[0x0C-0x00] PACKED;
struct fh2* nssFH PACKED;
nuint8 y10[0x24-0x10] PACKED;
nuint32 accessMode PACKED;
nuint8 y28[0x2C-0x28] PACKED;
nuint8 x2C PACKED;
nuint8 x2D PACKED;
nuint8 y2E[0x38-0x2E] PACKED;
nuint32 nextReadAheadPage PACKED;
};
struct zComnInfo {
nuint32 errorcode PACKED;
nuint32 connection PACKED;
struct ncpConnInfo* conn PACKED;
nuint32 reserved2 PACKED;
nuint32 reserved3 PACKED;
};
struct zComnPosition {
unsigned long long offset PACKED;
nuint32 length PACKED;
void* buffer PACKED;
nuint32 reserved1 PACKED;
nuint32 written PACKED;
};
struct zComnFile {
nuint32 fileHandle PACKED;
struct fh* nssHandle PACKED;
};
struct nwconnection {
nuint8 y0[0x180] PACKED;
nuint32 maxReadCacheBuf PACKED;
struct largeReadControl* largeReadControl PACKED;
nuint32 ncpDataSize PACKED;
};
struct LB_async {
nuint8 y0[0x0C-0x00] PACKED;
struct semaphore* sema PACKED;
nuint8 y10[0x3C-0x10] PACKED;
nuint32 errorCode PACKED;
nuint32* netwareFH PACKED;
struct cacheblk* cacheBlock PACKED;
nuint8 y48[0x4C-0x48] PACKED;
nuint32 pageNumber PACKED;
nuint32 x50 PACKED;
nuint8 x54 PACKED;
nuint8 y55[0x6C-0x55] PACKED;
struct largeReadControlFrag* frag PACKED;
};
struct {
nuint8 y0[0x54-0x00] PACKED;
nuint32 readYieldRequests PACKED;
nuint8 y58[0x5C-0x58] PACKED;
nuint32 readRequests PACKED;
nuint32 writeRequests PACKED;
nuint32 readBytes PACKED;
nuint32 writtenBytes PACKED;
} Inst;
extern struct nwconnection* (**NW_connectionTable)[];
extern struct semaphore ReserveResource;
extern int PeriodicYieldCount;
extern void LBL_sSignal(struct semaphore*);
extern void LBL_sWait(struct semaphore*);
extern void LBL_cntSignal(struct semaphore*, int);
extern void LBL_cntWait(struct semaphore*, int);
extern void LBL_xSignal(struct semaphore*);
extern void LBL_xWait(struct semaphore*);
extern void mailInterrupt(void (*)(struct cacheblk*), struct cacheblk*);
extern struct cacheblk* fastReadCache(nuint32*, nuint32 block);
extern void asyncReadFileBlk(struct LB_async*, void (*)(struct LB_async*));
extern void cacheRelease(struct cacheblk*);
extern void asyncReadAhead(struct fh*);
extern void SetErrno(struct zComnInfo*, nuint32 nssErrorCode);
extern void CYieldIfNeeded(void);
extern void LB_freeAsyncio(struct LB_async*);
extern struct LB_async* LB_getAsyncio(void);
extern void COMN_Write(struct zComnInfo*, struct zComnPosition*, struct zComnFile*);
extern void COMN_SetDataSize(struct zComnInfo*, struct zComnFile*, unsigned long long offs, nuint32 flags);
extern struct fh* COMN_DoResolveFileHandle(struct zComnInfo*, struct zComnFile*);
extern void COMN_DoReleaseFileHandleIDP(struct zComnInfo*, struct zComnFile*);
extern int COMN_IsSharedByteRange(struct zComnInfo*, struct fh2*, unsigned long long offs, unsigned long long len);
extern int COMN_ReadSnapOrDontCopyToSnap(struct fh2*, unsigned int page);
extern void COMN_Release(struct fh2**);
#define zRR_READ_ACCESS 0x00000001
#define zERR_HARD_READ_ERROR 20101
#define zERR_NO_READ_PRIVILEGE 20861
#define zERR_IOLOCK_ERROR 20900
#define zATTR_COW 0x00040000
#define NCP_NSS64Verb 0xE5
#endif /* __NCP_HOOK_H__ */

49
contrib/nss64/prelude.c Normal file
View File

@@ -0,0 +1,49 @@
/*
* prelude.c
* Copyright (c) 2001 Petr Vandrovec <vandrove@vc.cvut.cz>
*
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
extern void _TerminateNLM(unsigned int, unsigned int, unsigned int);
extern int _SetupArgv(void*);
extern int _StartNLM(void*, void*, const char*,
const char*, unsigned int, void*,
int (*)(), unsigned int, unsigned int,
unsigned int*, void*);
extern int main(int argc, char* argv[]);
/* unsigned int _argc = 0; */
static unsigned int NLMID = 0;
static int _cstart_(void) {
return _SetupArgv(main);
}
void _Stop(void) {
_TerminateNLM(NLMID, 0, 5);
}
unsigned int _Prelude(void* NLMHandle, void* errorScreen, const char* commandLine,
const char* loadDirectoryPath,
unsigned int uninitializedDataLength, void* NLMFileHandle,
int (*readRoutineP)(), unsigned int customDataOffset,
unsigned int customDataSize) {
return _StartNLM(NLMHandle, errorScreen, commandLine, loadDirectoryPath,
uninitializedDataLength, NLMFileHandle, readRoutineP, customDataOffset,
customDataSize, &NLMID, _cstart_);
}

View File

@@ -0,0 +1,48 @@
INSTALLATION:
CONTENT OF THE ZIP:
Directories:
REALDS8: snapin that recognizes NDS8 Unix attributes see the README inside.
PAMNCP REG Registry entries to add this snapin to current user.
PAMNCP DLL The actual snapin DLL
DUMMYDS8: snapin for testing on DS7 with dummy attributes (LINUX:*), see the README inside.
PAMNCP REG Registry entries to add this snapin to current user.
PAMNCP DLL The actual snapin DLL
DLLS: modules were compiled with BC++4.5. Make sure that you have CW3215.DLL
if you are going to use precompiled modules.
Source code are for Borland C 4.5.
I am not sure that the snapin code can be provided under GPL since it
use the copyrighted NDSK API calls and the toolbox to make "snapins".
If you need to recompile , you must have subscribed to developer.novell.com (free)
to be able to download the latest NDK for C.
As far as the snapin toolkit, it can be found at the follwing place:
------------------------------------------------------------------------
http://developer.novell.com/graveyard/index.htm
"downloads from this page are provided as a courtesy to our development
community. From this page, you can access utilities, APIs, and some source
code for items"that are no longer in active development at Novell."
-------------------------------------------------------------------------
Unzip this file to a temporary directory and proceed as follow, depending of your version of NWAdmin. If you run several versions of NWAdmin, repeat the process for each one.
NWADMIN95.EXE:
1. copy the appropriate pamncp.dll in the sys:public/win95 of your servers.
2. Check that snapin32.dll AND cw3220.dll are there. If absent, make sure they are in a directory of your path, or copy these files from a recent Novell distribution. To sys:public/win95.
3. Double-click on the pamncp.reg icon to register the snapin in the Current User part of the local registry. Note that this step should be done for every user running this snapin. My solution is to create a NAL application for NWadmin95 and to import the pamncp.reg file into its registry settings page.
NWADMINNT.EXE
1. copy the pamncp.dll in the sys:public/winnt of your servers.
2. steps 2 and 3 are identical to the NWADMIN95.EXE installation.
NWADMIN32:
1. copy the pamncp.dll in the sys:public/win32/snapins directory. No registry entries are needed.
A more complete documentation is **under progress** at
http://cipcinsa.insa-lyon.fr/ppollet/pamncp/
Patrick Pollet
Feb 05/02/2001

View File

@@ -0,0 +1,77 @@
This VERSION of the snapin is for uses on pré-DS8
shcemas
It *may* uses the following Unix properties
that must be created with Schemax
with the following names and syntaxes
and associated to USER and GROUP classes.
If you don't like extending the schema, don't create
theses attributes and stuff everything in L ( Location
attribute) visible on the Identification page of NWADmin.
For USERS:
"LINUX:UID" SYN_INTEGER
"LINUX:Primary GroupName" SYN_DIST_NAME
"LINUX:Primary GroupID" SYN_INTEGER
"LINUX:GID" SYN_INTEGER
"LINUX:Login Shell" SYN_CE_STRING
"LINUX:Home Directory" SYN_CE_STRING
"LINUX:Comments" SYN_CI_STRING
for GROUPS:
"LINUX:GID" SYN_INTEGER
// Either way , the snapin will always try to get *missing* data
// from the L attribute
// Of course NDS8 real or dummy attributes have priority, that is
// if both exists "NDS8" attribute will keep their values and the
// L attribute value will be erased when saving back the NDS.
So you can migrate slowly...
User:
U:nnn Unix UID
G:nnn Unix GID
S:/.../... Unix Shell
H:/.../.... Unix Home
Group:
G:nnn Unix GID
Currently the following attributes recognized by the PAM module
are NOT modifiable by this snapin. You should modify them
using the "built-in" string editor of NWADmin under the Identification Page
( Location attribute):
User:
O: Unix or NDS name of other group ( if that group is a NDS name
and has a N:nnnn attribute, this value will be used for
translation to Unix name, otherwise, a "proper Unix name"
will be made from the NDS one ( remove context part,
skip all spaces and illegal chars and prepend a Z if its
starts by a digit ( this is required by useradd/usermod
that misbehave with a group name starting with a digit)
C: Unix comment, added to the Gecos field after the full name
(-comma separator added)
P: Primary group name. So far the snapin works with the numeric
Primary Group ID for user's. It may change in the next release.
Of course any other L (location) strings is left untouched by the snapin
( no error message)!
Patrick Pollet
Feb 05/02/2001

Binary file not shown.

2357
contrib/pam-snapin/pamncp.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
LIBRARY PAMNCP
DESCRIPTION 'NWAdmin Snapin for PAM NCP authentication module: 32 bit SnapIn'
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE SINGLE
HEAPSIZE 16000
EXPORTS InitSnapin
SnapinPamNcpProcUser
SnapinPamNcpProcGroup
PamNcpSnapinHelpDlg
PamNcpSnapinTraceDlg

Binary file not shown.

102
contrib/pam-snapin/pamncp.h Normal file
View File

@@ -0,0 +1,102 @@
#ifndef __PAMNCP_H
#define IDC_DEFAULT 196
#define IDC_UNHERITED 197
#define IDC_VERSION 198
#define IDC_VERSION_NUM 199
#define IDC_EDIT_UID 200
#define IDC_EDIT_HOME 201
#define IDC_EDIT_GID 202
#define IDC_COMBO_SHELL 203
#define IDC_EDIT_SHELL 204
#define IDC_BASIC 205
#define IDC_UID_LBL 210
#define IDC_HOME_LBL 211
#define IDC_SHELL_LBL 212
#define IDC_GID_LBL 213
#define IDC_GNAME_LBL 214
#define IDC_EDIT_GNAME 215
#define IDC_EDIT_GID1 216
#define IDC_GID1_LBL 217
#define IDC_ZF_A 102
#define IDC_ZF_B 103
#define IDC_ZF_C 104
#define IDC_ZF_D 105
#define IDC_ZF_E 106
#define IDC_ZF_F 107
#define IDC_ZF_G 108
#define IDC_ZF_H 109
#define IDC_ZF_I 110
#define IDC_ZF_J 111
#define IDC_ZF_K 112
#define IDC_ZF_L 113
#define IDC_ZF_M 114
#define IDC_ZF_O 115
#define IDC_ZF_N 116
#define IDC_ZF_P 117
#define IDC_ZF_Q 118
#define IDC_ZF_R 119
#define IDC_ZF_S 120
#define IDC_ZF_T 121
#define IDC_ZF_U 122
#define IDC_ZF_V 123
#define IDC_ZF_W 124
#define IDC_ZF_X 125
#define IDC_ZF_Y 126
#define IDC_ZF_Z 127
#define IDC_ZF_0 128
#define IDC_ZF_1 129
#define IDC_ZF_2 130
#define IDC_ZF_3 131
#define IDC_ZF_4 132
#define IDC_ZF_5 133
#define IDC_ZF_1H 165
#define IDC_ZF_2H 164
#define IDC_ZF_3H 163
#define IDC_ZF_4H 162
#define IDC_ZF_5H 161
#define IDC_ZF_0H 160
#define IDC_ZF_ZH 159
#define IDC_ZF_YH 158
#define IDC_ZF_XH 157
#define IDC_ZF_WH 156
#define IDC_ZF_VH 155
#define IDC_ZF_UH 154
#define IDC_ZF_TH 153
#define IDC_ZF_SH 152
#define IDC_ZF_RH 151
#define IDC_ZF_QH 150
#define IDC_ZF_PH 149
#define IDC_ZF_OH 148
#define IDC_ZF_NH 147
#define IDC_ZF_MH 146
#define IDC_ZF_LH 145
#define IDC_ZF_KH 144
#define IDC_ZF_JH 143
#define IDC_ZF_IH 142
#define IDC_ZF_HH 141
#define IDC_ZF_GH 140
#define IDC_ZF_FH 139
#define IDC_ZF_EH 138
#define IDC_ZF_DH 137
#define IDC_ZF_CH 136
#define IDC_ZF_BH 135
#define IDC_ZF_AH 134
#define IDC_MEMO 300
#define IDC_ADD_LINE 400
#define __PAMNCP_H
#endif

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,147 @@
#
# Borland C++ IDE generated makefile
#
.AUTODEPEND
#
# Borland C++ tools
#
IMPLIB = Implib
BCC32 = Bcc32 +BccW32.cfg
TLINK32 = TLink32
TLIB = TLib
BRC32 = Brc32
TASM32 = Tasm32
#
# IDE macros
#
#
# Options
#
IDE_LFLAGS32 = -LC:\BC45\LIB
IDE_RFLAGS32 =
LLATW32_pamncpdlib = -Tpd -aa -c -LC:\BC45\LIB;C:\NOVELL\NDS\NWSDK\LIB\WIN32\BORLAND
RLATW32_pamncpdlib = -w32
BLATW32_pamncpdlib =
CNIEAT_pamncpdlib = -IC:\BC45\INCLUDE;C:\NOVELL\NDK\NWSDK\INCLUDE -D_RTLDLL;_BIDSDLL;_OWLDLL;_OWLALLPCH;
LNIEAT_pamncpdlib = -x
LEAT_pamncpdlib = $(LLATW32_pamncpdlib)
REAT_pamncpdlib = $(RLATW32_pamncpdlib)
BEAT_pamncpdlib = $(BLATW32_pamncpdlib)
CLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbcalwin32dlib =
LLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbcalwin32dlib =
RLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbcalwin32dlib =
BLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbcalwin32dlib =
CEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbcalwin32dlib = $(CEAT_pamncpdlib) $(CLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbcalwin32dlib)
CNIEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbcalwin32dlib = -IC:\BC45\INCLUDE;C:\NOVELL\NDK\NWSDK\INCLUDE -D_RTLDLL;_BIDSDLL;_OWLDLL;_OWLALLPCH;
LNIEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbcalwin32dlib = -x
LEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbcalwin32dlib = $(LEAT_pamncpdlib) $(LLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbcalwin32dlib)
REAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbcalwin32dlib = $(REAT_pamncpdlib) $(RLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbcalwin32dlib)
BEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbcalwin32dlib = $(BEAT_pamncpdlib) $(BLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbcalwin32dlib)
CLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbclxwin32dlib =
LLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbclxwin32dlib =
RLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbclxwin32dlib =
BLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbclxwin32dlib =
CEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbclxwin32dlib = $(CEAT_pamncpdlib) $(CLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbclxwin32dlib)
CNIEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbclxwin32dlib = -IC:\BC45\INCLUDE;C:\NOVELL\NDK\NWSDK\INCLUDE -D_RTLDLL;_BIDSDLL;_OWLDLL;_OWLALLPCH;
LNIEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbclxwin32dlib = -x
LEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbclxwin32dlib = $(LEAT_pamncpdlib) $(LLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbclxwin32dlib)
REAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbclxwin32dlib = $(REAT_pamncpdlib) $(RLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbclxwin32dlib)
BEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbclxwin32dlib = $(BEAT_pamncpdlib) $(BLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbclxwin32dlib)
CLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandblocwin32dlib =
LLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandblocwin32dlib =
RLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandblocwin32dlib =
BLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandblocwin32dlib =
CEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandblocwin32dlib = $(CEAT_pamncpdlib) $(CLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandblocwin32dlib)
CNIEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandblocwin32dlib = -IC:\BC45\INCLUDE;C:\NOVELL\NDK\NWSDK\INCLUDE -D_RTLDLL;_BIDSDLL;_OWLDLL;_OWLALLPCH;
LNIEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandblocwin32dlib = -x
LEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandblocwin32dlib = $(LEAT_pamncpdlib) $(LLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandblocwin32dlib)
REAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandblocwin32dlib = $(REAT_pamncpdlib) $(RLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandblocwin32dlib)
BEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandblocwin32dlib = $(BEAT_pamncpdlib) $(BLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandblocwin32dlib)
CLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbnetwin32dlib =
LLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbnetwin32dlib =
RLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbnetwin32dlib =
BLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbnetwin32dlib =
CEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbnetwin32dlib = $(CEAT_pamncpdlib) $(CLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbnetwin32dlib)
CNIEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbnetwin32dlib = -IC:\BC45\INCLUDE;C:\NOVELL\NDK\NWSDK\INCLUDE -D_RTLDLL;_BIDSDLL;_OWLDLL;_OWLALLPCH;
LNIEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbnetwin32dlib = -x
LEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbnetwin32dlib = $(LEAT_pamncpdlib) $(LLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbnetwin32dlib)
REAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbnetwin32dlib = $(REAT_pamncpdlib) $(RLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbnetwin32dlib)
BEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbnetwin32dlib = $(BEAT_pamncpdlib) $(BLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbnetwin32dlib)
CLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbsnapin32dlib =
LLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbsnapin32dlib =
RLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbsnapin32dlib =
BLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbsnapin32dlib =
CEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbsnapin32dlib = $(CEAT_pamncpdlib) $(CLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbsnapin32dlib)
CNIEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbsnapin32dlib = -IC:\BC45\INCLUDE;C:\NOVELL\NDK\NWSDK\INCLUDE -D_RTLDLL;_BIDSDLL;_OWLDLL;_OWLALLPCH;
LNIEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbsnapin32dlib = -x
LEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbsnapin32dlib = $(LEAT_pamncpdlib) $(LLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbsnapin32dlib)
REAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbsnapin32dlib = $(REAT_pamncpdlib) $(RLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbsnapin32dlib)
BEAT_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbsnapin32dlib = $(BEAT_pamncpdlib) $(BLATW16_ddbddbddbnovellbndkbnwsdkblibbwin32bborlandbsnapin32dlib)
#
# Dependency List
#
Dep_pamncp = \
pamncp.lib
pamncp : BccW32.cfg $(Dep_pamncp)
echo MakeNode
pamncp.lib : pamncp.dll
$(IMPLIB) $@ pamncp.dll
Dep_pamncpddll = \
..\..\..\novell\ndk\nwsdk\lib\win32\borland\calwin32.lib\
..\..\..\novell\ndk\nwsdk\lib\win32\borland\clxwin32.lib\
..\..\..\novell\ndk\nwsdk\lib\win32\borland\locwin32.lib\
..\..\..\novell\ndk\nwsdk\lib\win32\borland\netwin32.lib\
..\..\..\novell\ndk\nwsdk\lib\win32\borland\snapin32.lib\
pamncp.obj\
pamncp.def\
pamncp.res
pamncp.dll : $(Dep_pamncpddll)
$(TLINK32) @&&|
/v $(IDE_LFLAGS32) $(LEAT_pamncpdlib) $(LNIEAT_pamncpdlib) +
C:\BC45\LIB\c0d32.obj+
pamncp.obj
$<,$*
..\..\..\novell\ndk\nwsdk\lib\win32\borland\calwin32.lib+
..\..\..\novell\ndk\nwsdk\lib\win32\borland\clxwin32.lib+
..\..\..\novell\ndk\nwsdk\lib\win32\borland\locwin32.lib+
..\..\..\novell\ndk\nwsdk\lib\win32\borland\netwin32.lib+
..\..\..\novell\ndk\nwsdk\lib\win32\borland\snapin32.lib+
C:\BC45\LIB\owlwfi.lib+
C:\BC45\LIB\bidsfi.lib+
C:\BC45\LIB\import32.lib+
C:\BC45\LIB\cw32i.lib
pamncp.def
|
$(BRC32) pamncp.res $<
pamncp.obj : pamncp.c
$(BCC32) -P- -c @&&|
$(CEAT_pamncpdlib) $(CNIEAT_pamncpdlib) -o$@ pamncp.c
|
pamncp.res : pamncp.rc
$(BRC32) $(IDE_RFLAGS32) $(REAT_pamncpdlib) $(CNIEAT_pamncpdlib) -R -FO$@ pamncp.rc
# Compiler configuration file
BccW32.cfg :
Copy &&|
-R
-v
-vi
-H
-H=pamncp.csm
-WD
-H"owl\owlpch.h"
| $@

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,128 @@
/****************************************************************************
PAMNCP.RC
produced by Borland Resource Workshop
*****************************************************************************/
#include "pamncp.h"
PAMNCP_UPAGE DIALOG 11, 21, 271, 249
STYLE 0x4L | WS_CHILD
FONT 8, "MS Sans Serif"
{
LTEXT "Unix uid:", IDC_UID_LBL, 7, 25, 30, 8
EDITTEXT IDC_EDIT_UID, 41, 23, 25, 12, WS_TABSTOP | WS_BORDER
LTEXT "Unix gid:", IDC_GID_LBL, 7, 43, 29, 8
EDITTEXT IDC_EDIT_GID, 41, 41, 25, 12, WS_TABSTOP | WS_BORDER
LTEXT "Unix home:", IDC_HOME_LBL, 90, 24, 37, 9
EDITTEXT IDC_EDIT_HOME, 131, 23, 119, 12, WS_TABSTOP | WS_BORDER
LTEXT "Unix shell:", IDC_SHELL_LBL, 93, 43, 33, 9
COMBOBOX IDC_COMBO_SHELL, 131, 39, 44, 56, CBS_DROPDOWN | WS_TABSTOP
EDITTEXT IDC_EDIT_SHELL, 183, 39, 66, 12, WS_TABSTOP | WS_BORDER | WS_GROUP
AUTOCHECKBOX "&Automount Netware home", IDC_ZF_A, 7, 70, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "&Broadcast mode All", IDC_ZF_B, 7, 81, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "Broadcast mode &Console", IDC_ZF_C, 7, 92, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "&D reserved", IDC_ZF_D, 7, 103, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_DISABLED | WS_TABSTOP
AUTOCHECKBOX "&E reserved", IDC_ZF_E, 7, 114, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "Allow &Ftp access", IDC_ZF_F, 7, 125, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "&G reserved", IDC_ZF_G, 7, 136, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "Allow RS&H access", IDC_ZF_H, 7, 147, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "Create ~/.nw&Infos file", IDC_ZF_I, 7, 158, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "&J reserved", IDC_ZF_J, 7, 169, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "&K reserved", IDC_ZF_K, 7, 180, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "&L reserved", IDC_ZF_L, 7, 191, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_DISABLED | WS_TABSTOP
AUTOCHECKBOX "Forward &Mail", IDC_ZF_M, 7, 202, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "Create ~/.&Nwclient file", IDC_ZF_N, 7, 213, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "&Overwrite ~/.nwclient file", IDC_ZF_O, 7, 224, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "&Password in ~/.nwclient file", IDC_ZF_P, 7, 235, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "&Q reserved", IDC_ZF_Q, 138, 70, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "Allow &Rlogin access", IDC_ZF_R, 138, 81, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "Allow &Samba access", IDC_ZF_S, 138, 92, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "Allow &Telnet access", IDC_ZF_T, 138, 103, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "&U reserved", IDC_ZF_U, 138, 114, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "&Volative account", IDC_ZF_V, 138, 125, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "&W reserved", IDC_ZF_W, 138, 136, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "Allow &X access", IDC_ZF_X, 138, 147, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "&Y reserved", IDC_ZF_Y, 138, 158, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "&Z reserved", IDC_ZF_Z, 138, 169, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "Run zenscript &0 (opening)", IDC_ZF_0, 138, 180, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "Run zenscript &1 (opening)", IDC_ZF_1, 138, 191, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "Run zenscript &2 (opening)", IDC_ZF_2, 138, 202, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "Run zenscript &3 (closing)", IDC_ZF_3, 138, 213, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "Run zenscript &4 (closing)", IDC_ZF_4, 138, 224, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
AUTOCHECKBOX "Run zenscript &5 (closing)", IDC_ZF_5, 138, 235, 96, 10, BS_AUTOCHECKBOX | BS_LEFTTEXT | NOT WS_TABSTOP
LTEXT "Zenux Flags:", -1, 6, 58, 60, 8
LTEXT "Basic Unix properties:", IDC_BASIC, 7, 5, 190, 8
LTEXT "", IDC_VERSION, 195, 6, 22, 8
CONTROL "IDC_EDIT_DIR", -1, "static", SS_GRAYFRAME | WS_CHILD | WS_VISIBLE, 6, 16, 252, 39
CONTROL "", -1, "static", SS_GRAYFRAME | WS_CHILD | WS_VISIBLE, 5, 68, 255, 178
RTEXT "Text", IDC_VERSION_NUM, 200, 4, 47, 9
CONTROL "", -1, "static", SS_GRAYFRAME | WS_CHILD | WS_VISIBLE, 126, 70, 4, 172
AUTOCHECKBOX "", IDC_ZF_AH, 112, 70, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_BH, 112, 81, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_CH, 112, 92, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_DH, 112, 103, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_EH, 112, 114, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_FH, 112, 125, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_GH, 112, 136, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_HH, 112, 147, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_IH, 112, 158, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_JH, 112, 169, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_KH, 112, 180, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_LH, 112, 191, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_MH, 112, 202, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_NH, 112, 213, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_QH, 243, 70, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_RH, 243, 81, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_SH, 243, 92, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_TH, 243, 103, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_UH, 243, 114, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_VH, 243, 125, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_WH, 243, 136, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_XH, 243, 147, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_YH, 243, 158, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_ZH, 243, 169, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_0H, 243, 180, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_1H, 243, 191, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_2H, 243, 202, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_3H, 243, 213, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_OH, 112, 224, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_4H, 243, 224, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_PH, 112, 235, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
AUTOCHECKBOX "", IDC_ZF_5H, 243, 235, 9, 10, BS_AUTOCHECKBOX | NOT WS_TABSTOP | WS_DISABLED
PUSHBUTTON "Show unherited", IDC_UNHERITED, 53, 56, 62, 12, WS_TABSTOP
LTEXT "Unix gid:", IDC_GID1_LBL, 18, 34, 29, 8
EDITTEXT IDC_EDIT_GID1, 52, 32, 25, 12, WS_TABSTOP | WS_BORDER
LTEXT "Unix name:", IDC_GNAME_LBL, 85, 33, 37, 9
EDITTEXT IDC_EDIT_GNAME, 126, 32, 119, 12, WS_TABSTOP | WS_BORDER
PUSHBUTTON "where is the profile", IDC_DEFAULT, 135, 56, 120, 12, BS_LEFTTEXT | WS_TABSTOP
}
HELP_DLG DIALOG 40, 34, 293, 173
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Pam Ncp Snapin Help"
FONT 8, "MS Sans Serif"
{
DEFPUSHBUTTON "OK", IDOK, 126, 150, 50, 14
EDITTEXT IDC_MEMO, 7, 22, 280, 119, ES_MULTILINE | ES_READONLY | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
CTEXT "Text", IDC_VERSION, 36, 6, 220, 8
}
TRACE_DLG DIALOG 40, 34, 293, 173
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Pam Ncp Snapin Trace"
FONT 8, "MS Sans Serif"
{
DEFPUSHBUTTON "OK", IDOK, 126, 150, 50, 14
CTEXT "Text", IDC_VERSION, 36, 6, 220, 8
PUSHBUTTON "Cache", IDC_ADD_LINE, 205, 150, 50, 14, NOT WS_VISIBLE | WS_TABSTOP
EDITTEXT IDC_MEMO, 15, 19, 268, 122, ES_MULTILINE | ES_READONLY | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
}

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,54 @@
This snapin uses the real Unix properties of DS8 and above
with the following names and syntaxes
"UNIX:UID"
"UNIX:Primary GroupName"
"UNIX:Primary GroupID"
"UNIX:GID"
"UNIX:Login Shell"
"UNIX:Comments"
"UNIX:Home Directory"
You can use it on non DS8 schémas in that case, you must stuff
Unix properties in the L attribute ( Location string under thhe
Identification page of NWAdmin32).
Either way , the snapin will always try to get *missing* data
from the L attribute
Of course NDS8 (real or dummy) attributes have priority, that is
if both exists NDS8 attribut will keep their values and the
L attribute value will be erased when saving the NDS.
User:
U:nnn Unix UID
G:nnn Unix GID
S:/.../... Unix Shell
H:/.../.... Unix Home
Group:
G:nnn Unix GID
Currently the following attributes recognized by the PAM module
are NOT modifiable by this snapin. You should modify them
using the "built-in" string editor of NWADmin under the Identification Page
( Location attribute):
User:
O: Unix or NDS name of other group ( if that group is a NDS name
and has a N:nnnn attribute, this value will be used for
translation to Unix name, otherwise, a "proper Unix name"
will be made from the NDS one ( remove context part,
skip all spaces and illegal chars and prepend a Z if its
starts by a digit ( this is required by useradd/usermod
that misbehave with a group name starting with a digit)
C: Unix comment, added to the Gecos field after the full name
(-comma separator added)
P: Primary group name. So far the snapin works with the numeric
Primary Group ID for user's. It may change in the next release.
Of course any other L (location) strings is left untouched by the snapin
( no error message)!
Patrick Pollet
Feb 05/02/2001

Binary file not shown.

339
contrib/pam/COPYING Normal file
View File

@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, 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
Appendix: 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) 19yy <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., 675 Mass Ave, Cambridge, MA 02139, 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) 19yy 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.

63
contrib/pam/Makefile.in Normal file
View File

@@ -0,0 +1,63 @@
#
# Makefile for the linux ncp-filesystem routines.
#
top_srcdir = @top_srcdir@
top_builddir = ../..
include $(top_builddir)/Make.rules
LIBS = @INTLLIBS@ @LIBS@
LIB_PAM_SECURITY = @LIB_PAM_SECURITY@
NCP_LIB = libncp.so
NCPLIB_DIR = ../../lib
PAM_LIBRARY = pam_ncp_auth.so
PAM_OBJECTS = pam_ncp_auth.do support.do
CFLAGS_pam_ncp_auth.do := -DNCPMOUNT_PATH=\"$(bindir)/ncpmount\" -DNCPUMOUNT_PATH=\"$(bindir)/ncpumount\"
.PHONY : all install install-dev dep clean mrproper distclean
.PHONY : default
default:
make -C ../..
all: $(PAM_LIBRARY)
install: all
${INSTALL} -d $(DESTDIR)$(LIB_PAM_SECURITY)
${INSTALL} -m 755 $(PAM_LIBRARY) $(DESTDIR)$(LIB_PAM_SECURITY)
install-dev:
$(NCPLIB_DIR)/$(NCP_LIB):
make -C $(NCPLIB_DIR) $(NCP_LIB)
$(PAM_OBJECTS): %.do: %.c
$(CC) $(CFLAGS) $(CCFLAGS) $(CFLAGS_$@) -fPIC -o $@ -c $<
%.d: %.c
set -e; $(CC) -M $(CFLAGS) $(CCFLAGS) $(CFLAGS_$(@:.d=.do)) $< \
| sed 's,\($*\)\.o[ :]*,\1.o \1.do \1.to $@ : ,g' > $@; \
[ -s $@ ] || rm -f $@
$(PAM_LIBRARY): $(PAM_OBJECTS)
$(CC) $(CFLAGS) -shared -o $@ $(PAM_OBJECTS) -L$(NCPLIB_DIR) -lncp -lpam ${LIBS}
dep:
clean:
rm -f $(PAM_OBJECTS) $(PAM_LIBRARY) *~
mrproper: clean
rm -f *.d
distclean: mrproper
ifeq ($(NEED_DEP),yes)
include $(PAM_OBJECTS:%.do=%.d)
endif

108
contrib/pam/Makefile.pam Normal file
View File

@@ -0,0 +1,108 @@
# $Header$
#
# This Makefile controls a build process of the pam_unix modules
# for Linux-PAM. You should not modify this Makefile.
#
# $Log$
#
#
########################################################################
# some options... uncomment to take effect
########################################################################
ifdef DYNAMIC
#LIBSESSSH = pam_ncp_session.so
LIBAUTHSH = pam_ncp_auth.so
#LIBPASSWDSH = pam_ncp_passwd.so
#LIBACCOUNT = pam_ncp_acct.so
endif
ifdef STATIC
LIBSTATIC = libpam_ncp.o
endif
LIBAUTHOBJ = pam_ncp_auth.o support.o
LIBAUTHSRC = pam_ncp_auth.c support.c
LIBOBJ = $(LIBAUTHOBJ)
LIBSRC = $(LIBAUTHSRC)
LIBSHARED = $(LIBAUTHSH)
LIBOBJD = $(addprefix dynamic/,$(LIBOBJ))
LIBOBJS = $(addprefix static/,$(LIBOBJ))
dynamic/%.o : %.c
$(CC) $(CFLAGS) -Iinclude $(DYNAMIC) $(CPPFLAGS) -c $< -o $@
static/%.o: %.c
$(CC) $(CFLAGS) -Iinclude $(STATIC) $(CPPFLAGS) -c $< -o $@
########################### don't edit below #######################
dummy:
@echo "**** This is not a top-level Makefile "
@echo "**** You need to compile this as part of a PAM source tree. "
exit
info:
@echo
@echo "*** Building pam-unix(alpha) module of the framework..."
@echo
all: dirs info $(LIBSHARED) $(LIBSTATIC) register
dirs:
ifdef DYNAMIC
mkdir -p ./dynamic
endif
ifdef STATIC
mkdir -p ./static
endif
register:
ifdef STATIC
( cd .. ; \
./register_static pam_ncp_auth pam_ncp/$(LIBSTATIC) ; \
)
endif
ifdef DYNAMIC
$(LIBOBJD): $(LIBSRC)
$(LIBAUTHSH): $(LIBAUTHSRC) $(LIBOBJD)
$(CC) -shared -o $@ $(addprefix dynamic/,$(LIBAUTHOBJ)) -lncp
endif
ifdef STATIC
$(LIBOBJS): $(LIBSRC)
$(LIBSTATIC): $(LIBOBJS)
$(CC) -Wl,-r -o $@ $(LIBOBJS) -lncp -nostdlib
#### Following line gives up on my system (P.V.)
#### It works with -L/usr/lib -lncp, but in that case
#### we have to pass this Makefile through configure magic
#### $(LD) -r -o $@ $(LIBOBJS) -lncp
endif
install: all
mkdir -p $(FAKEROOT)$(SECUREDIR)
ifdef DYNAMIC
install -m644 $(LIBSHARED) $(FAKEROOT)$(SECUREDIR)
endif
remove:
cd $(FAKEROOT)$(SECUREDIR) && rm -f $(LIBSHARED)
clean:
rm -f $(LIBOBJD) $(LIBOBJS) a.out core *~
extraclean: clean
rm -f *.a *.out *.o *.so *.bak
.c.o:
$(CC) -c $(CFLAGS) $<

122
contrib/pam/README Normal file
View File

@@ -0,0 +1,122 @@
Why authenticate Linux users against a Netware box?
--------------------------------------------------
The pam_ncp_auth module is designed for use in environments where users have
already been given Netware accounts and the requirement to have two separate
passwords would be a barrier to the deployment of Linux.
A pam_ncp_passwd module allowing users to also change their passwords is also
planned.
How come it only took a few hours to put it together from scratch?
-----------------------------------------------------------------
This module is based on the ncpfs utilities developed by Volker Lendecke,
and is dynamically linked to the library routines contained therein. Therefore,
the ncpfs utilities are a prerequisite for compiling this module.
The most up-to-date version of the utilities can generally be found at
ftp://platan.vc.cvut.cz/pub/linux/ncpfs/latest
It is my intention to make this module stand alone, for simplicity and for
licensing reasons.
Configuration
-------------
The pam_ncp_auth module recognises one option, which is required (and may
be repeated):
"server=<ServerName>" or "server=<ServerName>/<GroupName>"
Except that, it recoginzes couple of options:
-d : turn on debugging output
-v : display reasons login failures on terminal (default)
-q : do not display login failures
-s : disallow SUPERVISOR from logging-in
-S : disallow SUPERVISOR equivalent from logging-in (NYI)
-uMIN,MAX,CFLAGS,MFLAGS : parameters for user creation
-gMIN,MAX,CFLAGS : parameters for group creation
If you are using variant "server=<ServerName>/<GroupName>", <GroupName>
must be fully distinguished name of Group and <ServerName> must have
at least read-only replica of logging-in user (to be fixed...).
This module is designed to run alongside locally stored passwords. For example,
my /etc/pam.d/login file during testing looked like this:
auth required /lib/security/pam_securetty.so
auth requisite /lib/security/pam_nologin.so
auth sufficient /lib/security/pam_pwdb.so shadow nullok
auth required /lib/security/pam_ncp_auth.so use_first_pass server=ROB-SERVER
This has the effect that users are only looked up on the Netware server if the
password they type fails to match the locally stored password. Hence local-only
users (such as root) are supported in this configuration.
David Woodhouse <Dave@imladris.demon.co.uk>
4/3/98
Users and groups creation
-------------------------
User creation is enabled by non-empty CFLAGS option in -u parameter.
CFLAGS can consist of one or more following letters:
r : When creating user, it must take uid from UNIX:UID property. If uid
is already used, or object does not have UNIX:UID property, user is
not allowed to login.
p : When creating user, preffer uid from UNIX:UID property.
n : When inventing uid for new user, take one which is one greater than
highest used uid in MIN,MAX range.
f : When inventing uid for new user, take first unused in MIN,MAX range.
If you specify both 'r' and 'p', or both 'n' and 'f', behavior is undefined.
User modification is enabled by non-empty MFLAGS option in -u parameter.
MFLAGS can consist of one or more following letters:
g : Update user's primary gid according to NDS database.
c : Update user's gecos (comment, full name) according to NDS database.
d : Update user's home directory according to NDS database.
s : Update user's shell according to NDS database.
NDS background
--------------
If -g,,r or -g,,p is specified, group's UNIX:GID attribute is read from
NDS. If attribute does not exist, and 'r' was not used, new gid is invented
according to min, max and n/f values in -g option.
If -u,,r or -u,,p is specified, user's UNIX:UID attribute is read from
NDS. If attribute does not exist, and 'r' was not used, new uid is invented
according to min, max and n/f values in -g option.
During user creation, home directory is retrieved from UNIX:Home Directory,
login shell from UNIX:Login Shell. If UNIX:Home Directory does not exist,
/home/$cn is used as home directory for user. If UNIX:Login Shell does not
exist, /bin/bash is used.
OK, to get it to work on my Debian - potato box, I have to use following
items in /etc/pam.d/login:
#%PAM-1.0
#[For version 1.0 syntax, the above header is optional]
#
# The PAM configuration file for the `login' service
#
auth requisite pam_securetty.so
auth required pam_env.so
auth required pam_nologin.so
auth optional pam_group.so
auth sufficient pam_unix.so
auth sufficient pam_ncp_auth.so use_first_pass server=CDROM/VANA.LINUXES.VC.CVUT.CZ
auth required pam_deny.so
account requisite pam_time.so
account required pam_unix.so
session required pam_unix.so
session optional pam_motd.so
session optional pam_mail.so
session optional pam_lastlog.so
password required pam_unix.so
Petr Vandrovec <vandrove@vc.cvut.cz>
9/23/99

57
contrib/pam/install-to-PAM Executable file
View File

@@ -0,0 +1,57 @@
#!/bin/sh
INCLDIR=../../include
if [ "$1" = "-y" ]; then
REMOVE=/bin/true
shift
else
REMOVE=/bin/false
fi
if [ $# -ne 1 ]; then
echo "usage: install-to-PAM pam-directory"
echo ""
echo "Run this program if you want to place this code into PAM tree"
echo "Usual value for pam-directory is /usr/src/pam-0.66/Linux-PAM/modules"
echo ""
echo "Due to strangeness of static PAM modules do not forget, that static"
echo "module links together with static libncp, resulting in very big"
echo "object file (60KB without debugging info, 500KB with)."
echo ""
echo "Also, do not forget to do 'make install-dev' in ncpfs tree before"
echo "compiling PAM modules."
exit 1
fi
DEST=$1
if [ ! -d $DEST/. ]; then
echo "$DEST does not exist or is not directory"
exit 1
fi
if [ ! -f $DEST/register_static ]; then
echo "$DEST is not module directory of PAM suite"
exit 1
fi
if [ ! -f pam_ncp_auth.c ]; then
echo "You must run this program from ncp_pam_auth plugin directory"
exit 1
fi
DESTD=$DEST/pam_ncp_auth
if [ -d $DESTD ]; then
if $REMOVE ; then
echo "Removing old code from $DESTD"
rm -rf $DESTD
else
echo "pam_ncp_auth is already present in $DEST"
echo ""
echo "Remove pam_ncp_auth or run this program with option -y"
exit 1
fi
fi
mkdir $DESTD
cp Makefile.pam $DESTD/Makefile
cp COPYING README *.c $DESTD
echo "PAM module was copied into $DESTD directory."
echo ""
echo "Please, do not forget to do 'make install-dev' in ncpfs tree before"
echo "attempting to compile this PAM module."

4959
contrib/pam/pam_ncp_auth.c Normal file

File diff suppressed because it is too large Load Diff

270
contrib/pam/support.c Normal file
View File

@@ -0,0 +1,270 @@
/*
* $Header: /home/morgan/pam/Linux-PAM-0.53/modules/pam_unix/RCS/support.c,v 1.1 1996/11/09 19:44:35 morgan Exp $
*/
/*
* Copyright Andrew Morgan, 1996. All rights reserved.
* Modified by Alexander O. Yuriev
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, and the entire permission notice in its entirety,
* including the disclaimer of warranties.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* ALTERNATIVELY, this product may be distributed under the terms of
* the GNU Public License, in which case the provisions of the GPL are
* required INSTEAD OF the above restrictions. (This clause is
* necessary due to a potential bad interaction between the GPL and
* the restrictions contained in a BSD-style copyright.)
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* $Log: support.c,v $
*
* Revision 1.2 2000/06/02 17:40:00 vana
* Added support functions for chautok.
*
* Revision 1.1 1996/11/09 19:44:35 morgan
* Initial revision
*
* Revision 1.1 1996/04/17 01:11:08 alex
* Initial revision
*
*/
#include <stdlib.h> /* define NULL */
#include <string.h>
#include "support.h"
#ifndef NDEBUG
# include <syslog.h>
#endif /* NDEBUG */
/* Implementation */
static int converse( pam_handle_t *pamh,
int nargs,
struct pam_message **message,
struct pam_response **response )
{
int retval;
struct pam_conv *conv;
retval = pam_get_item( pamh, PAM_CONV, (const void **) &conv ) ;
if ( retval == PAM_SUCCESS )
{
retval = conv->conv( nargs,
( const struct pam_message ** ) message,
response,
conv->appdata_ptr );
}
return retval;
}
/***************************************************************************/
/* prompt user for a using conversation calls */
/***************************************************************************/
int _set_auth_tok(pam_handle_t *pamh, int flags) {
int retval;
char *p;
struct pam_message msg[1],*pmsg[1];
struct pam_response *resp;
/* set up conversation call */
pmsg[0] = &msg[0];
msg[0].msg_style = PAM_PROMPT_ECHO_OFF;
msg[0].msg = "Password: ";
resp = NULL;
if ( ( retval = converse( pamh, 1 , pmsg, &resp ) ) != PAM_SUCCESS )
return retval;
if ( resp )
{
if ( ( flags & PAM_DISALLOW_NULL_AUTHTOK ) &&
resp[0].resp == NULL )
{
free( resp );
return PAM_AUTH_ERR;
}
p = resp[ 0 ].resp;
/* This could be a memory leak. If resp[0].resp
is malloc()ed, then it has to be free()ed!
-- alex
*/
resp[ 0 ].resp = NULL;
}
else
return PAM_CONV_ERR;
free( resp );
pam_set_item( pamh, PAM_AUTHTOK, p );
return PAM_SUCCESS;
}
int _read_new_pwd(pam_handle_t *pamh, int flags)
{
int retval;
char *p;
char *q;
struct pam_message msg[1],*pmsg[1];
struct pam_message msg2[1],*pmsg2[1];
struct pam_response *resp;
/* set up conversation call */
pmsg[0] = &msg[0];
msg[0].msg_style = PAM_PROMPT_ECHO_OFF;
msg[0].msg = "New Password: ";
resp = NULL;
if ( ( retval = converse( pamh, 1 , pmsg, &resp ) ) != PAM_SUCCESS )
return retval;
if ( resp )
{
if ( ( flags & PAM_DISALLOW_NULL_AUTHTOK ) &&
resp[0].resp == NULL )
{
free( resp );
return PAM_AUTH_ERR;
}
p = resp[ 0 ].resp;
/* This could be a memory leak. If resp[0].resp
is malloc()ed, then it has to be free()ed!
-- alex
*/
resp[ 0 ].resp = NULL;
}
else
return PAM_CONV_ERR;
free( resp );
pmsg2[0] = &msg2[0];
msg2[0].msg_style = PAM_PROMPT_ECHO_OFF;
msg2[0].msg = "Retype New Password: ";
resp = NULL;
if ( ( retval = converse( pamh, 1 , pmsg2, &resp ) ) != PAM_SUCCESS )
return retval;
if ( resp )
{
if ( ( flags & PAM_DISALLOW_NULL_AUTHTOK ) &&
resp[0].resp == NULL )
{
free( resp );
return PAM_AUTH_ERR;
}
q = resp[ 0 ].resp;
/* This could be a memory leak. If resp[0].resp
is malloc()ed, then it has to be free()ed!
-- alex
*/
resp[ 0 ].resp = NULL;
}
else
return PAM_CONV_ERR;
free( resp );
if (strcmp(p, q)) {
pmsg2[0] = &msg2[0];
msg2[0].msg_style = PAM_ERROR_MSG;
msg2[0].msg = "Passwords do not match!";
resp = NULL;
retval = converse( pamh, 1, pmsg2, &resp);
if ((retval != PAM_SUCCESS) && resp)
free(resp);
return PAM_AUTHTOK_ERR;
}
pam_set_item( pamh, PAM_AUTHTOK, p );
return PAM_SUCCESS;
}
int _set_oldauth_tok(pam_handle_t *pamh, int flags) {
int retval;
char *p;
struct pam_message msg[1],*pmsg[1];
struct pam_response *resp;
/* set up conversation call */
pmsg[0] = &msg[0];
msg[0].msg_style = PAM_PROMPT_ECHO_OFF;
msg[0].msg = "(current) NetWare password: ";
resp = NULL;
if ( ( retval = converse( pamh, 1 , pmsg, &resp ) ) != PAM_SUCCESS )
return retval;
if ( resp )
{
if ( ( flags & PAM_DISALLOW_NULL_AUTHTOK ) &&
resp[0].resp == NULL )
{
free( resp );
return PAM_AUTH_ERR;
}
p = resp[ 0 ].resp;
/* This could be a memory leak. If resp[0].resp
is malloc()ed, then it has to be free()ed!
-- alex
*/
resp[ 0 ].resp = NULL;
}
else
return PAM_CONV_ERR;
free( resp );
pam_set_item( pamh, PAM_OLDAUTHTOK, p );
return PAM_SUCCESS;
}

18
contrib/pam/support.h Normal file
View File

@@ -0,0 +1,18 @@
#ifndef __SUPPORT_H__
#define __SUPPORT_H__
#ifndef LINUX
#include <security/pam_appl.h>
#endif /* LINUX */
#define _PAM_EXTERN_FUNCTIONS
#include <security/pam_modules.h>
int _set_auth_tok(pam_handle_t *pamh, int flags);
int _set_oldauth_tok(pam_handle_t *pamh, int flags);
int _read_new_pwd(pam_handle_t *pamh, int flags);
#endif /* __SUPPORT_H__ */

View File

@@ -0,0 +1,6 @@
LTLIBRARY_SHARED_NAME = php_auth_nds.la
LTLIBRARY_SOURCES = php_auth_nds.c
LTLIBRARY_LDFLAGS = -L../../lib -lncp
EXTRA_INCLUDES = -I../../include -DNCPFS_VERSION=\"@VERSION@\"
include $(top_srcdir)/build/dynlib.mk

1279
contrib/php/acinclude.m4 Normal file

File diff suppressed because it is too large Load Diff

4927
contrib/php/aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,24 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: dynlib.mk,v 1.4 2002/02/28 08:25:30 sebastian Exp $
#
all: all-recursive
include $(builddir)/libs.mk
include $(top_srcdir)/build/rules.mk

80
contrib/php/build/fastgen.sh Executable file
View File

@@ -0,0 +1,80 @@
#! /bin/sh
#
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: fastgen.sh,v 1.14 2002/02/28 08:25:33 sebastian Exp $
#
if test "$#" = "0"; then
echo "Usage: fastgen.sh <srcdir> <mkdir_p> <bsdmakefile_p> <file>"
fi
srcdir=$1
shift
mkdir_p=$1
shift
bsd_makefile=$1
shift
top_srcdir=`(cd $srcdir; pwd)`
top_builddir=`pwd`
if test "$mkdir_p" = "yes"; then
mkdir_p="mkdir -p"
else
mkdir_p="$top_srcdir/build/shtool mkdir -p"
fi
if test "$bsd_makefile" = "yes"; then
(cd $top_srcdir; ./build/bsd_makefile)
for makefile in $@; do
echo "fastgen.sh: creating $makefile"
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
$mkdir_p "$dir/"
cat - $top_srcdir/$makefile.in <<EOF |sed 's/^include \(.*\)/.include "\1"/' >$makefile
top_srcdir = $top_srcdir
top_builddir = $top_builddir
srcdir = $top_srcdir/$dir
builddir = $top_builddir/$dir
VPATH = $top_srcdir/$dir
EOF
test -z "$dir" && dir=.
touch $dir/.deps
done
else
for makefile in $@; do
echo "fastgen.sh: creating $makefile"
dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
$mkdir_p "$dir/"
cat - $top_srcdir/$makefile.in <<EOF >$makefile
top_srcdir = $top_srcdir
top_builddir = $top_builddir
srcdir = $top_srcdir/$dir
builddir = $top_builddir/$dir
VPATH = $top_srcdir/$dir
EOF
test -z "$dir" && dir=.
touch $dir/.deps
done
fi

View File

@@ -0,0 +1,23 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: library.mk,v 1.12 2002/02/28 08:25:33 sebastian Exp $
#
LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo) $(LTLIBRARY_OBJECTS_X)
$(LTLIBRARY_NAME): $(LTLIBRARY_OBJECTS) $(LTLIBRARY_DEPENDENCIES)
$(LINK) $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD)

View File

@@ -0,0 +1,24 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: ltlib.mk,v 1.7 2002/02/28 08:25:34 sebastian Exp $
#
targets = $(LTLIBRARY_NAME)
include $(top_srcdir)/build/rules.mk
include $(top_srcdir)/build/library.mk

View File

@@ -0,0 +1,75 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 2000 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: mkdep.awk,v 1.5 2002/02/28 08:25:35 sebastian Exp $
#
# Usage:
#
# echo top_srcdir top_builddir srcdir CPP [CPP-ARGS] filenames | \
# awk -f mkdep.awk > dependencies
{
top_srcdir=$1
top_builddir=$2
srcdir=$3
cmd=$4
for (i = 5; i <= NF; i++) {
if (match($i, "^-[A-Z]") == 0)
break;
cmd=cmd " " $i
}
dif=i-1
for (; i <= NF; i++)
filenames[i-dif]=$i
no_files=NF-dif
for(i = 1; i <= no_files; i++) {
if (system("test -r " filenames[i]) != 0)
continue
target=filenames[i]
sub(srcdir "/", "", target)
target2=target
sub("\.(c|cpp)$", ".lo", target);
sub("\.(c|cpp)$", ".slo", target2);
for (e in used)
delete used[e]
cmdx=cmd " " filenames[i]
done=0
while ((cmdx | getline) > 0) {
if (match($0, "^# [0-9]* \".*\.h\"") != 0) {
if (sub(top_srcdir, "$(top_srcdir)", $3) == 0)
sub(top_builddir, "$(top_builddir)", $3)
if (substr($3,2,1) != "/" && used[$3] != 1) {
if (done == 0)
printf(target " " target2 ":")
done=1
printf(" \\\n\t" substr($3,2,length($3)-2))
used[$3] = 1;
}
}
}
if (done == 1)
print "\n"
}
}

View File

@@ -0,0 +1,23 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: program.mk,v 1.6 2002/02/28 08:25:35 sebastian Exp $
#
PROGRAM_OBJECTS = $(PROGRAM_SOURCES:.c=.lo)
$(PROGRAM_NAME): $(PROGRAM_DEPENDENCIES) $(PROGRAM_OBJECTS)
$(LINK_CLEAN) $(PROGRAM_LDFLAGS) $(PROGRAM_OBJECTS) $(PROGRAM_LDADD)

View File

@@ -0,0 +1,77 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: rules_pear.mk,v 1.16 2002/02/28 08:25:37 sebastian Exp $
#
include $(top_srcdir)/build/rules_common.mk
install_targets = install-modules
all: all-recursive
install: install-recursive
distclean-recursive depend-recursive clean-recursive all-recursive install-recursive:
@otarget=`echo $@|sed s/-recursive//`; \
list='$(SUBDIRS)'; for i in $$list; do \
target="$$otarget"; \
echo "Making $$target in $$i"; \
if test "$$i" = "."; then \
ok=yes; \
target="$$target-p"; \
fi; \
(cd $$i && $(MAKE) $$target) || exit 1; \
done; \
if test "$$otarget" = "all" && test -z '$(targets)'; then ok=yes; fi; \
if test "$$ok" != "yes"; then $(MAKE) "$$otarget-p" || exit 1; fi
all-p: $(targets)
install-p: $(targets) $(install_targets)
distclean-p depend-p clean-p:
depend: depend-recursive
@echo $(top_srcdir) $(top_builddir) $(srcdir) $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c *.c | $(AWK) -f $(top_srcdir)/build/mkdep.awk > $(builddir)/.deps || true
clean: clean-recursive clean-x
clean-x:
rm -f $(targets) *.lo *.slo *.la *.o $(CLEANFILES)
rm -rf .libs
distclean: distclean-recursive clean-x
rm -f config.cache config.log config.status config_vars.mk libtool \
config.h stamp-h Makefile build-defs.h php4.spec libphp4.module
cvsclean:
@for i in `find . -name .cvsignore`; do \
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore` *.o *.a || true); \
done
@rm -f $(SUBDIRS) 2>/dev/null || true
install-modules:
if [ -d modules ]; then \
$(mkinstalldirs) $(moduledir) && \
echo "installing shared modules into $(moduledir)" && \
rm -f modules/*.la && \
cp modules/* $(moduledir); \
fi
include $(builddir)/.deps
.PHONY: all-recursive clean-recursive install-recursive \
$(install_targets) install all clean depend depend-recursive shared \
distclean-recursive distclean clean-x all-p install-p distclean-p \
depend-p clean-p

View File

@@ -0,0 +1,77 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: rules_common.mk,v 1.11 2002/02/28 08:25:36 sebastian Exp $
#
include $(top_builddir)/config_vars.mk
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS)
COMPILE = $(CC) $(COMMON_FLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
CXX_COMPILE = $(CXX) $(COMMON_FLAGS) $(CXXFLAGS) $(EXTRA_CXXFLAGS)
SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) -prefer-pic $(EXTRA_CFLAGS) -c $< && touch $@
CXX_SHARED_COMPILE = $(SHARED_LIBTOOL) --mode=compile $(CXX) $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) -prefer-pic $(EXTRA_CXXFLAGS) -c $< && touch $@
LINK = $(LIBTOOL) --mode=link $(COMPILE) $(LDFLAGS) -o $@
LINK_CLEAN = $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
DEFS = -I. -I$(srcdir) -I$(top_builddir)/main -I$(top_srcdir)
moduledir = $(EXTENSION_DIR)
CXX_SUFFIX = .cpp
.SUFFIXES:
.SUFFIXES: .slo .c $(CXX_SUFFIX) .lo .o .s .y .l
.c.o:
$(COMPILE) -c $<
$(CXX_SUFFIX).o:
$(CXX_COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
.c.lo:
$(PHP_COMPILE)
$(CXX_SUFFIX).lo:
$(CXX_PHP_COMPILE)
.s.lo:
$(PHP_COMPILE)
.c.slo:
$(SHARED_COMPILE)
$(CXX_SUFFIX).slo:
$(CXX_SHARED_COMPILE)
.y.c:
$(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
if test -f y.tab.h; then \
if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
else :; fi
.l.c:
$(LEX) $(LFLAGS) $< && mv $(LEX_OUTPUT_ROOT).c $@

716
contrib/php/build/shtool Executable file
View File

@@ -0,0 +1,716 @@
#!/bin/sh
##
## GNU shtool -- The GNU Portable Shell Tool
## Copyright (c) 1994-2000 Ralf S. Engelschall <rse@engelschall.com>
##
## See http://www.gnu.org/software/shtool/ for more information.
## See ftp://ftp.gnu.org/gnu/shtool/ for latest version.
##
## Version 1.4.9 (16-Apr-2000)
## Ingredients: 3/17 available modules
##
##
## 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, or contact Ralf S. Engelschall <rse@engelschall.com>.
##
## Notice: Given that you include this file verbatim into your own
## source tree, you are justified in saying that it remains separate
## from your package, and that this way you are simply just using GNU
## shtool. So, in this situation, there is no requirement that your
## package itself is licensed under the GNU General Public License in
## order to take advantage of GNU shtool.
##
##
## Usage: shtool [<options>] [<cmd-name> [<cmd-options>] [<cmd-args>]]
##
## Available commands:
## echo Print string with optional construct expansion
## install Install a program, script or datafile
## mkdir Make one or more directories
##
## Not available commands (because module was not built-in):
## mdate Pretty-print modification time of a file or dir
## table Pretty-print a field-separated list as a table
## prop Display progress with a running propeller
## move Move files with simultaneous substitution
## mkln Make link with calculation of relative paths
## mkshadow Make a shadow tree through symbolic links
## fixperm Fix file permissions inside a source tree
## tarball Roll distribution tarballs
## guessos Simple operating system guesser
## arx Extended archive command
## slo Separate linker options by library class
## scpp Sharing C Pre-Processor
## version Generate and maintain a version information file
## path Deal with program paths
##
if [ $# -eq 0 ]; then
echo "$0:Error: invalid command line" 1>&2
echo "$0:Hint: run \`$0 -h' for usage" 1>&2
exit 1
fi
if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
echo "This is GNU shtool, version 1.4.9 (16-Apr-2000)"
echo "Copyright (c) 1994-2000 Ralf S. Engelschall <rse@engelschall.com>"
echo "Report bugs to <bug-shtool@gnu.org>"
echo ''
echo "Usage: shtool [<options>] [<cmd-name> [<cmd-options>] [<cmd-args>]]"
echo ''
echo 'Available global <options>:'
echo ' -v, --version display shtool version information'
echo ' -h, --help display shtool usage help page (this one)'
echo ' -d, --debug display shell trace information'
echo ''
echo 'Available <cmd-name> [<cmd-options>] [<cmd-args>]:'
echo ' echo [-n] [-e] [<str> ...]'
echo ' install [-v] [-t] [-c] [-C] [-s] [-m<mode>] [-o<owner>] [-g<group>]'
echo ' [-e<ext>] <file> <path>'
echo ' mkdir [-t] [-f] [-p] [-m<mode>] <dir> [<dir> ...]'
echo ''
echo 'Not available <cmd-name> (because module was not built-in):'
echo ' mdate [-n] [-z] [-s] [-d] [-f<str>] [-o<spec>] <path>'
echo ' table [-F<sep>] [-w<width>] [-c<cols>] [-s<strip>] <str><sep><str>...'
echo ' prop [-p<str>]'
echo ' move [-v] [-t] [-e] [-p] <src-file> <dst-file>'
echo ' mkln [-t] [-f] [-s] <src-path> [<src-path> ...] <dst-path>'
echo ' mkshadow [-v] [-t] [-a] <src-dir> <dst-dir>'
echo ' fixperm [-v] [-t] <path> [<path> ...]'
echo ' tarball [-t] [-v] [-o <tarball>] [-c <prog>] [-d <dir>] [-u'
echo ' <user>] [-g <group>] [-e <pattern>] <path> [<path> ...]'
echo ' guessos '
echo ' arx [-t] [-C<cmd>] <op> <archive> [<file> ...]'
echo ' slo [-p<str>] -- -L<dir> -l<lib> [-L<dir> -l<lib> ...]'
echo ' scpp [-v] [-p] [-f<filter>] [-o<ofile>] [-t<tfile>] [-M<mark>]'
echo ' [-D<dname>] [-C<cname>] <file> [<file> ...]'
echo ' version [-l<lang>] [-n<name>] [-p<prefix>] [-s<version>] [-i<knob>]'
echo ' [-d<type>] <file>'
echo ' path [-s] [-r] [-d] [-b] [-m] [-p<path>] <str> [<str> ...]'
echo ''
exit 0
fi
if [ ".$1" = ".-v" -o ".$1" = ."--version" ]; then
echo "GNU shtool 1.4.9 (16-Apr-2000)"
exit 0
fi
if [ ".$1" = ".-d" -o ".$1" = ."--debug" ]; then
shift
set -x
fi
name=`echo "$0" | sed -e 's;.*/\([^/]*\)$;\1;' -e 's;-sh$;;' -e 's;\.sh$;;'`
case "$name" in
echo|install|mkdir )
# implicit tool command selection
tool="$name"
;;
* )
# explicit tool command selection
tool="$1"
shift
;;
esac
arg_spec=""
opt_spec=""
gen_tmpfile=no
##
## DISPATCH INTO SCRIPT PROLOG
##
case $tool in
echo )
str_tool="echo"
str_usage="[-n] [-e] [<str> ...]"
arg_spec="0+"
opt_spec="n.e."
opt_n=no
opt_e=no
;;
install )
str_tool="install"
str_usage="[-v] [-t] [-c] [-C] [-s] [-m<mode>] [-o<owner>] [-g<group>] [-e<ext>] <file> <path>"
arg_spec="2="
opt_spec="v.t.c.C.s.m:o:g:e:"
opt_v=no
opt_t=no
opt_c=no
opt_C=no
opt_s=no
opt_m=""
opt_o=""
opt_g=""
opt_e=""
;;
mkdir )
str_tool="mkdir"
str_usage="[-t] [-f] [-p] [-m<mode>] <dir> [<dir> ...]"
arg_spec="1+"
opt_spec="t.f.p.m:"
opt_t=no
opt_f=no
opt_p=no
opt_m=""
;;
-* )
echo "$0:Error: unknown option \`$tool'" 2>&1
echo "$0:Hint: run \`$0 -h' for usage" 2>&1
exit 1
;;
* )
echo "$0:Error: unknown command \`$tool'" 2>&1
echo "$0:Hint: run \`$0 -h' for usage" 2>&1
exit 1
;;
esac
##
## COMMON UTILITY CODE
##
# determine name of tool
if [ ".$tool" != . ]; then
# used inside shtool script
toolcmd="$0 $tool"
toolcmdhelp="shtool $tool"
msgprefix="shtool:$tool"
else
# used as standalone script
toolcmd="$0"
toolcmdhelp="sh $0"
msgprefix="$str_tool"
fi
# parse argument specification string
eval `echo $arg_spec |\
sed -e 's/^\([0-9]*\)\([+=]\)/arg_NUMS=\1; arg_MODE=\2/'`
# parse option specification string
eval `echo h.$opt_spec |\
sed -e 's/\([a-zA-Z0-9]\)\([.:+]\)/opt_MODE_\1=\2;/g'`
# interate over argument line
opt_PREV=''
while [ $# -gt 0 ]; do
# special option stops processing
if [ ".$1" = ".--" ]; then
shift
break
fi
# determine option and argument
opt_ARG_OK=no
if [ ".$opt_PREV" != . ]; then
# merge previous seen option with argument
opt_OPT="$opt_PREV"
opt_ARG="$1"
opt_ARG_OK=yes
opt_PREV=''
else
# split argument into option and argument
case "$1" in
-[a-zA-Z0-9]*)
eval `echo "x$1" |\
sed -e 's/^x-\([a-zA-Z0-9]\)/opt_OPT="\1";/' \
-e 's/";\(.*\)$/"; opt_ARG="\1"/'`
;;
-[a-zA-Z0-9])
opt_OPT=`echo "x$1" | cut -c3-`
opt_ARG=''
;;
*)
break
;;
esac
fi
# eat up option
shift
# determine whether option needs an argument
eval "opt_MODE=\$opt_MODE_${opt_OPT}"
if [ ".$opt_ARG" = . -a ".$opt_ARG_OK" != .yes ]; then
if [ ".$opt_MODE" = ".:" -o ".$opt_MODE" = ".+" ]; then
opt_PREV="$opt_OPT"
continue
fi
fi
# process option
case $opt_MODE in
'.' )
# boolean option
eval "opt_${opt_OPT}=yes"
;;
':' )
# option with argument (multiple occurances override)
eval "opt_${opt_OPT}=\"\$opt_ARG\""
;;
'+' )
# option with argument (multiple occurances append)
eval "opt_${opt_OPT}=\"\$opt_${opt_OPT} \$opt_ARG\""
;;
* )
echo "$msgprefix:Error: unknown option: \`-$opt_OPT'" 1>&2
echo "$msgprefix:Hint: run \`$toolcmdhelp -h' or \`man shtool' for details" 1>&2
exit 1
;;
esac
done
if [ ".$opt_PREV" != . ]; then
echo "$msgprefix:Error: missing argument to option \`-$opt_PREV'" 1>&2
echo "$msgprefix:Hint: run \`$toolcmdhelp -h' or \`man shtool' for details" 1>&2
exit 1
fi
# process help option
if [ ".$opt_h" = .yes ]; then
echo "Usage: $toolcmdhelp $str_usage"
exit 0
fi
# complain about incorrect number of arguments
case $arg_MODE in
'=' )
if [ $# -ne $arg_NUMS ]; then
echo "$msgprefix:Error: invalid number of arguments (exactly $arg_NUMS expected)" 1>&2
echo "$msgprefix:Hint: run \`$toolcmd -h' or \`man shtool' for details" 1>&2
exit 1
fi
;;
'+' )
if [ $# -lt $arg_NUMS ]; then
echo "$msgprefix:Error: invalid number of arguments (at least $arg_NUMS expected)" 1>&2
echo "$msgprefix:Hint: run \`$toolcmd -h' or \`man shtool' for details" 1>&2
exit 1
fi
;;
esac
# establish a temporary file on request
if [ ".$gen_tmpfile" = .yes ]; then
if [ ".$TMPDIR" != . ]; then
tmpdir="$TMPDIR"
elif [ ".$TEMPDIR" != . ]; then
tmpdir="$TEMPDIR"
else
tmpdir="/tmp"
fi
tmpfile="$tmpdir/.shtool.$$"
rm -f $tmpfile >/dev/null 2>&1
touch $tmpfile
fi
##
## DISPATCH INTO SCRIPT BODY
##
case $tool in
echo )
##
## echo -- Print string with optional construct expansion
## Copyright (c) 1998-2000 Ralf S. Engelschall <rse@engelschall.com>
## Originally written for WML as buildinfo
##
text="$*"
# check for broken escape sequence expansion
seo=''
bytes=`echo '\1' | wc -c | awk '{ printf("%s", $1); }'`
if [ ".$bytes" != .3 ]; then
bytes=`echo -E '\1' | wc -c | awk '{ printf("%s", $1); }'`
if [ ".$bytes" = .3 ]; then
seo='-E'
fi
fi
# check for existing -n option (to suppress newline)
minusn=''
bytes=`echo -n 123 2>/dev/null | wc -c | awk '{ printf("%s", $1); }'`
if [ ".$bytes" = .3 ]; then
minusn='-n'
fi
# determine terminal bold sequence
term_bold=''
term_norm=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[Bb]'`" != . ]; then
case $TERM in
# for the most important terminal types we directly know the sequences
xterm|xterm*|vt220|vt220*)
term_bold=`awk 'BEGIN { printf("%c%c%c%c", 27, 91, 49, 109); }' </dev/null 2>/dev/null`
term_norm=`awk 'BEGIN { printf("%c%c%c", 27, 91, 109); }' </dev/null 2>/dev/null`
;;
vt100|vt100*)
term_bold=`awk 'BEGIN { printf("%c%c%c%c%c%c", 27, 91, 49, 109, 0, 0); }' </dev/null 2>/dev/null`
term_norm=`awk 'BEGIN { printf("%c%c%c%c%c", 27, 91, 109, 0, 0); }' </dev/null 2>/dev/null`
;;
# for all others, we try to use a possibly existing `tput' or `tcout' utility
* )
paths=`echo $PATH | sed -e 's/:/ /g'`
for tool in tput tcout; do
for dir in $paths; do
if [ -r "$dir/$tool" ]; then
for seq in bold md smso; do # 'smso' is last
bold="`$dir/$tool $seq 2>/dev/null`"
if [ ".$bold" != . ]; then
term_bold="$bold"
break
fi
done
if [ ".$term_bold" != . ]; then
for seq in sgr0 me rmso reset; do # 'reset' is last
norm="`$dir/$tool $seq 2>/dev/null`"
if [ ".$norm" != . ]; then
term_norm="$norm"
break
fi
done
fi
break
fi
done
if [ ".$term_bold" != . -a ".$term_norm" != . ]; then
break;
fi
done
;;
esac
if [ ".$term_bold" = . -o ".$term_norm" = . ]; then
echo "$msgprefix:Warning: unable to determine terminal sequence for bold mode" 1>&2
fi
fi
# determine user name
username=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[uU]'`" != . ]; then
username="$LOGNAME"
if [ ".$username" = . ]; then
username="$USER"
if [ ".$username" = . ]; then
username="`(whoami) 2>/dev/null |\
awk '{ printf("%s", $1); }'`"
if [ ".$username" = . ]; then
username="`(who am i) 2>/dev/null |\
awk '{ printf("%s", $1); }'`"
if [ ".$username" = . ]; then
username='unknown'
fi
fi
fi
fi
fi
# determine user id
userid=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%U'`" != . ]; then
userid="`(id -u) 2>/dev/null`"
if [ ".$userid" = . ]; then
str="`(id) 2>/dev/null`"
if [ ".`echo $str | grep '^uid[ ]*=[ ]*[0-9]*('`" != . ]; then
userid=`echo $str | sed -e 's/^uid[ ]*=[ ]*//' -e 's/(.*//'`
fi
if [ ".$userid" = . ]; then
userid=`egrep "^${username}:" /etc/passwd 2>/dev/null | \
sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'`
if [ ".$userid" = . ]; then
userid=`(ypcat passwd) 2>/dev/null |
egrep "^${username}:" | \
sed -e 's/[^:]*:[^:]*://' -e 's/:.*$//'`
if [ ".$userid" = . ]; then
userid='?'
fi
fi
fi
fi
fi
# determine host name
hostname=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%h'`" != . ]; then
hostname="`(uname -n) 2>/dev/null |\
awk '{ printf("%s", $1); }'`"
if [ ".$hostname" = . ]; then
hostname="`(hostname) 2>/dev/null |\
awk '{ printf("%s", $1); }'`"
if [ ".$hostname" = . ]; then
hostname='unknown'
fi
fi
case $hostname in
*.* )
domainname=".`echo $hostname | cut -d. -f2-`"
hostname="`echo $hostname | cut -d. -f1`"
;;
esac
fi
# determine domain name
domainname=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%d'`" != . ]; then
if [ ".$domainname" = . ]; then
if [ -f /etc/resolv.conf ]; then
domainname="`egrep '^[ ]*domain' /etc/resolv.conf | head -1 |\
sed -e 's/.*domain//' \
-e 's/^[ ]*//' -e 's/^ *//' -e 's/^ *//' \
-e 's/^\.//' -e 's/^/./' |\
awk '{ printf("%s", $1); }'`"
if [ ".$domainname" = . ]; then
domainname="`egrep '^[ ]*search' /etc/resolv.conf | head -1 |\
sed -e 's/.*search//' \
-e 's/^[ ]*//' -e 's/^ *//' -e 's/^ *//' \
-e 's/ .*//' -e 's/ .*//' \
-e 's/^\.//' -e 's/^/./' |\
awk '{ printf("%s", $1); }'`"
fi
fi
fi
fi
# determine current time
time_day=''
time_month=''
time_year=''
time_monthname=''
if [ ".$opt_e" = .yes -a ".`echo $text | egrep '%[DMYm]'`" != . ]; then
time_day=`date '+%d'`
time_month=`date '+%m'`
time_year=`date '+%Y' 2>/dev/null`
if [ ".$time_year" = . ]; then
time_year=`date '+%y'`
case $time_year in
[5-9][0-9]) time_year="19$time_year" ;;
[0-4][0-9]) time_year="20$time_year" ;;
esac
fi
case $time_month in
1|01) time_monthname='Jan' ;;
2|02) time_monthname='Feb' ;;
3|03) time_monthname='Mar' ;;
4|04) time_monthname='Apr' ;;
5|05) time_monthname='May' ;;
6|06) time_monthname='Jun' ;;
7|07) time_monthname='Jul' ;;
8|08) time_monthname='Aug' ;;
9|09) time_monthname='Sep' ;;
10) time_monthname='Oct' ;;
11) time_monthname='Nov' ;;
12) time_monthname='Dec' ;;
esac
fi
# expand special ``%x'' constructs
if [ ".$opt_e" = .yes ]; then
text=`echo $seo "$text" |\
sed -e "s/%B/${term_bold}/g" \
-e "s/%b/${term_norm}/g" \
-e "s/%u/${username}/g" \
-e "s/%U/${userid}/g" \
-e "s/%h/${hostname}/g" \
-e "s/%d/${domainname}/g" \
-e "s/%D/${time_day}/g" \
-e "s/%M/${time_month}/g" \
-e "s/%Y/${time_year}/g" \
-e "s/%m/${time_monthname}/g" 2>/dev/null`
fi
# create output
if [ .$opt_n = .no ]; then
echo $seo "$text"
else
# the harder part: echo -n is best, because
# awk may complain about some \xx sequences.
if [ ".$minusn" != . ]; then
echo $seo $minusn "$text"
else
echo dummy | awk '{ printf("%s", TEXT); }' TEXT="$text"
fi
fi
;;
install )
##
## install -- Install a program, script or datafile
## Copyright (c) 1997-2000 Ralf S. Engelschall <rse@engelschall.com>
## Originally written for shtool
##
src="$1"
dst="$2"
# If destination is a directory, append the input filename
if [ -d $dst ]; then
dst=`echo "$dst" | sed -e 's:/$::'`
dstfile=`echo "$src" | sed -e 's;.*/\([^/]*\)$;\1;'`
dst="$dst/$dstfile"
fi
# Add a possible extension to src and dst
if [ ".$opt_e" != . ]; then
src="$src$opt_e"
dst="$dst$opt_e"
fi
# Check for correct arguments
if [ ".$src" = ".$dst" ]; then
echo "$msgprefix:Error: source and destination are the same" 1>&2
exit 1
fi
# Make a temp file name in the destination directory
dstdir=`echo $dst | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;' -e 's;^$;.;'`
dsttmp="$dstdir/#INST@$$#"
# Verbosity
if [ ".$opt_v" = .yes ]; then
echo "$src -> $dst" 1>&2
fi
# Copy or move the file name to the temp name
# (because we might be not allowed to change the source)
if [ ".$opt_C" = .yes ]; then
opt_c=yes
fi
if [ ".$opt_c" = .yes ]; then
if [ ".$opt_t" = .yes ]; then
echo "cp $src $dsttmp" 1>&2
fi
cp $src $dsttmp || exit $?
else
if [ ".$opt_t" = .yes ]; then
echo "mv $src $dsttmp" 1>&2
fi
mv $src $dsttmp || exit $?
fi
# Adjust the target file
# (we do chmod last to preserve setuid bits)
if [ ".$opt_s" = .yes ]; then
if [ ".$opt_t" = .yes ]; then
echo "strip $dsttmp" 1>&2
fi
strip $dsttmp || exit $?
fi
if [ ".$opt_o" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chown $opt_o $dsttmp" 1>&2
fi
chown $opt_o $dsttmp || exit $?
fi
if [ ".$opt_g" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chgrp $opt_g $dsttmp" 1>&2
fi
chgrp $opt_g $dsttmp || exit $?
fi
if [ ".$opt_m" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chmod $opt_m $dsttmp" 1>&2
fi
chmod $opt_m $dsttmp || exit $?
fi
# Determine whether to do a quick install
# (has to be done _after_ the strip was already done)
quick=no
if [ ".$opt_C" = .yes ]; then
if [ -r $dst ]; then
if cmp -s $src $dst; then
quick=yes
fi
fi
fi
# Finally install the file to the real destination
if [ $quick = yes ]; then
if [ ".$opt_t" = .yes ]; then
echo "rm -f $dsttmp" 1>&2
fi
rm -f $dsttmp
else
if [ ".$opt_t" = .yes ]; then
echo "rm -f $dst && mv $dsttmp $dst" 1>&2
fi
rm -f $dst && mv $dsttmp $dst
fi
;;
mkdir )
##
## mkdir -- Make one or more directories
## Copyright (c) 1996-2000 Ralf S. Engelschall <rse@engelschall.com>
## Originally written for public domain by Noah Friedman <friedman@prep.ai.mit.edu>
## Cleaned up and enhanced for shtool
##
errstatus=0
for p in ${1+"$@"}; do
# if the directory already exists...
if [ -d "$p" ]; then
if [ ".$opt_f" = .no ] && [ ".$opt_p" = .no ]; then
echo "$msgprefix:Error: directory already exists: $p" 1>&2
errstatus=1
break
else
continue
fi
fi
# if the directory has to be created...
if [ ".$opt_p" = .no ]; then
if [ ".$opt_t" = .yes ]; then
echo "mkdir $p" 1>&2
fi
mkdir $p || errstatus=$?
else
# the smart situation
set fnord `echo ":$p" |\
sed -e 's/^:\//%/' \
-e 's/^://' \
-e 's/\// /g' \
-e 's/^%/\//'`
shift
pathcomp=''
for d in ${1+"$@"}; do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp="./$pathcomp" ;;
esac
if [ ! -d "$pathcomp" ]; then
if [ ".$opt_t" = .yes ]; then
echo "mkdir $pathcomp" 1>&2
fi
mkdir $pathcomp || errstatus=$?
if [ ".$opt_m" != . ]; then
if [ ".$opt_t" = .yes ]; then
echo "chmod $opt_m $pathcomp" 1>&2
fi
chmod $opt_m $pathcomp || errstatus=$?
fi
fi
pathcomp="$pathcomp/"
done
fi
done
exit $errstatus
;;
esac
exit 0
##EOF##

1409
contrib/php/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

11
contrib/php/config.h.in Normal file
View File

@@ -0,0 +1,11 @@
/* config.h.in. Generated automatically from configure.in by autoheader 2.13. */
/* Define if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* Define if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Whether to build auth-nds as dynamic module */
#undef COMPILE_DL_AUTH_NDS

6
contrib/php/config.m4 Normal file
View File

@@ -0,0 +1,6 @@
PHP_ARG_ENABLE(auth-nds,whether to enable NDS authentication,
[ --enable-auth-nds enable NDS authentication])
if test "$PHP_AUTH_NDS" != "no"; then
PHP_EXTENSION(auth-nds, $ext_shared)
fi

1473
contrib/php/config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

6033
contrib/php/configure vendored Executable file

File diff suppressed because it is too large Load Diff

90
contrib/php/configure.in Normal file
View File

@@ -0,0 +1,90 @@
AC_INIT(Makefile.in)
AC_DEFUN(PHP_WITH_PHP_CONFIG,[
AC_ARG_WITH(php-config,
[ --with-php-config=PATH],[
PHP_CONFIG=$withval
],[
PHP_CONFIG=php-config
])
prefix=`$PHP_CONFIG --prefix 2>/dev/null`
INCLUDES=`$PHP_CONFIG --includes 2>/dev/null`
EXTENSION_DIR=`$PHP_CONFIG --extension-dir`
if test -z "$prefix"; then
AC_MSG_ERROR(Cannot find php-config. Please use --with-php-config=PATH)
fi
AC_MSG_CHECKING(for PHP prefix)
AC_MSG_RESULT($prefix)
AC_MSG_CHECKING(for PHP includes)
AC_MSG_RESULT($INCLUDES)
AC_MSG_CHECKING(for PHP extension directory)
AC_MSG_RESULT($EXTENSION_DIR)
])
abs_srcdir=`(cd $srcdir && pwd)`
php_always_shared=yes
PHP_CONFIG_NICE(config.nice)
AC_PROG_CC
AC_PROG_CC_C_O
PHP_SHLIB_SUFFIX_NAME
PHP_WITH_PHP_CONFIG
AC_PREFIX_DEFAULT()
sinclude(config.m4)
enable_static=no
enable_shared=yes
AC_PROG_LIBTOOL
SHARED_LIBTOOL='$(LIBTOOL)'
PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<'
phplibdir="`pwd`/modules"
CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H"
test "$prefix" = "NONE" && prefix="/usr/local"
test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
PHP_SUBST(prefix)
PHP_SUBST(exec_prefix)
PHP_SUBST(libdir)
PHP_SUBST(prefix)
PHP_SUBST(phplibdir)
PHP_SUBST(PHP_COMPILE)
PHP_SUBST(CC)
PHP_SUBST(CFLAGS)
PHP_SUBST(CPP)
PHP_SUBST(CPPFLAGS)
PHP_SUBST(CXX)
PHP_SUBST(DEFS)
PHP_SUBST(EXTENSION_DIR)
PHP_SUBST(EXTRA_LDFLAGS)
PHP_SUBST(EXTRA_LIBS)
PHP_SUBST(INCLUDES)
PHP_SUBST(LEX)
PHP_SUBST(LEX_OUTPUT_ROOT)
PHP_SUBST(LFLAGS)
PHP_SUBST(SHARED_LIBTOOL)
PHP_SUBST(LIBTOOL)
PHP_SUBST(SHELL)
PHP_FAST_OUTPUT(Makefile)
PHP_GEN_CONFIG_VARS
PHP_GEN_MAKEFILES($PHP_FAST_OUTPUT_FILES)
test -d modules || mkdir modules
touch .deps
AC_CONFIG_HEADER(config.h)
AC_OUTPUT()

88
contrib/php/dynlib.m4 Normal file
View File

@@ -0,0 +1,88 @@
# +----------------------------------------------------------------------+
# | PHP Version 4 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2002 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 2.02 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available at through the world-wide-web at |
# | http://www.php.net/license/2_02.txt. |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: dynlib.m4,v 1.9 2002/02/28 08:25:27 sebastian Exp $
#
AC_DEFUN(LIB_SHARED_CONVENIENCE,[
lib_target="\$(LTLIBRARY_NAME)"
cat >>$1<<EOF
\$(LTLIBRARY_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
\$(SHARED_LIBTOOL) --mode=link \$(COMPILE) \$(LDFLAGS) -o \[$]@ \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
EOF
])
AC_DEFUN(LIB_SHARED_MODULE,[
lib_target="\$(LTLIBRARY_SHARED_NAME)"
cat >>$1<<EOF
\$(LTLIBRARY_SHARED_NAME): \$(LTLIBRARY_SHARED_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
\$(SHARED_LIBTOOL) --mode=link \$(CC) \$(COMMON_FLAGS) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(LDFLAGS) -o \[$]@ -avoid-version -module -rpath \$(phplibdir) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_SHARED_LIBADD)
\$(SHARED_LIBTOOL) --mode=install cp \[$]@ \$(phplibdir)
EOF
])
AC_DEFUN(LIB_STATIC_CONVENIENCE,[
lib_target="\$(LTLIBRARY_NAME)"
cat >>$1<<EOF
\$(LTLIBRARY_NAME): \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_DEPENDENCIES)
\$(LINK) \$(LTLIBRARY_LDFLAGS) \$(LTLIBRARY_OBJECTS) \$(LTLIBRARY_LIBADD)
EOF
])
dnl LIB_BUILD(path, shared, convenience)
dnl sets up path to build a shared/static convenience/module
AC_DEFUN(LIB_BUILD,[
lib_makefile="$1/libs.mk"
lib_target=""
$php_shtool mkdir -p $1
if test "$BSD_MAKEFILE" = "yes"; then
lib_include_conf=".include \"\$(top_builddir)/config_vars.mk\""
else
lib_include_conf="include \$(top_builddir)/config_vars.mk"
fi
cat >$lib_makefile<<EOF
$lib_include_conf
LTLIBRARY_OBJECTS = \$(LTLIBRARY_SOURCES:.c=.lo) \$(LTLIBRARY_OBJECTS_X)
LTLIBRARY_SHARED_OBJECTS = \$(LTLIBRARY_OBJECTS:.lo=.slo)
EOF
if test "$2" = "shared" || test "$2" = "yes"; then
lib_build_shared=yes
if test -n "$3"; then
dnl ---------------------------------------- Shared Convenience
LIB_SHARED_CONVENIENCE($lib_makefile)
else
dnl ---------------------------------------- Shared Module
LIB_SHARED_MODULE($lib_makefile)
fi
else
dnl ---------------------------------------- Static Convenience = Static Module
LIB_STATIC_CONVENIENCE($lib_makefile)
fi
dnl ---------------------------------------- Generate build targets
if test -n "$lib_target"; then
cat >>$lib_makefile<<EOF
targets = $lib_target
EOF
fi
])

0
contrib/php/install-sh Normal file
View File

5396
contrib/php/libtool Executable file

File diff suppressed because it is too large Load Diff

5107
contrib/php/ltmain.sh Normal file

File diff suppressed because it is too large Load Diff

0
contrib/php/missing Normal file
View File

View File

710
contrib/php/php_auth_nds.c Normal file
View File

@@ -0,0 +1,710 @@
/*
php_auth_nds.c - User verification for ncpfs
Copyright (C) 2000, 2001 Petr Vandrovec
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
Revision history:
1.00 2000, September 30 Petr Vandrovec <vandrove@vc.cvut.cz>
Initial revision, used on dialog.cvut.cz.
1.01 2001, January 10 Petr Vandrovec <vandrove@vc.cvut.cz>
Further polishing, used on cdonline.cvut.cz.
1.01 2001, February 19 Petr Vandrovec <vandrove@vc.cvut.cz>
Added license, polished for release, added sample code.
1.02 2001, March 25 Patrick Pollet
Added some NWDSFreeContext in case of errors
Added group parameter (NDS name or bindery)
1.03 2001, March 28 Patrick Pollet
Added NDS reading attribute functions
string read_nds_string (tree, object, attribute)
string read_nds_num (tree, object, attribute)
1.04 2001, October 27 Patrick Pollet
Added nds_tree_auth allowing a tree name and a list of context to be searched
Simplified code by adding internal CreateCtx and CreateCtxAndConn (called by all NDS related functions)
*/
/*
Original example:
Expects uid as username, srv as server name and pwd as password. If server name
is FDNET or ST, it uses NDS username $uid.FADOP resp. $uid.STUDENT.CVUT-FSV. For
other servers it uses simple bindery login... If password verification passes,
$ss_username and $valid_user are set to $srv/$uid - you can use session_register
on one of them.
if ($HTTP_POST_VARS["uid"] == "")
break;
if ($HTTP_POST_VARS["srv"] == "") {
$auth_err = "Wrong URL";
} else if ($HTTP_POST_VARS["pwd"] == "") {
$auth_err = "Invalid password";
} else {
$uu = strtoupper($HTTP_POST_VARS["uid"]);
if ($HTTP_POST_VARS["srv"] == "FDNET") {
$auth_err = auth_nds($HTTP_POST_VARS["srv"], $uu . ".FADOP", strtoupper($HTTP_POST_VARS["pwd"]));
} else if ($HTTP_POST_VARS["srv"] == "ST") {
$auth_err = auth_nds($HTTP_POST_VARS["srv"], $uu . ".STUDENT.CVUT-FSV", strtoupper($HTTP_POST_VARS["pwd"]));
} else {
$auth_err = auth_bindery($HTTP_POST_VARS["srv"], $uu, $HTTP_POST_VARS["pwd"]);
}
if ($auth_err == "") {
$valid_user = $HTTP_POST_VARS["srv"] . "/" . $uu;
$ss_username = $valid_user;
}
}
for more examples see /contrib/php/site
*/
#include "config.h"
#include <php.h>
#include <ext/standard/info.h>
#include <ncp/nwcalls.h>
#include <ncp/nwnet.h>
#include <ncp/nwclient.h>
#include <Zend/zend_modules.h>
#include <unistd.h>
#include <stdlib.h>
#include <ctype.h>
#include <wchar.h>
#include <string.h>
static int is_member_of_group_bind( char* errstr,NWCONN_HANDLE conn,const char* user,const char* group) {
int err;
err = NWIsObjectInSet(conn, user, NCP_BINDERY_USER, "GROUPS_I'M_IN", group, NCP_BINDERY_UGROUP);
if (!err) {
err= NWIsObjectInSet(conn, group, NCP_BINDERY_UGROUP, "GROUP_MEMBERS", user, NCP_BINDERY_USER);
if (!err)
return 0;
else {
sprintf(errstr, "inconsistent bindery database for user %s and group %s: %s",
user, group, strnwerror(err));
}
} else {
sprintf (errstr,"user %s is not member of %s: %s", user, group, strnwerror(err));
}
return -1;
}
static int is_member_of_group_nds( char* errstr,NWDSContextHandle ctx,NWCONN_HANDLE conn,NWObjectID oid,const char* group) {
int eval = 0;
Buf_T* buf=NULL;
NWDSCCODE dserr;
nbool8 match;
dserr = NWDSAllocBuf(DEFAULT_MESSAGE_LEN, &buf);
if (dserr) {
sprintf(errstr, "NWDSAllocBuf() failed with %s\n", strnwerror(dserr));
eval = 120;
goto bailout;
}
dserr = NWDSInitBuf(ctx, DSV_COMPARE, buf);
if (dserr) {
sprintf(errstr, "NWDSInitBuf() failed with %s\n", strnwerror(dserr));
eval = 121;
goto bailout;
}
dserr = NWDSPutAttrName(ctx, buf, "Group Membership");
if (dserr) {
sprintf(errstr, "NWDSPutAttrName() failed with %s\n", strnwerror(dserr));
eval = 122;
goto bailout;
}
dserr = NWDSPutAttrVal(ctx, buf, SYN_DIST_NAME, group);
if (dserr) {
sprintf(errstr, "NWDSPutAttrVal() failed with %s\n", strnwerror(dserr));
eval = 123;
goto bailout;
}
dserr = __NWDSCompare(ctx, conn, oid, buf, &match);
if (dserr) {
sprintf(errstr, "__NWDSCompare() failed with %s(oid=%x)\n", strnwerror(dserr), oid);
eval = 124;
goto bailout;
}
if (!match) {
sprintf(errstr, "Not member of NDS group %s\n", group);
eval=125;
}
bailout:
if (buf)
NWDSFreeBuf(buf);
return eval;
}
/* internal; called by all functions requiring a context */
static int _createCtx ( char * errstr, NWDSContextHandle *ctx) {
NWDSCCODE dserr;
u_int32_t ctxflag = 0;
u_int32_t confidence = 0;
int eval = 0;
dserr = NWDSCreateContextHandle(ctx);
if (dserr) {
sprintf(errstr, "NWDSCreateContextHandle failed with %s\n", strnwerror(dserr));
return 100;
}
ctxflag = DCV_XLATE_STRINGS | DCV_DEREF_ALIASES | DCV_TYPELESS_NAMES;
dserr = NWDSSetContext(*ctx, DCK_FLAGS, &ctxflag);
if (dserr) {
sprintf(errstr, "NWDSSetContext(DCK_FLAGS) failed: %s\n", strnwerror(dserr));
eval=101;
goto bailout;
}
dserr = NWDSSetContext(*ctx, DCK_NAME_CONTEXT, "");
if (dserr) {
sprintf(errstr, "NWDSSetContext(DCK_NAME_CONTEXT) failed: %s\n",strnwerror(dserr));
eval=102;
goto bailout;
}
dserr = NWDSSetContext(*ctx, DCK_CONFIDENCE, &confidence);
if (dserr) {
sprintf(errstr, "NWDSSetContext(DCK_CONFIDENCE) failed: %s\n",strnwerror(dserr));
eval=103;
goto bailout;
}
/* success */
return 0;
/*failure */
bailout:
dserr = NWDSFreeContext(*ctx);
if (dserr) {
sprintf(errstr, "NWDSFreeContext failed with %s\n", strnwerror(dserr));
eval=105;
}
return eval;
}
/* internnal; called by all functions requiring a connection to a tree */
static int _createCtxAndConn (char * errstr, const char* treename, NWDSContextHandle *ctx, NWCONN_HANDLE *conn) {
NWDSCCODE dserr;
int eval = 0;
eval=_createCtx (errstr,ctx);
if (eval)
return eval;
dserr= NWCXAttachToTreeByName(conn, treename);
if (dserr) {
sprintf(errstr, "NWCXAttachToTreeByName failed with %s\n", strnwerror(dserr));
eval =99;
goto bailout;
}
dserr = NWDSAddConnection(*ctx, *conn);
if (dserr) {
sprintf(errstr, "Cannot bind connection to context: %s\n",strnwerror(dserr));
eval=104;
goto bailout;
}
/* success */
//sprintf (errstr,"tout va bien\n");
return 0;
/*failure */
bailout:
if (conn) NWCCCloseConn(*conn);
dserr = NWDSFreeContext(*ctx);
if (dserr) {
sprintf(errstr, "NWDSFreeContext failed with %s\n", strnwerror(dserr));
eval=105;
}
return eval;
}
static int bindery_auth (char* errstr, const char* server, const char* user, const char* pwd,
const char * group)
{
struct ncp_conn *conn;
struct ncp_conn_spec spec;
long err;
char upperpw[256];
int i;
if (strlen(pwd) > 255) {
sprintf(errstr, "Specified password is too long");
return 1;
}
for (i = 0; pwd[i]; i++) {
upperpw[i] = toupper(pwd[i]);
}
upperpw[i] = 0;
spec.uid = ~0; /* ensure that ncp_open will not use permanent connection */
spec.server[0] = 0;
spec.user[0] = 0;
strcpy(spec.server, server);
if ((conn = ncp_open(&spec, &err)) == NULL) {
sprintf(errstr, "Cannot connect to server: %s", strnwerror(err));
return 1;
}
/* useless code ???
{
NWCONN_NUM num;
err=NWGetConnectionNumber(conn, &num);
}
*/
/* Bindery authorization */
err = NWVerifyObjectPassword(conn, user, OT_USER, upperpw);
if (err) {
sprintf(errstr, "Wrong credentials: %s", strnwerror(err));
}else {
if (group[0]) {
err=is_member_of_group_bind(errstr,conn,user,group);
}
}
NWCCCloseConn(conn);
return err;
}
/* authenticate to a NDS server */
static int nds_auth_fn(char* errstr, const char* server, const char* objectname, const char* pwd,
const char * group)
{
NWDSCCODE dserr;
NWDSContextHandle ctx=NULL;
NWCONN_HANDLE conn=NULL;
int eval = 0;
NWObjectID oid;
eval=_createCtx (errstr,&ctx);
if (eval)
return eval;
if (server[0] == '/') {
dserr = ncp_open_mount(server, &conn);
if (dserr) {
sprintf(errstr, "ncp_open_mount failed with %s\n", strnwerror(dserr));
eval=104;
goto bailout;
}
} else {
struct ncp_conn_spec connsp;
long err;
memset(&connsp, 0, sizeof(connsp));
strcpy(connsp.server, server);
conn = ncp_open(&connsp, &err);
if (!conn) {
sprintf(errstr, "ncp_open failed with %s\n",strnwerror(err));
eval=105;
goto bailout;
}
}
dserr = NWDSAddConnection(ctx, conn);
if (dserr) {
sprintf(errstr, "Cannot bind connection to context: %s\n",strnwerror(dserr));
eval=106;
goto bailout;
}
dserr = NWDSVerifyObjectPassword(ctx, NDS_PASSWORD, objectname, pwd);
if (dserr) {
sprintf(errstr, "Verify password failed: %s\n",
strnwerror(dserr));
eval = 110;
} else {
if (group[0]) {
dserr=NWDSMapNameToID(ctx, conn,objectname,&oid);
if (dserr) {
sprintf(errstr, "%s when retrieving object ID\n", strnwerror(dserr));
eval =119;
goto bailout;
}
eval=is_member_of_group_nds(errstr,ctx,conn,oid,group);
}
}
bailout:
if (conn) NWCCCloseConn(conn);
if (ctx) {
dserr = NWDSFreeContext(ctx);
if (dserr) {
sprintf(errstr, "NWDSFreeContext failed with %s\n", strnwerror(dserr));
eval=111;
}
}
return eval;
}
/* authenticate to a NDS tree and return FQDN of found user */
static int tree_auth_fn(char* errstr, const char* treename, const char* objectname, const char* contexts,const char* pwd,
const char * group, char * fqdn)
{
NWDSCCODE dserr;
NWDSContextHandle ctx=NULL;
NWCONN_HANDLE conn=NULL;
int eval = 0;
const char * ctxStart;
const char* ctxEnd;
NWObjectID oid;
eval=_createCtxAndConn (errstr,treename, &ctx, &conn);
if (eval)
return eval;
/* scan the search contexts list */
ctxStart=contexts;
do {
strcpy(fqdn,objectname);
if (ctxStart) {
char ctxBuffer[MAX_DN_CHARS];
strcat(fqdn,".");
ctxEnd=strchr(ctxStart,',');
if (ctxEnd) {
memcpy(ctxBuffer,ctxStart,ctxEnd - ctxStart);
ctxBuffer[ctxEnd-ctxStart]=0;
ctxEnd++;
strcat(fqdn,ctxBuffer);
} else
strcat(fqdn,ctxStart);
ctxStart=ctxEnd;
}
eval=109; // don't forget to reset it !!!!
dserr=NWDSMapNameToID(ctx,conn, fqdn,&oid);
if (!dserr) { //found a matching user
dserr = NWDSVerifyObjectPassword(ctx, NDS_PASSWORD, fqdn, pwd);
if (dserr) { //password makes the difference
sprintf(errstr, "Verify password failed: %s\n", strnwerror(dserr));
eval = 110;
} else {
eval=0; // got him
break;
}
}
} while (ctxStart );
if (!dserr) {
if (group[0])
eval=is_member_of_group_nds(errstr,ctx,conn,oid,group);
}
NWCCCloseConn(conn);
dserr = NWDSFreeContext(ctx);
if (dserr) {
sprintf(errstr, "NWDSFreeContext failed with %s\n", strnwerror(dserr));
eval=111;
}
return eval;
}
static int nds_read_string_fn(char* errstr, const char* treename, const char* objectname, const char* attrname,char ** buffer){
/* return single or multi string attributes */
NWDSCCODE dserr;
NWDSContextHandle ctx=NULL;
NWCONN_HANDLE conn=NULL;
int eval = 0;
if (!treename || !objectname || !attrname ) {
sprintf (errstr," invalid parameters.");
return 98;
}
eval=_createCtxAndConn (errstr,treename, &ctx, &conn);
if (eval)
return eval;
dserr= NWCXGetMultiStringAttributeValue (ctx,objectname,attrname,buffer);
if (dserr) {
sprintf(errstr, "NWCXGetAttribute failed : %s\n",strnwerror(dserr));
eval=106;
}
NWCCCloseConn(conn);
dserr = NWDSFreeContext(ctx);
if (dserr) {
sprintf(errstr, "NWDSFreeContext failed with %s\n", strnwerror(dserr));
eval=107;
}
return eval;
}
static int nds_read_int_fn(char* errstr, const char* treename, const char* objectname, const char* attrname,char * buffer, int maxlen){
/* return single numeric NDS (include time and boolean attributes)*/
NWDSCCODE dserr;
NWDSContextHandle ctx=NULL;
NWCONN_HANDLE conn=NULL;
int eval = 0;
if (!treename || !objectname || !attrname ) {
sprintf (errstr," invalid parameters.");
return 98;
}
eval=_createCtxAndConn (errstr,treename, &ctx, &conn);
if (eval)
return eval;
dserr=NWCXGetAttributeValueAsString (ctx,objectname,attrname,buffer,maxlen);
if (dserr) {
sprintf(errstr, "NWCXGetAttribute failed : %s\n",strnwerror(dserr));
eval=106;
}
NWCCCloseConn(conn);
dserr = NWDSFreeContext(ctx);
if (dserr) {
sprintf(errstr, "NWDSFreeContext failed with %s\n", strnwerror(dserr));
eval=107;
}
return eval;
}
PHP_FUNCTION (read_nds_string)
{
int res; /* fcn result code */
const char *treen, *objectn, *attributen;
char errstr[512];
char local_buffer [8192];
char * buffer; // returned by NWCXGetMultiStringAttributeValue
int argc = ZEND_NUM_ARGS();
zval **tree, **object, **attribute;
if (argc != 3 || zend_get_parameters_ex(argc, &tree, &object, &attribute)) {
WRONG_PARAM_COUNT;
}
sprintf(errstr, "Wrong parameters values");
if (!tree || !object || !attribute) {
RETURN_STRING(errstr,1);
}
convert_to_string_ex(tree);
convert_to_string_ex(object);
convert_to_string_ex(attribute);
treen = (*tree)->value.str.val;
objectn = (*object)->value.str.val;
attributen = (*attribute)->value.str.val;
if (!treen || !objectn || !attributen) {
RETURN_STRING(errstr,1);
}
sprintf(errstr, "failure");
res=nds_read_string_fn(errstr,treen,objectn,attributen,&buffer);
if (res) {
RETURN_STRING(errstr,1);
}
if (strlen(buffer) >=sizeof(local_buffer)) {
buffer[sizeof(local_buffer)-1]=0;
}
strcpy(local_buffer,buffer);
free(buffer);
RETURN_STRING(local_buffer,1);
}
PHP_FUNCTION (read_nds_int)
{
int res; /* fcn result code */
const char *treen, *objectn, *attributen;
char errstr[512];
char buffer [512];
int argc = ZEND_NUM_ARGS();
zval **tree, **object, **attribute;
if (argc != 3 || zend_get_parameters_ex(argc, &tree, &object, &attribute)) {
WRONG_PARAM_COUNT;
}
sprintf(errstr, "Wrong parameters values");
if (!tree || !object || !attribute) {
RETURN_STRING(errstr,1);
}
convert_to_string_ex(tree);
convert_to_string_ex(object);
convert_to_string_ex(attribute);
treen = (*tree)->value.str.val;
objectn = (*object)->value.str.val;
attributen = (*attribute)->value.str.val;
if (!treen || !objectn || !attributen) {
RETURN_STRING(errstr,1);
}
buffer[0]=0;
sprintf(errstr, "failure");
res=nds_read_int_fn(errstr,treen,objectn,attributen,buffer,sizeof(buffer));
if (res) {
RETURN_STRING(errstr,1);
}
RETURN_STRING(buffer,1);
}
PHP_FUNCTION(auth_bindery)
{
int res; /* fcn result code */
const char *servern, *usern, *sent_pw, *groupn;
char errstr[512];
int argc = ZEND_NUM_ARGS();
zval **server, **user, **password, ** group;
if (argc != 4 || zend_get_parameters_ex(argc, &server, &user, &password, &group)) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(server);
convert_to_string_ex(user);
convert_to_string_ex(password);
convert_to_string_ex(group);
servern = (*server)->value.str.val;
usern = (*user)->value.str.val;
sent_pw = (*password)->value.str.val;
groupn = (*group)->value.str.val;
/* do they know the magic word? */
sprintf(errstr, "failure");
res = bindery_auth(errstr, servern, usern, sent_pw, groupn );
if (res) {
RETURN_STRING(errstr,1);
}
RETURN_FALSE;
}
PHP_FUNCTION(auth_tree)
{
int res; /* fcn result code */
const char *servern, *ctxs,*usern, *sent_pw, *groupn;
char errstr[512];
char fqdn[MAX_DN_CHARS+1]; // to get the FQDN used
char fqdn_ret[MAX_DN_CHARS+5]; // to return to php DN=xxx.yyy.zzz
int argc = ZEND_NUM_ARGS();
zval **server, **user, **contexts, **password, **group;
if (argc != 5 || zend_get_parameters_ex(argc, &server, &user, &contexts,&password, &group)) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(server);
convert_to_string_ex(user);
convert_to_string_ex(contexts);
convert_to_string_ex(password);
convert_to_string_ex(group);
servern = (*server)->value.str.val;
usern = (*user)->value.str.val;
ctxs = (*contexts)->value.str.val ;
sent_pw = (*password)->value.str.val;
groupn = (*group)->value.str.val;
/* do they know the magic word? */
sprintf(errstr, "failure");
res = tree_auth_fn(errstr, servern, usern, ctxs,sent_pw, groupn,fqdn);
if (res) {
RETURN_STRING(errstr,1);
}
//RETURN_FALSE;
strcpy(fqdn_ret,"DN=");
strcat(fqdn_ret,fqdn);
RETURN_STRING(fqdn_ret,1);
}
PHP_FUNCTION(auth_nds)
{
int res; /* fcn result code */
const char *servern, *usern, *sent_pw, *groupn;
char errstr[512];
int argc = ZEND_NUM_ARGS();
zval **server, **user, **password, **group;
if (argc != 4 || zend_get_parameters_ex(argc, &server, &user, &password, &group)) {
WRONG_PARAM_COUNT;
}
convert_to_string_ex(server);
convert_to_string_ex(user);
convert_to_string_ex(password);
convert_to_string_ex(group);
servern = (*server)->value.str.val;
usern = (*user)->value.str.val;
sent_pw = (*password)->value.str.val;
groupn = (*group)->value.str.val;
/* do they know the magic word? */
sprintf(errstr, "failure");
res = nds_auth_fn(errstr, servern, usern, sent_pw, groupn);
if (res) {
RETURN_STRING(errstr,1);
}
RETURN_FALSE;
}
PHP_MINIT_FUNCTION(auth_nds)
{
return SUCCESS;
}
PHP_MINFO_FUNCTION(auth_nds)
{
php_info_print_table_start();
php_info_print_table_row(3, "NDS/Bindery authentication support", "enabled","(c) 2000-2001 by <a HREF=\"mailto:vandrove@vc.cvut.cz\">P.Vandrovec</a> & <A href=\"mailto:patrick.pollet@insa-lyon.fr\">P.Pollet </a>");
php_info_print_table_row(3, "NDS reading properties support", "enabled","(c) 2001 by <A HREF=\"mailto:patrick.pollet@insa-lyon.fr\">P.Pollet</a>");
php_info_print_table_end();
}
function_entry auth_nds_functions[] = {
PHP_FE(auth_bindery, NULL)
PHP_FE(auth_nds, NULL)
PHP_FE(auth_tree, NULL)
PHP_FE(read_nds_string, NULL)
PHP_FE(read_nds_int, NULL)
{NULL, NULL, NULL}
};
zend_module_entry auth_nds_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
STANDARD_MODULE_HEADER,
#endif
"auth_nds",
auth_nds_functions,
PHP_MINIT(auth_nds),
NULL,
NULL,
NULL,
PHP_MINFO(auth_nds),
#if ZEND_MODULE_API_NO >= 20010901
NCPFS_VERSION, /* extension version number (string) */
#endif
STANDARD_MODULE_PROPERTIES
};
ZEND_GET_MODULE(auth_nds)

View File

@@ -0,0 +1,12 @@
<?php
/* $Id: config.inc.php3,v 1.26 1999/10/10 19:57:29 tobias Exp $ */
$cfgBorder = "0";
$cfgThBgcolor = "#D3DCE3";
$cfgBgcolorOne = "#CCCCCC";
$cfgBgcolorTwo = "#DDDDDD";
?>

View File

@@ -0,0 +1,8 @@
<hr>
<table border=0 width="90%">
<tr align="right"><TD><P STYLE="color:red;font-size: 8pt;font-family:tahoma" >
V 1.00 P.Pollet le 24/03/2001.
</font></td> </tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,61 @@
<?php
/* $Id: header.inc.php3,v 1.15 1999/07/18 19:54:10 tobias Exp $ */
if (!isset($no_require))
include("lib.inc.php3");
?>
<html>
<head>
<style type="text/css">
//<!--
body { font-family: Arial, Helvetica, sans-serif; font-size: 9pt}
th { font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: bold; background-color: <?php echo $cfgThBgcolor;?>;}
td { font-family: Arial, Helvetica, sans-serif; font-size: 9pt;}
form { font-family: Arial, Helvetica, sans-serif; font-size: 9pt}
h1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12pt; font-weight: bold}
h2 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: bold}
A:link { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; text-decoration: none; color: blue}
A:visited { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; text-decoration: none; color: blue}
A:hover { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; text-decoration: underline; color: red}
//-->
</style>
<!--
<META HTTP-EQUIV="Expires" CONTENT="Fri, Jun 12 1981 08:20:00 GMT">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache,must-revalidate">
-->
</head>
<body bgcolor="#F5F5F5" text="#000000" background="images/bkg.gif">
<TABLE WIDTH=99% BORDER=0>
<TR ALIGN=center>
<TD ALIGN=center>
<A HREF="linuxinfos.phtml"> <IMG SRC="images/linuxlog.gif" BORDER=0 width=50 height=50> </a>
</TD>
<TD COLSPAN=3 ALIGN=CENTER VALIGN=CENTER>
<H1>
<? echo $strEntete ?>
<CENTER>
<?
if (isset($message))
{
show_message(urldecode($message));
}
?>
</center>
</H1></TD>
<TD ALIGN=center>
<A HREF="nwinfos.phtml"> <IMG SRC="images/netware.gif" BORDER=0 ></A>
</TD>
</TR>
</TABLE>
<HR>

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@@ -0,0 +1,108 @@
<?
session_start();
global $ss_authenticated;
#echo "session auth:".$ss_authenticated."<br>";
if (session_is_registered("ss_authenticated"))
{
session_unregister ("ss_authenticated");
unset ($ss_authenticated);
#echo "session auth:".$ss_authenticated."<br>";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!-- *************************************************
EDITEUR WEBEXPERT
DATE DE CREATION: 01/01/00
DERNIERE MODIFICATION: 01/01/00
************************************************** -->
<HTML>
<HEAD>
<TITLE>Identification</TITLE>
<!META NAME="Patrick Pollet" CONTENT="INSA de Lyon">
<!META NAME="Description" CONTENT="">
<SCRIPT LANGUAGE="JavaScript">
<!-- Debut du script
function testf(form)
{
var erreur = 0;
//alert ("début de test")
if (form.uid.value.length <3)
{
alert ("Votre login est trop court !");
form.uid.focus();
return(false);
}
if (form.pwd.value.length <5 )
{
alert ("Votre mot de passe comporte au moins cinq caractères");
form.pwd.focus();
return(false);
}
//alert ("fin de test"+erreur)
return (true)
}
// Fin du script -->
</SCRIPT>
</HEAD>
<BODY onload="javascript:document.IDD.uid.focus();">
<?php
$strEntete="Bienvenue au Centre Informatique du Premier Cycle<p> Identification";
include("header.inc.php3");
?>
<CENTER>
<FORM NAME=IDD ACTION="nds.php" METHOD=POST onsubmit="return testf(this)">
<?
#echo "session user:".$ss_username."<br>";
#echo "session auth:".$ss_authenticated."<br>";
#echo "session tree:".$ss_tree."<br>";
?>
<TABLE border=1>
<TR>
<TD align=right bgcolor = <? echo $cfgBgcolorTwo;?> ><br>Veuillez entrer votre login Novell:<br>&nbsp<br></TD>
<TD><INPUT TYPE="text" NAME="uid" SIZE="15" MAXLENGTH="15"
<?
#remet le login
if ($uid!="") { echo " value=".$uid; }
?>
>
</TD>
</TR>
<TR>
<TD align=right bgcolor = <? echo $cfgBgcolorTwo;?>><br>Et votre mot de passe:<br>&nbsp<br></TD>
<TD><INPUT TYPE="password" NAME="pwd" SIZE="12" MAXLENGTH="12">
<TD><INPUT TYPE=HIDDEN NAME="tree" VALUE="INSA_ROOT">
<INPUT TYPE=HIDDEN NAME="ctx" VALUE=".PC">
</TD>
</TR>
<TR>
<TD COLSPAN=2 ALIGN="CENTER">
<br>&nbsp<br>
<INPUT TYPE="reset" VALUE="Annuler" onclick="javascript:document.IDD.uid.focus();">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<INPUT TYPE="submit" VALUE=" Valider ">
<br>&nbsp<br>
</TD>
</TR>
</TABLE>
</FORM>
</CENTER>
<?php
require ("footer.inc.php3");
?>
</BODY>
</HTML>

View File

@@ -0,0 +1,140 @@
<?php
/* $Id: lib.inc.php3,v 1.41 1999/10/10 11:39:34 tobias Exp $ */
require("config.inc.php3");
function mkjoli($string) {
return ucfirst(strtolower($string));
}
function fillblank($string) {
if (trim($string =="")) return ("&nbsp;");
else return (mkjoli($string));
}
function justify($string,$len) {
while (strlen($string) <$len) {
$string=$string." ";
}
return $string;
}
function justifyhtml($string,$len) {
$l=strlen($string);
while ($l <$len) {
$string=$string."&nbsp;";$l++;
}
return $string;
}
function premier($string) {
$prns=split(" ",trim($string));
return ($prns[0]);
}
function suivant($string) {
$prns=split(" ",trim($string));
$s="";
for ($i=1;$i<count($prns);$i++) {$s=$s.trim($prns[$i])." ";}
return ($s);
}
function marque($string, $pattern) {
$beg="<font color='#FF0000' ><B>";
$end="</b></font>";
if ($pattern=="") return $string;
$string=strtolower($string);
$pattern=strtolower($pattern);
return(str_replace($pattern,$beg.$pattern.$end,$string));
}
function mysql_die($error = "")
{
global $strError,$strMySQLSaid, $strBack;
echo "<b> $strError </b><p>";
if (empty($error))
echo $strMySQLSaid.mysql_error();
else
echo $strMySQLSaid.$error;
echo "<br><a href=\"javascript:history.go(-1)\">$strBack</a>";
require ("footer.inc.php3");
exit;
}
function auth()
{
global $cfgServer;
#$PHP_AUTH_USER = ""; No need to do this since err 401 allready clears that var
Header("status: 401 Unauthorized");
Header("HTTP/1.0 401 Unauthorized");
Header("WWW-authenticate: basic realm=\"phpMySQLAdmin on " . $cfgServer['host'] . "\"");
echo "<HTML><HEAD><TITLE>" . $GLOBALS["strAccessDenied"] . "</TITLE></HEAD>\n";
echo "<BODY BGCOLOR=#FFFFFF><BR><BR><CENTER><H1>" . $GLOBALS["strWrongUser"] . "</H1>\n";
echo "</CENTER></BODY></HTML>";
exit;
}
function count_records ($db,$table)
{ $result = mysql_db_query($db, "select count(*) as num from $table");
$num = mysql_result($result,0,"num");
echo $num;
}
function show_message($message)
{
?>
<div align="center">
<table border="<?php echo $GLOBALS['cfgBorder'];?>" width=70%>
<tr>
<td align=center bgcolor="<?php echo $GLOBALS['cfgThBgcolor'];?>">
<b><?php echo $message;?><b><br>
</td>
</tr>
</table>
</div>
<?php
}
function split_string($sql, $delimiter)
{
$sql = trim($sql);
$buffer = array();
$ret = array();
$in_string = false;
for($i=0; $i<strlen($sql); $i++)
{
if($sql[$i] == $delimiter && !$in_string)
{
$ret[] = substr($sql, 0, $i);
$sql = substr($sql, $i + 1);
$i = 0;
}
if($in_string && ($sql[$i] == $in_string) && $buffer[0] != "\\")
{
$in_string = false;
}
elseif(!$in_string && ($sql[$i] == "\"" || $sql[$i] == "'") && $buffer[0] != "\\")
{
$in_string = $sql[$i];
}
$buffer[0] = $buffer[1];
$buffer[1] = $sql[$i];
}
if (!empty($sql))
{
$ret[] = $sql;
}
return($ret);
}
// -----------------------------------------------------------------
?>

View File

@@ -0,0 +1,42 @@
<?
session_start();
global $ss_authenticated;
if (!session_is_registered("ss_authenticated") || (!$ss_authenticated)) {
header ("Location: index.phtml?message=".urlencode("Vous n êtes pas authentifié"));
exit(); /* capital sinon execute quand même le code plus bas !!!! */
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!-- *************************************************
EDITEUR WEBEXPERT
DATE DE CREATION: 01/01/00
DERNIERE MODIFICATION: 01/01/00
************************************************** -->
<HTML>
<HEAD>
<TITLE>Menu général</TITLE>
<META NAME="Patrick Pollet" CONTENT="INSA de Lyon">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY >
<?php
$strEntete="Bienvenue au Centre Informatique du Premier Cycle<p> Informations sur ce serveur";
include("header.inc.php3");
?>
<?php
phpinfo();
?>
<?
require ("footer.inc.php3");
?>
</BODY>
</HTML>

View File

@@ -0,0 +1,44 @@
<?
session_start();
global $ss_authenticated;
if (!session_is_registered("ss_authenticated") || (!$ss_authenticated)) {
header ("Location: index.phtml?message=".urlencode("Vous n êtes pas authentifié"));
exit(); /* capital sinon execute quand même le code php plus bas !!!! */
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!-- *************************************************
EDITEUR WEBEXPERT
DATE DE CREATION: 01/01/00
DERNIERE MODIFICATION: 01/01/00
************************************************** -->
<HTML>
<HEAD>
<TITLE>Menu général</TITLE>
<META NAME="Patrick Pollet" CONTENT="INSA de Lyon">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY >
<?php
$strEntete="Bienvenue au Centre Informatique du Premier Cycle<p> Menu général de l'Intranet enseignants";
include("header.inc.php3");
?>
<?php
#echo "hello ".session_name()."=".session_id()."<BR>";
#echo "vous êtes ".$ss_username."<BR>";
#echo "attaché à ".$ss_tree."<BR>";
?>
<?
require ("footer.inc.php3");
?>
</BODY>
</HTML>

72
contrib/php/site/nds.php Normal file
View File

@@ -0,0 +1,72 @@
<?
session_start();
#doit être après l'ouverture de session
global $ss_username;
global $ss_tree;
global $ss_server;
global $ss_authenticated;
session_unregister("ss_authenticated");
$auth_err= "Pas de login!";
$ss_authenticated=0 ;
$date= date ("d/m/Y H:i:s");
$machine=getenv('http_host')." [".getenv('remote_addr')."]";
$ss_tree =$HTTP_POST_VARS["tree"];
$ss_srv =$HTTP_POST_VARS["srv"];
$ctx =$HTTP_POST_VARS["ctx"];
$uu =$HTTP_POST_VARS["uid"];
$pwd =$HTTP_POST_VARS["pwd"];
if ($ss_tree == "" && $ss_srv == "")
$auth_err = "Pas d'arbre ni de serveur !";
else if ($uu== "")
$auth_err = "Nom d'utilisateur incorrect";
else if ($pwd == "")
$auth_err = "Mot de passe incorrect";
else {
if ($ss_tree !="") {
$ss_username=$uu.$ctx;
if ($ctx == ".PC") {
#echo "authentification à CIPCINSA<BR>";
$auth_err = auth_nds("CIPCINSA", $ss_username, strtoupper($pwd),"profs.pc");
} else if ($ctx == ".GCP.PC") {
#echo "authentification à GCP<BR>";
$auth_err = auth_nds("GCP", $ss_username, strtoupper($pwd),"profs.gcp.pc");
} else
$auth_err = "Access denied!";
} else {
$ss_username=$uu;
#echo "authentification à ".$HTTP_POST_VARS["svr"]."<BR>";
$auth_err = auth_bindery($ss_svr, $uu, $pwd, $HTTP_POST_VARS["grp"]);
}
# write in /var/log/secure
openlog ("php_nds_auth",LOG_ID |LOG_PID ,LOG_AUTHPRIV);
if ($auth_err == "") {
$ss_authenticated=1;
session_register("ss_username");
session_register("ss_authenticated");
session_register("ss_tree");
session_register("ss_server");
syslog (LOG_NOTICE,"granted access to ".$ss_username." the ".$date. " from ".$machine);
closelog();
header ("Location: menu.phtml");
}
else {
syslog (LOG_WARNING,"access denied for ".$uu." from ".$machine." due to ".$auth_err);
closelog();
header ("Location: index.phtml?uid=".$uu."&message=".urlencode($auth_err));
}
}
?>
<BODY>
</body>

View File

@@ -0,0 +1,6 @@
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date du passé
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // toujours modifié
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Pragma: no-cache"); // HTTP/1.0
?>

View File

@@ -0,0 +1,149 @@
<?
session_start();
#doit être après l'ouverture de session
#global $ss_username;
#global $ss_tree;
#global $ss_server;
#global $ss_authenticated;
if (!session_is_registered("ss_authenticated") || (!$ss_authenticated)) {
header ("Location: index.phtml?message=".urlencode("Vous n êtes pas authentifié"));
exit(); /* capital sinon execute quand même le code plus bas !!!! */
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!-- *************************************************
EDITEUR WEBEXPERT
DATE DE CREATION: 01/01/00
DERNIERE MODIFICATION: 01/01/00
************************************************** -->
<HTML>
<HEAD>
<TITLE>Menu général</TITLE>
<META NAME="Patrick Pollet" CONTENT="INSA de Lyon">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY >
<?php
$strEntete="Bienvenue au Centre Informatique du Premier Cycle<p> Informations sur votre compte";
include("header.inc.php3");
?>
<TABLE border=1 width=99%>
<?
#attention ce code semble être executé même si redirection en haut
function infoStrSur ($tree,$user,$prop,$propalias) {
syslog (LOG_NOTICE,"infoStrSur called on".$tree." for ".$user. " to get ".$prop);
$fn=read_nds_string ($tree,$user,$prop);
if (strstr($fn,"(-60"))
$fn="&nbsp;";
return "<TR><TD BGCOLOR=#CCCCFF>".$propalias."</TD><TD>".$fn."</TD></TR>";
}
function infoNumSur ($tree,$user,$prop,$propalias) {
syslog (LOG_NOTICE,"infoStrSur called on".$tree." for ".$user. " to get ".$prop);
$fn=read_nds_int($tree,$user,$prop);
if (strstr($fn,"(-60"))
$fn="&nbsp;";
return "<TR><TD BGCOLOR=#CCCCFF>".$propalias."</TD><TD>".$fn."</TD></TR>";
}
if (session_is_registered("ss_authenticated") && ($ss_authenticated)) {
openlog ("php_nds_read",LOG_ID |LOG_PID ,LOG_AUTHPRIV);
echo(infoStrSur($ss_tree,$ss_username,"CN","Login:"));
echo(infoStrSur($ss_tree,$ss_username,"Full Name","Nom complet:"));
echo(infoStrSur($ss_tree,$ss_username,"Given Name","Prénoms:"));
echo(infoStrSur($ss_tree,$ss_username,"Surname","Nom de famille:"));
echo(infoStrSur($ss_tree,$ss_username,"Initials","Civilité:"));
echo(infoStrSur($ss_tree,$ss_username,"Title","Titre:"));
echo(infoStrSur($ss_tree,$ss_username,"Description","Description:"));
echo(infoStrSur($ss_tree,$ss_username,"Generational Qualifier","GQ:"));
echo(infoStrSur($ss_tree,$ss_username,"Group Membership","Adhésion aux groupes:"));
echo(infoStrSur($ss_tree,$ss_username,"Security Equals","Equivalence de sécurité:"));
echo(infoStrSur($ss_tree,$ss_username,"ACL","Droits:"));
echo(infoStrSur($ss_tree,$ss_username,"EMail Address","Adresse Email I:"));
echo(infoStrSur($ss_tree,$ss_username,"Internet EMail Address","Adresse EMail II:"));
echo(infoStrSur($ss_tree,$ss_username,"Home Directory","Repertoire home:"));
echo(infoStrSur($ss_tree,$ss_username,"Message Server","Serveur préféré:"));
echo(infoStrSur($ss_tree,$ss_username,"Profile","Profil:"));
echo(infoStrSur($ss_tree,$ss_username,"Language","Langue:"));
echo(infoNumSur($ss_tree,$ss_username,"Login Time","Date de login:"));
echo(infoNumSur($ss_tree,$ss_username,"Last Login Time","Dernier login:"));
echo(infoNumSur($ss_tree,$ss_username,"Login Disabled","Compte désactivé:"));
echo(infoNumSur($ss_tree,$ss_username,"Login Expiration Time","Votre compte expire le:"));
echo(infoNumSur($ss_tree,$ss_username,"Login Grace Limit","Nombre maximum d'essais:"));
echo(infoNumSur($ss_tree,$ss_username,"Login Grace Remaining","Il vous reste:"));
echo(infoNumSur($ss_tree,$ss_username,"Login Intruder Attempts","Essais d'intrusions:"));
echo(infoNumSur($ss_tree,$ss_username,"Login Intruder Reset Time","Remise à zéro après:"));
echo(infoNumSur($ss_tree,$ss_username,"Login Maximum Simultaneous","Nombre de connexions permises:"));
echo(infoNumSur($ss_tree,$ss_username,"Password Required","Mot de passe obligatoire:"));
echo(infoNumSur($ss_tree,$ss_username,"Password Unique Required","Mots de passe uniques obligatoire:"));
echo(infoNumSur($ss_tree,$ss_username,"Password Allow Change","Chgmt de mot de passe permis:"));
echo(infoNumSur($ss_tree,$ss_username,"Password Minimum Length","Longueur mimimale du mot de passe:"));
echo(infoNumSur($ss_tree,$ss_username,"Password Expiration Time","Date d'expiration du mot de passe:"));
echo(infoNumSur($ss_tree,$ss_username,"Password Expiration Interval","Votre mot de passe expire tous les:"));
echo(infoStrSur($ss_tree,$ss_username,"Telephone Number","N° de téléphone:"));
echo(infoStrSur($ss_tree,$ss_username,"Facsimile Telephone Number","N° de FAX"));
echo(infoStrSur($ss_tree,$ss_username,"SA","Rue:"));
echo(infoStrSur($ss_tree,$ss_username,"Physical Delivery Office Name","Ville:"));
echo(infoStrSur($ss_tree,$ss_username,"Postal Office Box","Boite postale:"));
echo(infoStrSur($ss_tree,$ss_username,"Postal Code","Code postal:"));
echo(infoStrSur($ss_tree,$ss_username,"S","Etat/Province:"));
echo(infoStrSur($ss_tree,$ss_username,"Postal Address","Infos sur étiquettes:"));
echo(infoNumSur($ss_tree,$ss_username,"LINUX:UID","ID Linux:"));
echo(infoNumSur($ss_tree,$ss_username,"LINUX:GID","Groupe Linux:"));
#echo(infoNumSur($ss_tree,$ss_username,"LINUX:Primary GroupID",""));
#echo(infoStrSur($ss_tree,$ss_username,"LINUX:Primary GroupName",""));
echo(infoStrSur($ss_tree,$ss_username,"LINUX:Login Shell","Shell Linux:"));
echo(infoStrSur($ss_tree,$ss_username,"LINUX:Home Directory","Home Linux:"));
echo(infoStrSur($ss_tree,$ss_username,"LINUX:Comments","Gecos Linux:"));
echo(infoNumSur($ss_tree,$ss_username,"UNIX:UID","ID Unix:"));
echo(infoNumSur($ss_tree,$ss_username,"UNIX:GID","Groupe Unix:"));
#echo(infoStrSur($ss_tree,$ss_username,"UNIX:Primary GroupID",""));
#echo(infoStrSur($ss_tree,$ss_username,"UNIX:Primary GroupName",""));
echo(infoStrSur($ss_tree,$ss_username,"UNIX:Login Shell","Shell Unix:"));
echo(infoStrSur($ss_tree,$ss_username,"UNIX:Home Directory","Home Unix:"));
echo(infoStrSur($ss_tree,$ss_username,"UNIX:Comments","Gecos Unix:"));
echo(infoStrSur($ss_tree,$ss_username,"OU","Organisation:"));
echo(infoStrSur($ss_tree,$ss_username,"L","Locations:"));
echo(infoStrSur($ss_tree,$ss_username,"Network Address","Loggué depuis:"));
closelog();
}
?>
</table>
<?
require ("footer.inc.php3");
?>
</BODY>
</HTML>

View File

@@ -0,0 +1,19 @@
#!/bin/sh
#
# @sysconfdir@/config.ipx Config file for IPX networking
#
# Author: Roumen Petrov (RYP) <rpetrov@usa.net>, sep 1998.
IPX_DEVICE=eth0
IPX_FRAME0=802.3
IPX_FRAME1=802.2
#IPX_INTERNAL_NET=yes
IPX_INTERNAL_NET=no
#IPX_NETNUM=333
IPX_NETNUM=0
IPX_NODE=1
IPX_CONFIGURED=yes

View File

@@ -0,0 +1,68 @@
#!/bin/sh
#
# /etc/rc.d/rc.ipxnet Bring up/down IPX networking
#
# Author: Roumen Petrov (RYP) <rpetrov@usa.net>, sep 1998.
#
prefix=@prefix@
exec_prefix=@exec_prefix@
sysconfdir=@sysconfdir@
bindir=@bindir@
cfgfile=${sysconfdir}/config.ipx
if [ -x ${cfgfile} ]
then
. ${cfgfile}
else
echo "IPX configuration not found!"
exit 1
fi
case "$1" in
start)
echo "Insert IPX modules..."
/sbin/insmod -k ipx;
/sbin/insmod -k ncpfs;
echo "Starting IPX network..."
if [ ${IPX_CONFIGURED} = "yes" ]; then
if [ ${IPX_INTERNAL_NET} = "yes" ]; then
${bindir}/ipx_internal_net add ${IPX_NETNUM} ${IPX_NODE}
else
${bindir}/ipx_interface add -p ${IPX_DEVICE} ${IPX_FRAME0} ${IPX_NETNUM}
${bindir}/ipx_interface add ${IPX_DEVICE} ${IPX_FRAME1} ${IPX_NETNUM}
fi
fi
${bindir}/ipx_configure --auto_primary=on --auto_interface=on
;;
stop)
echo "umount all ncp file systems..."
umount -v -a -tncpfs
if [ $? -ne 0 ] ; then
exit 1;
fi
ncpmod=`cat /proc/modules | grep -w ncpfs | sed -e 's/ .*//'`
if [ ! -z $ncpmod ]; then
echo "Removing ncpfs module..."
/sbin/rmmod ncpfs;
if [ $? -ne 0 ] ; then
exit 1;
fi
fi
echo "Stoping IPX network..."
${bindir}/ipx_configure --auto_primary=off --auto_interface=off
${bindir}/ipx_interface delall
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac

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