Import ncpfs 2.0.4

This commit is contained in:
ncpfs archive import
2026-04-28 20:39:58 +02:00
parent 011a5107c5
commit 3019bba627
11 changed files with 244 additions and 26 deletions

BIN
.downloads/ncpfs-2.0.4.tgz Normal file

Binary file not shown.

12
Changes
View File

@@ -1,6 +1,18 @@
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.
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

View File

@@ -2,14 +2,17 @@
# Makefile for the linux ncp-filesystem routines.
#
VERSION = 2.0.3
VERSION = 2.0.4
# 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, please uncomment the following line:
#HAVE_ELF=yes
# 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 `which gcc`|grep ELF >/dev/null && echo -n yes )
TOPDIR = $(shell pwd)
BINDIR = /usr/local/bin
@@ -28,6 +31,17 @@ export INCLUDES BINDIR INTERM_BINDIR SBINDIR KERNELD VERSION HAVE_ELF
all:
for i in $(SUBDIRS); do make -C $$i all; done
@if [ "$(HAVE_ELF)" = yes ] ;\
then \
echo ; echo ; echo ;\
echo Please add \'`pwd`/util\' to the environment ; \
echo variable LD_LIBRARY_PATH by executing ; \
echo ;\
echo export LD_LIBRARY_PATH=\"\$$LD_LIBRARY_PATH:`pwd`/util\" ; \
echo ;\
echo or do a \'make install\'. ;\
echo ;\
fi
dep:
for i in $(SUBDIRS); do make -C $$i dep; done

23
README
View File

@@ -3,11 +3,24 @@ some little utilities it also contains nprint, which enables you to
print on NetWare print queues. The opposite side, pserver, is also
provided.
I'm planning major changes in the structure of ncpfs for Linux 2.1.x
which will break the binary compatibility. So I changed the numbering
scheme for ncpfs. ncpfs-2.0.x will be the version to be used with
Linux 2.0.0 and older kernels, and ncpfs-2.1.x will be the version for
the development kernels.
ncpfs works with NetWare versions 3.x and following. It does NOT work
with NetWare version 2.x. Some of the NetWare look-alikes, such as
CD-ROM servers WinNT 3.51 Server are also NOT supported. This
restriction comes from the fact that ncpfs relies heavily on the name
space facilities NetWare supports since version 3. When you want to
mount volumes that have been exported by mars_nwe, you have to
activate the name space calls in mars_nwe's config.h file, although
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

View File

@@ -1,8 +1,8 @@
.TH NPASSWD 1 06/22/1996 npasswd npasswd
.TH NWPASSWD 1 06/22/1996 nwpasswd nwpasswd
.SH NAME
npasswd \- Change a user's password
nwpasswd \- Change a user's password
.SH SYNOPSIS
.B npasswd
.B nwpasswd
[
.B -h
] [
@@ -18,9 +18,9 @@ npasswd \- Change a user's password
.SH DESCRIPTION
With
.B npasswd,
.B nwpasswd,
you can change your password on a NetWare server.
.B npasswd
.B nwpasswd
asks for the old password and twice for the new password. Then it
changes the password on the server.
@@ -28,7 +28,7 @@ changes the password on the server.
.B -h
.RS 3
With -h npasswd prints a little help text.
With -h nwpasswd prints a little help text.
.RE
.B -S
@@ -51,5 +51,5 @@ changed.
.RE
.SH CREDITS
npasswd would not have been possible without the work of Guntram
nwpasswd would not have been possible without the work of Guntram
Blom. Look at nwcrypt.c for his work.

View File

@@ -1,7 +1,7 @@
Begin3
Title: ncpfs
Version: 2.0.3
Entered-date: 22. July 1996
Version: 2.0.4
Entered-date: 25. July 1996
Description: With ncpfs you can mount volumes of your netware
server under Linux. You can also print to netware
print queues and spool netware print queues to the
@@ -13,7 +13,7 @@ Author: lendecke@namu01.Num.Math.Uni-Goettingen.de (Volker Lendecke)
Maintained-by: lendecke@namu01.Num.Math.Uni-Goettingen.de (Volker Lendecke)
Primary-site: ftp.gwdg.de:/pub/linux/misc/ncpfs
Alternate-site: sunsite.unc.edu:/pub/Linux/system/Filesystems/ncpfs
~128k ncpfs-2.0.3.tgz
~ 1k ncpfs-2.0.3.lsm
~130k ncpfs-2.0.4.tgz
~ 1k ncpfs-2.0.4.lsm
Copying-policy: GPL
End

View File

@@ -2,7 +2,7 @@
# Makefile for the linux ncp-filesystem routines.
#
USERUTILS = slist pqlist nwfsinfo pserver nprint nsend ncopy npasswd
USERUTILS = slist pqlist nwfsinfo pserver nprint nsend ncopy nwpasswd
USERUTILS += nwbols nwbocreate nwborm nwboprops
USERUTILS += nwbpcreate nwbprm nwbpvalues nwbpadd
USERUTILS += nwgrant nwrevoke nwuserlist
@@ -60,6 +60,8 @@ $(NCP_LIB): ncplib.o ncplib_err.o $(COM_ERR_CFILES)
com_err/com_err.o com_err/error_message.o com_err/et_name.o \
com_err/init_et.o
ln -sf libncp.so.1.0 libncp.so.1
ln -sf libncp.so.1 libncp.so
export LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
ncplib_err.o: ncplib_err.h ncplib_err.c
$(CC) $(CFLAGS) $(PIC_FLAG) -c ncplib_err.c
@@ -82,8 +84,8 @@ dep: ncplib_err.h
clean:
make -C com_err clean
rm -f *.o *~ slist test ncptest ncplib_err.[ch] libncp.a
rm -f libncp.so.*
rm -f *.o *~ slist test ncptest ncplib_err.[ch]
rm -f libncp.*
mrproper: clean
make -C com_err mrproper

View File

@@ -235,6 +235,12 @@ ncp_change_object_security(struct ncp_conn *conn,
const char *object_name,
__u8 security);
struct ncp_station_addr {
__u32 NetWork __attribute__ ((packed));
__u8 Node[6] __attribute__ ((packed));
__u16 Socket __attribute__ ((packed));
};
struct ncp_prop_login_control {
__u8 AccountExpireDate[3] __attribute__ ((packed));
__u8 Disabled __attribute__ ((packed));
@@ -251,7 +257,7 @@ struct ncp_prop_login_control {
__u32 MaxDiskUsage __attribute__ ((packed));
__u16 BadLoginCount __attribute__ ((packed));
__u32 BadLoginCountDown __attribute__ ((packed));
__u8 LastIntruder[8] __attribute__ ((packed));
struct ncp_station_addr LastIntruder __attribute__ ((packed));
};
long

View File

@@ -139,6 +139,7 @@ main(int argc, char *argv[])
{
break;
}
segno += 1;
}
@@ -218,6 +219,174 @@ print_string(__u8 *val)
puts(val);
}
static char *
print_station_addr(char *fmt, struct ncp_station_addr *addr, char *buff)
{
char *ret = buff;
while ( *fmt != 0 )
{
switch ( *fmt )
{
case '%':
switch ( *(++fmt) )
{
case 'N': /* node */
{
int i ;
for ( i = 0 ; i < 6 ; buff += 2 , i++ )
{
sprintf(buff, "%02X",addr->Node[i]);
}
}
break;
case 'S': /* Socket */
sprintf(buff, "%04X", htons(addr->Socket));
buff += 4 ;
break ;
case 'L': /* Lan */
sprintf(buff, "%08lX", htonl(addr->NetWork));
buff += 8 ;
break ;
case '%':
*buff++ = '%';
default:
break ;
}
if (*fmt)
{
fmt++ ;
}
break ;
default:
*buff++ = *fmt++ ;
}
}
*buff = 0 ;
return ret ;
}
void
print_login_control ( __u8 *val )
{
int i , j , mask;
char buff[32];
struct ncp_prop_login_control *a =(struct ncp_prop_login_control *)val;
static char *days[]
= { "Sun" , "Mon" , "Tue" , "Wen" , "Thu" , "Fri" , "Sat" } ;
if (a->LastLogin[2] || a->LastLogin[1] || a->LastLogin[0] ||
a->LastLogin[3] || a->LastLogin[4] || a->LastLogin[5])
{
printf("Last Login: %d.%d.%02d at %2d:%02d:%02d\n",
a->LastLogin[2] , a->LastLogin[1] , a->LastLogin[0] ,
a->LastLogin[3] , a->LastLogin[4] , a->LastLogin[5]);
}
else
{
printf("Never logged in\n");
}
if (a->Disabled != 0)
{
printf(" --- Account disabled ---\n");
}
if (a->AccountExpireDate[2] || a->AccountExpireDate[1] ||
a->AccountExpireDate[0])
{
printf("Account expires on: %d.%d.%d\n",
a->AccountExpireDate[2],
a->AccountExpireDate[1],
a->AccountExpireDate[0]);
}
if (a->PasswordExpireDate[2] || a->PasswordExpireDate[1] ||
a->PasswordExpireDate[0])
{
printf("Password expires on: %d.%d.%d\n" ,
a->PasswordExpireDate[2],
a->PasswordExpireDate[1],
a->PasswordExpireDate[0]);
printf("GraceLogins left: %d\nof max. : %d\n",
a->GraceLogins, a->MaxGraceLogins);
printf("PasswortChangeInterval : %d days\n",
ntohs(a->PasswordExpireInterval));
}
if ((a->RestrictionMask & 2) != 0)
{
printf("New password must be different when changing\n");
}
if ((a->RestrictionMask & 1) != 0)
{
printf("User ist not allowed to change password\n");
}
printf("Minimal password length : %d\n", a->MinPasswordLength);
if (ntohs(a->MaxConnections) != 0)
{
printf("Maximum no of connections: %d\n",
ntohs(a->MaxConnections));
}
if ( a->MaxDiskUsage != 0xFFFFFF7FL )
{
printf("Maximum DiskQuota : %8ld blocks\n",
ntohl(a->MaxDiskUsage));
}
printf("Failed Logins: %5d\n", ntohs(a->BadLoginCount));
if (a->BadLoginCountDown != 0L)
{
printf("Account disabled still %8ld seconds\n",
ntohl(a->BadLoginCountDown));
}
if (a->LastIntruder.NetWork != 0L)
{
printf("Last \'intruder\' address: %s\n" ,
print_station_addr("(%L): %N[%S]" ,
&(a->LastIntruder),buff));
}
if ( a->RestrictionMask & 0xFC )
{
printf("RestrictionMask : %02X\n", a->RestrictionMask);
}
for ( i = 0 ; i < 42 ; i++ )
{
if ( a->ConnectionTimeMask[i] != 0xFF )
{
i = 101;
}
}
if ( i < 100 )
{
return;
}
val = a->ConnectionTimeMask;
printf("Time restrictions: 1 1 1 1 1 1 1 1 1 1 2 2 2 2 ]\n");
printf(" Day [0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 ]\n");
for ( i = 0 ; i < 7 ; i++ )
{
printf (" %s [" , days[i]);
for ( j = 0 ; j < 6 ; j++ )
{
for ( mask = 1 ; mask < 0x100 ; mask <<= 1 )
{
putchar ( (*val & mask) ? '*' : ' ' ) ;
}
val++ ;
}
printf ( "]\n" ) ;
}
}
void
print_addr( __u8 *val)
{
char buff[50];
print_station_addr("(%L): %N[%S]",
(struct ncp_station_addr *)val, buff);
printf("%s\n", buff);
}
static struct {
char *pname ;
void (*func)(__u8 *) ;
@@ -228,6 +397,8 @@ static struct {
{ "DESCRIPTION" , print_string } ,
{ "IDENTIFICATION" , print_string } ,
{ "Q_DIRECTORY" , print_string } ,
{ "LOGIN_CONTROL" , print_login_control } ,
{ "NET_ADDRESS" , print_addr } ,
{ NULL , NULL }
};

View File

@@ -130,9 +130,9 @@ main(int argc, char *argv[])
exit(1);
}
fprintf(tty_file, "\r\n\007\007\007Message from NetWare Server: %s\n",
fprintf(tty_file,"\r\n\007\007\007Message from NetWare Server: %s\r\n",
mnt->mnt_fsname);
fprintf(tty_file, "%s\n", message);
fprintf(tty_file, "%s\r\n", message);
fclose(tty_file);
fclose(mtab);
return;

View File

@@ -1,5 +1,5 @@
/*
* npasswd.c
* nwpasswd.c
*
* Change a bindery object's password
*