Compare commits

...

110 Commits

Author SHA1 Message Date
Mario Fetka
9a7ed29ccd Prepare ncpfs 2.2.7 release
All checks were successful
Source release / source-package (push) Successful in 2m28s
2026-04-29 13:15:31 +02:00
Mario Fetka
a0857c83c4 add missng files
All checks were successful
Source release / source-package (push) Successful in 2m31s
2026-04-29 12:58:20 +02:00
Mario Fetka
a9b3613e44 Use mkinstalldirs script for gettext install helper
Some checks failed
Source release / source-package (push) Has been cancelled
2026-04-29 12:57:18 +02:00
Mario Fetka
cb7776c1cb Fix MKINSTALLDIRS substitution
All checks were successful
Source release / source-package (push) Successful in 2m24s
2026-04-29 12:51:04 +02:00
Mario Fetka
718b7ff929 Install fix
All checks were successful
Source release / source-package (push) Successful in 2m24s
2026-04-29 12:43:20 +02:00
Mario Fetka
0e90f4b564 Ship PHP libtool auxiliary files 2026-04-29 12:37:50 +02:00
Mario Fetka
4357e67f06 Fix gettext install helper and ship PHP configure helpers 2026-04-29 12:34:48 +02:00
Mario Fetka
6dcc4f69ef Delete old dev builds
All checks were successful
Source release / source-package (push) Successful in 2m22s
2026-04-29 11:04:08 +02:00
Mario Fetka
1622f5a39c Hardening ncpfs
All checks were successful
Source release / source-package (push) Successful in 2m23s
2026-04-29 09:52:29 +02:00
Mario Fetka
02bb8584e9 correct dev releases action
All checks were successful
Source release / source-package (push) Successful in 2m23s
2026-04-29 01:21:02 +02:00
Mario Fetka
0654accb13 Remove generated PHP build directory 2026-04-29 01:15:47 +02:00
Mario Fetka
b3b44f89ef Exclude CI and build artifacts from source archives 2026-04-29 01:15:32 +02:00
Mario Fetka
5fba979346 correct tar action
All checks were successful
Source release / source-package (push) Successful in 2m23s
2026-04-29 01:09:48 +02:00
Mario Fetka
1fb4c0b04c Add action
Some checks failed
Source release / source-package (push) Failing after 2m24s
2026-04-29 01:04:16 +02:00
Mario Fetka
90097c46c3 Add generated release headers 2026-04-28 23:20:33 +02:00
Mario Fetka
0a8c9594cf Prepare 2.2.7 release build files 2026-04-28 23:12:05 +02:00
Mario Fetka
8345f2d85f Replace BitKeeper dist target with Git archive 2026-04-28 23:08:29 +02:00
Mario Fetka
beb035b65d Convert hgignore to gitignore 2026-04-28 23:06:19 +02:00
Mario Fetka
6afee4d0a6 Convert hgignore to gitignore 2026-04-28 23:03:59 +02:00
Mario Fetka
92858f09f8 Prepare 2.2.7 release 2026-04-28 22:59:47 +02:00
Mario Fetka
4956e08f2e Update LSM metadata for 2.2.7 2026-04-28 21:40:16 +02:00
Mario Fetka
827339ce80 Remove temporary download cache 2026-04-28 21:22:45 +02:00
Mario Fetka
f469f50747 Remove temporary patch cache 2026-04-28 21:20:24 +02:00
Mario Fetka
32bec895a1 Apply patch: ncpfs-2.2.6-r5-nds-null-name.patch 2026-04-28 21:20:24 +02:00
Mario Fetka
df32d2f966 Apply patch: ncpfs-2.2.6-php-install-root.patch 2026-04-28 21:20:24 +02:00
Mario Fetka
ec01e736af Apply patch: ncpfs-2.2.6-php_auth_nds-php8.patch 2026-04-28 21:20:24 +02:00
Mario Fetka
238ee10077 Apply patch: ncpfs-2.2.6-php5x.patch 2026-04-28 21:20:24 +02:00
Mario Fetka
470ed23b98 Apply patch: ncpfs-2.2.6-fix-build-with-gcc14.patch 2026-04-28 21:20:24 +02:00
Mario Fetka
a92164d627 Apply patch: ncpfs-2.2.6-usr-merge.patch 2026-04-28 21:20:24 +02:00
Mario Fetka
e1ee3915bb Apply patch: ncpfs-2.2.6-makefile-fix-soname-link.patch 2026-04-28 21:20:24 +02:00
Mario Fetka
333460aa93 Apply patch: ncpfs-2.2.6-r6-ldflags-support.patch 2026-04-28 20:56:05 +02:00
Mario Fetka
c2011dbfef Apply patch: ncpfs-2.2.6-remove-libncp_atomic-header.patch 2026-04-28 20:56:05 +02:00
Mario Fetka
214c385876 Apply patch: ncpfs-2.2.6-no-suid-root.patch 2026-04-28 20:56:05 +02:00
Mario Fetka
95b744aafe Apply patch: ncpfs-2.2.6-r6-drop-mtab-support.patch 2026-04-28 20:56:05 +02:00
Mario Fetka
3ba8508d21 Apply patch: ncpfs-2.2.6-drop-kernel-check.patch 2026-04-28 20:56:05 +02:00
Mario Fetka
53b90566fa Apply patch: ncpfs-2.2.6-r6-servername-array-fix.patch 2026-04-28 20:56:05 +02:00
Mario Fetka
4a231c2331 Apply patch: ncpfs-2.2.6-pam_ncp_auth-fix.patch 2026-04-28 20:56:05 +02:00
Mario Fetka
f8a818a08e Apply patch: ncpfs-2.2.6-getuid-fix.patch 2026-04-28 20:56:05 +02:00
Mario Fetka
9a1a04bb89 Apply patch: ncpfs-2.2.6-align-fix.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
5cb1ffb0c3 Apply patch: ncpfs-2.2.6-missing-includes.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
25c1bd0cbd Apply patch: ncpfs-2.2.6-CVE-2011-1679+1680.diff 2026-04-28 20:56:04 +02:00
Mario Fetka
ef8bd91ac8 Apply patch: ncpfs-2_2_6_partial.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
96f556756f Apply patch: ncpfs-2.2.6-mount-issue-ver2.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
ac6fbba57f Apply patch: ncpfs.mount_hang.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
4420173152 Apply patch: ncpfs.offsetof.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
2c86c4e4e4 Apply patch: ncpfs.pam_ncp_auth.syslog.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
0335fad01d Apply patch: ncpfs.LDFLAGS.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
3dfee625b2 Apply patch: ncpfs-hg-commit-458.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
1eabb4023c Apply patch: ncpfs-hg-commit-457.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
e86c5b7566 Apply patch: ncpfs-hg-commit-456.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
a6ec57e2dd Apply patch: ncpfs-hg-commit-455.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
6697b0bf1f Apply patch: ncpfs-hg-commit-454.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
3f2f1419a2 Apply patch: ncpfs-hg-commit-453.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
ec8ac65ecd Apply patch: ncpfs-hg-commit-452.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
08931df148 Apply patch: ncpfs-hg-commit-451.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
99d2f50b13 Apply patch: ncpfs-hg-commit-450.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
1e22bb8bb0 Apply patch: ncpfs-hg-commit-449.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
4a212a344a Apply patch: ncpfs-hg-commit-448.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
b8edcafa95 Apply patch: ncpfs-hg-commit-447.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
f1bd71ad2b Apply patch: ncpfs-hg-commit-446.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
3bb01f5f63 Apply patch: ncpfs-hg-commit-445.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
418e9a73f3 Apply patch: ncpfs-hg-commit-444.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
c1f9ff00aa Apply patch: ncpfs-hg-commit-443.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
a3dffd8dd5 Apply patch: ncpfs-hg-commit-442.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
783da0a9d7 Apply patch: ncpfs-hg-commit-441.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
acef0daea1 Apply patch: ncpfs-hg-commit-440.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
639326a47b Apply patch: ncpfs-hg-commit-439.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
4dba55d5b7 Apply patch: ncpfs-hg-commit-438.patch 2026-04-28 20:56:04 +02:00
Mario Fetka
047d713617 Apply patch: ncpfs-hg-commit-437.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
b3c6ede15c Apply patch: ncpfs-hg-commit-436.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
3100445250 Apply patch: ncpfs-hg-commit-435.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
d763fcf8d8 Apply patch: ncpfs-hg-commit-434.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
90ae1620dc Apply patch: ncpfs-hg-commit-433.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
6d512926a0 Apply patch: ncpfs-hg-commit-432.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
4d94ea705a Apply patch: ncpfs-hg-commit-431.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
b417a518c5 Apply patch: ncpfs-hg-commit-430.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
3677b7040d Apply patch: ncpfs-hg-commit-429.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
78bb78fa4e Apply patch: ncpfs-hg-commit-428.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
973fa07c99 Apply patch: ncpfs-hg-commit-427.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
6788b3fc6a Apply patch: ncpfs-hg-commit-426.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
aa5795945d Apply patch: ncpfs-hg-commit-425.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
c5eff7349b Apply patch: ncpfs-hg-commit-424.patch 2026-04-28 20:56:03 +02:00
Mario Fetka
81360b55ad Apply patch: ncpfs-hg-commit-423.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
483fe570c5 Apply patch: ncpfs-hg-commit-422.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
fa8a6d071b Apply patch: ncpfs-hg-commit-421.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
466966b43a Apply patch: ncpfs-hg-commit-420.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
6c6c86dcfb Apply patch: ncpfs-hg-commit-419.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
42f1d0941d Apply patch: ncpfs-hg-commit-417.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
58ca20a4ba Apply patch: ncpfs-hg-commit-416.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
31af4d974c Apply patch: ncpfs-hg-commit-415.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
4740ddf9ae Apply patch: ncpfs-hg-commit-414.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
7589a3691c Apply patch: ncpfs-hg-commit-413.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
d2eb8c0f30 Apply patch: ncpfs-hg-commit-412.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
7283b290db Apply patch: ncpfs-hg-commit-411.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
112bf1c545 Apply patch: ncpfs-hg-commit-410.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
fc1534a821 Apply patch: ncpfs-hg-commit-409.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
cf9a7f8a83 Apply patch: ncpfs-hg-commit-408.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
1d3ed884cc Apply patch: ncpfs-hg-commit-407.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
38655cdcbf Apply patch: ncpfs-hg-commit-406.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
8237cf5dba Apply patch: ncpfs-hg-commit-405.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
d5745d1c9b Apply patch: ncpfs-hg-commit-404.patch 2026-04-28 20:56:02 +02:00
Mario Fetka
6e2b9493f9 Apply patch: ncpfs-hg-commit-403.patch 2026-04-28 20:56:02 +02:00
ncpfs archive import
b34e88bda5 Import ncpfs 2.2.6 2026-04-28 20:40:00 +02:00
ncpfs archive import
b48389be22 Import ncpfs 2.2.5 2026-04-28 20:40:00 +02:00
ncpfs archive import
ef8405088b Import ncpfs 2.2.4 2026-04-28 20:40:00 +02:00
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
ncpfs archive import
0979ae6a41 Import ncpfs 2.2.0 2026-04-28 20:39:59 +02:00
ncpfs archive import
c6c6fbe4ca Import ncpfs 2.1.1 2026-04-28 20:39:59 +02:00
677 changed files with 274215 additions and 15061 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

40
.gitattributes vendored Normal file
View File

@@ -0,0 +1,40 @@
# Do not include CI/config metadata in source release tarballs
.gitea/ export-ignore
.github/ export-ignore
.gitignore export-ignore
.gitattributes export-ignore
# Do not include generated phpize/autotools build directories
contrib/php/build/ export-ignore
contrib/php/include/ export-ignore
contrib/php/autom4te.cache/ export-ignore
contrib/php/.deps/ export-ignore
contrib/php/.libs/ export-ignore
contrib/php/modules/ export-ignore
contrib/php/libs/ export-ignore
# Do not include temporary/generated build files
autom4te.cache/ export-ignore
config.log export-ignore
config.status export-ignore
config.cache export-ignore
Makefile export-ignore
Make.rules export-ignore
libtool export-ignore
stamp-h1 export-ignore
# Do not include object/build artifacts
*.o export-ignore
*.do export-ignore
*.to export-ignore
*.lo export-ignore
*.la export-ignore
*.a export-ignore
*.so export-ignore
*.so.* export-ignore
*.dep export-ignore
*.gcno export-ignore
*.gcda export-ignore
*.orig export-ignore
*.rej export-ignore
*~ export-ignore

View File

@@ -0,0 +1,348 @@
name: Source release
on:
push:
tags:
- "v*"
branches:
- master
workflow_dispatch:
jobs:
source-package:
runs-on: ubuntu-latest
env:
GITEA_API: https://gitea.disconnected-by-peer.at/api/v1
OWNER: mars_nwe
REPO: ncpfs
steps:
- name: Check out source
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
token: ${{ secrets.RELEASE_TOKEN }}
- name: Fetch tags explicitly
run: |
git fetch --force --tags
echo "describe:"
git describe --tags --long --match 'v*' --always || true
echo "exact tag:"
git describe --tags --exact-match || true
echo "points-at-head:"
git tag --points-at HEAD || true
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
autoconf \
automake \
autopoint \
gettext \
gettext-base \
make \
gcc \
g++ \
pkg-config \
curl \
jq \
php-dev \
php-cli \
libpam0g-dev
- name: Determine version
id: version
env:
REF_TYPE: ${{ gitea.ref_type || github.ref_type }}
REF_NAME: ${{ gitea.ref_name || github.ref_name }}
SHA: ${{ gitea.sha || github.sha }}
run: |
set -e
BASE_VERSION="$(sed -n 's/^AC_INIT(\[\[ncpfs\]\],\[\[\([^]]*\)\]\].*/\1/p' configure.ac)"
if [ -z "$BASE_VERSION" ]; then
echo "Could not determine version from configure.ac"
exit 1
fi
if [ "$REF_TYPE" = "tag" ]; then
VERSION="$BASE_VERSION"
DISTFILE="ncpfs-${VERSION}.tar.gz"
PREFIX="ncpfs-${VERSION}/"
else
DESCRIBE="$(git describe --tags --long --match 'v*' --always)"
COUNT="$(printf '%s' "$DESCRIBE" | sed -nE 's/^v?[0-9][^-]*-([0-9]+)-g[0-9a-f]+$/\1/p')"
GITID="$(printf '%s' "$DESCRIBE" | sed -nE 's/^v?[0-9][^-]*-[0-9]+-(g[0-9a-f]+)$/\1/p')"
if [ -z "$COUNT" ] || [ -z "$GITID" ]; then
COUNT="$(git rev-list --count HEAD)"
GITID="g$(printf '%s' "$SHA" | cut -c1-7)"
fi
VERSION="${BASE_VERSION}-dev.${COUNT}-${GITID}"
DISTFILE="ncpfs-${VERSION}.tar.gz"
PREFIX="ncpfs-${VERSION}/"
fi
echo "base_version=$BASE_VERSION" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "distfile=$DISTFILE" >> "$GITHUB_OUTPUT"
echo "prefix=$PREFIX" >> "$GITHUB_OUTPUT"
echo "Base version: $BASE_VERSION"
echo "Package version: $VERSION"
echo "Distfile: $DISTFILE"
echo "Prefix: $PREFIX"
- name: Regenerate configure files
run: |
set -e
aclocal
autoheader
autoconf
cd contrib/php
rm -rf autom4te.cache
rm -f configure config.h config.h.in config.log config.status config.cache Makefile Makevars libtool
phpize
cd ../..
- name: Configure
run: |
set -e
./configure --with-php-config="$(command -v php-config)"
- name: Build
run: |
set -e
make
- name: Clean build artifacts
run: |
set -e
make clean || true
rm -rf \
autom4te.cache \
.libs \
modules
rm -f \
Makefile \
Make.rules \
config.log \
config.status \
config.cache \
config.nice \
libtool \
stamp-h1
rm -rf \
contrib/php/autom4te.cache \
contrib/php/.deps \
contrib/php/.libs \
contrib/php/modules \
contrib/php/libs
rm -f \
contrib/php/Makefile \
contrib/php/Makefile.fragments \
contrib/php/Makefile.objects \
contrib/php/Makevars \
contrib/php/config.h \
contrib/php/config.log \
contrib/php/config.status \
contrib/php/config.cache \
contrib/php/config.nice \
contrib/php/config_vars.mk \
contrib/php/libs.mk \
contrib/php/libtool \
contrib/php/run-tests.php \
contrib/php/*.lo \
contrib/php/*.la \
contrib/php/*.o \
contrib/php/*.dep \
contrib/php/*.slo
find . \
\( -name '*.o' \
-o -name '*.do' \
-o -name '*.to' \
-o -name '*.lo' \
-o -name '*.la' \
-o -name '*.a' \
-o -name '*.so' \
-o -name '*.so.*' \
-o -name '*.dep' \
-o -name '*.gcno' \
-o -name '*.gcda' \
-o -name '*.orig' \
-o -name '*.rej' \
-o -name '*~' \) \
-delete
find man -name '*.gz' -delete 2>/dev/null || true
find ipx-1.0 -name '*.gz' -delete 2>/dev/null || true
test -f lib/libncp.vers
- name: Build source tarball
id: pkg
run: |
set -e
VERSION="${{ steps.version.outputs.version }}"
DISTFILE="${{ steps.version.outputs.distfile }}"
PREFIX="${{ steps.version.outputs.prefix }}"
git archive \
--format=tar \
--prefix="${PREFIX}" \
HEAD | gzip -9 > "../${DISTFILE}"
FILE="$(realpath "../${DISTFILE}")"
test -s "$FILE"
echo "file=$FILE" >> "$GITHUB_OUTPUT"
echo "name=$DISTFILE" >> "$GITHUB_OUTPUT"
echo "Created: $FILE"
tar -tzf "$FILE" > tarball-list.txt
sed -n '1,20p' tarball-list.txt
echo
echo "Checking archive exclusions..."
if grep -E '(^[^/]+/\.gitea/|^[^/]+/\.github/|^[^/]+/contrib/php/build/|^[^/]+/contrib/php/autom4te.cache/)' tarball-list.txt; then
echo "Archive contains excluded CI/build paths"
exit 1
fi
- name: Decide release target
id: target
env:
REF_TYPE: ${{ gitea.ref_type || github.ref_type }}
REF_NAME: ${{ gitea.ref_name || github.ref_name }}
SHA: ${{ gitea.sha || github.sha }}
run: |
set -e
if [ "$REF_TYPE" = "tag" ]; then
echo "tag=$REF_NAME" >> "$GITHUB_OUTPUT"
echo "name=$REF_NAME" >> "$GITHUB_OUTPUT"
echo "prerelease=false" >> "$GITHUB_OUTPUT"
else
SHORT_SHA="$(printf '%s' "$SHA" | cut -c1-7)"
echo "tag=development" >> "$GITHUB_OUTPUT"
echo "name=development ($REF_NAME @ $SHORT_SHA)" >> "$GITHUB_OUTPUT"
echo "prerelease=true" >> "$GITHUB_OUTPUT"
fi
- name: Create or update release
env:
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
REL_TAG: ${{ steps.target.outputs.tag }}
REL_NAME: ${{ steps.target.outputs.name }}
REL_PRERELEASE: ${{ steps.target.outputs.prerelease }}
run: |
set -e
RELEASE_JSON="$(curl -fsS \
-H "Authorization: token ${GITEA_TOKEN}" \
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/tags/${REL_TAG}" || true)"
if [ -z "$RELEASE_JSON" ]; then
RELEASE_JSON="$(curl -fsS -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
"${GITEA_API}/repos/${OWNER}/${REPO}/releases" \
-d "$(jq -n \
--arg tag "$REL_TAG" \
--arg name "$REL_NAME" \
--argjson prerelease "$REL_PRERELEASE" \
'{tag_name:$tag,name:$name,draft:false,prerelease:$prerelease}')" )"
else
RELEASE_ID="$(printf '%s' "$RELEASE_JSON" | jq -r '.id')"
RELEASE_JSON="$(curl -fsS -X PATCH \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${RELEASE_ID}" \
-d "$(jq -n \
--arg tag "$REL_TAG" \
--arg name "$REL_NAME" \
--argjson prerelease "$REL_PRERELEASE" \
'{tag_name:$tag,name:$name,draft:false,prerelease:$prerelease}')" )"
fi
echo "$RELEASE_JSON" > release.json
- name: Delete old development assets
if: ${{ steps.target.outputs.tag == 'development' }}
env:
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: |
set -e
RELEASE_ID="$(jq -r '.id' release.json)"
ASSET_IDS="$(curl -fsS \
-H "Authorization: token ${GITEA_TOKEN}" \
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${RELEASE_ID}" \
| jq -r '.assets[]? | .id')"
if [ -z "$ASSET_IDS" ]; then
echo "No old development assets to delete."
exit 0
fi
for ASSET_ID in $ASSET_IDS; do
echo "Deleting old development asset id=${ASSET_ID}"
curl -fsS -X DELETE \
-H "Authorization: token ${GITEA_TOKEN}" \
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${RELEASE_ID}/assets/${ASSET_ID}"
done
- name: Delete old asset with same name if present
env:
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
NAME: ${{ steps.pkg.outputs.name }}
run: |
set -e
RELEASE_ID="$(jq -r '.id' release.json)"
ASSET_ID="$(curl -fsS \
-H "Authorization: token ${GITEA_TOKEN}" \
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${RELEASE_ID}" \
| jq -r --arg NAME "$NAME" '.assets[]? | select(.name==$NAME) | .id' \
| head -n1)"
if [ -n "$ASSET_ID" ]; then
curl -fsS -X DELETE \
-H "Authorization: token ${GITEA_TOKEN}" \
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${RELEASE_ID}/assets/${ASSET_ID}"
fi
- name: Upload tarball to release
env:
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
FILE: ${{ steps.pkg.outputs.file }}
NAME: ${{ steps.pkg.outputs.name }}
run: |
set -e
RELEASE_ID="$(jq -r '.id' release.json)"
curl -fsS -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"${FILE}" \
"${GITEA_API}/repos/${OWNER}/${REPO}/releases/${RELEASE_ID}/assets?name=${NAME}"

220
.gitignore vendored Normal file
View File

@@ -0,0 +1,220 @@
# Object/build artifacts
*.a
*.d
*.do
*.la
*.lo
*.o
*.so
*.so.*
*.slo
*~
*.orig
*.rej
# Top-level configure/build outputs
/Make.rules
/Makefile
/autom4te.cache/
/config.log
/config.status
/config.cache
/stamp-h1
/libtool
# Generated config headers
/include/config.h
/include/ncp/ext/socket.h
/include/ncp/ext/stdint.h
/include/ncp/kernel/fs.h
/include/ncp/kernel/if.h
/include/ncp/kernel/ipx.h
/include/ncp/kernel/route.h
/include/ncp/kernel/types.h
/include/ncp/nwnet.h
# intl / po generated files
/intl/Makefile
/po/Makefile
/po/Makefile.in
/po/POTFILES
# Library outputs
/lib/Makefile
/lib/libncp.so.*
# manpage outputs
/man/*.gz
/man/Makefile
# ipx generated files
/ipx-1.0/*.gz
/ipx-1.0/Makefile
/ipx-1.0/Samples/Makefile
/ipx-1.0/Samples/ipxrcv
/ipx-1.0/Samples/ipxsend
/ipx-1.0/Samples/rip
/ipx-1.0/Samples/sap
/ipx-1.0/ipx_cmd
/ipx-1.0/ipx_configure
/ipx-1.0/ipx_interface
/ipx-1.0/ipx_internal_net
/ipx-1.0/ipx_route
/ipxdump/Makefile
# sutil binaries
/sutil/Makefile
/sutil/ncplogin
/sutil/ncpmap
/sutil/ncpmount
/sutil/ncpumount
/sutil/nwsfind
# util binaries
/util/Makefile
/util/ncopy
/util/ncptest
/util/nprint
/util/nsend
/util/nwauth
/util/nwbocreate
/util/nwbols
/util/nwboprops
/util/nwborm
/util/nwbpadd
/util/nwbpcreate
/util/nwbprm
/util/nwbpset
/util/nwbpvalues
/util/nwdir
/util/nwdpvalues
/util/nwfsctrl
/util/nwfsinfo
/util/nwfstime
/util/nwgrant
/util/nwlistsalvage
/util/nwmsg
/util/nwpasswd
/util/nwpjmv
/util/nwpqjob
/util/nwpurge
/util/nwrevoke
/util/nwrights
/util/nwsalvage
/util/nwtrustee
/util/nwtrustee2
/util/nwuserlist
/util/nwvolinfo
/util/pqlist
/util/pqstat
/util/pserver
/util/slist
# contrib generated files
/contrib/ncp_nss_lib/libnss_ncp.so.*
/contrib/ncp_nss_lib/test_ncp_nss
/contrib/pam/Makefile
/contrib/php/Makefile
/contrib/php/.deps/
/contrib/php/.libs/
/contrib/php/config.h
/contrib/php/config.log
/contrib/php/config.nice
/contrib/php/config.status
/contrib/php/config.cache
/contrib/php/config_vars.mk
/contrib/php/libs.mk
/contrib/php/php_auth_nds.slo
/contrib/php/modules/
/contrib/php/libs/
/contrib/php/libtool
/contrib/php/Makevars
/contrib/php/run-tests.php
/contrib/tcl-utils/Makefile
/contrib/tknwmsg/Makefile
/contrib/tests/Makefile
# contrib testing binaries
/contrib/testing/Makefile
/contrib/testing/abbrev
/contrib/testing/canon
/contrib/testing/chgpwd
/contrib/testing/cmpattr
/contrib/testing/copyauth
/contrib/testing/dirlimit
/contrib/testing/dirlist2
/contrib/testing/dssearch
/contrib/testing/dsstream
/contrib/testing/eaops
/contrib/testing/effright
/contrib/testing/fileinfo
/contrib/testing/large
/contrib/testing/lic
/contrib/testing/mkattr
/contrib/testing/mkclass
/contrib/testing/mkfile
/contrib/testing/mkobj
/contrib/testing/modclass
/contrib/testing/modobj
/contrib/testing/mvobj
/contrib/testing/nfssetinfo
/contrib/testing/nsfileinfo
/contrib/testing/nwbcast
/contrib/testing/nwdsgethost
/contrib/testing/nwdsgetstat
/contrib/testing/nwdsgetvi
/contrib/testing/nwdslist
/contrib/testing/nwdspartjoin
/contrib/testing/nwdspartlist
/contrib/testing/nwdspartrm
/contrib/testing/nwdspartsplit
/contrib/testing/nwdsresetstat
/contrib/testing/nwgettime
/contrib/testing/partroot
/contrib/testing/physlock
/contrib/testing/readaddr
/contrib/testing/readadef
/contrib/testing/readattr
/contrib/testing/readcc
/contrib/testing/readcls
/contrib/testing/readsynt
/contrib/testing/reloadds
/contrib/testing/renobj
/contrib/testing/replops
/contrib/testing/resint
/contrib/testing/resolve
/contrib/testing/rmattr
/contrib/testing/rmclass
/contrib/testing/rmobj
/contrib/testing/schsync
/contrib/testing/semaphore
/contrib/testing/setkeys
/contrib/testing/time
/contrib/testing/timegv
/contrib/testing/timeinfo
/contrib/testing/verpwd
/contrib/testing/verunix
/contrib/testing/vollist
/contrib/testing/wcsmbs-tst1
# contrib testing/pp binaries
/contrib/testing/pp/Makefile
/contrib/testing/pp/bcastmd
/contrib/testing/pp/getconn_addr
/contrib/testing/pp/getsynt
/contrib/testing/pp/nwc_next_object
/contrib/testing/pp/nwgetconnlist
/contrib/testing/pp/nwwhoami
/contrib/testing/pp/open_conn_by_name
/contrib/testing/pp/readsdef
/contrib/testing/pp/readsynt
/contrib/testing/pp/return_block_of_tree
/contrib/testing/pp/scantree
/contrib/testing/pp/scanvolr
/contrib/testing/pp/semaphor
/contrib/testing/pp/treelist
/contrib/testing/pp/vlist
/contrib/testing/pp/volres

986
ABOUT-NLS Normal file
View File

@@ -0,0 +1,986 @@
1 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 free software 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 on translations can 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.
1.1 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'.
1.2 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 included GNU
`gettext' 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 not be 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 usually have 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.
1.3 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'.
Special advice for Norwegian users: The language code for Norwegian
bokma*l changed from `no' to `nb' recently (in 2003). During the
transition period, while some message catalogs for this language are
installed under `nb' and some older ones under `no', it's recommended
for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
older translations are used.
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.
1.4 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.
1.5 Available Packages
======================
Languages are not equally supported in all packages. The following
matrix shows the current state of internationalization, as of April
2005. 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 af am ar az be bg bs ca cs cy da de el en en_GB
+-------------------------------------------------+
GNUnet | |
a2ps | [] [] [] [] [] |
aegis | () |
ant-phone | () |
anubis | [] |
ap-utils | |
aspell | [] [] [] [] |
bash | [] [] |
batchelor | [] |
bfd | |
bibshelf | [] |
binutils | [] |
bison | [] [] |
bluez-pin | [] [] [] [] |
clisp | [] [] |
console-tools | [] [] |
coreutils | [] [] [] [] |
cpio | |
cpplib | [] [] [] |
darkstat | [] () [] |
dialog | [] [] [] [] [] [] |
diffutils | [] [] [] [] [] |
doodle | [] |
e2fsprogs | [] [] |
enscript | [] [] [] [] |
error | [] [] [] [] |
fetchmail | [] () [] [] [] |
fileutils | [] [] |
findutils | [] [] [] |
flex | [] [] [] |
fslint | [] |
gas | |
gawk | [] [] [] |
gbiff | [] |
gcal | [] |
gcc | [] |
gettext-examples | [] [] [] [] |
gettext-runtime | [] [] [] [] |
gettext-tools | [] [] |
gimp-print | [] [] [] [] |
gip | |
gliv | [] |
glunarclock | |
gmult | [] [] |
gnubiff | () |
gnucash | [] () () [] |
gnucash-glossary | [] () |
gpe-aerial | [] [] |
gpe-beam | [] [] |
gpe-calendar | [] [] |
gpe-clock | [] [] |
gpe-conf | [] [] |
gpe-contacts | |
gpe-edit | [] |
gpe-go | [] |
gpe-login | [] [] |
gpe-ownerinfo | [] [] |
gpe-sketchbook | [] [] |
gpe-su | [] [] |
gpe-taskmanager | [] [] |
gpe-timesheet | [] |
gpe-today | [] [] |
gpe-todo | [] [] |
gphoto2 | [] [] [] [] |
gprof | [] [] |
gpsdrive | () () |
gramadoir | [] [] |
grep | [] [] [] [] [] [] |
gretl | |
gsasl | [] |
gss | |
gst-plugins | [] [] [] [] [] [] |
gstreamer | [] [] [] [] [] |
gtick | [] () |
gtkspell | [] [] [] |
hello | [] [] [] [] |
id-utils | [] [] |
impost | |
indent | [] [] |
iso_3166 | |
iso_3166_1 | [] [] [] [] [] |
iso_3166_2 | |
iso_3166_3 | [] |
iso_4217 | |
iso_639 | |
jpilot | [] |
jtag | |
jwhois | |
kbd | [] [] [] [] |
latrine | () |
ld | [] |
libc | [] [] [] [] [] |
libextractor | |
libgpewidget | [] [] [] |
libgsasl | |
libiconv | [] [] [] [] [] |
libidn | |
lifelines | [] () |
lilypond | [] |
lingoteach | |
lynx | [] [] [] [] |
m4 | [] [] [] [] |
mailutils | [] |
make | [] [] |
man-db | [] () [] [] |
minicom | [] [] |
mysecretdiary | [] [] |
nano | [] () [] |
nano_1_0 | [] () [] [] |
opcodes | [] |
parted | [] [] [] [] |
psmisc | |
ptx | [] [] [] |
pwdutils | |
python | |
radius | [] |
recode | [] [] [] [] [] |
rpm | [] [] |
screem | |
scrollkeeper | [] [] [] [] [] [] [] [] |
sed | [] [] |
sh-utils | [] [] |
shared-mime-info | [] [] |
sharutils | [] [] [] [] [] |
silky | |
skencil | [] () |
sketch | [] () |
solfege | [] |
soundtracker | [] [] |
sp | [] |
stardict | [] |
tar | |
texinfo | [] [] |
textutils | [] [] [] |
tin | () () |
tp-robot | [] |
tuxpaint | [] [] [] [] [] [] [] |
unicode-han-tra... | |
unicode-transla... | |
util-linux | [] [] [] [] |
vorbis-tools | [] [] [] [] |
wastesedge | () |
wdiff | [] [] [] [] |
wget | [] [] [] [] [] [] |
xchat | [] [] [] [] |
xkeyboard-config | |
xpad | |
+-------------------------------------------------+
af am ar az be bg bs ca cs cy da de el en en_GB
10 0 0 2 7 4 0 41 43 3 52 90 20 1 15
eo es et eu fa fi fr ga gl he hr hu id is it
+-----------------------------------------------+
GNUnet | |
a2ps | [] [] [] () |
aegis | |
ant-phone | [] |
anubis | [] |
ap-utils | [] |
aspell | [] [] |
bash | [] [] [] [] |
batchelor | [] [] |
bfd | [] |
bibshelf | [] [] [] |
binutils | [] [] |
bison | [] [] [] [] [] [] |
bluez-pin | [] [] [] [] [] [] |
clisp | [] [] |
console-tools | |
coreutils | [] [] [] [] [] |
cpio | [] [] |
cpplib | [] [] |
darkstat | [] () [] [] [] |
dialog | [] [] [] [] [] [] [] [] |
diffutils | [] [] [] [] [] [] [] [] [] [] |
doodle | [] [] |
e2fsprogs | [] [] [] |
enscript | [] [] |
error | [] [] [] [] [] |
fetchmail | [] |
fileutils | [] [] [] [] [] [] |
findutils | [] [] [] [] [] |
flex | [] [] [] |
fslint | [] |
gas | [] [] |
gawk | [] [] [] [] |
gbiff | [] |
gcal | [] [] |
gcc | [] |
gettext-examples | [] [] [] [] |
gettext-runtime | [] [] [] [] [] [] |
gettext-tools | [] [] [] |
gimp-print | [] [] |
gip | [] [] [] |
gliv | () |
glunarclock | [] [] [] |
gmult | [] [] [] |
gnubiff | () () |
gnucash | [] () [] |
gnucash-glossary | [] [] |
gpe-aerial | [] [] |
gpe-beam | [] [] |
gpe-calendar | [] [] [] [] |
gpe-clock | [] [] [] |
gpe-conf | [] |
gpe-contacts | [] |
gpe-edit | [] [] |
gpe-go | [] [] |
gpe-login | [] [] [] |
gpe-ownerinfo | [] [] [] [] [] |
gpe-sketchbook | [] [] |
gpe-su | [] [] [] |
gpe-taskmanager | [] [] [] |
gpe-timesheet | [] [] [] [] |
gpe-today | [] [] [] [] |
gpe-todo | [] [] [] |
gphoto2 | [] [] [] [] [] |
gprof | [] [] [] |
gpsdrive | () () [] () |
gramadoir | [] [] |
grep | [] [] [] [] [] [] [] [] [] [] [] [] |
gretl | [] [] [] |
gsasl | [] [] [] |
gss | [] |
gst-plugins | [] [] [] |
gstreamer | [] |
gtick | [] [] [] [] [] |
gtkspell | [] [] [] [] [] [] |
hello | [] [] [] [] [] [] [] [] [] [] [] [] [] [] |
id-utils | [] [] [] [] |
impost | [] [] |
indent | [] [] [] [] [] [] [] [] [] [] [] |
iso_3166 | [] [] [] |
iso_3166_1 | [] [] [] [] [] [] [] |
iso_3166_2 | [] |
iso_3166_3 | [] |
iso_4217 | [] [] [] |
iso_639 | [] [] [] [] |
jpilot | [] [] |
jtag | [] |
jwhois | [] [] [] [] [] |
kbd | [] [] |
latrine | [] [] [] |
ld | [] [] |
libc | [] [] [] [] [] |
libextractor | |
libgpewidget | [] [] [] [] [] |
libgsasl | [] [] |
libiconv | [] [] [] [] [] [] [] [] [] [] [] |
libidn | [] [] |
lifelines | () |
lilypond | [] |
lingoteach | [] [] [] |
lynx | [] [] [] |
m4 | [] [] [] [] |
mailutils | [] [] |
make | [] [] [] [] [] [] [] |
man-db | () |
minicom | [] [] [] [] |
mysecretdiary | [] [] [] |
nano | [] [] () [] [] |
nano_1_0 | [] [] [] [] [] |
opcodes | [] [] |
parted | [] [] [] [] |
psmisc | [] [] |
ptx | [] [] [] [] [] [] [] [] [] |
pwdutils | |
python | |
radius | [] [] |
recode | [] [] [] [] [] [] [] [] |
rpm | [] |
screem | |
scrollkeeper | [] [] [] |
sed | [] [] [] [] [] |
sh-utils | [] [] [] [] [] [] [] |
shared-mime-info | [] [] [] [] [] [] |
sharutils | [] [] [] [] [] [] [] |
silky | [] |
skencil | [] [] |
sketch | [] [] |
solfege | [] |
soundtracker | [] [] [] |
sp | [] |
stardict | [] |
tar | [] [] [] [] [] |
texinfo | [] [] [] |
textutils | [] [] [] [] [] |
tin | [] () |
tp-robot | [] [] |
tuxpaint | [] [] [] [] [] [] [] [] [] |
unicode-han-tra... | |
unicode-transla... | [] [] |
util-linux | [] [] [] [] [] [] |
vorbis-tools | [] [] |
wastesedge | () |
wdiff | [] [] [] [] [] [] [] [] |
wget | [] [] [] [] [] [] [] [] [] [] |
xchat | [] [] [] [] [] |
xkeyboard-config | |
xpad | [] [] [] |
+-----------------------------------------------+
eo es et eu fa fi fr ga gl he hr hu id is it
13 85 21 15 2 35 115 45 17 8 6 40 27 1 45
ja ko ku lg lt lv mk mn ms mt nb nl nn no nso
+-----------------------------------------------+
GNUnet | |
a2ps | () [] [] () |
aegis | () |
ant-phone | [] |
anubis | [] [] [] |
ap-utils | |
aspell | [] [] |
bash | [] |
batchelor | [] |
bfd | |
bibshelf | |
binutils | |
bison | [] [] [] |
bluez-pin | [] |
clisp | [] |
console-tools | |
coreutils | [] [] |
cpio | |
cpplib | |
darkstat | [] [] |
dialog | [] |
diffutils | [] [] [] |
doodle | |
e2fsprogs | |
enscript | [] |
error | [] |
fetchmail | [] [] |
fileutils | [] [] |
findutils | [] |
flex | [] [] |
fslint | [] |
gas | |
gawk | [] [] |
gbiff | [] |
gcal | |
gcc | |
gettext-examples | [] [] |
gettext-runtime | [] [] [] |
gettext-tools | [] [] |
gimp-print | [] [] |
gip | [] |
gliv | [] |
glunarclock | [] [] |
gmult | [] |
gnubiff | |
gnucash | () () [] |
gnucash-glossary | [] |
gpe-aerial | [] |
gpe-beam | [] |
gpe-calendar | [] |
gpe-clock | [] |
gpe-conf | [] |
gpe-contacts | |
gpe-edit | [] |
gpe-go | [] |
gpe-login | [] |
gpe-ownerinfo | [] |
gpe-sketchbook | [] |
gpe-su | [] |
gpe-taskmanager | [] [] |
gpe-timesheet | [] |
gpe-today | [] |
gpe-todo | [] |
gphoto2 | [] [] |
gprof | |
gpsdrive | () () () |
gramadoir | () |
grep | [] [] [] |
gretl | |
gsasl | [] |
gss | |
gst-plugins | [] |
gstreamer | [] |
gtick | [] |
gtkspell | [] [] |
hello | [] [] [] [] [] [] [] [] |
id-utils | [] |
impost | |
indent | [] [] |
iso_3166 | [] |
iso_3166_1 | [] [] |
iso_3166_2 | [] |
iso_3166_3 | [] |
iso_4217 | [] [] [] |
iso_639 | [] [] [] |
jpilot | () () () |
jtag | |
jwhois | [] |
kbd | [] |
latrine | [] |
ld | |
libc | [] [] [] [] [] |
libextractor | |
libgpewidget | [] |
libgsasl | [] |
libiconv | [] |
libidn | |
lifelines | [] |
lilypond | [] |
lingoteach | [] |
lynx | [] [] |
m4 | [] [] |
mailutils | |
make | [] [] [] |
man-db | () |
minicom | [] |
mysecretdiary | [] |
nano | [] [] |
nano_1_0 | [] [] [] |
opcodes | [] |
parted | [] [] |
psmisc | [] [] |
ptx | [] [] [] |
pwdutils | |
python | |
radius | |
recode | [] |
rpm | [] [] |
screem | [] |
scrollkeeper | [] [] [] |
sed | [] [] |
sh-utils | [] [] |
shared-mime-info | [] [] [] [] |
sharutils | [] [] |
silky | [] |
skencil | |
sketch | |
solfege | [] [] |
soundtracker | |
sp | () |
stardict | [] [] |
tar | [] [] |
texinfo | [] [] [] |
textutils | [] [] [] |
tin | |
tp-robot | [] |
tuxpaint | [] [] [] [] [] [] |
unicode-han-tra... | |
unicode-transla... | |
util-linux | [] [] |
vorbis-tools | [] |
wastesedge | [] |
wdiff | [] [] |
wget | [] [] |
xchat | [] [] [] [] |
xkeyboard-config | [] |
xpad | [] |
+-----------------------------------------------+
ja ko ku lg lt lv mk mn ms mt nb nl nn no nso
33 11 1 1 1 2 2 3 11 0 15 96 7 5 0
or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
+-------------------------------------------------+
GNUnet | |
a2ps | () [] [] [] [] [] [] |
aegis | () () |
ant-phone | [] |
anubis | [] [] [] |
ap-utils | () |
aspell | [] [] |
bash | [] [] [] |
batchelor | [] |
bfd | |
bibshelf | |
binutils | [] [] |
bison | [] [] [] [] [] |
bluez-pin | [] [] [] [] [] [] [] [] |
clisp | [] |
console-tools | [] |
coreutils | [] [] [] [] |
cpio | [] [] |
cpplib | |
darkstat | [] [] [] [] [] [] |
dialog | [] [] [] [] [] [] [] |
diffutils | [] [] [] [] [] [] |
doodle | [] |
e2fsprogs | [] [] |
enscript | [] [] [] [] |
error | [] [] [] |
fetchmail | [] () [] [] [] |
fileutils | [] [] [] [] [] |
findutils | [] [] [] [] [] [] |
flex | [] [] [] [] [] |
fslint | [] [] [] |
gas | |
gawk | [] [] [] [] |
gbiff | [] |
gcal | [] |
gcc | |
gettext-examples | [] [] [] [] [] [] |
gettext-runtime | [] [] [] [] [] [] [] |
gettext-tools | [] [] [] [] [] [] [] |
gimp-print | [] [] |
gip | [] [] [] |
gliv | [] [] [] |
glunarclock | [] [] [] [] [] [] |
gmult | [] [] [] [] |
gnubiff | () [] |
gnucash | () [] [] [] [] |
gnucash-glossary | [] [] [] |
gpe-aerial | [] [] [] [] [] [] |
gpe-beam | [] [] [] [] [] [] |
gpe-calendar | [] [] [] [] [] [] [] |
gpe-clock | [] [] [] [] [] [] [] |
gpe-conf | [] [] [] [] [] [] |
gpe-contacts | [] [] [] |
gpe-edit | [] [] [] [] [] [] [] |
gpe-go | [] [] [] [] [] |
gpe-login | [] [] [] [] [] [] [] |
gpe-ownerinfo | [] [] [] [] [] [] [] |
gpe-sketchbook | [] [] [] [] [] [] [] |
gpe-su | [] [] [] [] [] [] [] |
gpe-taskmanager | [] [] [] [] [] [] [] |
gpe-timesheet | [] [] [] [] [] [] [] |
gpe-today | [] [] [] [] [] [] [] |
gpe-todo | [] [] [] [] [] [] [] |
gphoto2 | [] [] [] [] |
gprof | [] [] [] |
gpsdrive | [] |
gramadoir | [] |
grep | [] [] [] [] [] [] [] |
gretl | [] |
gsasl | [] [] [] [] [] |
gss | [] [] [] |
gst-plugins | [] [] [] [] |
gstreamer | [] [] [] [] |
gtick | [] [] [] |
gtkspell | [] [] [] [] [] [] |
hello | [] [] [] [] [] [] [] |
id-utils | [] [] [] [] |
impost | |
indent | [] [] [] [] [] [] |
iso_3166 | [] [] [] [] [] |
iso_3166_1 | [] [] [] [] |
iso_3166_2 | |
iso_3166_3 | [] [] [] |
iso_4217 | [] [] |
iso_639 | [] [] [] |
jpilot | |
jtag | [] |
jwhois | [] [] [] () () |
kbd | [] [] [] |
latrine | [] [] |
ld | [] |
libc | [] [] [] [] [] |
libextractor | [] |
libgpewidget | [] [] [] [] [] [] |
libgsasl | [] [] [] |
libiconv | [] [] [] [] [] [] [] [] [] [] |
libidn | [] () |
lifelines | [] [] |
lilypond | [] |
lingoteach | [] |
lynx | [] [] [] |
m4 | [] [] [] [] [] |
mailutils | [] [] [] |
make | [] [] [] [] |
man-db | [] [] |
minicom | [] [] [] [] |
mysecretdiary | [] [] [] [] |
nano | [] [] [] |
nano_1_0 | [] [] [] [] |
opcodes | [] [] |
parted | [] [] [] [] |
psmisc | [] [] |
ptx | [] [] [] [] [] [] |
pwdutils | [] |
python | |
radius | [] [] |
recode | [] [] [] [] [] [] |
rpm | [] [] [] [] |
screem | |
scrollkeeper | [] [] [] [] [] [] [] |
sed | [] [] [] [] [] [] [] [] |
sh-utils | [] [] [] |
shared-mime-info | [] [] [] [] [] |
sharutils | [] [] [] |
silky | [] |
skencil | [] [] [] |
sketch | [] [] [] |
solfege | |
soundtracker | [] [] |
sp | |
stardict | [] [] |
tar | [] [] [] [] |
texinfo | [] [] [] [] |
textutils | [] [] [] |
tin | |
tp-robot | [] |
tuxpaint | [] [] [] [] [] [] [] [] |
unicode-han-tra... | |
unicode-transla... | |
util-linux | [] [] [] |
vorbis-tools | [] [] |
wastesedge | |
wdiff | [] [] [] [] [] [] |
wget | [] [] [] [] [] [] [] [] [] |
xchat | [] [] [] [] [] [] |
xkeyboard-config | |
xpad | |
+-------------------------------------------------+
or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
1 0 48 30 58 6 79 71 5 45 13 12 50 86 0
tg th tk tr uk ven vi wa xh zh_CN zh_TW zu
+--------------------------------------------+
GNUnet | | 0
a2ps | [] [] [] | 19
aegis | | 0
ant-phone | [] | 4
anubis | [] | 9
ap-utils | () | 1
aspell | [] [] [] | 13
bash | | 10
batchelor | [] [] | 7
bfd | | 1
bibshelf | [] | 5
binutils | [] | 6
bison | [] | 17
bluez-pin | [] [] [] [] [] | 24
clisp | | 7
console-tools | [] | 4
coreutils | [] | 16
cpio | [] [] | 6
cpplib | [] [] | 7
darkstat | [] () () | 15
dialog | [] [] [] | 25
diffutils | [] [] [] [] | 28
doodle | [] | 5
e2fsprogs | [] | 8
enscript | [] | 12
error | [] [] [] | 16
fetchmail | [] | 12
fileutils | [] [] [] | 18
findutils | [] [] | 17
flex | [] [] | 15
fslint | [] | 7
gas | [] | 3
gawk | [] | 14
gbiff | | 4
gcal | [] | 5
gcc | [] | 3
gettext-examples | [] [] [] [] | 20
gettext-runtime | [] [] [] [] [] | 25
gettext-tools | [] [] [] | 17
gimp-print | [] | 11
gip | [] | 8
gliv | [] | 6
glunarclock | [] [] | 13
gmult | [] [] [] | 13
gnubiff | [] | 3
gnucash | () [] | 10
gnucash-glossary | [] | 8
gpe-aerial | [] [] | 13
gpe-beam | [] [] | 13
gpe-calendar | [] [] [] [] | 18
gpe-clock | [] [] [] [] | 17
gpe-conf | [] [] | 12
gpe-contacts | [] [] | 6
gpe-edit | [] [] [] [] | 15
gpe-go | [] [] | 11
gpe-login | [] [] [] [] [] | 18
gpe-ownerinfo | [] [] [] [] | 19
gpe-sketchbook | [] [] | 14
gpe-su | [] [] [] | 16
gpe-taskmanager | [] [] [] | 17
gpe-timesheet | [] [] [] [] | 17
gpe-today | [] [] [] [] [] | 19
gpe-todo | [] [] [] | 16
gphoto2 | [] [] | 17
gprof | [] [] | 10
gpsdrive | | 2
gramadoir | [] | 6
grep | [] [] [] [] | 32
gretl | | 4
gsasl | [] [] | 12
gss | [] | 5
gst-plugins | [] [] | 16
gstreamer | [] [] [] | 14
gtick | [] | 11
gtkspell | [] [] [] | 20
hello | [] [] [] [] | 37
id-utils | [] [] | 13
impost | [] | 3
indent | [] [] [] | 24
iso_3166 | [] [] [] | 12
iso_3166_1 | [] [] | 20
iso_3166_2 | | 2
iso_3166_3 | [] [] | 8
iso_4217 | [] [] | 10
iso_639 | [] [] | 12
jpilot | [] [] [] | 6
jtag | | 2
jwhois | [] [] [] | 12
kbd | [] [] | 12
latrine | [] [] | 8
ld | [] | 5
libc | [] [] | 22
libextractor | | 1
libgpewidget | [] [] | 17
libgsasl | [] | 7
libiconv | [] [] [] [] [] | 32
libidn | [] [] | 5
lifelines | | 4
lilypond | [] | 5
lingoteach | | 5
lynx | [] [] | 14
m4 | [] [] | 17
mailutils | [] | 7
make | [] [] | 18
man-db | | 5
minicom | | 11
mysecretdiary | [] [] | 12
nano | | 11
nano_1_0 | [] [] | 17
opcodes | [] | 7
parted | [] [] [] | 17
psmisc | [] | 7
ptx | [] [] | 23
pwdutils | | 1
python | | 0
radius | [] | 6
recode | [] [] | 22
rpm | [] [] | 11
screem | | 1
scrollkeeper | [] [] | 23
sed | [] [] | 19
sh-utils | [] | 15
shared-mime-info | [] [] | 19
sharutils | [] [] [] | 20
silky | | 3
skencil | | 6
sketch | | 6
solfege | | 4
soundtracker | [] | 8
sp | [] | 3
stardict | [] [] [] [] | 10
tar | [] [] | 13
texinfo | [] [] | 14
textutils | [] [] [] | 17
tin | | 1
tp-robot | [] [] | 7
tuxpaint | [] [] [] [] | 34
unicode-han-tra... | | 0
unicode-transla... | | 2
util-linux | [] [] | 17
vorbis-tools | [] | 10
wastesedge | | 1
wdiff | [] [] | 22
wget | [] [] [] [] | 31
xchat | [] [] [] | 22
xkeyboard-config | | 1
xpad | [] | 5
+--------------------------------------------+
72 teams tg th tk tr uk ven vi wa xh zh_CN zh_TW zu
147 domains 0 0 1 78 29 0 71 16 0 41 20 0 1711
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 April 2005 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'.
1.6 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
the 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.

27
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
@@ -33,3 +36,27 @@ like
Nov 25 16:09:08 lx01 kernel: alloc_skb called nonatomically from interrupt 0000002e
These are a bit annoying, but completely harmless.
-------------------------------------------------------------------------------
Known bugs:
- 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.
- 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.

985
Changes

File diff suppressed because it is too large Load Diff

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>

77
Make.rules.in Normal file
View File

@@ -0,0 +1,77 @@
# ########################################################
INSTALL := @INSTALL@
INSTALL_DATA := @INSTALL_DATA@
CC := @CC@
RANLIB := @RANLIB@
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
# Default hardening flags. They are intentionally overridable so that
# distro/package builds can provide their own policy, for example:
# make HARDEN_CFLAGS= HARDEN_LDFLAGS=
HARDEN_CPPFLAGS ?=
HARDEN_CFLAGS ?= -O2 -fstack-protector-strong -fstack-clash-protection -D_FORTIFY_SOURCE=3
HARDEN_LDFLAGS ?= -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack
PIE_CFLAGS ?= -fPIE
PIE_LDFLAGS ?= -pie
CFLAGS_OPTIONS += $(HARDEN_CPPFLAGS) $(HARDEN_CFLAGS)
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)
LDFLAGS := $(HARDEN_LDFLAGS) @LDFLAGS@
# 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@
BUILD_SHARED := @BUILD_SHARED@
libext := @libext@
shlibext := @shlibext@
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

105
Makefile
View File

@@ -1,105 +0,0 @@
#
# Makefile for the linux ncp-filesystem routines.
#
VERSION = 2.0.12
# If you are using kerneld to autoload ncp support,
# uncomment this (kerneld is in linux since about 1.3.57):
KERNELD = -DHAVE_KERNELD
# 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 )
# 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
# Include code for Linux2.0.x
MOUNT2 = 1
# Include code for Linux2.1.x
MOUNT3 = 1
TOPDIR = $(shell pwd)
BINDIR = /usr/bin
SBINDIR = /sbin
SUBDIRS = lib sutil util ipx-1.0 man
KVERSION=$(shell uname -r | cut -b1-3)
INCLUDES=-I$(TOPDIR)/include
COPT = -O2
# COPT += -g
CFLAGS = $(COPT) -Wall $(INCLUDES) $(KERNELD) -DNCPFS_VERSION=\"$(VERSION)\"
export INCLUDES BINDIR SBINDIR KERNELD VERSION HAVE_ELF CFLAGS NDS_SUPPORT \
SIGNATURES MOUNT2 MOUNT3
all:
set -e; for i in $(SUBDIRS); 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 $(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

102
Makefile.in Normal file
View File

@@ -0,0 +1,102 @@
#
# 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 = @INTLSUB@ @POSUB@ $(BASE_SUBDIRS)
SUBDIRS := $(EXECSUBDIRS)
INSTALL_SUBDIRS := $(SUBDIRS)
INSTALL_DEV_SUBDIRS := lib sutil util man @ADDON_DEV_SUBDIRS@
CLEAN_SUBDIRS := lib sutil util man @INTLSUB@ @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 BUILD_SHARED CFLAGS
all:
set -e; for i in $(EXECSUBDIRS); do make -C $$i all; done
@if [ "$(BUILD_SHARED)" = 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/private/libncp-atomic.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=ncpfs-$(VERSION).tar.gz
dist: tgz
make dep
make all
tgz:
if [ -d .git ]; then \
git archive --format=tar --prefix=ncpfs-$(VERSION)/ HEAD | gzip -9 > ../$(DISTFILE); \
else \
make distclean; \
(cd ..; tar --exclude='.git' -cvf - $(SRCDIR) | gzip -9 > $(DISTFILE)); \
fi
slackware:
make -C contrib/slackware slackware
make tgz

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(....).

42
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,23 +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 running kerneld, please comment the corresponding line in
the Makefile to reflect this.
Run 'configure', 'make' and, as root, 'make install'. That's all.
If you are not using 2.0.x kernels, you can comment out MOUNT2=1 line
in the Makefile.
If you are not using 2.1.x kernels, you can comment out MOUNT3=1 line
in the Makefile.
If you are not using NDS access, you can comment out NDS_SUPPORT=1 in
the Makefile.
If you are not using packet signatures, you can comment out SIGNATURES=1
in the Makefile.
After you adapted your Makefile, 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
@@ -109,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.
@@ -127,10 +118,7 @@ limitation is the lack of uid, gid and permission information per
file. You have to assign those values once for a complete mounted
directory.
You will not be able to access servers that require packet
signatures. This seems to be one of Novell's bigger secrets :-(.
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

3515
aclocal.m4 vendored Normal file

File diff suppressed because it is too large Load Diff

172
cleanup-release.sh Executable file
View File

@@ -0,0 +1,172 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
echo "Cleaning top-level generated build outputs..."
rm -rf \
autom4te.cache \
.libs \
modules
rm -f \
Makefile \
Make.rules \
config.log \
config.status \
config.cache \
config.nice \
libtool \
stamp-h1
echo "Cleaning generated subdir Makefiles..."
rm -f \
lib/Makefile \
man/Makefile \
util/Makefile \
sutil/Makefile \
ipxdump/Makefile \
ipx-1.0/Makefile \
ipx-1.0/Samples/Makefile \
contrib/pam/Makefile \
contrib/tcl-utils/Makefile \
contrib/tknwmsg/Makefile \
contrib/tests/Makefile \
contrib/testing/Makefile \
contrib/testing/pp/Makefile \
intl/Makefile \
po/Makefile \
po/Makefile.in \
po/POTFILES
echo "Cleaning PHP phpize build outputs, keeping contrib/php/configure..."
rm -rf \
contrib/php/autom4te.cache \
contrib/php/.deps \
contrib/php/.libs \
contrib/php/modules \
contrib/php/libs
rm -f \
contrib/php/Makefile \
contrib/php/Makefile.fragments \
contrib/php/Makefile.objects \
contrib/php/Makevars \
contrib/php/config.h \
contrib/php/config.log \
contrib/php/config.status \
contrib/php/config.cache \
contrib/php/config.nice \
contrib/php/config_vars.mk \
contrib/php/libs.mk \
contrib/php/libtool \
contrib/php/run-tests.php \
contrib/php/*.lo \
contrib/php/*.la \
contrib/php/*.o \
contrib/php/*.dep \
contrib/php/*.slo
echo "Cleaning object files, binaries, generated manpages, backups..."
find . \
\( -name '*.o' \
-o -name '*.do' \
-o -name '*.to' \
-o -name '*.lo' \
-o -name '*.la' \
-o -name '*.a' \
-o -name '*.so' \
-o -name '*.so.*' \
-o -name '*.dep' \
-o -name '*.gcno' \
-o -name '*.gcda' \
-o -name '*.orig' \
-o -name '*.rej' \
-o -name '*~' \) \
-delete
find man -name '*.gz' -delete 2>/dev/null || true
find ipx-1.0 -name '*.gz' -delete 2>/dev/null || true
echo "Cleaning known built binaries..."
rm -f \
sutil/ncplogin \
sutil/ncpmap \
sutil/ncpmount \
sutil/ncpumount \
sutil/nwsfind
rm -f \
util/ncopy \
util/ncptest \
util/nprint \
util/nsend \
util/nwauth \
util/nwbocreate \
util/nwbols \
util/nwboprops \
util/nwborm \
util/nwbpadd \
util/nwbpcreate \
util/nwbprm \
util/nwbpset \
util/nwbpvalues \
util/nwdir \
util/nwdpvalues \
util/nwfsctrl \
util/nwfsinfo \
util/nwfstime \
util/nwgrant \
util/nwlistsalvage \
util/nwmsg \
util/nwpasswd \
util/nwpjmv \
util/nwpqjob \
util/nwpurge \
util/nwrevoke \
util/nwrights \
util/nwsalvage \
util/nwtrustee \
util/nwtrustee2 \
util/nwuserlist \
util/nwvolinfo \
util/pqlist \
util/pqstat \
util/pserver \
util/slist
rm -f \
ipxdump/ipxdump \
ipxdump/ipxparse \
ipx-1.0/ipx_cmd \
ipx-1.0/ipx_configure \
ipx-1.0/ipx_interface \
ipx-1.0/ipx_internal_net \
ipx-1.0/ipx_route \
ipx-1.0/Samples/ipxrcv \
ipx-1.0/Samples/ipxsend \
ipx-1.0/Samples/rip \
ipx-1.0/Samples/sap
echo "Restoring required release files if needed..."
if [ ! -f lib/libncp.vers ]; then
if git cat-file -e HEAD:lib/libncp.vers 2>/dev/null; then
git checkout -- lib/libncp.vers
elif git cat-file -e v2.2.6:lib/libncp.vers 2>/dev/null; then
git show v2.2.6:lib/libncp.vers > lib/libncp.vers
else
echo "Warning: lib/libncp.vers is missing and could not be restored."
fi
fi
echo
echo "Cleanup done."
echo
echo "Remaining untracked/modified files:"
git status --short

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

1818
config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

571
config.rpath Executable file
View File

@@ -0,0 +1,571 @@
#! /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-2005 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# 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.
# Known limitations:
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
# than 256 bytes, otherwise the compiler driver will dump core. The only
# known workaround is to choose shorter directory names for the build
# directory and/or the installation directory.
# All known linkers require a `.a' archive for static linking (except M$VC,
# which needs '.lib').
libext=a
shrext=.so
host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
cc_basename=`echo "$CC" | sed -e 's%^.*/%%'`
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
wl=
if test "$GCC" = yes; then
wl='-Wl,'
else
case "$host_os" in
aix*)
wl='-Wl,'
;;
darwin*)
case "$cc_basename" in
xlc*)
wl='-Wl,'
;;
esac
;;
mingw* | pw32* | os2*)
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
;;
irix5* | irix6* | nonstopux*)
wl='-Wl,'
;;
newsos6)
;;
linux*)
case $cc_basename in
icc* | ecc*)
wl='-Wl,'
;;
pgcc | pgf77 | pgf90)
wl='-Wl,'
;;
ccc*)
wl='-Wl,'
;;
como)
wl='-lopt='
;;
esac
;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
sco3.2v5*)
;;
solaris*)
wl='-Wl,'
;;
sunos4*)
wl='-Qoption ld '
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
wl='-Wl,'
;;
sysv4*MP*)
;;
unicos*)
wl='-Wl,'
;;
uts4*)
;;
esac
fi
# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
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/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
fi
;;
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 cannot use
# them.
ld_shlibs=no
;;
beos*)
if $LD --help 2>&1 | grep ': 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'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
netbsd*)
;;
solaris* | sysv5*)
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
sunos4*)
hardcode_direct=yes
;;
linux*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
esac
if test "$ld_shlibs" = yes; then
# Unlike libtool, we use -rpath here, not --rpath, since the documented
# option of GNU ld is called -rpath, not --rpath.
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
# Begin _LT_AC_SYS_LIBPATH_AIX.
echo 'int main () { return 0; }' > conftest.c
${CC} ${LDFLAGS} conftest.c -o conftest
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
if test -z "$aix_libpath"; then
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
fi
if test -z "$aix_libpath"; then
aix_libpath="/usr/lib:/lib"
fi
rm -f conftest.c conftest
# End _LT_AC_SYS_LIBPATH_AIX.
if test "$aix_use_runtimelinking" = yes; then
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
else
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
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
;;
bsdi[45]*)
;;
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=no
if test "$GCC" = yes ; then
:
else
case "$cc_basename" in
xlc*)
;;
*)
ld_shlibs=no
;;
esac
fi
;;
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
freebsd1*)
ld_shlibs=no
;;
freebsd2.2*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
freebsd2*)
hardcode_direct=yes
hardcode_minus_L=yes
;;
freebsd* | kfreebsd*-gnu | dragonfly*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
hpux9*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
hpux10* | hpux11*)
if test "$with_gnu_ld" = no; then
case "$host_cpu" in
hppa*64*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=no
;;
ia64*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=no
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
esac
fi
;;
irix5* | irix6* | nonstopux*)
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)
case $host_vendor in
sni)
hardcode_direct=yes # is this really true???
;;
siemens)
hardcode_direct=no
;;
motorola)
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
esac
;;
sysv4.3*)
;;
sysv4*MP*)
if test -d /usr/nec; then
ld_shlibs=yes
fi
;;
sysv4.2uw2*)
hardcode_direct=yes
hardcode_minus_L=no
;;
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
;;
sysv5*)
hardcode_libdir_flag_spec=
;;
uts4*)
hardcode_libdir_flag_spec='-L$libdir'
;;
*)
ld_shlibs=no
;;
esac
fi
# Check dynamic linker characteristics
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
libname_spec='lib$name'
case "$host_os" in
aix3*)
;;
aix4* | aix5*)
;;
amigaos*)
;;
beos*)
;;
bsdi[45]*)
;;
cygwin* | mingw* | pw32*)
shrext=.dll
;;
darwin* | rhapsody*)
shrext=.dylib
;;
dgux*)
;;
freebsd1*)
;;
kfreebsd*-gnu)
;;
freebsd*)
;;
gnu*)
;;
hpux9* | hpux10* | hpux11*)
case "$host_cpu" in
ia64*)
shrext=.so
;;
hppa*64*)
shrext=.sl
;;
*)
shrext=.sl
;;
esac
;;
irix5* | irix6* | nonstopux*)
case "$host_os" in
irix5* | nonstopux*)
libsuff= shlibsuff=
;;
*)
case $LD in
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
*) libsuff= shlibsuff= ;;
esac
;;
esac
;;
linux*oldld* | linux*aout* | linux*coff*)
;;
linux*)
;;
knetbsd*-gnu)
;;
netbsd*)
;;
newsos6)
;;
nto-qnx*)
;;
openbsd*)
;;
os2*)
libname_spec='$name'
shrext=.dll
;;
osf3* | osf4* | osf5*)
;;
sco3.2v5*)
;;
solaris*)
;;
sunos4*)
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
;;
sysv4*MP*)
;;
uts4*)
;;
esac
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
LC_ALL=C 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"
EOF

2364
config.sub vendored Executable file

File diff suppressed because it is too large Load Diff

11430
configure vendored Executable file

File diff suppressed because it is too large Load Diff

1279
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);
}

View File

@@ -0,0 +1,114 @@
#
#
#
top_srcdir = ../..
top_builddir = ../..
this_srcdir = ${top_srcdir}/lib
include ${top_builddir}/Make.rules
VERSION_SOLIB := 2.3
VERSION_SONAME := 2
vpath %.c ${this_srcdir}
LIBS :=
REENTRANT_CFLAGS := -D_REENTRANT
VERSIONED_LINK := yes
SHARED_NSSLIB := libnss_ncp.so
SHARED_NSSLIB_BIN := $(SHARED_NSSLIB).$(VERSION_SOLIB)
SHARED_NSSLIB_SONAME := $(SHARED_NSSLIB).$(VERSION_SONAME)
O_UTILS1 = test_ncp_nss.o\
#
O_TMP1 =
UTILS1 = $(O_UTILS1:%.o=%)
CCFLAGS += -I.
PIC_FLAGS := -fPIC
NWCOMPAT := 1
SHARED_VLINK :=
SHARED_VLINK_CFLAGS :=
ifeq ($(VERSIONED_LINK),yes)
SHARED_VLINK := -Wl,-version-script=${this_srcdir}/libncp.vers
SHARED_VLINK_CFLAGS := -DMULTIVERSION
endif
ifeq ($(HAVE_ELF),yes)
NCP_LIB = libncp.so
NCPLIB_DIR = ../../lib
LIBDEP = $(NCPLIB_DIR)/$(NCP_LIB)
else
NCP_LIB = libncp.a
NCPLIB_DIR = ../../lib
LIBDEP = $(NCPLIB_DIR)/$(NCP_LIB)
endif
STATIC_BASE_OBJ := nss_ncp.o nss_cfgfile.o
SHARED_BASE_OBJ := $(STATIC_BASE_OBJ:.o=.do)
SHARED_O_OBJ := $(SHARED_BASE_OBJ)
BASE_CFLAGS := -DHAVE_CONFIG_H -DMAKE_NCPLIB -D_GNU_SOURCE
SHARED_CFLAGS := $(CFLAGS) $(CCFLAGS) $(REENTRANT_CFLAGS) $(PIC_FLAGS) $(SHARED_VLINK_CFLAGS)
.PHONY : all dep install install-dev clean mrproper distclean
.PHONY : install_shared install_static install_static_su
all: $(SHARED_NSSLIB) $(UTILS1)
install: install_shared
%.d: %.c %h
set -e; $(CC) -M $(STATIC_CFLAGS) $(CFLAGS_$(@:.d=.o)) $(BASE_CFLAGS) $< \
| sed 's,\($*\)\.o[ :]*,\1.o \1.do \1.to $@ : ,g' > $@; \
[ -s $@ ] || rm -f $@
$(STATIC_BASE_OBJ): %.o: %.c %.h
$(CC) $(STATIC_CFLAGS) $(CFLAGS_$@) $(BASE_CFLAGS) -o $@ -c $<
$(SHARED_BASE_OBJ): %.do: %.c %.h
$(CC) $(SHARED_CFLAGS) $(CFLAGS_$(@:.do=.o)) $(BASE_CFLAGS) -o $@ -c $<
$(O_UTILS1) $(O_TMP1): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) $(CFLAGS_$@) -o $@ -c $<
$(UTILS1):: %: %.o $(O_TMP1) $(SHARED_NSSLIB)
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(addsuffix .o,$@) $(OBJS_$@) -L. -lnss_ncp -L$(top_builddir)/lib -lncp $(LDFLAGS_$@)
dep:
clean:
rm -f *.o *.do *.to $(SHARED_NSSLIB) $(SHARED_NSSLIB_BIN) $(UTILS1) *~
mrproper: clean
rm -f $(UTILS) $(DISTFILE)
distclean: mrproper
install_shared: $(SHARED_NCPLIB_BIN)
$(INSTALL) -d $(DESTDIR)$(libsodir)
$(INSTALL) $(SHARED_NCPLIB_BIN) $(DESTDIR)$(libsodir)
-ldconfig
$(SHARED_NSSLIB): $(SHARED_NSSLIB_SONAME)
rm -f $@
ln -sf $< $@
$(SHARED_NSSLIB_SONAME): $(SHARED_NSSLIB_BIN)
ln -sf $< $@
$(SHARED_NSSLIB_BIN): $(SHARED_O_OBJ) ${this_srcdir}/libncp.vers
$(CC) -shared -o $@ -Wl,-soname=$(SHARED_NSSLIB_SONAME) $(SHARED_VLINK) $(SHARED_O_OBJ) -L$(NCPLIB_DIR) -lncp ${LIBS}

View File

@@ -0,0 +1,29 @@
[Requester]
[ncp_nss]
useTree=1
server=INSA_ROOT
startCtx=
ctrlGroup=
doPasswd=1
doShadow=1
doGroup=1
defGid=100
defShell=/bin/bash
debug=1
fallbackUid=-1
fallbackGid=-1
[pam]
useTree=1
server=INSA_ROOT
searchCtx=PC,S.PC,GCP.PC
debug=1
mountLocally=1
createLocalHome=0
zenOn=
zenOff=

View File

@@ -0,0 +1,347 @@
/*
nss_cfgfile.c - Configuration file handling
Copyright (C) 2000 Petr Vandrovec
Copyright (C) 2003 Patrick Pollet
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 2003, Jan 16 Patrick Pollet <patrick.pollet@insa-lyon.fr>
Initial revision, stronly inspired by ncpfs/lib/cfgfile.c
*/
#include "config.h"
#include "private/libncp-lock.h"
#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/syslog.h>
#include "nss_cfgfile.h"
#include "nss_ncp.h"
// temporary define (waiting for a better Makefile)
#define GLOBALCFGFILE "/etc/ncpfs.conf"
#ifndef GLOBALCFGFILE
#error "GLOBALCFGFILE must be defined"
#endif
// #define DEBUG 1
static struct nss_ncp_conf*
alloc_nss_ncp_conf(void)
{
struct nss_ncp_conf * conf;
conf = malloc(sizeof(*conf));
if (!conf)
return NULL;
return conf;
}
void
free_nss_ncp_conf(struct nss_ncp_conf *conf)
{
#define FREEFIELD(x) do if (conf->x) { free(conf->x); conf->x = NULL; } while (0);
if (conf) {
FREEFIELD(server);
FREEFIELD(startCtx);
FREEFIELD(ctrlGroup);
FREEFIELD(defShell);
}
#undef FREEFIELD
}
struct cfgFile {
ncpt_mutex_t mutex;
FILE* file;
};
static struct cfgFile*
cfgOpenFile(const char* path,
int writeRequired)
{
struct cfgFile* cfg;
cfg = malloc(sizeof(*cfg));
if (cfg) {
cfg->file = fopen(path, writeRequired ? "r+" : "r");
if (cfg->file) {
ncpt_mutex_init(&cfg->mutex);
} else {
free(cfg);
cfg = NULL;
}
}
return cfg;
}
static void
cfgClose(struct cfgFile* cfg)
{
ncpt_mutex_lock(&cfg->mutex);
fclose(cfg->file);
ncpt_mutex_destroy(&cfg->mutex);
free(cfg);
}
struct check {
const char *option; /* configuration option */
int mandatory; /* can be empty or null */
int found; /* set to TRUE if found in cfg file */
char **char_ptr; /* where to store string value */
int *int_ptr; /* where to store integer value */
const char *defValue; /* default value */
};
#ifdef DEBUG
void
printResults(const char *infos, const struct check *results)
{
const struct check *ptr;
printf ("%s\n", infos);
for (ptr = results; ptr->option; ptr++) {
if (ptr->int_ptr)
printf ("option=%s mandatory=%d found=%d value=%d defvalue=%s\n",
ptr->option, ptr->mandatory, ptr->found, *ptr->int_ptr, ptr->defValue);
else
printf ("option=%s mandatory=%d found=%d value=%s defvalue=%s\n",
ptr->option, ptr->mandatory, ptr->found, *ptr->char_ptr, ptr->defValue);
}
}
void
printConf(const char *infos, const struct nss_ncp_conf *conf)
{
printf ("%s\n", infos);
printf ("debug=%d useTree=%d server=%s startCtx=%s ctrlGroup=%s defGid=%u defShell=%s fallbackUid=%u fallbackGid=%u "
"doPassword=%d doGroup=%d doShadow=%d\n",
conf->debug, conf->useTree, conf->server, conf->startCtx,
conf->ctrlGroup, conf->defGid, conf->defShell, conf->fallbackUid, conf->fallbackGid,
conf->doPassword, conf->doGroup, conf->doShadow);
}
#endif
static int
process_line(const char *cptr, struct check *ptr)
{
const char* sptr; // start of real value
const char* eptr; // end of real value
char ec;
char cc;
while (*cptr && isspace(*cptr))
cptr++;
if (*cptr != '=' && *cptr != ':')
return 1; //no equal sign found
cptr++;
while (*cptr && isspace(*cptr))
cptr++;
// space are allowed in value only if surrounded by " or ' (eg a NDS control group)
if (*cptr == '"' || *cptr == '\'')
ec = *cptr++;
else
ec = 0;
sptr = cptr;
eptr = cptr;
while ((cc = *cptr++) != 0) {
if (cc == '\n')
break;
if (!ec && isspace(cc))
break;
if (cc == ec)
break;
eptr++;
}
if (eptr != sptr) {
if (ptr->int_ptr) {
char* errPtr; // err
*ptr->int_ptr = strtoul(sptr, &errPtr, 0);
ptr->found = errPtr == eptr;
} else {
char *v = malloc(eptr - sptr + 1);
if (v) {
memcpy(v, sptr, eptr - sptr);
v[eptr - sptr] = 0;
*ptr->char_ptr = v;
ptr->found = TRUE;
} else
return 1;
}
}
return 0;
}
static int
fix_conf(struct check *results)
{
struct check* ptr;
for (ptr = results; ptr->option; ptr++) {
if (!ptr->found) {
if (ptr->mandatory) {
traceForce(0, LOG_ERR, "ncp_nss aborting :missing mandatory information '%s=' in config file %s", ptr->option, GLOBALCFGFILE);
return 1;
}
if (ptr->int_ptr) {
*ptr->int_ptr = strtoul(ptr->defValue, NULL, 0);
} else {
char *v = strdup(ptr->defValue);
if (v)
*ptr->char_ptr = v;
else
return 1;
}
}
}
return 0;
}
static struct nss_ncp_conf *
read_conf_file(const char * mySection, struct cfgFile *cfg)
{
struct nss_ncp_conf *conf;
conf = alloc_nss_ncp_conf();
if (!conf)
return NULL;
{
struct check check_confs[] = {
/*option mandati found char_ptr int_ptr defValue */
{"debug", FALSE, FALSE, NULL, &conf->debug, "0"},
{"useTree", FALSE, FALSE, NULL, &conf->useTree, "0"},
{"server", TRUE, FALSE, &conf->server, NULL, ""},
{"startCtx", FALSE, FALSE, &conf->startCtx, NULL, ""},
{"ctrlGroup", FALSE, FALSE, &conf->ctrlGroup, NULL, ""},
{"defGid", FALSE, FALSE, NULL, &conf->defGid, "100"},
{"defShell", FALSE, FALSE, &conf->defShell, NULL, "/bin/bash"},
{"fallbackUid", FALSE, FALSE, NULL, &conf->fallbackUid, "-1"},
{"fallbackGid", FALSE, FALSE, NULL, &conf->fallbackGid, "-1"},
{"doPasswd", FALSE, FALSE, NULL, &conf->doPassword, "0"},
{"doGroup", FALSE, FALSE, NULL, &conf->doGroup, "0"},
{"doShadow", FALSE, FALSE, NULL, &conf->doShadow, "0"},
{NULL, FALSE, FALSE, NULL, NULL, NULL}
};
char cfgline[16384];
size_t seclen = strlen(mySection);
#ifdef DEBUG
// DO NOT DO IT A a second call (using test_ncp_nss -2) coredump !!!
// printResults("before reading CFG", check_confs);
#endif
ncpt_mutex_lock(&cfg->mutex);
//rewind(cfg->file);
while (fgets(cfgline, sizeof(cfgline)-1, cfg->file)) {
char* cptr = cfgline;
struct check* ptr;
while (*cptr && isspace(*cptr))
cptr++;
if (*cptr != '[')
continue;
if (strncasecmp(++cptr, mySection, seclen))
continue;
if (cptr[seclen] != ']')
continue;
while (fgets(cfgline, sizeof(cfgline) - 1, cfg->file)) {
cptr = cfgline;
while (*cptr && isspace(*cptr))
cptr++;
if (!*cptr)
continue; //empty line
if (*cptr == '[') // start of another section
goto ssend;
for (ptr = check_confs; ptr->option; ptr++) {
size_t keylen = strlen(ptr->option);
if (!strncasecmp(cptr, ptr->option, keylen)) {
cptr += keylen;
process_line(cptr, ptr);
}
}
}
}
ssend:
#ifdef DEBUG
printResults("after reading CFG no error", check_confs);
#endif
#ifdef DEBUG
printConf("before fixing ", conf);
#endif
if (!fix_conf (check_confs)) { // fill in missing values with default,
#ifdef DEBUG
printConf("after fixing ", conf);
#endif
ncpt_mutex_unlock(&cfg->mutex);
return conf;
}
#ifdef DEBUG
printResults("after reading CFG error", check_confs);
#endif
ncpt_mutex_unlock(&cfg->mutex);
free_nss_ncp_conf(conf);
return NULL;
}
}
struct nss_ncp_conf*
parse_conf(void)
{
struct cfgFile *cfg;
struct nss_ncp_conf *conf;
#ifdef DEBUG
printf("entering parse_conf\n");
#endif
cfg = cfgOpenFile(GLOBALCFGFILE, FALSE);
if (!cfg)
return NULL;
conf = read_conf_file(NSS_SECTION, cfg);
cfgClose(cfg);
#ifdef DEBUG
if (conf)
printConf("final value ", conf);
#endif
return conf;
}

View File

@@ -0,0 +1,26 @@
#ifndef HAVE_NSS_CFGFILE
#define HAVE_NSS_CFGFILE
#define TRUE 1
#define FALSE 0
#define NSS_SECTION "ncp_nss"
struct nss_ncp_conf {
int debug;
int useTree; // use Tree connection or server connection
char * server; // name of server or tree
char * startCtx; // start searching is this context (and below)
char * ctrlGroup; // limit search to members of this NDS group for passwd and shadow
int defGid; // if no primary group found in NDS use this value
char * defShell; // if no shell found in NDS use this value
int fallbackUid; // if no UID found in NDS use this one (-1= skip user, NFS_NOBODY= use this UID)
int fallbackGid; // if no GID found in NDS use this one (-1= skip group, NFS_NOBODY= use this GID)
int doPassword; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf
int doGroup; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf
int doShadow; // if 0, will return immediarly NSS_STATUS_UNAVAILABLE even if ncp is listed in /etc/nsswitch.conf
};
struct nss_ncp_conf* parse_conf(void);
void free_nss_ncp_conf(struct nss_ncp_conf *conf);
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,176 @@
/**************************************************************************
nss_ncp.h header for NSS for NDS
Copyright (C) 2002 Patrick Pollet
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 2003, January 06 Patrick Pollet <patrick.pollet@insa-lyon.fr>
initial release
************************************************************************/
#ifndef HAVE_NSS_NCP_H
#define HAVE_NSS_NCP_H
#define TRUE 1
#define FALSE 0
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <ncp/nwnet.h>
#include <unistd.h>
#include <ctype.h>
#include <wchar.h>
#include <string.h>
#include <pwd.h>
#include <grp.h>
#include <shadow.h>
#include <sys/syslog.h>
#include <nss.h>
// USE_DUMMY_ATTRibutes must be set in the Makefile
//#define USING_DUMMY_ATTRIBUTES
#ifndef USING_DUMMY_ATTRIBUTES
// the real ones
#define ATTR_UID "UNIX:UID"
#define ATTR_PGNAME "UNIX:Primary GroupName"
#define ATTR_PGID "UNIX:Primary GroupID"
#define ATTR_GID "UNIX:GID"
#define ATTR_SHELL "UNIX:Login Shell"
#define ATTR_COM "UNIX:Comments"
#define ATTR_HOME "UNIX:Home Directory"
#else
// dummy attributes for testing
// created with Schemax with the same syntax
// and associated to user class and group class
#define ATTR_UID "LINUX:UID"
#define ATTR_PGNAME "LINUX:Primary GroupName"
#define ATTR_PGID "LINUX:Primary GroupID"
#define ATTR_GID "LINUX:GID"
#define ATTR_SHELL "LINUX:Login Shell"
#define ATTR_COM "LINUX:Comments"
#define ATTR_HOME "LINUX:Home Directory"
#endif
// the attribute used to test presence of NDS8
// either real or dummy (not used yet)
#define ATTR_NDS8 ATTR_UID
// other attributes used
// absent NDS8 attributes are searched in L attribute
// also new properties ( Zenux Flags, Other group...)
#define ATTR_CN "CN"
#define ATTR_LOCATION "L"
#define ATTR_GRP_MBS "Group Membership"
#define ATTR_MEMBERS "Member"
#define ATTR_FULL_NAME "Full Name"
#define ATTR_DATE_PWD_EXPIRE "Password Expiration Time"
#define ATTR_INT_PWD_EXPIRE "Password Expiration Interval"
#define ATTR_GRACE_LIMIT "Login Grace Limit"
#define ATTR_DATE_ACCT_EXPIRE "Login Expiration Time"
// the proper naming attribute may be customized here (must be a CI_STRING )
#define ATTR_GECOS ATTR_FULL_NAME
// syntaxes of the used attributes
#define SYN_CN SYN_CI_STRING
#define SYN_LOCATION SYN_CI_STRING
#define SYN_UID SYN_INTEGER
#define SYN_PGNAME SYN_DIST_NAME
#define SYN_PGID SYN_INTEGER
#define SYN_GID SYN_INTEGER
#define SYN_SHELL SYN_CE_STRING
#define SYN_COM SYN_CI_STRING
#define SYN_HOME SYN_CE_STRING
#define SYN_GRP_MBS SYN_DIST_NAME
#define SYN_MEMBERS SYN_DIST_NAME
#define QF_DEBUG 0x0001
#define QF_VERBOSE 0x0002
#define NFS_NOBODY = 65534
#define CNF_FILE "/etc/nss_ncp.conf"
void traceForce(int debugMode, int err, const char* format, ...);
/******************************* NSS API ***************************************/
enum nss_status _nss_ncp_initgroups (const char *userName, gid_t group,
long int *start, long int *size, gid_t * groups,
long int limit,int *errnop);
enum nss_status _nss_ncp_getpwnam_r (const char* name, struct passwd *pwd,
char * buffer, size_t buflen, int * errnop);
enum nss_status _nss_ncp_getpwuid_r (uid_t uid, struct passwd *pwd,
char * buffer, size_t buflen, int * errnop);
enum nss_status _nss_ncp_getgrnam_r (const char* name, struct group *grp,
char * buffer, size_t buflen, int * errnop);
enum nss_status _nss_ncp_getspnam_r (const char * name, struct spwd *spw,
char *buffer, size_t buflen,int * errnop);
enum nss_status _nss_ncp_getgrgid_r (gid_t gid, struct group *grp,
char * buffer, size_t buflen, int * errnop);
enum nss_status _nss_ncp_setpwent(void);
enum nss_status _nss_ncp_setgrent(void);
enum nss_status _nss_ncp_setspent (void);
enum nss_status _nss_ncp_endpwent(void);
enum nss_status _nss_ncp_endgrent(void);
enum nss_status _nss_ncp_endspent (void);
enum nss_status _nss_ncp_getpwent_r(struct passwd *pwd, char * buffer, size_t buflen, int * errnop);
enum nss_status _nss_ncp_getgrent_r(struct group *grp,char * buffer, size_t buflen, int * errnop);
enum nss_status _nss_ncp_getspent_r (struct spwd *spw,char * buffer, size_t buflen,int * errnop);
#endif

View File

@@ -0,0 +1,313 @@
/**************************************************************************
getpwduid.c:test program for NSS for NDS
Copyright (C) 2002 Patrick Pollet
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 2003, January 06 Patrick Pollet <patrick.pollet@insa-lyon.fr>
initial release
1.01 2003, January 08 Patrick Pollet <patrick.pollet@insa-lyon.fr>
added conf structure and control group
added optional fallback UID and GID if none found in NDS (default is to skip user,group)
1.02 2003, January 09 Patrick Pollet <patrick.pollet@insa-lyon.fr>
added initgroups
1.03 2003, January 10 Patrick Pollet <patrick.pollet@insa-lyon.fr>
fixed bug in nds_user_info2 (bad structure received by nds_user_location2)
1.04 2003, January 11 Patrick Pollet <patrick.pollet@insa-lyon.fr>
fixed setting ndsXXX=NULL trees in case of errors in _nss_ncp_setxxent()
made always NAME_CONTEXT=[Root] in CreateContextAndConn
calling NWCCloseIteration only it some errors has occured in the search
1.05
modified to use nss_ncp.so
************************************************************************/
#define TRUE 1
#define FALSE 0
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <ncp/nwnet.h>
#ifdef VERBOSE
#include <ncp/ncplib.h>
#endif
#include <unistd.h>
#include <ctype.h>
#include <wchar.h>
#include <string.h>
#include "private/libintl.h"
#include <pwd.h>
#include <grp.h>
#include <shadow.h>
#include <sys/syslog.h>
#include <nss.h>
#include "nss_ncp.h"
#include "nss_cfgfile.h"
static struct nss_ncp_conf defConf ={0, TRUE, NULL, NULL, NULL, 100, NULL, -1, -1, TRUE, TRUE, TRUE};
/**************** TESTING ******************/
static void print_passwd (struct passwd pwd){
printf("%s:%s:%d:%d:%s:%s:%s\n",pwd.pw_name,pwd.pw_passwd,pwd.pw_uid,pwd.pw_gid,pwd.pw_gecos,pwd.pw_dir,pwd.pw_shell);
}
static void print_group (struct group grp){
char ** mmb; int num;
printf("%s:%s:%d:",grp.gr_name,grp.gr_passwd,grp.gr_gid);
for (mmb=grp.gr_mem,num=0;*mmb; mmb++,num++) {
if (num)
printf(",");
printf ("%s",*mmb);
}
printf("\n");
}
static void print_shadow (struct spwd spw){
printf("%s:%s:%ld:%ld:%ld:%ld:%ld:%ld:%ld\n",spw.sp_namp,spw.sp_pwdp,spw.sp_lstchg,spw.sp_min,spw.sp_max,spw.sp_warn,spw.sp_inact,spw.sp_expire,spw.sp_flag);
}
static void print_user_groups(gid_t * groups, long int start, long int size){
int i;
printf("start=%ld size=%ld\n",start,size);
for (i=0; i<start; i++)
printf("%d ",groups[i]);
printf("\n");
}
static void give_details_on_user_groups(gid_t *groups, long int start){
struct group grp;
char buffer[65000];
long int i;
for (i=0; i<start;i++) {
enum nss_status err=_nss_ncp_getgrgid_r (groups[i],&grp,buffer,sizeof(buffer),&errno);
if (err==NSS_STATUS_SUCCESS)
print_group(grp);
else printf("nss result is %d for group %d\n",err,groups[i]);
}
}
#define _(X) gettext(X)
static char *progname;
static void usage(void)
{
fprintf(stderr, _("usage: %s [options]\n"), progname);
exit (1);
}
static void help(void)
{
printf(_("\n"
"usage: %s [options]\n"), progname);
printf(_("\n"
"-h Print this help text\n"
"-u id Unix User passwd info to search by uid in NDS\n"
"-n login Unix User passwd infos to search by name in NDS\n"
"-s login Unix User shadow infos to search by name in NDS\n"
"-i grpid Unix group to search by gid in NDS\n"
"-g grpname Unix group to search by name in NDS\n"
"-m login Get Unix groups of user login\n"
"-U all Unix users to search in NDS\n"
"-G all Unix groups to search in NDS\n"
"-S all Unix shadows to search in NDS\n"
"-D verbose mode (fill /var/log/secure && screen)\n"
"-T treeName use this Tree \n"
"-B serverName use this server\n"
"-C NDS ctx start in this context (default=[Root])\n"
"-O NDS group restrict user's search to this group\n"
"-f fallbackID if no UID,GID found in NDS use this one (default=-1 skip user & group)\n"
"-2 show the BUG (two calls )\n"
"\n"));
exit (1);
}
/*************************************************************************
** main
*/
int main (int argc, char** argv) {
const char* userName=NULL;
uid_t userId=-1;
const char* groupName=NULL;
gid_t groupId=-1;
const char* shadowName=NULL;
const char* memberName=NULL;
int opt;
int allUsers=0;
int allGroups=0;
int allShadows=0;
char buffer[65000];
int nbCalls=1;
struct passwd pwd;
struct group grp;
struct spwd spw;
progname = argv[0];
while ((opt = getopt(argc, argv, "h?u:n:g:i:s:m:T:B:C:O:f:UGSD2")) != EOF)
{
switch (opt)
{
case 'n':
userName = optarg;
break;
case 'm':
memberName = optarg;
break;
case 's':
shadowName = optarg;
break;
case 'g':
groupName = optarg;
break;
case 'i':
groupId = strtoul(optarg, NULL, 0);
break;
case 'u':
userId = strtoul(optarg, NULL, 0);
break;
case 'U':
allUsers=1;
break;
case 'G':
allGroups=1;
break;
case 'S':
allShadows=1;
break;
case 'D':
defConf.debug=QF_DEBUG;
break;
case 'T':
defConf.server=optarg;
defConf.useTree=1;
break;
case 'B':
defConf.server=optarg;
defConf.useTree=0;
break;
case 'C':
defConf.startCtx=optarg;
break;
case 'O':
defConf.ctrlGroup=optarg;
break;
case 'f':
defConf.fallbackUid=strtoul(optarg, NULL, 0);
defConf.fallbackGid=strtoul(optarg, NULL, 0);
break;
case '2':
nbCalls=2;
break;
case 'h':
case '?':
help();
default:
usage();
}
}
if (defConf.debug)
openlog("ncp_nss", LOG_PID, LOG_AUTHPRIV);
while(nbCalls--) { // do it once or twice (freeze at the second !!!!)
if (userName) {
printf ("searching in passwd for login %s\n",userName);
if (_nss_ncp_getpwnam_r (userName,&pwd,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
print_passwd(pwd);
}
if (memberName) {
#define MAX_GRP 30
gid_t groups[MAX_GRP];
long int start=0;
long int size=MAX_GRP;
printf ("searching groups of %s\n",memberName);
if ( _nss_ncp_initgroups (memberName, /*999 */ defConf.defGid,&start,&size,groups,0,&errno)==NSS_STATUS_SUCCESS) {
//long int *start, long int *size, gid_t * groups,long int limit,int *errnop) {
print_user_groups(groups,start,size);
give_details_on_user_groups(groups,start);// FREEZE AT THIS SECOND CALL to NWCCOpenConnByNAME !!!!
}
}
if (userId != (uid_t)-1) {
printf ("searching in passwd for uid %d\n",userId);
if ( _nss_ncp_getpwuid_r (userId, &pwd,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
print_passwd(pwd);
}
if (allUsers) {
_nss_ncp_setpwent();
while ( _nss_ncp_getpwent_r(&pwd,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
print_passwd(pwd);
_nss_ncp_endpwent();
}
if (groupName) {
printf ("searching in group for %s\n",groupName);
if (_nss_ncp_getgrnam_r (groupName,&grp,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS) {
print_group(grp);
}
}
if (groupId != (gid_t)-1) {
printf ("searching in group for gid %d\n",groupId);
if ( _nss_ncp_getgrgid_r (groupId, &grp,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
print_group(grp);
}
if (allGroups) {
_nss_ncp_setgrent();
while ( _nss_ncp_getgrent_r(&grp,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
print_group(grp);
_nss_ncp_endgrent();
}
if (shadowName) {
printf ("searching in shadow for login %s\n",shadowName);
if (_nss_ncp_getspnam_r (shadowName,&spw,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
print_shadow(spw);
}
if (allShadows) {
_nss_ncp_setspent();
while ( _nss_ncp_getspent_r(&spw,buffer,sizeof(buffer),&errno)==NSS_STATUS_SUCCESS)
print_shadow(spw);
_nss_ncp_endspent();
}
}
if (defConf.debug)
closelog();
exit(0);
}

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.

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

@@ -0,0 +1,64 @@
#
# 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.$(shlibext)
NCPLIB_DIR = ../../lib
PAM_LIBRARY = pam_ncp_auth.$(shlibext)
PAM_OBJECTS = pam_ncp_auth.do support.do
CFLAGS_pam_ncp_auth.do := -DNCPMOUNT_PATH=\"$(bindir)/ncpmount\" -DNCPUMOUNT_PATH=\"$(bindir)/ncpumount\"
LDFLAGS = @LDFLAGS@
.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 $(LDFLAGS) -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."

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