├── libtirpc ├── dirs ├── tirpc │ ├── getpeereid.h │ ├── rpc │ │ ├── xdr.h │ │ ├── auth_gss.h │ │ ├── rpc_msg.h │ │ ├── raw.h │ │ ├── svc_dg.h │ │ ├── clnt_stat.h │ │ ├── nettype.h │ │ ├── pmap_rmt.h │ │ ├── rpcent.h │ │ ├── svc_auth.h │ │ ├── des.h │ │ ├── auth_unix.h │ │ ├── rpc_com.h │ │ ├── rpcb_clnt.h │ │ └── pmap_clnt.h │ ├── misc │ │ ├── queue.h │ │ └── socket.h │ ├── rpcsvc │ │ ├── nis.h │ │ └── crypt.h │ ├── namespace.h │ ├── fpmath.h │ ├── netconfig.h │ ├── spinlock.h │ └── nss_tls.h ├── src │ ├── libtirpc.def │ ├── auth_none.c │ ├── auth_sspi.c │ ├── epoll_sub.c │ ├── clnt_generic.c │ ├── winstubs.c │ ├── makefile │ ├── gettimeofday.c │ ├── rpc_commondata.c │ ├── pmap_prot.c │ ├── getpeereid.c │ ├── rpc_dtablesize.c │ ├── sources │ ├── authunix_prot.c │ ├── svc_auth_none.c │ ├── getrpcport.c │ ├── des_soft.c │ ├── rpcdname.c │ ├── authdes_prot.c │ ├── svc_run.c │ ├── pmap_getmaps.c │ └── asprintf.c ├── TODO ├── AUTHORS ├── NEWS ├── VERSION ├── doc │ ├── Makefile.am │ └── etc_netconfig ├── THANKS ├── libtirpc.pc.in ├── bootstrap ├── man │ ├── Makefile.am │ ├── getrpcport.3t │ ├── publickey.5 │ ├── rtime.3t │ ├── publickey.3t │ ├── rpc.5 │ ├── bindresvport.3t │ ├── getrpcent.3t │ ├── rpc_clnt_auth.3t │ ├── rpc_svc_err.3t │ ├── rpc_xdr.3t │ ├── des_crypt.3t │ └── netconfig.5 ├── libtirpc │ ├── resource.h │ ├── libtirpc.rc │ └── libtirpc.def ├── .gitignore ├── autogen.sh ├── Makefile.am ├── configure.ac └── README ├── dirs ├── sys ├── wmlkm.c ├── wmlkm.h ├── makefile ├── nfs41_driver.rc ├── nfs41_driver.ini ├── sources ├── nfs41sys_ioctl.c └── nfs41sys_util.h ├── daemon ├── idmap.h ├── list.h ├── pnfs.h ├── pnfs_io.c ├── delegation.h ├── pnfs_debug.c ├── recovery.h ├── nfs41_daemon.h ├── pnfs_device.c ├── pnfs_layout.c ├── callback_server.c ├── nfs41_callback.h ├── nfs41_compound.h ├── nfs41_session.c ├── makefile ├── sources ├── accesstoken.h ├── aclutil.h ├── nfs41_xdr.h ├── cpvparser1.h └── fileinfoutil.h ├── dll ├── dllmain.c ├── nfs41_np.h ├── options.c ├── options.h ├── makefile ├── nfs41_np.def └── sources ├── mount ├── enum.c ├── options.c ├── options.h ├── sources └── urlparser1.h ├── tests ├── asio │ └── asio.c ├── ea │ ├── sources │ └── Makefile ├── cthon04 │ ├── 0003-lock-Fix-issue-with-tlock-path.patch │ ├── 0002-basic-Workaround-for-ms-nfs41-client-POSIX-symlink-t.patch │ ├── 0001-tools-Cygwin-3.6-port.patch │ └── 0004-special-tools-HACK-Disable-tests-which-cannot-work-o.patch ├── winsg │ └── Makefile ├── filemmaptests │ ├── testqsortonmmapedfile1.ksh93 │ └── Makefile ├── winfsinfo1 │ └── Makefile ├── catdbgprint │ └── Makefile ├── lockincfile1 │ └── Makefile ├── winfstest │ ├── README.txt │ └── 0001-winfstest-Update-VS-project-file-to-VS19-and-make-fi.patch ├── winclonefile │ └── Makefile ├── winoffloadcopyfile │ └── Makefile ├── lssparse │ └── Makefile ├── winrunassystem │ └── Makefile ├── wintartests │ └── wintartest_comparewinvsgnu001.bash └── tests_software_compat.txt ├── install ├── nfs_install.c └── sources ├── cygwin ├── cygwin_ksh93 │ ├── cygwin_ksh93.readme │ ├── ksh_1_0_9_mamake_bootstrap.patch │ ├── ksh.kshrc │ └── ksh_1_0_8_libast_Cygwin_set_PATH_LEADING_SLASHES_for_UNC_paths.patch ├── utils │ ├── sshnfs │ │ └── README.txt │ └── mount_sshnfs │ │ └── README.txt └── cygwin_patches │ └── cygwin_dll_fix_uidgid4nfsv4_fs.diff ├── ms-nfs41-idmap.conf ├── etc_netconfig ├── nfs41rdr.inf └── include └── nfs_ea.h /libtirpc/dirs: -------------------------------------------------------------------------------- 1 | DIRS = src 2 | 3 | -------------------------------------------------------------------------------- /dirs: -------------------------------------------------------------------------------- 1 | DIRS = dll sys mount install libtirpc daemon 2 | -------------------------------------------------------------------------------- /sys/wmlkm.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/sys/wmlkm.c -------------------------------------------------------------------------------- /sys/wmlkm.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/sys/wmlkm.h -------------------------------------------------------------------------------- /daemon/idmap.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/daemon/idmap.h -------------------------------------------------------------------------------- /daemon/list.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/daemon/list.h -------------------------------------------------------------------------------- /daemon/pnfs.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/daemon/pnfs.h -------------------------------------------------------------------------------- /dll/dllmain.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/dll/dllmain.c -------------------------------------------------------------------------------- /dll/nfs41_np.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/dll/nfs41_np.h -------------------------------------------------------------------------------- /dll/options.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/dll/options.c -------------------------------------------------------------------------------- /dll/options.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/dll/options.h -------------------------------------------------------------------------------- /libtirpc/tirpc/getpeereid.h: -------------------------------------------------------------------------------- 1 | 2 | int getpeereid(int s, uid_t *euid, gid_t *egid); 3 | -------------------------------------------------------------------------------- /mount/enum.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/mount/enum.c -------------------------------------------------------------------------------- /daemon/pnfs_io.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/daemon/pnfs_io.c -------------------------------------------------------------------------------- /libtirpc/src/libtirpc.def: -------------------------------------------------------------------------------- 1 | SECTIONS .TIRPCP READ WRITE SHARED 2 | 3 | EXPORTS 4 | 5 | -------------------------------------------------------------------------------- /mount/options.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/mount/options.c -------------------------------------------------------------------------------- /mount/options.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/mount/options.h -------------------------------------------------------------------------------- /daemon/delegation.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/daemon/delegation.h -------------------------------------------------------------------------------- /daemon/pnfs_debug.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/daemon/pnfs_debug.c -------------------------------------------------------------------------------- /daemon/recovery.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/daemon/recovery.h -------------------------------------------------------------------------------- /tests/asio/asio.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/tests/asio/asio.c -------------------------------------------------------------------------------- /daemon/nfs41_daemon.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/daemon/nfs41_daemon.h -------------------------------------------------------------------------------- /daemon/pnfs_device.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/daemon/pnfs_device.c -------------------------------------------------------------------------------- /daemon/pnfs_layout.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/daemon/pnfs_layout.c -------------------------------------------------------------------------------- /install/nfs_install.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/install/nfs_install.c -------------------------------------------------------------------------------- /daemon/callback_server.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/daemon/callback_server.c -------------------------------------------------------------------------------- /daemon/nfs41_callback.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/daemon/nfs41_callback.h -------------------------------------------------------------------------------- /daemon/nfs41_compound.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/daemon/nfs41_compound.h -------------------------------------------------------------------------------- /daemon/nfs41_session.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/daemon/nfs41_session.c -------------------------------------------------------------------------------- /libtirpc/TODO: -------------------------------------------------------------------------------- 1 | * Support of DES & other security part 2 | * Provide tests 3 | * rpcgen command missing 4 | -------------------------------------------------------------------------------- /libtirpc/src/auth_none.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/libtirpc/src/auth_none.c -------------------------------------------------------------------------------- /libtirpc/src/auth_sspi.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/libtirpc/src/auth_sspi.c -------------------------------------------------------------------------------- /libtirpc/src/epoll_sub.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/libtirpc/src/epoll_sub.c -------------------------------------------------------------------------------- /libtirpc/tirpc/rpc/xdr.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/libtirpc/tirpc/rpc/xdr.h -------------------------------------------------------------------------------- /libtirpc/src/clnt_generic.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/libtirpc/src/clnt_generic.c -------------------------------------------------------------------------------- /libtirpc/tirpc/rpc/auth_gss.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/libtirpc/tirpc/rpc/auth_gss.h -------------------------------------------------------------------------------- /libtirpc/tirpc/rpc/rpc_msg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kofemann/ms-nfs41-client/HEAD/libtirpc/tirpc/rpc/rpc_msg.h -------------------------------------------------------------------------------- /libtirpc/AUTHORS: -------------------------------------------------------------------------------- 1 | Gilles Quillard 2 | Antoine Fraticelli 3 | 4 | -------------------------------------------------------------------------------- /libtirpc/NEWS: -------------------------------------------------------------------------------- 1 | New in 0.1: 2 | * Portage from FreeBSD 5.2.1 (security part to be completed) 3 | * Use autoconf/automake 4 | -------------------------------------------------------------------------------- /libtirpc/VERSION: -------------------------------------------------------------------------------- 1 | # This file is used by configure to get version information 2 | # 3 | PKG_MAJOR=0 4 | PKG_MINOR=1 5 | PKG_REVISION=11 6 | PKG_BUILD=0 7 | 8 | -------------------------------------------------------------------------------- /libtirpc/doc/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | install: install-am 3 | $(mkinstalldirs) $(DESTDIR)/etc 4 | cp -p ./etc_netconfig $(DESTDIR)/etc/netconfig 5 | chmod 0644 $(DESTDIR)/etc/netconfig 6 | -------------------------------------------------------------------------------- /libtirpc/tirpc/misc/queue.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) 5 | 6 | #define STAILQ_FIRST(head) ((head)->stqh_first) 7 | -------------------------------------------------------------------------------- /libtirpc/src/winstubs.c: -------------------------------------------------------------------------------- 1 | /* XXX Need copyright info */ 2 | 3 | #include 4 | #include 5 | 6 | /* 7 | DWORD getpid(void) 8 | { 9 | fprintf(stderr, "STUB: getpid() returning zero!\n"); 10 | return 0; 11 | } 12 | */ -------------------------------------------------------------------------------- /libtirpc/THANKS: -------------------------------------------------------------------------------- 1 | Thanks to for 2 | 3 | Aurelien Charbon TI-RPC portage from NetBSD 4 | 5 | BSD Communauty TI-RPC improvement from Sun implementation 6 | 7 | -------------------------------------------------------------------------------- /dll/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 3 | # file to this component. This file merely indirects to the real make file 4 | # that is shared by all the driver components of the Windows NT DDK 5 | # 6 | 7 | !INCLUDE $(NTMAKEENV)\makefile.def 8 | 9 | -------------------------------------------------------------------------------- /sys/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 3 | # file to this component. This file merely indirects to the real make file 4 | # that is shared by all the driver components of the Windows NT DDK 5 | # 6 | 7 | !INCLUDE $(NTMAKEENV)\makefile.def 8 | 9 | -------------------------------------------------------------------------------- /daemon/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 3 | # file to this component. This file merely indirects to the real make file 4 | # that is shared by all the driver components of the Windows NT DDK 5 | # 6 | 7 | !INCLUDE $(NTMAKEENV)\makefile.def 8 | 9 | -------------------------------------------------------------------------------- /libtirpc/libtirpc.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libtirpc 7 | Description: Transport Independent RPC Library 8 | Requires: 9 | Version: @PACKAGE_VERSION@ 10 | Libs: -L@libdir@ -ltirpc 11 | Cflags: -I@includedir@/tirpc 12 | -------------------------------------------------------------------------------- /libtirpc/src/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 3 | # file to this component. This file merely indirects to the real make file 4 | # that is shared by all the driver components of the Windows NT DDK 5 | # 6 | 7 | !INCLUDE $(NTMAKEENV)\makefile.def 8 | 9 | -------------------------------------------------------------------------------- /cygwin/cygwin_ksh93/cygwin_ksh93.readme: -------------------------------------------------------------------------------- 1 | # 2 | # Cygwin ast-ksh/ksh93 README 3 | # 4 | 5 | # Build sequence 6 | cygport --64 ksh93.cygport download 7 | cygport --64 ksh93.cygport prep 8 | cygport --64 ksh93.cygport compile 9 | cygport --64 ksh93.cygport install 10 | cygport --64 ksh93.cygport package 11 | # EOF. 12 | -------------------------------------------------------------------------------- /dll/nfs41_np.def: -------------------------------------------------------------------------------- 1 | LIBRARY 2 | 3 | EXPORTS 4 | NPGetCaps 5 | NPAddConnection 6 | NPAddConnection3 7 | NPCancelConnection 8 | NPGetConnection 9 | NPGetConnection3 10 | NPOpenEnum 11 | NPEnumResource 12 | NPCloseEnum 13 | NPGetUniversalName 14 | NPGetResourceParent 15 | NPGetResourceInformation 16 | NPLogonNotify 17 | NPPasswordChangeNotify 18 | -------------------------------------------------------------------------------- /sys/nfs41_driver.rc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define VER_FILETYPE VFT_DRV 5 | #define VER_FILESUBTYPE VFT2_DRV_SYSTEM 6 | #define VER_FILEDESCRIPTION_STR "CITI's nfs41 driver" 7 | #define VER_INTERNALNAME_STR "nfs41_driver.sys" 8 | #define VER_ORIGINALFILENAME_STR "nfs41_driver.Sys" 9 | 10 | #include "common.ver" 11 | 12 | -------------------------------------------------------------------------------- /libtirpc/bootstrap: -------------------------------------------------------------------------------- 1 | [ -e Makefile ] && make clean 2 | rm -rf autom4te.cache configure Makefile stamp-h1 3 | rm -rf src/Makefile src/.deps 4 | rm -rf Makefile.in aclocal.m4 config.log config.h 5 | rm -rf depcomp missing install-sh config.status 6 | aclocal 7 | autoheader 8 | automake --gnu --add-missing -c 9 | autoconf 10 | rm -rf autom4te.cache config.log libtool stamp-h1* 11 | -------------------------------------------------------------------------------- /libtirpc/man/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | man5_MANS = netconfig.5 3 | man3_MANS = bindresvport.3t des_crypt.3t getnetconfig.3t getnetpath.3t \ 4 | getrpcent.3t getrpcport.3t rpc.3t rpc_clnt_auth.3t rpc_clnt_calls.3t \ 5 | rpc_clnt_create.3t rpc_secure.3t rpc_soc.3t rpc_svc_calls.3t \ 6 | rpc_svc_create.3t rpc_svc_err.3t rpc_svc_reg.3t rpc_xdr.3t rtime.3t 7 | 8 | EXTRA_DIST = $(man5_MANS) $(man3_MANS) 9 | 10 | -------------------------------------------------------------------------------- /libtirpc/libtirpc/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by tirpc.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /tests/ea/sources: -------------------------------------------------------------------------------- 1 | TARGETTYPE=PROGRAM 2 | TARGETNAME=nfs_ea 3 | SOURCES=main.c 4 | UMTYPE=console 5 | USE_MSVCRT=1 6 | TARGETLIBS=$(DDK_LIB_PATH)\ntdll.lib 7 | INCLUDES=$(DDK_INC_PATH) 8 | 9 | UMENTRY=wmain 10 | UNICODE=1 11 | C_DEFINES=$(C_DEFINES) -DUNICODE -D_UNICODE 12 | 13 | !IF 0 14 | /W3 is default level 15 | bump to /Wall, but suppress warnings generated by system includes 16 | !ENDIF 17 | MSC_WARNING_LEVEL=/Wall /wd4668 /wd4619 /wd4820 /wd4255 /wd4711 18 | -------------------------------------------------------------------------------- /mount/sources: -------------------------------------------------------------------------------- 1 | TARGETTYPE=PROGRAM 2 | TARGETNAME=nfs_mount 3 | SOURCES=mount.c options.c enum.c 4 | UMTYPE=console 5 | USE_MSVCRT=1 6 | TARGETLIBS=$(DDK_LIB_PATH)\mpr.lib 7 | INCLUDES=..\sys 8 | 9 | UMENTRY=wmain 10 | UNICODE=1 11 | C_DEFINES=$(C_DEFINES) -DUNICODE -D_UNICODE 12 | 13 | !IF 0 14 | /W3 is default level 15 | bump to /Wall, but suppress warnings generated by system includes 16 | !ENDIF 17 | MSC_WARNING_LEVEL=/Wall /wd4668 /wd4619 /wd4820 /wd4255 /wd4711 18 | -------------------------------------------------------------------------------- /ms-nfs41-idmap.conf: -------------------------------------------------------------------------------- 1 | # ldap server information 2 | #ldap_hostname="localhost" 3 | #ldap_port="389" 4 | #ldap_version="3" 5 | #ldap_timeout="5" 6 | 7 | # ldap schema information 8 | #ldap_base="cn=localhost" 9 | 10 | #ldap_class_users="user" 11 | #ldap_class_groups="group" 12 | 13 | #ldap_attr_username="cn" 14 | #ldap_attr_groupname="cn" 15 | #ldap_attr_gssAuthName="gssAuthName" 16 | #ldap_attr_uidNumber="uidNumber" 17 | #ldap_attr_gidNumber="gidNumber" 18 | 19 | # caching configuration 20 | #cache_ttl="60" 21 | -------------------------------------------------------------------------------- /install/sources: -------------------------------------------------------------------------------- 1 | TARGETTYPE=PROGRAM 2 | TARGETNAME=nfs_install 3 | SOURCES=nfs_install.c 4 | UMTYPE=console 5 | USE_MSVCRT=1 6 | INCLUDES=..\sys 7 | 8 | !IF 0 9 | /W3 is default level 10 | bump to /Wall, but suppress warnings generated by system includes, 11 | as well as the following warnings: 12 | 4100 - unused function call arguments (we have lots of stubs) 13 | 4127 - constant conditional (I like to use if(0) or if(1)) 14 | !ENDIF 15 | MSC_WARNING_LEVEL=/Wall /wd4668 /wd4619 /wd4820 /wd4255 /wd4100 /wd4127 /wd4201 /wd4214 /wd4711 16 | -------------------------------------------------------------------------------- /sys/nfs41_driver.ini: -------------------------------------------------------------------------------- 1 | \registry\machine\system\currentcontrolset\services\nfs41_driver 2 | Description = nfs41_driver 3 | DisplayName = nfs41_driver 4 | ErrorControl = REG_DWORD 0x00000001 5 | Group = Network 6 | ImagePath = System32\DRIVERS\nfs41_driver.sys 7 | LastLoadStatus = REG_DWORD 0 8 | Start = REG_DWORD 0x00000001 9 | Type = REG_DWORD 0x00000002 10 | \registry\machine\system\currentcontrolset\services\nfs41_driver\NetworkProvider 11 | DeviceName = \Device\nfs41_driver 12 | Name = NFS41 Network 13 | ProviderPath = System32\nfs41_np.dll 14 | -------------------------------------------------------------------------------- /cygwin/utils/sshnfs/README.txt: -------------------------------------------------------------------------------- 1 | # 2 | # sshnfs/README.txt 3 | # 4 | 5 | **** ToDo: 6 | - ksh93 getopt argument parsing 7 | - Correct POSIX exit codes 8 | - c.destination_nfs_port should be a command line option 9 | - How can a non-standard (TCP/2049) NFS port be specified for 10 | ssh+nfs:// URLs be specified ? 11 | - Debug messages should go to stderr 12 | - Linux: Add mount.nfs -o nconnect=4 (see 13 | https://www.suse.com/support/kb/doc/?id=000019933) 14 | 15 | 16 | **** Testing: 17 | - Check whether SSH -p port works 18 | - Check whether user in ssh+nfs:// URLs works 19 | - Check whether ports in ssh+nfs:// URLs works 20 | 21 | # EOF. 22 | -------------------------------------------------------------------------------- /cygwin/cygwin_ksh93/ksh_1_0_9_mamake_bootstrap.patch: -------------------------------------------------------------------------------- 1 | # Patch to avoid ETXTBUSY when trying to replace mamake.exe 2 | diff --git a/bin/package b/bin/package 3 | index 8d969c8b..f9ba6ab6 100755 4 | --- a/bin/package 5 | +++ b/bin/package 6 | @@ -2515,7 +2515,8 @@ checkaout() # cmd ... 7 | done 8 | fi 9 | rm -f "$INSTALLROOT/dyn/bin/$i" "$INSTALLROOT/src/lib/libast/$i" & 10 | - $exec $CC -O $CCFLAGS $LDFLAGS -o $INSTALLROOT/bin/$i $INITROOT/$i.c || return 11 | + $exec $CC -O $CCFLAGS $LDFLAGS -o $INSTALLROOT/bin/${i}_bootstrap $INITROOT/$i.c || return 12 | + $exec ln -s ${i}_bootstrap $INSTALLROOT/bin/$i 13 | test -f $i.o && $exec rm -f $i.o 14 | hash -r 15 | ;; 16 | -------------------------------------------------------------------------------- /dll/sources: -------------------------------------------------------------------------------- 1 | TARGETTYPE=DYNLINK 2 | TARGETNAME=nfs41_np 3 | SOURCES=dllmain.c nfs41_np.c options.c 4 | UMTYPE=console 5 | UNICODE=1 6 | DLLBASE=0x1010000 7 | USE_NTDLL=1 8 | NET_C_DEFINES=-DUNICODE 9 | INCLUDES=..\sys; \ 10 | $(DDK_INC_PATH); 11 | TARGETLIBS=$(DDK_LIB_PATH)\user32.lib $(DDK_LIB_PATH)\kernel32.lib 12 | DLLDEF=nfs41_np.def 13 | 14 | !IF 0 15 | /W3 is default level 16 | bump to /Wall, but suppress warnings generated by system includes, 17 | as well as the following warnings: 18 | 4100 - unused function call arguments (we have lots of stubs) 19 | 4127 - constant conditional (I like to use if(0) or if(1)) 20 | !ENDIF 21 | MSC_WARNING_LEVEL=/Wall /wd4668 /wd4619 /wd4820 /wd4255 /wd4100 /wd4127 /wd4711 22 | -------------------------------------------------------------------------------- /cygwin/utils/mount_sshnfs/README.txt: -------------------------------------------------------------------------------- 1 | # 2 | # mount_sshnfs/README.txt 3 | # 4 | 5 | **** ToDo: 6 | - Add umount -f option 7 | - Add umount -v option 8 | - Add mount -v/-vv/-vvv option 9 | - Fix FIXME stuff 10 | - on mount: Check whether the mount point exists 11 | - mounting should enforce that we only try NFSv4, and not try NFSv3 12 | - Implement "status" command to check on mount point and ssh 13 | forwarding process 14 | - Implement "restart_forwarding" command to restart the ssh 15 | forwarding process if it terminated for some reason 16 | - Debug messages should go to stderr 17 | - Linux: Add mount.nfs -o nconnect=4 (see 18 | https://www.suse.com/support/kb/doc/?id=000019933) 19 | - Add Linux umount helper support, see umount(8) HELPER section 20 | 21 | # EOF. 22 | -------------------------------------------------------------------------------- /libtirpc/tirpc/rpcsvc/nis.h: -------------------------------------------------------------------------------- 1 | #ifndef _RPCSVC_NIS_H 2 | #define _RPCSVC_NIS_H 3 | 4 | #define NIS_PK_NONE 0 /* no public key (unix/sys auth) */ 5 | #define NIS_PK_DH 1 /* Public key is Diffie-Hellman type */ 6 | #define NIS_PK_RSA 2 /* Public key is RSA type */ 7 | #define NIS_PK_KERB 3 /* Use kerberos style authentication */ 8 | 9 | typedef char * nis_name; 10 | struct endpoint { 11 | char *uaddr; 12 | char *family; 13 | char *proto; 14 | }; 15 | typedef struct endpoint endpoint; 16 | 17 | struct nis_server{ 18 | nis_name name; 19 | struct { 20 | u_int ep_len; 21 | endpoint *ep_val; 22 | } ep; 23 | uint32_t key_type; 24 | netobj pkey; 25 | }; 26 | typedef struct nis_server nis_server; 27 | 28 | #endif /* !_RPCSVC_NIS_H */ 29 | 30 | -------------------------------------------------------------------------------- /tests/cthon04/0003-lock-Fix-issue-with-tlock-path.patch: -------------------------------------------------------------------------------- 1 | From fa34ebf1b4ea266129d05e79f3d594fd70752226 Mon Sep 17 00:00:00 2001 2 | From: Roland Mainz 3 | Date: Tue, 18 Feb 2025 17:15:21 +0100 4 | Subject: [PATCH 3/4] lock: Fix issue with tlock path 5 | 6 | Fix issue with tlock path 7 | 8 | Signed-off-by: Roland Mainz 9 | --- 10 | lock/runtests | 2 +- 11 | 1 file changed, 1 insertion(+), 1 deletion(-) 12 | 13 | diff --git a/lock/runtests b/lock/runtests 14 | index 21b09a5..4db16e2 100755 15 | --- a/lock/runtests 16 | +++ b/lock/runtests 17 | @@ -64,7 +64,7 @@ do 18 | ;; 19 | esac 20 | echo "" 21 | - $i $TESTARGS $NFSTESTDIR 22 | + ./$i $TESTARGS $NFSTESTDIR 23 | done 24 | 25 | echo "Congratulations, you passed the locking tests!" 26 | -- 27 | 2.45.1 28 | -------------------------------------------------------------------------------- /etc_netconfig: -------------------------------------------------------------------------------- 1 | # 2 | # The network configuration file. This file is currently only used in 3 | # conjunction with the TI-RPC code in the libtirpc library. 4 | # 5 | # Entries consist of: 6 | # 7 | # \ 8 | # 9 | # 10 | # The and fields are always empty in this 11 | # implementation. 12 | # 13 | udp tpi_clts v inet udp - - 14 | tcp tpi_cots_ord v inet tcp - - 15 | udp6 tpi_clts v inet6 udp - - 16 | tcp6 tpi_cots_ord v inet6 tcp - - 17 | rawip tpi_raw - inet - - - 18 | local tpi_cots_ord - loopback - - - 19 | unix tpi_cots_ord - loopback - - - 20 | -------------------------------------------------------------------------------- /libtirpc/.gitignore: -------------------------------------------------------------------------------- 1 | # files generated by autoconf, automake, autoheader and libtoolize 2 | aclocal.m4 3 | autom4te.cache 4 | compile 5 | config.guess 6 | config.log 7 | config.sub 8 | configure 9 | depcomp 10 | install-sh 11 | libtool 12 | ltmain.sh 13 | Makefile.in 14 | missing 15 | config.h.in 16 | # files generated by configure 17 | confdefs.h 18 | config.status 19 | conftest 20 | conftest.c 21 | conftest.cpp 22 | conftest.er1 23 | conftest.err 24 | .deps 25 | Makefile 26 | config.h 27 | stamp-h1 28 | libtirpc.pc 29 | # file generated during compilation 30 | *.o 31 | .libs 32 | lib*.a 33 | src/libtirpc.la 34 | src/libtirpc_la-*.lo 35 | # generic editor backup et al 36 | *~ 37 | # cscope database files 38 | cscope.* 39 | # files generated by patches 40 | *.patch 41 | *.rej 42 | *.orig 43 | # files generated by debugging 44 | .gdb_history 45 | .gdbinit 46 | core 47 | -------------------------------------------------------------------------------- /libtirpc/doc/etc_netconfig: -------------------------------------------------------------------------------- 1 | # 2 | # The network configuration file. This file is currently only used in 3 | # conjunction with the TI-RPC code in the libtirpc library. 4 | # 5 | # Entries consist of: 6 | # 7 | # \ 8 | # 9 | # 10 | # The and fields are always empty in this 11 | # implementation. 12 | # 13 | udp tpi_clts v inet udp - - 14 | tcp tpi_cots_ord v inet tcp - - 15 | udp6 tpi_clts v inet6 udp - - 16 | tcp6 tpi_cots_ord v inet6 tcp - - 17 | rawip tpi_raw - inet - - - 18 | local tpi_cots_ord - loopback - - - 19 | unix tpi_cots_ord - loopback - - - 20 | -------------------------------------------------------------------------------- /cygwin/cygwin_ksh93/ksh.kshrc: -------------------------------------------------------------------------------- 1 | # 2 | # /etc/ksh.kshrc+~/.kshrc are sourced only for interactive shells 3 | # 4 | 5 | function _ksh_kshrc_is_windows_admin_account 6 | { 7 | # 8 | # Test whether we have the Windows permissions to install DLLs 9 | # and the kernel module 10 | # 11 | # Usually Windows Adminstrator rights are indicated by the 12 | # membership in group "544(Administratoren)" (Cygwin maps 13 | # "SID S-1-5-32-544" to GID 544) 14 | # 15 | if [[ "$(/usr/bin/id -G)" =~ (^|[[:space:]]+)544([[:space:]]+|$) ]] ; then 16 | return 0 17 | fi 18 | return 1 19 | } 20 | 21 | # default prompt 22 | if _ksh_kshrc_is_windows_admin_account ; then 23 | PS1=$'\E[1;91m$(/usr/bin/logname)@$(/usr/bin/hostname) \E[1;33m${PWD/~(Sl-r)$HOME/"~"}\E[0m\n$ ' 24 | else 25 | PS1=$'\E[1;32m$(/usr/bin/logname)@$(/usr/bin/hostname) \E[1;33m${PWD/~(Sl-r)$HOME/"~"}\E[0m\n$ ' 26 | fi 27 | 28 | # default editor mode 29 | set -o gmacs 30 | 31 | # EOF. 32 | -------------------------------------------------------------------------------- /libtirpc/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | echo -n cleaning up . 4 | 5 | # Clean up the generated crud 6 | ( 7 | for FILE in compile config.guess config.sub depcomp install-sh ltmain.sh missing mkinstalldirs; do 8 | if test -f $FILE; then 9 | rm -f $FILE 10 | fi 11 | echo -n . 12 | done 13 | ) 14 | 15 | for FILE in aclocal.m4 configure config.h.in; do 16 | if test -f $FILE; then 17 | rm -f $FILE 18 | fi 19 | echo -n . 20 | done 21 | 22 | for DIR in autom4te.cache; do 23 | if test -d $DIR; then 24 | rm -rf $DIR 25 | fi 26 | echo -n . 27 | done 28 | 29 | find . -type f -name 'Makefile.in' -print0 | xargs -r0 rm -f -- 30 | find . -type f -name 'Makefile' -print0 | xargs -r0 rm -f -- 31 | 32 | echo ' done' 33 | 34 | if test x"${1}" = x"clean"; then 35 | exit 36 | fi 37 | 38 | aclocal 39 | libtoolize --force --copy 40 | autoheader 41 | automake --add-missing --copy --gnu # -Wall 42 | autoconf # -Wall 43 | -------------------------------------------------------------------------------- /libtirpc/man/getrpcport.3t: -------------------------------------------------------------------------------- 1 | .\" @(#)getrpcport.3r 2.2 88/08/02 4.0 RPCSRC; from 1.12 88/02/26 SMI 2 | .\" 3 | .Dd October 6, 1987 4 | .Dt GETRPCPORT 3 5 | .Os 6 | .Sh NAME 7 | .Nm getrpcport 8 | .Nd get RPC port number 9 | .Sh LIBRARY 10 | .Lb libc 11 | .Sh SYNOPSIS 12 | .Ft int 13 | .Fn getrpcport "char *host" "int prognum" "int versnum" "int proto" 14 | .Sh DESCRIPTION 15 | The 16 | .Fn getrpcport 17 | function 18 | returns the port number for version 19 | .Fa versnum 20 | of the RPC program 21 | .Fa prognum 22 | running on 23 | .Fa host 24 | and using protocol 25 | .Fa proto . 26 | It returns 0 if it cannot contact the portmapper, or if 27 | .Fa prognum 28 | is not registered. If 29 | .Fa prognum 30 | is registered but not with version 31 | .Fa versnum , 32 | it will still return a port number (for some version of the program) 33 | indicating that the program is indeed registered. 34 | The version mismatch will be detected upon the first call to the service. 35 | -------------------------------------------------------------------------------- /sys/sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=nfs41_driver 2 | TARGETTYPE=DRIVER 3 | #KMDF_VERSION_MAJOR=1 4 | TARGETLIBS = $(TARGETLIBS) \ 5 | $(DDK_LIB_PATH)\ksecdd.lib \ 6 | $(DDK_LIB_PATH)\rxce.lib \ 7 | $(DDK_LIB_PATH)\rdbsslib.lib \ 8 | $(DDK_LIB_PATH)\copysup.lib 9 | C_DEFINES= -DEXPLODE_POOLTAGS -DMONOLITHIC_MINIRDR 10 | !IF 0 11 | Enable Buffer Security Check 12 | !ENDIF 13 | USER_C_FLAGS=/GS 14 | 15 | INCLUDES=..\dll 16 | SOURCES= nfs41_driver.rc nfs41_driver.c wmlkm.c nfs41_debug.c 17 | 18 | !IF 0 19 | /W3 is default level 20 | bump to /Wall, but suppress warnings generated by system includes, 21 | as well as the following warnings: 22 | 4100 - unused function call arguments (we have lots of stubs) 23 | 4127 - constant conditional (I like to use if(0) or if(1)) 24 | 4204 - nonstandard extension used : non-constant aggregate initializer 25 | !ENDIF 26 | MSC_WARNING_LEVEL=/Wall /wd4668 /wd4619 /wd4820 /wd4255 /wd4100 /wd4127 /wd4201 /wd4204 /wd4115 /wd4711 27 | -------------------------------------------------------------------------------- /tests/winsg/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for winsg 3 | # 4 | 5 | # signtool.exe can be in either '/cygdrive/c/Program Files/' or '/cygdrive/c/Program Files (x86)/' 6 | SIGNTOOL := $(shell ls -1 '/cygdrive/c/Program Files'*'/Microsoft SDKs/ClickOnce/SignTool/signtool.exe' | head -n 1) 7 | 8 | all: winsg.i686.exe winsg.x86_64.exe winsg.exe 9 | 10 | winsg.i686.exe: winsg.c 11 | clang -target i686-pc-windows-gnu -std=gnu17 -municode -Wall -Wextra -DUNICODE=1 -D_UNICODE=1 -g winsg.c -o $@ 12 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 13 | 14 | winsg.x86_64.exe: winsg.c 15 | clang -target x86_64-pc-windows-gnu -std=gnu17 -municode -Wall -Wextra -DUNICODE=1 -D_UNICODE=1 -g winsg.c -o $@ 16 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 17 | 18 | winsg.exe: winsg.x86_64.exe 19 | ln -s winsg.x86_64.exe winsg.exe 20 | 21 | clean: 22 | rm -fv \ 23 | winsg.i686.exe \ 24 | winsg.x86_64.exe \ 25 | winsg.exe 26 | # EOF. 27 | -------------------------------------------------------------------------------- /cygwin/cygwin_ksh93/ksh_1_0_8_libast_Cygwin_set_PATH_LEADING_SLASHES_for_UNC_paths.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/lib/libast/port/astconf.c b/src/lib/libast/port/astconf.c 2 | index b6b58027..396cd46d 100644 3 | --- a/src/lib/libast/port/astconf.c 4 | +++ b/src/lib/libast/port/astconf.c 5 | @@ -1355,6 +1355,24 @@ astgetconf(const char* name, const char* path, const char* value, int flags, Err 6 | Lookup_t look; 7 | Sfio_t* tmp; 8 | 9 | +#ifdef __CYGWIN__ 10 | + /* 11 | + * hack for Cygwin to make Cygwin UNC paths (with leading 12 | + * two slashes) work. 13 | + * 14 | + * Testcase: 15 | + * cd into UNC path, print "pwd -P", result must start with 16 | + * "///" 17 | + * ---- snip ---- 18 | + * $ bash -c 'cd "//derfw1fs10.global.loc/rfw" ; path_to_kshdir/ksh.exe -c "pwd -P ; true" ; true' 19 | + * //derfw1fs10.global.loc/rfw 20 | + * ---- snip ---- 21 | + * 22 | + */ 23 | + if (name && (!strcmp(name, "PATH_LEADING_SLASHES"))) { 24 | + return "1"; 25 | + } 26 | +#endif /* __CYGWIN__ */ 27 | if (!name) 28 | { 29 | if (path) 30 | -------------------------------------------------------------------------------- /tests/filemmaptests/testqsortonmmapedfile1.ksh93: -------------------------------------------------------------------------------- 1 | #!/bin/ksh93 2 | 3 | # 4 | # testqsortonmmapedfile1.ksh93 - Test |qsort()| on memory mapped file 5 | # 6 | 7 | set -o errexit 8 | 9 | builtin cat 10 | builtin cmp 11 | builtin rm 12 | 13 | integer res=0 14 | 15 | which qsortonmmapedfile1.exe || exit 1 16 | 17 | if [[ ! -f 'numfile1_orig' ]] ; then 18 | for ((i=32*1024*1024 ; i > 0 ; i--)) ; do 19 | printf "%15.15d\n" i 20 | # cat is used for buffering 21 | done | cat >'numfile1_orig' 22 | fi 23 | set -o xtrace 24 | 25 | rm -f 'numfile1' 'numfile1_sort_out' 26 | cp 'numfile1_orig' 'numfile1' 27 | time sort 'numfile1' -o 'numfile1_sort_out' 28 | ls -l 'numfile1' 29 | head 'numfile1' 30 | time qsortonmmapedfile1.exe 'numfile1' 31 | head 'numfile1' 32 | ls -l 'numfile1' 33 | if cmp 'numfile1' 'numfile1_sort_out' ; then 34 | printf '#\n# test OK\n#\n' 35 | (( res=0 )) 36 | else 37 | printf '#\n# test FAILED\n#\n' 38 | (( res=1 )) 39 | 40 | diff -u 'numfile1' 'numfile1_sort_out' 41 | fi 42 | 43 | exit $res 44 | # EOF. 45 | -------------------------------------------------------------------------------- /libtirpc/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = src man doc 2 | 3 | nobase_include_HEADERS = tirpc/netconfig.h \ 4 | tirpc/rpcsvc/crypt.x \ 5 | tirpc/rpcsvc/crypt.h \ 6 | tirpc/rpc/xdr.h \ 7 | tirpc/rpc/types.h \ 8 | tirpc/rpc/svc_soc.h \ 9 | tirpc/rpc/svc.h \ 10 | tirpc/rpc/svc_dg.h \ 11 | tirpc/rpc/svc_auth.h \ 12 | tirpc/rpc/rpc_msg.h \ 13 | tirpc/rpc/rpc.h \ 14 | tirpc/rpc/rpcent.h \ 15 | tirpc/rpc/rpc_com.h \ 16 | tirpc/rpc/rpcb_prot.x \ 17 | tirpc/rpc/rpcb_prot.h \ 18 | tirpc/rpc/rpcb_clnt.h \ 19 | tirpc/rpc/raw.h \ 20 | tirpc/rpc/pmap_rmt.h \ 21 | tirpc/rpc/pmap_prot.h \ 22 | tirpc/rpc/pmap_clnt.h \ 23 | tirpc/rpc/nettype.h \ 24 | tirpc/rpc/des.h \ 25 | tirpc/rpc/des_crypt.h \ 26 | tirpc/rpc/clnt_stat.h \ 27 | tirpc/rpc/clnt_soc.h \ 28 | tirpc/rpc/clnt.h \ 29 | tirpc/rpc/auth_unix.h \ 30 | tirpc/rpc/auth_kerb.h \ 31 | tirpc/rpc/auth.h \ 32 | tirpc/rpc/auth_gss.h \ 33 | tirpc/rpc/auth_des.h 34 | 35 | pkgconfigdir=$(libdir)/pkgconfig 36 | pkgconfig_DATA = libtirpc.pc 37 | -------------------------------------------------------------------------------- /libtirpc/man/publickey.5: -------------------------------------------------------------------------------- 1 | .\" @(#)publickey.5 2.1 88/08/07 4.0 RPCSRC; from 1.6 88/02/29 SMI; 2 | .Dd October 19, 1987 3 | .Dt PUBLICKEY 5 4 | .Os 5 | .Sh NAME 6 | .Nm publickey 7 | .Nd "public key database" 8 | .Sh SYNOPSIS 9 | .Pa /etc/publickey 10 | .Sh DESCRIPTION 11 | .Pa /etc/publickey 12 | is the public key database used for secure 13 | RPC (Remote Procedure Calls). 14 | Each entry in 15 | the database consists of a network user 16 | name (which may either refer to 17 | a user or a hostname), followed by the user's 18 | public key (in hex 19 | notation), a colon, and then the user's 20 | secret key encrypted with 21 | its login password (also in hex notation). 22 | .Pp 23 | This file is altered either by the user through the 24 | .Xr chkey 1 25 | command or by the system administrator through the 26 | .Xr newkey 8 27 | command. 28 | The file 29 | .Pa /etc/publickey 30 | should only contain data on the 31 | .Tn NIS 32 | master machine, where it 33 | is converted into the 34 | .Tn NIS 35 | database 36 | .Pa publickey.byname . 37 | .Sh SEE ALSO 38 | .Xr chkey 1 , 39 | .Xr publickey 3 , 40 | .Xr newkey 8 , 41 | .Xr ypupdated 8 42 | -------------------------------------------------------------------------------- /tests/winfsinfo1/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for winfsinfo 3 | # 4 | 5 | # signtool.exe can be in either '/cygdrive/c/Program Files/' or '/cygdrive/c/Program Files (x86)/' 6 | SIGNTOOL := $(shell ls -1 '/cygdrive/c/Program Files'*'/Microsoft SDKs/ClickOnce/SignTool/signtool.exe' | head -n 1) 7 | 8 | all: winfsinfo.i686.exe winfsinfo.x86_64.exe winfsinfo.exe 9 | 10 | winfsinfo.i686.exe: winfsinfo.c 11 | clang -target i686-pc-windows-gnu -std=gnu17 -Wall -Wextra -DUNICODE=1 -D_UNICODE=1 -I../../include -g winfsinfo.c -lmpr -lntdll -o $@ 12 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 13 | 14 | winfsinfo.x86_64.exe: winfsinfo.c 15 | clang -target x86_64-pc-windows-gnu -std=gnu17 -Wall -Wextra -DUNICODE=1 -D_UNICODE=1 -I../../include -g winfsinfo.c -lmpr -lntdll -o $@ 16 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 17 | 18 | winfsinfo.exe: winfsinfo.x86_64.exe 19 | ln -s winfsinfo.x86_64.exe winfsinfo.exe 20 | 21 | clean: 22 | rm -fv \ 23 | winfsinfo.i686.exe \ 24 | winfsinfo.x86_64.exe \ 25 | winfsinfo.exe 26 | # EOF. 27 | -------------------------------------------------------------------------------- /tests/catdbgprint/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for catdbgprint 3 | # 4 | 5 | # signtool.exe can be in either '/cygdrive/c/Program Files/' or '/cygdrive/c/Program Files (x86)/' 6 | SIGNTOOL := $(shell ls -1 '/cygdrive/c/Program Files'*'/Microsoft SDKs/ClickOnce/SignTool/signtool.exe' | head -n 1) 7 | 8 | all: catdbgprint.i686.exe catdbgprint.x86_64.exe catdbgprint.exe 9 | 10 | catdbgprint.i686.exe: catdbgprint.c 11 | clang -target i686-pc-windows-gnu -std=gnu17 -Wall -Wextra -DUNICODE=1 -D_UNICODE=1 -I../../include -g catdbgprint.c -lntdll -o $@ 12 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 13 | 14 | catdbgprint.x86_64.exe: catdbgprint.c 15 | clang -target x86_64-pc-windows-gnu -std=gnu17 -Wall -Wextra -DUNICODE=1 -D_UNICODE=1 -I../../include -g catdbgprint.c -lntdll -o $@ 16 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 17 | 18 | catdbgprint.exe: catdbgprint.x86_64.exe 19 | ln -s catdbgprint.x86_64.exe catdbgprint.exe 20 | 21 | clean: 22 | rm -fv \ 23 | catdbgprint.i686.exe \ 24 | catdbgprint.x86_64.exe \ 25 | catdbgprint.exe 26 | # EOF. 27 | -------------------------------------------------------------------------------- /tests/lockincfile1/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for lockincfile1 3 | # 4 | 5 | # signtool.exe can be in either '/cygdrive/c/Program Files/' or '/cygdrive/c/Program Files (x86)/' 6 | SIGNTOOL := $(shell ls -1 '/cygdrive/c/Program Files'*'/Microsoft SDKs/ClickOnce/SignTool/signtool.exe' | head -n 1) 7 | 8 | all: \ 9 | lockincfile1.i686.exe \ 10 | lockincfile1.x86_64.exe \ 11 | lockincfile1.exe 12 | 13 | lockincfile1.i686.exe: lockincfile1.c 14 | clang -target i686-pc-windows-gnu -std=gnu17 -Wall -Wextra -DUNICODE=1 -D_UNICODE=1 -g -O lockincfile1.c -o $@ 15 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 16 | 17 | lockincfile1.x86_64.exe: lockincfile1.c 18 | clang -target x86_64-pc-windows-gnu -std=gnu17 -Wall -Wextra -DUNICODE=1 -D_UNICODE=1 -g -O lockincfile1.c -o $@ 19 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 20 | 21 | lockincfile1.exe: lockincfile1.x86_64.exe 22 | ln -s lockincfile1.x86_64.exe lockincfile1.exe 23 | 24 | clean: 25 | rm -fv \ 26 | lockincfile1.i686.exe \ 27 | lockincfile1.x86_64.exe \ 28 | lockincfile1.exe 29 | # EOF. 30 | -------------------------------------------------------------------------------- /libtirpc/src/gettimeofday.c: -------------------------------------------------------------------------------- 1 | /* XXX NEED Copyright info */ 2 | #include 3 | #include 4 | 5 | #if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) 6 | #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 7 | #else 8 | #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL 9 | #endif 10 | 11 | int gettimeofday(struct timeval *tv, struct timezone *tz) 12 | { 13 | FILETIME ft; 14 | unsigned __int64 tmpres = 0; 15 | static int tzflag; 16 | 17 | if (NULL != tv) 18 | { 19 | GetSystemTimePreciseAsFileTime(&ft); 20 | 21 | tmpres |= ft.dwHighDateTime; 22 | tmpres <<= 32; 23 | tmpres |= ft.dwLowDateTime; 24 | 25 | /*converting file time to unix epoch*/ 26 | tmpres /= 10; /*convert into microseconds*/ 27 | tmpres -= DELTA_EPOCH_IN_MICROSECS; 28 | tv->tv_sec = (long)(tmpres / 1000000UL); 29 | tv->tv_usec = (long)(tmpres % 1000000UL); 30 | } 31 | 32 | if (NULL != tz) 33 | { 34 | if (!tzflag) 35 | { 36 | _tzset(); 37 | tzflag++; 38 | } 39 | tz->tz_minuteswest = _timezone / 60; 40 | tz->tz_dsttime = _daylight; 41 | } 42 | 43 | return 0; 44 | } 45 | -------------------------------------------------------------------------------- /tests/winfstest/README.txt: -------------------------------------------------------------------------------- 1 | # 2 | # winfstest testsuite usage instructions 3 | # for ms-nfs41-client 4 | # 5 | 6 | set -o xtrace 7 | set -o nounset 8 | set -o errexit 9 | 10 | git clone https://github.com/kofemann/ms-nfs41-client.git 11 | git clone https://github.com/dimov-cz/winfstest.git 12 | cd winfstest/ 13 | git config --global --add safe.directory "$PWD" 14 | 15 | # switch to commit which is known to work (with our patches) 16 | git checkout '525f878c06c585619eadd769c8ed9dcdf175b026' 17 | git am --ignore-whitespace <'../ms-nfs41-client/tests/winfstest/0001-winfstest-Update-VS-project-file-to-VS19-and-make-fi.patch' 18 | 19 | # build test suite binaries 20 | export PATH+=":/cygdrive/c/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/" 21 | MSBuild.exe winfstest.sln -t:Build -p:Configuration=Debug -p:Platform=x64 22 | 23 | # get testsuite binary path 24 | cd TestSuite 25 | chmod a+x winfstest.exe 26 | winfstest_testsuite_path="$(pwd)" 27 | 28 | # create test dir on NFSv4.1 filesystem 29 | mkdir -p /cygdrive/t/winfstesttmp 30 | cd /cygdrive/t/winfstesttmp 31 | 32 | # run testsuite 33 | ${winfstest_testsuite_path}/run-winfstest 34 | 35 | # EOF. 36 | -------------------------------------------------------------------------------- /libtirpc/configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT(libtirpc, 0.2.1) 2 | AM_INIT_AUTOMAKE(libtirpc, 0.2.1) 3 | AM_MAINTAINER_MODE 4 | AC_CONFIG_SRCDIR([src/auth_des.c]) 5 | 6 | AC_ARG_ENABLE(gss,[ --enable-gss Turn on gss api], [case "${enableval}" in 7 | yes) gss=true ; AC_CHECK_LIB([gssapi],[gss_init_sec_context]) ;; 8 | no) gss=false ;; 9 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-gss) ;; 10 | esac],[gss=false]) 11 | AM_CONDITIONAL(GSS, test x$gss = xtrue) 12 | if test x$gss = xtrue; then 13 | AC_DEFINE(HAVE_LIBGSSAPI, 1, []) 14 | PKG_CHECK_MODULES(GSSGLUE, libgssglue, [], 15 | AC_MSG_ERROR([Unable to locate information required to use libgssglue.])) 16 | fi 17 | 18 | AC_PROG_CC 19 | AM_CONFIG_HEADER(config.h) 20 | AC_PROG_LIBTOOL 21 | ##AC_PROG_RANLIB 22 | AC_HEADER_DIRENT 23 | AC_PREFIX_DEFAULT(/usr) 24 | AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h]) 25 | AC_CHECK_LIB([pthread], [pthread_create]) 26 | 27 | 28 | AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile]) 29 | AC_OUTPUT(libtirpc.pc) 30 | -------------------------------------------------------------------------------- /tests/winclonefile/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for winclonefile 3 | # 4 | 5 | # signtool.exe can be in either '/cygdrive/c/Program Files/' or '/cygdrive/c/Program Files (x86)/' 6 | SIGNTOOL := $(shell ls -1 '/cygdrive/c/Program Files'*'/Microsoft SDKs/ClickOnce/SignTool/signtool.exe' | head -n 1) 7 | 8 | all: winclonefile.i686.exe winclonefile.x86_64.exe winclonefile.exe 9 | 10 | winclonefile.i686.exe: winclonefile.c 11 | clang -target i686-pc-windows-gnu -std=gnu17 -Wall -Wextra -DUNICODE=1 -D_UNICODE=1 -I../../include -g winclonefile.c -lntdll -o $@ 12 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 13 | 14 | winclonefile.x86_64.exe: winclonefile.c 15 | clang -target x86_64-pc-windows-gnu -std=gnu17 -Wall -Wextra -DUNICODE=1 -D_UNICODE=1 -I../../include -g winclonefile.c -lntdll -o $@ 16 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 17 | 18 | winclonefile.exe: winclonefile.x86_64.exe 19 | ln -s winclonefile.x86_64.exe winclonefile.exe 20 | 21 | clean: 22 | rm -fv \ 23 | winclonefile.i686.exe \ 24 | winclonefile.x86_64.exe \ 25 | winclonefile.exe 26 | # EOF. 27 | -------------------------------------------------------------------------------- /tests/cthon04/0002-basic-Workaround-for-ms-nfs41-client-POSIX-symlink-t.patch: -------------------------------------------------------------------------------- 1 | From 8c4799d4f3bab10be067e1074bffe043147ba7b0 Mon Sep 17 00:00:00 2001 2 | From: Roland Mainz 3 | Date: Tue, 18 Feb 2025 17:12:30 +0100 4 | Subject: [PATCH 2/4] basic: Workaround for ms-nfs41-client POSIX symlink to 5 | WinNT symlink syntax limitation 6 | 7 | Workaround for ms-nfs41-client POSIX symlink to WinNT symlink syntax, 8 | WinNT does not have the concept of a global root like UNIX/POSIX, 9 | so a symlink target currently gets rejected 10 | 11 | Signed-off-by: Roland Mainz 12 | --- 13 | basic/test8.c | 2 +- 14 | 1 file changed, 1 insertion(+), 1 deletion(-) 15 | 16 | diff --git a/basic/test8.c b/basic/test8.c 17 | index d65eb3a..f993631 100644 18 | --- a/basic/test8.c 19 | +++ b/basic/test8.c 20 | @@ -43,7 +43,7 @@ static int Tflag = 0; /* print timing */ 21 | static int Fflag = 0; /* test function only; set count to 1, negate -t */ 22 | static int Nflag = 0; /* Suppress directory operations */ 23 | 24 | -#define SNAME "/this/is/a/symlink" /* symlink prefix */ 25 | +#define SNAME "/dev/this/is/a/symlink" /* symlink prefix */ 26 | 27 | static void 28 | usage() 29 | -- 30 | 2.45.1 31 | -------------------------------------------------------------------------------- /libtirpc/man/rtime.3t: -------------------------------------------------------------------------------- 1 | .\" @(#)rtime.3n 2.1 88/08/08 4.0 RPCSRC; from 1.5 88/02/08 SMI 2 | .\" $FreeBSD: src/lib/libc/rpc/rtime.3,v 1.8 2002/12/19 09:40:23 ru Exp $ 3 | .\" 4 | .Dd November 22, 1987 5 | .Dt RTIME 3 6 | .Os 7 | .Sh NAME 8 | .Nm rtime 9 | .Nd "get remote time" 10 | .Sh LIBRARY 11 | .Lb libc 12 | .Sh SYNOPSIS 13 | .In sys/types.h 14 | .In sys/time.h 15 | .In netinet/in.h 16 | .Ft int 17 | .Fo rtime 18 | .Fa "struct sockaddr_in *addrp" 19 | .Fa "struct timeval *timep" 20 | .Fa "struct timeval *timeout" 21 | .Fc 22 | .Sh DESCRIPTION 23 | The 24 | .Fn rtime 25 | function 26 | consults the Internet Time Server at the address pointed to by 27 | .Fa addrp 28 | and returns the remote time in the 29 | .Vt timeval 30 | struct pointed to by 31 | .Fa timep . 32 | Normally, the 33 | .Tn UDP 34 | protocol is used when consulting the Time Server. 35 | The 36 | .Fa timeout 37 | argument specifies how long the 38 | routine should wait before giving 39 | up when waiting for a reply. 40 | If 41 | .Fa timeout 42 | is specified as 43 | .Dv NULL , 44 | however, the routine will instead use 45 | .Tn TCP 46 | and block until a reply is received from the time server. 47 | .Sh RETURN VALUES 48 | .Rv -std rtime 49 | .Sh SEE ALSO 50 | .Xr timed 8 51 | -------------------------------------------------------------------------------- /tests/filemmaptests/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for qsortonmmapedfile1 3 | # 4 | 5 | # signtool.exe can be in either '/cygdrive/c/Program Files/' or '/cygdrive/c/Program Files (x86)/' 6 | SIGNTOOL := $(shell ls -1 '/cygdrive/c/Program Files'*'/Microsoft SDKs/ClickOnce/SignTool/signtool.exe' | head -n 1) 7 | 8 | all: \ 9 | qsortonmmapedfile1.i686.exe \ 10 | qsortonmmapedfile1.x86_64.exe \ 11 | qsortonmmapedfile1.exe 12 | 13 | qsortonmmapedfile1.i686.exe: qsortonmmapedfile1.c 14 | clang -target i686-pc-windows-gnu -std=gnu17 -Wall -Wextra -DUNICODE=1 -D_UNICODE=1 -g -O qsortonmmapedfile1.c -o $@ 15 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 16 | 17 | qsortonmmapedfile1.x86_64.exe: qsortonmmapedfile1.c 18 | clang -target x86_64-pc-windows-gnu -std=gnu17 -Wall -Wextra -DUNICODE=1 -D_UNICODE=1 -g -O qsortonmmapedfile1.c -o $@ 19 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 20 | 21 | qsortonmmapedfile1.exe: qsortonmmapedfile1.x86_64.exe 22 | ln -s qsortonmmapedfile1.x86_64.exe qsortonmmapedfile1.exe 23 | 24 | clean: 25 | rm -fv \ 26 | qsortonmmapedfile1.i686.exe \ 27 | qsortonmmapedfile1.x86_64.exe \ 28 | qsortonmmapedfile1.exe 29 | # EOF. 30 | -------------------------------------------------------------------------------- /tests/ea/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for nfs_ea 3 | # 4 | 5 | # signtool.exe can be in either '/cygdrive/c/Program Files/' or '/cygdrive/c/Program Files (x86)/' 6 | SIGNTOOL := $(shell ls -1 '/cygdrive/c/Program Files'*'/Microsoft SDKs/ClickOnce/SignTool/signtool.exe' | head -n 1) 7 | 8 | all: nfs_ea.i686.exe nfs_ea.x86_64.exe nfs_ea.exe 9 | 10 | nfs_ea.i686.exe: main.c 11 | clang -target i686-pc-windows-gnu -std=gnu17 -municode -Wall -Wextra -DSTRSAFE_NO_DEPRECATE=1 -D_CRT_STDIO_ISO_WIDE_SPECIFIERS=1 -DUNICODE=1 -D_UNICODE=1 -isystem /usr/include/w32api/ddk -I../../include -g main.c -lntdll -o $@ 12 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 13 | 14 | nfs_ea.x86_64.exe: main.c 15 | clang -target x86_64-pc-windows-gnu -std=gnu17 -municode -Wall -Wextra -DSTRSAFE_NO_DEPRECATE=1 -D_CRT_STDIO_ISO_WIDE_SPECIFIERS=1 -DUNICODE=1 -D_UNICODE=1 -isystem /usr/include/w32api/ddk -I../../include -g main.c -lntdll -o $@ 16 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 17 | 18 | nfs_ea.exe: nfs_ea.x86_64.exe 19 | rm -f nfs_ea.exe 20 | ln -s nfs_ea.x86_64.exe nfs_ea.exe 21 | 22 | clean: 23 | rm -fv \ 24 | nfs_ea.i686.exe \ 25 | nfs_ea.x86_64.exe \ 26 | nfs_ea.exe 27 | # EOF. 28 | -------------------------------------------------------------------------------- /tests/winoffloadcopyfile/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for winoffloadcopyfile 3 | # 4 | 5 | # signtool.exe can be in either '/cygdrive/c/Program Files/' or '/cygdrive/c/Program Files (x86)/' 6 | SIGNTOOL := $(shell ls -1 '/cygdrive/c/Program Files'*'/Microsoft SDKs/ClickOnce/SignTool/signtool.exe' | head -n 1) 7 | 8 | all: winoffloadcopyfile.i686.exe winoffloadcopyfile.x86_64.exe winoffloadcopyfile.exe 9 | 10 | winoffloadcopyfile.i686.exe: winoffloadcopyfile.c 11 | clang -target i686-pc-windows-gnu -std=gnu17 -Wall -Wextra -DUNICODE=1 -D_UNICODE=1 -I../../include -g winoffloadcopyfile.c -lntdll -o $@ 12 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 13 | 14 | winoffloadcopyfile.x86_64.exe: winoffloadcopyfile.c 15 | clang -target x86_64-pc-windows-gnu -std=gnu17 -Wall -Wextra -DUNICODE=1 -D_UNICODE=1 -I../../include -g winoffloadcopyfile.c -lntdll -o $@ 16 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 17 | 18 | winoffloadcopyfile.exe: winoffloadcopyfile.x86_64.exe 19 | ln -s winoffloadcopyfile.x86_64.exe winoffloadcopyfile.exe 20 | 21 | clean: 22 | rm -fv \ 23 | winoffloadcopyfile.i686.exe \ 24 | winoffloadcopyfile.x86_64.exe \ 25 | winoffloadcopyfile.exe 26 | # EOF. 27 | -------------------------------------------------------------------------------- /tests/lssparse/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for lssparse 3 | # 4 | 5 | # signtool.exe can be in either '/cygdrive/c/Program Files/' or '/cygdrive/c/Program Files (x86)/' 6 | SIGNTOOL := $(shell ls -1 '/cygdrive/c/Program Files'*'/Microsoft SDKs/ClickOnce/SignTool/signtool.exe' | head -n 1) 7 | 8 | # Cygwin stopped supporting 32bit with Cygwin release 3.3, so no 32bit version 9 | # has SEEK_HOLE/SEEK_DATA support 10 | GETCONF_LONG_BIT := $(strip $(shell getconf LONG_BIT 2>/dev/null || echo 0)) 11 | 12 | ifeq ($(GETCONF_LONG_BIT),64) 13 | all: lssparse.x86_64.exe lssparse.exe 14 | else 15 | all: 16 | endif 17 | 18 | # Cygwin 3.6 does not support 32bit builds anymore 19 | #lssparse.i686.exe: lssparse.c 20 | # gcc -std=gnu17 -Wall -Wextra -DUNICODE=1 -D_UNICODE=1 -I../../include -g lssparse.c -lntdll -o $@ 21 | # bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 22 | 23 | lssparse.x86_64.exe: lssparse.c 24 | gcc -std=gnu17 -Wall -Wextra -DUNICODE=1 -D_UNICODE=1 -I../../include -g lssparse.c -lntdll -o $@ 25 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 26 | 27 | lssparse.exe: lssparse.x86_64.exe 28 | ln -s lssparse.x86_64.exe lssparse.exe 29 | 30 | clean: 31 | rm -fv \ 32 | lssparse.x86_64.exe \ 33 | lssparse.exe 34 | # EOF. 35 | -------------------------------------------------------------------------------- /libtirpc/man/publickey.3t: -------------------------------------------------------------------------------- 1 | .\" @(#)publickey.3r 2.1 88/08/07 4.0 RPCSRC 2 | .\" 3 | .Dd October 6, 1987 4 | .Dt PUBLICKEY 3 5 | .Os 6 | .Sh NAME 7 | .Nm publickey , getpublickey , getsecretkey 8 | .Nd "get public or secret key" 9 | .Sh LIBRARY 10 | .Lb librpcsvc 11 | .Sh SYNOPSIS 12 | .In rpc/rpc.h 13 | .In rpc/key_prot.h 14 | .Ft int 15 | .Fo getpublickey 16 | .Fa "char netname[MAXNETNAMELEN+1]" 17 | .Fa "char publickey[HEXKEYBYTES+1]" 18 | .Fc 19 | .Ft int 20 | .Fo getsecretkey 21 | .Fa "char netname[MAXNETNAMELEN+1]" 22 | .Fa "char secretkey[HEXKEYBYTES+1]" 23 | .Fa "char *passwd" 24 | .Fc 25 | .Sh DESCRIPTION 26 | These routines are used to get public and secret keys from the 27 | .Tn YP 28 | database. 29 | The 30 | .Fn getsecretkey 31 | function 32 | has an extra argument, 33 | .Fa passwd , 34 | which is used to decrypt the encrypted secret key stored in the database. 35 | Both routines return 1 if they are successful in finding the key, 0 otherwise. 36 | The keys are returned as 37 | .Dv NULL Ns \-terminated , 38 | hexadecimal strings. 39 | If the password supplied to 40 | .Fn getsecretkey 41 | fails to decrypt the secret key, the routine will return 1 but the 42 | .Fa secretkey 43 | argument will be a 44 | .Dv NULL 45 | string 46 | .Pq Dq . 47 | .Sh SEE ALSO 48 | .Xr publickey 5 49 | .Pp 50 | .%T "RPC Programmer's Manual" 51 | in 52 | .Pa /usr/share/doc/psd/23.rpc . 53 | -------------------------------------------------------------------------------- /libtirpc/man/rpc.5: -------------------------------------------------------------------------------- 1 | .\" @(#)rpc.4 1.17 93/08/30 SMI; from SVr4 2 | .\" Copyright 1989 AT&T 3 | .Dd December 10, 1991 4 | .Dt RPC 5 5 | .Os 6 | .Sh NAME 7 | .Nm rpc 8 | .Nd rpc program number data base 9 | .Sh SYNOPSIS 10 | .Pa /etc/rpc 11 | .Sh DESCRIPTION 12 | The 13 | .Nm 14 | file contains user readable names that 15 | can be used in place of RPC program numbers. 16 | For each RPC program a single line should be present 17 | with the following information: 18 | .Pp 19 | .Bl -enum -compact 20 | .It 21 | name of the RPC program 22 | .It 23 | RPC program number 24 | .It 25 | aliases 26 | .El 27 | .Pp 28 | Items are separated by any number of blanks and/or 29 | tab characters. 30 | A hash 31 | .Pq Dq Li # 32 | indicates the beginning of a comment; characters up to the end of 33 | the line are not interpreted by routines which search the file. 34 | .Sh EXAMPLES 35 | Below is an example of an RPC database: 36 | .Bd -literal 37 | # 38 | # rpc 39 | # 40 | rpcbind 100000 portmap sunrpc portmapper 41 | rusersd 100002 rusers 42 | nfs 100003 nfsprog 43 | mountd 100005 mount showmount 44 | walld 100008 rwall shutdown 45 | sprayd 100012 spray 46 | llockmgr 100020 47 | nlockmgr 100021 48 | status 100024 49 | bootparam 100026 50 | keyserv 100029 keyserver 51 | .Ed 52 | .Sh FILES 53 | .Bl -tag -width /etc/nsswitch.conf -compact 54 | .It Pa /etc/nsswitch.conf 55 | .El 56 | .Sh SEE ALSO 57 | .Xr getrpcent 3 58 | -------------------------------------------------------------------------------- /daemon/sources: -------------------------------------------------------------------------------- 1 | TARGETTYPE=PROGRAM 2 | TARGETNAME=nfsd 3 | SOURCES=nfs41_daemon.c daemon_debug.c nfs41_ops.c nfs41_compound.c nfs41_xdr.c \ 4 | nfs41_server.c nfs41_client.c nfs41_superblock.c nfs41_session.c lookup.c \ 5 | mount.c open.c readwrite.c lock.c readdir.c getattr.c setattr.c upcall.c \ 6 | nfs41_rpc.c util.c pnfs_layout.c pnfs_device.c pnfs_debug.c pnfs_io.c \ 7 | name_cache.c namespace.c rbtree.c volume.c callback_server.c callback_xdr.c \ 8 | service.c symlink.c idmap.c 9 | UMTYPE=console 10 | USE_LIBCMT=1 11 | #USE_MSVCRT=1 12 | C_DEFINES=-DSTANDALONE_NFSD #-- use this for non-service nfsd 13 | INCLUDES=..\sys;..\dll;..\libtirpc\tirpc 14 | # Use the following for "service" version of nfsd 15 | #TARGETLIBS=$(SDK_LIB_PATH)\ws2_32.lib $(SDK_LIB_PATH)\iphlpapi.lib \ 16 | # ..\libtirpc\src\obj$(BUILD_ALT_DIR)\*\libtirpc.lib \ 17 | # $(SDK_LIB_PATH)\kernel32.lib \ 18 | # $(SDK_LIB_PATH)\advapi32.lib \ 19 | # $(SDK_LIB_PATH)\shell32.lib 20 | TARGETLIBS=$(SDK_LIB_PATH)\ws2_32.lib $(SDK_LIB_PATH)\iphlpapi.lib \ 21 | ..\libtirpc\src\obj$(BUILD_ALT_DIR)\*\libtirpc.lib 22 | 23 | !IF 0 24 | /W3 is default level 25 | bump to /Wall, but suppress warnings generated by system includes, 26 | as well as the following warnings: 27 | 4100 - unused function call arguments (we have lots of stubs) 28 | 4127 - constant conditional (I like to use if(0) or if(1)) 29 | 4220 - varargs matching remaining parameters 30 | 4204 - nonstandard extension 31 | !ENDIF 32 | MSC_WARNING_LEVEL=/Wall /wd4668 /wd4619 /wd4820 /wd4255 /wd4100 /wd4127 /wd4711 /wd4220 /wd4204 33 | -------------------------------------------------------------------------------- /libtirpc/libtirpc/libtirpc.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | //#include "afxres.h" 11 | 12 | ///////////////////////////////////////////////////////////////////////////// 13 | #undef APSTUDIO_READONLY_SYMBOLS 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // English (U.S.) resources 17 | 18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 19 | LANGUAGE 9, 1 20 | #pragma code_page(1252) 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""afxres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | #endif // English (U.S.) resources 48 | ///////////////////////////////////////////////////////////////////////////// 49 | 50 | 51 | 52 | #ifndef APSTUDIO_INVOKED 53 | ///////////////////////////////////////////////////////////////////////////// 54 | // 55 | // Generated from the TEXTINCLUDE 3 resource. 56 | // 57 | 58 | 59 | ///////////////////////////////////////////////////////////////////////////// 60 | #endif // not APSTUDIO_INVOKED 61 | 62 | -------------------------------------------------------------------------------- /libtirpc/tirpc/namespace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001 Daniel Eischen . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 18 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 | * SUCH DAMAGE. 25 | * 26 | * $FreeBSD: src/lib/libc/include/namespace.h,v 1.16 2003/05/01 19:03:13 nectar Exp $ 27 | */ 28 | 29 | #ifndef _NAMESPACE_H_ 30 | #define _NAMESPACE_H_ 31 | 32 | 33 | #endif /* _NAMESPACE_H_ */ 34 | -------------------------------------------------------------------------------- /daemon/accesstoken.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NFSv4.1 client for Windows 3 | * Copyright (C) 2024 Roland Mainz 4 | * 5 | * Roland Mainz 6 | * 7 | * This library is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as published by 9 | * the Free Software Foundation; either version 2.1 of the License, or (at 10 | * your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, but 13 | * without any warranty; without even the implied warranty of merchantability 14 | * or fitness for a particular purpose. See the GNU Lesser General Public 15 | * License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with this library; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 20 | */ 21 | 22 | #ifndef __NFS41_DAEMON_ACCESSTOKEN_H__ 23 | #define __NFS41_DAEMON_ACCESSTOKEN_H__ 1 24 | 25 | #include 26 | #include 27 | #include "nfs41_types.h" /* for |gid_t| */ 28 | 29 | bool get_token_user_name(HANDLE tok, char *out_buffer); 30 | bool get_token_primarygroup_name(HANDLE tok, char *out_buffer); 31 | bool get_token_authenticationid(HANDLE tok, LUID *out_authenticationid); 32 | bool set_token_privilege(HANDLE tok, const char *seprivname, bool enable_priv); 33 | bool fill_auth_unix_aup_gids(HANDLE tok, 34 | gid_t *, int *num_aup_gids); 35 | bool get_token_groups_names(HANDLE tok, 36 | int num_out_buffers, char *out_buffers[], 37 | int *out_buffers_count); 38 | 39 | #endif /* !__NFS41_DAEMON_ACCESSTOKEN_H__ */ 40 | -------------------------------------------------------------------------------- /nfs41rdr.inf: -------------------------------------------------------------------------------- 1 | [Version] 2 | Signature="$CHICAGO$" 3 | DriverVer=06/12/2024,1.0.0.0 4 | Class=NetService 5 | ClassGUID={4d36e974-e325-11ce-bfc1-08002be10318} 6 | CatalogFile=nfs41rdr.cat 7 | Provider=%ProviderName% 8 | 9 | [SourceDisksNames] 10 | 1=%Disk% 11 | 12 | [SourceDisksFiles] 13 | nfs41_driver.sys=1, 14 | nfs41_np.dll=1, 15 | 16 | [DestinationDirs] 17 | DefaultDestDir=10 ;%windir% 18 | nfs41_driver.sysfile=12 ;%windir%\system32\drivers 19 | nfs41_driver.dllfile=11 ;%windir%\system32 20 | 21 | [DefaultInstall] 22 | CopyFiles=nfs41_driver.sysfile,nfs41_driver.dllfile 23 | AddReg=nfs41_np.AddReg 24 | 25 | [DefaultInstall.Services] 26 | AddService=%Nfs41RdrServiceName%,,nfs41rdr.Service 27 | 28 | [DefaultUninstall] 29 | DelFiles=nfs41_driver.sysfile,nfs41_driver.dllfile 30 | DelReg=nfs41_driver.DelReg 31 | 32 | [DefaultUninstall.Services] 33 | DelService=%Nfs41RdrServiceName% 34 | 35 | [nfs41_driver.sysfile] 36 | nfs41_driver.sys 37 | 38 | [nfs41_driver.dllfile] 39 | nfs41_np.dll 40 | 41 | [nfs41rdr.Service] 42 | DisplayName=%Nfs41RdrServiceName% 43 | Description=%Nfs41RdrServiceName% 44 | ServiceType=0x00000002 ;SERVICE_FILE_SYSTEM_DRIVER 45 | StartType=0x00000001 ;SERVICE_SYSTEM_START 46 | ErrorControl=0x00000001 ;SERVICE_ERROR_NORMAL 47 | ServiceBinary=%12%\nfs41_driver.sys 48 | LoadOrderGroup=Network 49 | 50 | [nfs41_np.AddReg] 51 | HKLM,SYSTEM\CurrentControlSet\Services\nfs41_driver\NetworkProvider,DeviceName,,\Device\nfs41_driver 52 | HKLM,SYSTEM\CurrentControlSet\Services\nfs41_driver\NetworkProvider,Name,,"NFS41 Network" 53 | HKLM,SYSTEM\CurrentControlSet\Services\nfs41_driver\NetworkProvider,ProviderPath,,System32\nfs41_np.dll 54 | 55 | [nfs41_driver.DelReg] 56 | HKLM,SYSTEM\CurrentControlSet\Services\nfs41_driver 57 | 58 | [Strings] 59 | Nfs41RdrServiceName="nfs41_driver" 60 | Disk="Source files" 61 | ProviderName="NFS41 Provider" 62 | -------------------------------------------------------------------------------- /tests/cthon04/0001-tools-Cygwin-3.6-port.patch: -------------------------------------------------------------------------------- 1 | From 9279c46b92c037dc3cb9f4472a773539e0eb977d Mon Sep 17 00:00:00 2001 2 | From: Roland Mainz 3 | Date: Tue, 18 Feb 2025 17:11:09 +0100 4 | Subject: [PATCH 1/4] tools: Cygwin 3.6 port 5 | 6 | Cygwin 3.6 port 7 | 8 | Signed-off-by: Roland Mainz 9 | --- 10 | tools/dirdmp.c | 6 +++--- 11 | tools/dirprt.c | 2 +- 12 | 2 files changed, 4 insertions(+), 4 deletions(-) 13 | 14 | diff --git a/tools/dirdmp.c b/tools/dirdmp.c 15 | index 6b231a0..e8dcca3 100644 16 | --- a/tools/dirdmp.c 17 | +++ b/tools/dirdmp.c 18 | @@ -7,8 +7,8 @@ 19 | 20 | #include 21 | #include 22 | -#include 23 | #include 24 | +#include 25 | #include 26 | #include 27 | #include 28 | @@ -38,7 +38,7 @@ main(argc, argv) 29 | int argc; 30 | char *argv[]; 31 | { 32 | -#if defined(LINUX) || defined (AIX) 33 | +#if defined(LINUX) || defined(__CYGWIN__) || defined (AIX) 34 | fprintf(stderr, "dirdmp is not supported on this platform.\n"); 35 | exit(1); 36 | #else 37 | @@ -50,7 +50,7 @@ main(argc, argv) 38 | #endif /* LINUX || AIX */ 39 | } 40 | 41 | -#if !(defined(LINUX) || defined(AIX)) 42 | +#if !(defined(LINUX) || defined(__CYGWIN__) || defined(AIX)) 43 | 44 | static void 45 | print(dir) 46 | diff --git a/tools/dirprt.c b/tools/dirprt.c 47 | index a0630eb..acb9ec3 100644 48 | --- a/tools/dirprt.c 49 | +++ b/tools/dirprt.c 50 | @@ -72,7 +72,7 @@ print(dir) 51 | return; 52 | } 53 | while ((dp = readdir(dirp)) != NULL) { 54 | -#if defined(SVR3) || defined(SVR4) || defined(LINUX) 55 | +#if defined(SVR3) || defined(SVR4) || defined(LINUX) || defined(__CYGWIN__) 56 | printf("%5ld %5ld %5d %s\n", (long)telldir(dirp), 57 | (long)dp->d_ino, 58 | dp->d_reclen, dp->d_name); 59 | -- 60 | 2.45.1 61 | -------------------------------------------------------------------------------- /cygwin/cygwin_patches/cygwin_dll_fix_uidgid4nfsv4_fs.diff: -------------------------------------------------------------------------------- 1 | # prototype fix for Cygwin DLL to handle uids/gids correctly on 2 | # NFSv4 filesystems. 3 | # Without LDAP they use Cygwin or UWIN to obtain the uid/gid for files, 4 | # which breaks the assumptions in |fhandler_base::fstat_by_nfs_ea()| 5 | # and causes it to map all uid/gid values into the Unix_User+/Unix_Group SID 6 | # range 7 | diff --git a/winsup/cygwin/fhandler/disk_file.cc b/winsup/cygwin/fhandler/disk_file.cc 8 | index d54d3747e..92a54d9db 100644 9 | --- a/winsup/cygwin/fhandler/disk_file.cc 10 | +++ b/winsup/cygwin/fhandler/disk_file.cc 11 | @@ -239,8 +239,12 @@ fhandler_base::fstat_by_nfs_ea (struct stat *buf) 12 | domain = cygheap->dom.get_rfc2307_domain (); 13 | if ((ldap_open = (cldap.open (domain) == NO_ERROR))) 14 | map_uid = cldap.remap_uid (nfs_attr->uid); 15 | - if (map_uid == ILLEGAL_UID) 16 | - map_uid = MAP_UNIX_TO_CYGWIN_ID (nfs_attr->uid); 17 | + if (map_uid == ILLEGAL_UID) { 18 | + if (pc.has_acls()) 19 | + map_uid = nfs_attr->uid; 20 | + else 21 | + map_uid = MAP_UNIX_TO_CYGWIN_ID (nfs_attr->uid); 22 | + } 23 | cygheap->ugid_cache.add_uid (nfs_attr->uid, map_uid); 24 | buf->st_uid = map_uid; 25 | } 26 | @@ -258,8 +262,12 @@ fhandler_base::fstat_by_nfs_ea (struct stat *buf) 27 | domain = cygheap->dom.get_rfc2307_domain (); 28 | if ((ldap_open || cldap.open (domain) == NO_ERROR)) 29 | map_gid = cldap.remap_gid (nfs_attr->gid); 30 | - if (map_gid == ILLEGAL_GID) 31 | - map_gid = MAP_UNIX_TO_CYGWIN_ID (nfs_attr->gid); 32 | + if (map_gid == ILLEGAL_GID) { 33 | + if (pc.has_acls()) 34 | + map_gid = nfs_attr->gid; 35 | + else 36 | + map_gid = MAP_UNIX_TO_CYGWIN_ID (nfs_attr->gid); 37 | + } 38 | cygheap->ugid_cache.add_gid (nfs_attr->gid, map_gid); 39 | buf->st_gid = map_gid; 40 | } 41 | -------------------------------------------------------------------------------- /daemon/aclutil.h: -------------------------------------------------------------------------------- 1 | /* NFSv4.1 client for Windows 2 | * Copyright (C) 2012 The Regents of the University of Michigan 3 | * Copyright (C) 2023-2025 Roland Mainz 4 | * 5 | * Olga Kornievskaia 6 | * Casey Bodley 7 | * Roland Mainz 8 | * 9 | * This library is free software; you can redistribute it and/or modify it 10 | * under the terms of the GNU Lesser General Public License as published by 11 | * the Free Software Foundation; either version 2.1 of the License, or (at 12 | * your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, but 15 | * without any warranty; without even the implied warranty of merchantability 16 | * or fitness for a particular purpose. See the GNU Lesser General Public 17 | * License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public License 20 | * along with this library; if not, write to the Free Software Foundation, 21 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 22 | */ 23 | 24 | #ifndef __NFS41_DAEMON_ACLUTIL_H__ 25 | #define __NFS41_DAEMON_ACLUTIL_H__ 1 26 | 27 | #include "nfs41_build_features.h" 28 | #include "nfs41_daemon.h" 29 | 30 | /* |DPRINTF()| levels for acl logging */ 31 | #define ACLLVL1 1 32 | #define ACLLVL2 2 33 | #define ACLLVL3 3 34 | 35 | void free_sids(PSID *sids, int count); 36 | int map_sid2nfs4ace_who(PSID sid, PSID owner_sid, PSID group_sid, 37 | char *who_out, char *domain, SID_NAME_USE *sid_type_out); 38 | void convert_nfs4name_2_user_domain(LPSTR nfs4name, 39 | LPSTR *domain); 40 | int convert_nfs4acl_2_dacl(nfs41_daemon_globals *nfs41dg, 41 | nfsacl41 *acl, int file_type, PACL *dacl_out, PSID **sids_out, 42 | bool named_attr_support); 43 | int map_dacl_2_nfs4acl(PACL acl, PSID sid, PSID gsid, nfsacl41 *nfs4_acl, 44 | int file_type, bool named_attr_support, char *domain); 45 | 46 | #endif /* !__NFS41_DAEMON_ACLUTIL_H__ */ 47 | -------------------------------------------------------------------------------- /libtirpc/src/rpc_commondata.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009, Sun Microsystems, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * - Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * - Redistributions in binary form must reproduce the above copyright notice, 10 | * this list of conditions and the following disclaimer in the documentation 11 | * and/or other materials provided with the distribution. 12 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #include 30 | #include 31 | 32 | 33 | /* 34 | * This file should only contain common data (global data) that is exported 35 | * by public interfaces 36 | */ 37 | struct opaque_auth _null_auth; 38 | fd_set svc_fdset; 39 | int svc_maxfd = -1; 40 | 41 | SVCXPRT **__svc_xports; 42 | int __svc_maxrec; 43 | -------------------------------------------------------------------------------- /libtirpc/libtirpc/libtirpc.def: -------------------------------------------------------------------------------- 1 | LIBRARY libtirpc 2 | EXPORTS 3 | authnone_create 4 | authunix_create 5 | authunix_create_default 6 | authsspi_create 7 | authsspi_create_default 8 | clnt_create 9 | clnt_broadcast 10 | clnt_pcreateerror 11 | clnt_perrno 12 | clnt_perror 13 | clnt_spcreateerror 14 | clnt_sperrno 15 | clnt_sperror 16 | clnt_tli_create 17 | clntraw_create 18 | clnttcp_create 19 | clntudp_bufcreate 20 | clntudp_create 21 | freenetbuf 22 | freenetconfigent 23 | freeuaddr 24 | get_myaddress 25 | getnetconfigent 26 | pmap_getmaps 27 | pmap_getport 28 | pmap_rmtcall 29 | pmap_set 30 | pmap_unset 31 | svc_getreq 32 | svc_getreqset 33 | svc_run 34 | svc_sendreply 35 | svcerr_auth 36 | svcerr_decode 37 | svcerr_noproc 38 | svcerr_noprog 39 | svcerr_progvers 40 | svcerr_systemerr 41 | svcerr_weakauth 42 | svcraw_create 43 | svctcp_create 44 | svcudp_bufcreate 45 | svcudp_create 46 | taddr2uaddr 47 | tsd_key_delete 48 | uaddr2taddr 49 | wintirpc_mem_alloc 50 | wintirpc_mem_free 51 | xdr_array 52 | xdr_authunix_parms 53 | xdr_bool 54 | xdr_bytes 55 | xdr_callhdr 56 | xdr_callmsg 57 | xdr_char 58 | xdr_des_block 59 | xdr_double 60 | xdr_enum 61 | xdr_float 62 | xdr_free 63 | xdr_hyper 64 | xdr_int 65 | xdr_int8_t 66 | xdr_int16_t 67 | xdr_int32_t 68 | xdr_int64_t 69 | xdr_long 70 | xdr_netobj 71 | xdr_opaque 72 | xdr_opaque_auth 73 | xdr_pmap 74 | xdr_pmaplist 75 | xdr_pmaplist_ptr 76 | xdr_pointer 77 | xdr_reference 78 | xdr_replymsg 79 | xdr_short 80 | xdr_sizeof 81 | xdr_string 82 | xdr_u_char 83 | xdr_u_hyper 84 | xdr_u_int 85 | xdr_u_int8_t 86 | xdr_u_int32_t 87 | xdr_u_int64_t 88 | xdr_u_long 89 | xdr_u_short 90 | xdr_uint8_t 91 | xdr_uint16_t 92 | xdr_uint32_t 93 | xdr_uint64_t 94 | xdr_quad_t 95 | xdr_u_quad_t 96 | xdr_union 97 | xdr_vector 98 | xdr_void 99 | xdr_wrapstring 100 | xdrmem_create 101 | xdrrec_create 102 | xdrrec_endofrecord 103 | xdrrec_eof 104 | xdrrec_skiprecord 105 | xdrstdio_create 106 | xprt_register 107 | xprt_unregister 108 | svc_fdset DATA 109 | rpc_createerr DATA 110 | _null_auth DATA 111 | -------------------------------------------------------------------------------- /mount/urlparser1.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * 4 | * Copyright (c) 2024 Roland Mainz 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | /* urlparser1.h - header for simple URL parser */ 26 | 27 | #ifndef __URLPARSER1_H__ 28 | #define __URLPARSER1_H__ 1 29 | 30 | #include 31 | 32 | #ifdef _MSC_VER 33 | typedef signed long long ssize_t; 34 | #endif 35 | 36 | typedef struct _url_parser_name_value { 37 | char *name; 38 | char *value; 39 | } url_parser_name_value; 40 | 41 | typedef struct _url_parser_context { 42 | char *in_url; 43 | 44 | char *scheme; 45 | struct { 46 | char *username; 47 | char *passwd; 48 | } login; 49 | struct { 50 | char *hostname; 51 | signed int port; 52 | } hostport; 53 | char *path; 54 | 55 | ssize_t num_parameters; 56 | url_parser_name_value *parameters; 57 | } url_parser_context; 58 | 59 | /* Prototypes */ 60 | url_parser_context *url_parser_create_context(const char *in_url, unsigned int flags); 61 | int url_parser_parse(url_parser_context *uctx); 62 | void url_parser_free_context(url_parser_context *c); 63 | 64 | #endif /* !__URLPARSER1_H__ */ 65 | -------------------------------------------------------------------------------- /daemon/nfs41_xdr.h: -------------------------------------------------------------------------------- 1 | /* NFSv4.1 client for Windows 2 | * Copyright (C) 2012 The Regents of the University of Michigan 3 | * Copyright (C) 2024-2025 Roland Mainz 4 | * 5 | * Olga Kornievskaia 6 | * Casey Bodley 7 | * Roland Mainz 8 | * 9 | * This library is free software; you can redistribute it and/or modify it 10 | * under the terms of the GNU Lesser General Public License as published by 11 | * the Free Software Foundation; either version 2.1 of the License, or (at 12 | * your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, but 15 | * without any warranty; without even the implied warranty of merchantability 16 | * or fitness for a particular purpose. See the GNU Lesser General Public 17 | * License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public License 20 | * along with this library; if not, write to the Free Software Foundation, 21 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 22 | */ 23 | 24 | #ifndef __NFS41_NFS_XDR_H__ 25 | #define __NFS41_NFS_XDR_H__ 1 26 | 27 | #include "nfs41_types.h" 28 | #include "nfs41_compound.h" 29 | 30 | bool_t nfs_encode_compound(XDR *xdr, caddr_t *args); 31 | bool_t nfs_decode_compound(XDR *xdr, caddr_t *res); 32 | 33 | void nfsacl41_free(nfsacl41 *acl); 34 | bool_t xdr_stateid4(XDR *xdr, stateid4 *si); 35 | 36 | /* NFSv4.2 ops */ 37 | bool_t encode_op_allocate(XDR *xdr, nfs_argop4 *argop); 38 | bool_t decode_op_allocate(XDR *xdr, nfs_resop4 *resop); 39 | bool_t encode_op_copy(XDR *xdr, nfs_argop4 *argop); 40 | bool_t decode_op_copy(XDR *xdr, nfs_resop4 *resop); 41 | bool_t encode_op_deallocate(XDR *xdr, nfs_argop4 *argop); 42 | bool_t decode_op_deallocate(XDR *xdr, nfs_resop4 *resop); 43 | bool_t encode_op_read_plus(XDR *xdr, nfs_argop4 *argop); 44 | bool_t decode_op_read_plus(XDR *xdr, nfs_resop4 *resop); 45 | bool_t encode_op_seek(XDR *xdr, nfs_argop4 *argop); 46 | bool_t decode_op_seek(XDR *xdr, nfs_resop4 *resop); 47 | bool_t encode_op_clone(XDR *xdr, nfs_argop4 *argop); 48 | bool_t decode_op_clone(XDR *xdr, nfs_resop4 *resop); 49 | 50 | #endif /* !__NFS41_NFS_XDR_H__ */ 51 | -------------------------------------------------------------------------------- /include/nfs_ea.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NFSv4.1 client for Windows 3 | * Copyright (C) 2024-2025 Roland Mainz 4 | * 5 | * Roland Mainz 6 | * 7 | * This library is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU Lesser General Public License as published by 9 | * the Free Software Foundation; either version 2.1 of the License, or (at 10 | * your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, but 13 | * without any warranty; without even the implied warranty of merchantability 14 | * or fitness for a particular purpose. See the GNU Lesser General Public 15 | * License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with this library; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 20 | */ 21 | 22 | #ifndef __NFS41_DAEMON_NFSV4_EA 23 | #define __NFS41_DAEMON_NFSV4_EA 1 24 | 25 | /* 26 | * ToDo: Add documentation how these EAs (extended attributes) work 27 | */ 28 | 29 | #define EA_NFSV3ATTRIBUTES "NfsV3Attributes" 30 | #define EA_NFSV3ATTRIBUTES_LEN (15) 31 | 32 | #define EA_NFSSYMLINKTARGETNAME "NfsSymlinkTargetName" 33 | #define EA_NFSSYMLINKTARGETNAME_LEN (17) 34 | 35 | #define EA_NFSACTONLINK "NfsActOnLink" 36 | #define EA_NFSACTONLINK_LEN (11) 37 | 38 | /* 39 | * "NfsV3Attributes" uses |nfs3_attrs| as content 40 | */ 41 | /* 42 | * Note that we cannot use in the Windows kernel, so we 43 | * use Windows Types here 44 | */ 45 | typedef struct _nfs3_attrs_timestruc_t { 46 | INT32 tv_sec; 47 | UINT32 tv_nsec; 48 | } nfs3_attrs_timestruc_t; 49 | 50 | typedef struct _nfs3_attrs { 51 | UINT32 type, mode, nlink, uid, gid, filler1; 52 | UINT64 size, used; 53 | struct { 54 | UINT32 specdata1; 55 | UINT32 specdata2; 56 | } rdev; 57 | UINT64 fsid, fileid; 58 | nfs3_attrs_timestruc_t atime, mtime, ctime; 59 | } nfs3_attrs; 60 | 61 | enum ftype3 { 62 | NF3REG = 1, 63 | NF3DIR, 64 | NF3BLK, 65 | NF3CHR, 66 | NF3LNK, 67 | NF3SOCK, 68 | NF3FIFO 69 | }; 70 | 71 | #endif /* !__NFS41_DAEMON_NFSV4_EA */ 72 | -------------------------------------------------------------------------------- /tests/cthon04/0004-special-tools-HACK-Disable-tests-which-cannot-work-o.patch: -------------------------------------------------------------------------------- 1 | From 190b1032a6dad762fdd5d015320788aa8e259672 Mon Sep 17 00:00:00 2001 2 | From: Roland Mainz 3 | Date: Tue, 18 Feb 2025 17:17:39 +0100 4 | Subject: [PATCH 4/4] special,tools: HACK: Disable tests which cannot work on 5 | Cygwin/ms-nfs41-client 6 | 7 | HACK: Disable tests which cannot work on Cygwin/ms-nfs41-client 8 | 9 | Signed-off-by: Roland Mainz 10 | --- 11 | special/Makefile | 4 ++-- 12 | special/runtests.wrk | 2 +- 13 | tools/Makefile | 2 +- 14 | 3 files changed, 4 insertions(+), 4 deletions(-) 15 | 16 | diff --git a/special/Makefile b/special/Makefile 17 | index 77215c1..36f4978 100644 18 | --- a/special/Makefile 19 | +++ b/special/Makefile 20 | @@ -3,9 +3,9 @@ 21 | # 1.4 Lachman ONC Test Suite source 22 | # 23 | 24 | -TESTS=op_unlk op_ren op_chmod dupreq excltest negseek rename holey \ 25 | +TESTS=op_unlk op_chmod dupreq excltest negseek rename holey \ 26 | truncate nfsidem nstat stat stat2 touchn fstat rewind \ 27 | - telldir bigfile bigfile2 freesp 28 | + telldir bigfile bigfile2 freesp 29 | DOSRUNFILES = scripts/*.bat 30 | DOSBUILDFILES = console/*.bat console/*.mak dos/*.bat dos/*.mak 31 | DOSFILES = $(DOSRUNFILES) $(DOSBUILDFILES) 32 | diff --git a/special/runtests.wrk b/special/runtests.wrk 33 | index 8f099fa..385ac61 100644 34 | --- a/special/runtests.wrk 35 | +++ b/special/runtests.wrk 36 | @@ -29,7 +29,7 @@ if [ "$CIFS" = "yes" ] && echo $MNTOPTIONS | grep -E "vers=2|vers=3" > /dev/null 37 | then 38 | echo "skipping test; not supported by SMB 2.0 and higher versions" 39 | else 40 | - TMPDIR= ./op_ren 41 | + : # TMPDIR= ./op_ren 42 | fi 43 | 44 | echo "" 45 | diff --git a/tools/Makefile b/tools/Makefile 46 | index ce2cbc7..8cc1903 100644 47 | --- a/tools/Makefile 48 | +++ b/tools/Makefile 49 | @@ -8,7 +8,7 @@ 50 | # 'make copy DESTDIR=path' copies test programs to path 51 | # 'make dist DESTDIR=path' copies sources to path 52 | 53 | -TESTS = tcp tcpd udp udpd dirdmp dirprt pmaptst pmapbrd 54 | +TESTS = tcp tcpd udp udpd dirdmp dirprt 55 | 56 | # dirdmp apparently doesn't work with Linux 2.2. So for Linux systems, 57 | # comment out the above definition and use this one. 58 | -- 59 | 2.45.1 60 | -------------------------------------------------------------------------------- /libtirpc/src/pmap_prot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009, Sun Microsystems, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * - Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * - Redistributions in binary form must reproduce the above copyright notice, 10 | * this list of conditions and the following disclaimer in the documentation 11 | * and/or other materials provided with the distribution. 12 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | /* 30 | * pmap_prot.c 31 | * Protocol for the local binder service, or pmap. 32 | * 33 | * Copyright (C) 1984, Sun Microsystems, Inc. 34 | */ 35 | 36 | #include 37 | #include 38 | 39 | #include 40 | #include 41 | #include 42 | 43 | 44 | bool_t 45 | xdr_pmap(XDR *xdrs, struct pmap *regs) 46 | { 47 | 48 | assert(xdrs != NULL); 49 | assert(regs != NULL); 50 | 51 | if (xdr_u_long(xdrs, ®s->pm_prog) && 52 | xdr_u_long(xdrs, ®s->pm_vers) && 53 | xdr_u_long(xdrs, ®s->pm_prot)) 54 | return (xdr_u_long(xdrs, ®s->pm_port)); 55 | return (FALSE); 56 | } -------------------------------------------------------------------------------- /daemon/cpvparser1.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * MIT License 4 | * 5 | * Copyright (c) 2023 Roland Mainz 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy 8 | * of this software and associated documentation files (the "Software"), to deal 9 | * in the Software without restriction, including without limitation the rights 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in all 15 | * copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | * SOFTWARE. 24 | */ 25 | 26 | /* 27 | * cpvparser1.h - simple ksh93 compound variable parsing 28 | * 29 | * It basically reads the output of $ print -v ... # like this: 30 | * ---- snip ---- 31 | * $ ksh93 -c 'compound c=( va=1 vb=hello ) ; print -v c' 32 | * ( 33 | * va=1 34 | * vb=hello 35 | * ) 36 | * ---- snip ---- 37 | * 38 | * ToDo: 39 | * - arrays (indexed, sparse indexed and associative) 40 | * - multibyte characters 41 | * 42 | * Written by Roland Mainz 43 | */ 44 | 45 | #ifndef CPV_PARSER_H 46 | #define CPV_PARSER_H 1 47 | 48 | typedef struct cpv_name_val 49 | { 50 | const char *cpv_name; 51 | const char *cpv_value; 52 | } cpv_name_val; 53 | 54 | /* Flags for |cpv_create_parser()| */ 55 | #define CPVFLAG_DEBUG_OUTPUT (0x00000008L) 56 | 57 | /* prototypes */ 58 | void *cpv_create_parser(const char *s, unsigned long flags, ...); 59 | void cpv_free_parser(void *); 60 | int cpv_read_cpv_header(void *); 61 | void cpv_free_name_val_data(cpv_name_val *); 62 | int cpv_parse_name_val(void *, cpv_name_val *); 63 | 64 | #endif /* !CPV_PARSER_H */ 65 | -------------------------------------------------------------------------------- /libtirpc/README: -------------------------------------------------------------------------------- 1 | LIBTIRPC 0.1 FROM SUN'S TIRPCSRC 2.3 29 Aug 1994 2 | 3 | This package contains SunLib's implementation of transport-independent 4 | RPC (TI-RPC) documentation. This library forms a piece of the base of Open Network 5 | Computing (ONC), and is derived directly from the Solaris 2.3 source. 6 | 7 | TI-RPC is an enhanced version of TS-RPC that requires the UNIX System V 8 | Transport Layer Interface (TLI) or an equivalent X/Open Transport Interface 9 | (XTI). TI-RPC is on-the-wire compatible with the TS-RPC, which is supported 10 | by almost 70 vendors on all major operating systems. TS-RPC source code 11 | (RPCSRC 4.0) remains available from several internet sites. 12 | 13 | This release was a native source release, compatible for 14 | building on Solaris 2.3. It had been ported from FreeBSD 5.2.1 to GNU/Linux 15 | in 2004. 16 | 17 | Applications linked with this release's librpc must link with the United 18 | States domestic version of libcrypt in order to resolve the cbc_crypt() and 19 | ecb_crypt() functions. These routines are used with Secure RPC however all 20 | RPC programs that link with this release's librpc will need to link with the 21 | domestic libcrypt. 22 | 23 | WHAT'S NEW IN THIS RELEASE: TIRPCSRC 2.3 FROM SUN 24 | 25 | The previous release was TIRPCSRC 2.0. 26 | 27 | 1. This release is based on Solaris 2.3. The previous release was 28 | based on Solaris 2.0. This release contains a siginificant number of 29 | bug fixes and other enhancements over TIRPCSRC 2.0. 30 | 31 | 2. The RPC library is thread safe for all client-side interfaces 32 | (clnt_create, clnt_call, etc.). The server-side interfaces 33 | (svc_create, svc_run, etc.) are not thread safe in this release. The 34 | server-side interfaces will be made thread safe in the next release of 35 | TIRPCSRC. Please see the manual pages for details about which 36 | interfaces are thread safe. 37 | 38 | 3. As part of the work to make the RPC library thread-safe, rpcgen has 39 | been enhanced to generate thread-safe RPC stubs (the -M option). Note 40 | that this modifies the call-signature for the stub functions; the 41 | procedure calling the RPC stub must now pass to the stub a pointer to 42 | an allocated structure where results will be placed by the stub. See 43 | the rpcgen manual page and the rpcgen Programming Guide for details. 44 | 45 | -------------------------------------------------------------------------------- /libtirpc/tirpc/rpc/raw.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: raw.h,v 1.1 2000/06/02 22:57:56 fvdl Exp $ */ 2 | /* $FreeBSD: src/include/rpc/raw.h,v 1.1 2001/03/19 12:49:47 alfred Exp $ */ 3 | 4 | /* 5 | * Copyright (c) 2009, Sun Microsystems, Inc. 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions are met: 10 | * - Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * - Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | /* 32 | * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. 33 | */ 34 | 35 | #ifndef _RPC_RAW_H 36 | #define _RPC_RAW_H 37 | 38 | /* from: @(#)raw.h 1.11 94/04/25 SMI */ 39 | /* from: @(#)raw.h 1.2 88/10/25 SMI */ 40 | 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | /* 46 | * raw.h 47 | * 48 | * Raw interface 49 | * The common memory area over which they will communicate 50 | */ 51 | extern char *__rpc_rawcombuf; 52 | 53 | #ifdef __cplusplus 54 | } 55 | #endif 56 | 57 | #endif /* _RPC_RAW_H */ 58 | -------------------------------------------------------------------------------- /libtirpc/tirpc/fpmath.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2003 Mike Barcroft 3 | * Copyright (c) 2002 David Schultz 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 15 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 | * SUCH DAMAGE. 26 | * 27 | * $FreeBSD: src/lib/libc/include/fpmath.h,v 1.1 2003/02/08 20:37:53 mike Exp $ 28 | */ 29 | 30 | #include 31 | #include "_fpmath.h" 32 | 33 | union IEEEf2bits { 34 | float f; 35 | struct { 36 | #if _BYTE_ORDER == _LITTLE_ENDIAN 37 | unsigned int man :23; 38 | unsigned int exp :8; 39 | unsigned int sign :1; 40 | #else /* _BIG_ENDIAN */ 41 | unsigned int sign :1; 42 | unsigned int exp :8; 43 | unsigned int man :23; 44 | #endif 45 | } bits; 46 | }; 47 | 48 | union IEEEd2bits { 49 | double d; 50 | struct { 51 | #if _BYTE_ORDER == _LITTLE_ENDIAN 52 | unsigned int manl :32; 53 | unsigned int manh :20; 54 | unsigned int exp :11; 55 | unsigned int sign :1; 56 | #else /* _BIG_ENDIAN */ 57 | unsigned int sign :1; 58 | unsigned int exp :11; 59 | unsigned int manh :20; 60 | unsigned int manl :32; 61 | #endif 62 | } bits; 63 | }; 64 | -------------------------------------------------------------------------------- /tests/winrunassystem/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for winrunassystem 3 | # 4 | 5 | # signtool.exe can be in either '/cygdrive/c/Program Files/' or '/cygdrive/c/Program Files (x86)/' 6 | SIGNTOOL := $(shell ls -1 '/cygdrive/c/Program Files'*'/Microsoft SDKs/ClickOnce/SignTool/signtool.exe' | head -n 1) 7 | 8 | all: \ 9 | winrunassystem.i686.exe \ 10 | winrunassystem.x86_64.exe \ 11 | winrunassystem.exe \ 12 | nfs_globalmount.i686.exe \ 13 | nfs_globalmount.x86_64.exe \ 14 | nfs_globalmount.exe 15 | 16 | # 17 | # winrunassystem.exe 18 | # 19 | winrunassystem.i686.exe: winrunassystem.c 20 | clang -target i686-pc-windows-gnu -std=gnu17 -municode -Wall -Wextra -DBUILD_WINRUNASSYSTEM=1 -DUNICODE=1 -D_UNICODE=1 -g winrunassystem.c -lWtsapi32 -o $@ 21 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 22 | 23 | winrunassystem.x86_64.exe: winrunassystem.c 24 | clang -target x86_64-pc-windows-gnu -std=gnu17 -municode -Wall -Wextra -DBUILD_WINRUNASSYSTEM=1 -DUNICODE=1 -D_UNICODE=1 -g winrunassystem.c -lWtsapi32 -o $@ 25 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 26 | 27 | winrunassystem.exe: winrunassystem.x86_64.exe 28 | ln -s winrunassystem.x86_64.exe $@ 29 | 30 | 31 | # 32 | # nfs_globalmount.exe 33 | # 34 | # (implemented *.exe instead of a script,so it can be easily called from 35 | # cmd.exe, powershell.exe, and be whitelisted in MS Defender) 36 | # 37 | nfs_globalmount.i686.exe: winrunassystem.c 38 | clang -target i686-pc-windows-gnu -std=gnu17 -municode -Wall -Wextra -DBUILD_NFS_GLOBALMOUNT=1 -DUNICODE=1 -D_UNICODE=1 -g winrunassystem.c -lWtsapi32 -o $@ 39 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 40 | 41 | nfs_globalmount.x86_64.exe: winrunassystem.c 42 | clang -target x86_64-pc-windows-gnu -std=gnu17 -municode -Wall -Wextra -DBUILD_NFS_GLOBALMOUNT=1 -DUNICODE=1 -D_UNICODE=1 -g winrunassystem.c -lWtsapi32 -o $@ 43 | bash -x -c '"$(SIGNTOOL)" sign /ph /fd "sha256" /sha1 "$${CERTIFICATE_THUMBPRINT%$$(printf "\r")}" $@' 44 | 45 | nfs_globalmount.exe: nfs_globalmount.x86_64.exe 46 | ln -s nfs_globalmount.x86_64.exe $@ 47 | 48 | clean: 49 | rm -fv \ 50 | winrunassystem.i686.exe \ 51 | winrunassystem.x86_64.exe \ 52 | winrunassystem.exe \ 53 | nfs_globalmount.i686.exe \ 54 | nfs_globalmount.x86_64.exe \ 55 | nfs_globalmount.exe 56 | # EOF. 57 | -------------------------------------------------------------------------------- /libtirpc/src/getpeereid.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001 Dima Dorfman. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 | * SUCH DAMAGE. 25 | */ 26 | 27 | #ifndef _WINTIRPC 28 | #include 29 | #endif /* !_WINTIRPC */ 30 | #include 31 | #include 32 | #ifndef _WINTIRPC 33 | #include 34 | #include 35 | #include 36 | #endif /* !_WINTIRPC */ 37 | 38 | #include 39 | #ifndef _WINTIRPC 40 | #include 41 | #endif /* !_WINTIRPC */ 42 | 43 | #ifdef _WINTIRPC 44 | int 45 | getpeereid(int s, uid_t *euid, gid_t *egid) 46 | { 47 | // XXX Need to figure out what to do here for Windows! 48 | return -1; 49 | } 50 | #else 51 | int 52 | getpeereid(int s, uid_t *euid, gid_t *egid) 53 | { 54 | struct ucred uc; 55 | socklen_t uclen; 56 | int error; 57 | 58 | uclen = sizeof(uc); 59 | error = wintirpc_getsockopt(s, SOL_SOCKET, SO_PEERCRED, &uc, &uclen); /* SCM_CREDENTIALS */ 60 | if (error != 0) 61 | return (error); 62 | // if (uc.cr_version != XUCRED_VERSION) 63 | // return (EINVAL); 64 | *euid = uc.uid; 65 | *egid = uc.gid; 66 | return (0); 67 | } 68 | #endif 69 | -------------------------------------------------------------------------------- /libtirpc/man/bindresvport.3t: -------------------------------------------------------------------------------- 1 | .\" @(#)bindresvport.3n 2.2 88/08/02 4.0 RPCSRC; from 1.7 88/03/14 SMI 2 | .\" 3 | .Dd November 22, 1987 4 | .Dt BINDRESVPORT 3 5 | .Os 6 | .Sh NAME 7 | .Nm bindresvport , 8 | .Nm bindresvport_sa 9 | .Nd bind a socket to a privileged IP port 10 | .Sh LIBRARY 11 | .Lb libc 12 | .Sh SYNOPSIS 13 | .In sys/types.h 14 | .In rpc/rpc.h 15 | .Ft int 16 | .Fn bindresvport "int sd" "struct sockaddr_in *sin" 17 | .Ft int 18 | .Fn bindresvport_sa "int sd" "struct sockaddr *sa" 19 | .Sh DESCRIPTION 20 | The 21 | .Fn bindresvport 22 | and 23 | .Fn bindresvport_sa 24 | functions 25 | are used to bind a socket descriptor to a privileged 26 | .Tn IP 27 | port, that is, a 28 | port number in the range 0-1023. 29 | .Pp 30 | If 31 | .Fa sin 32 | is a pointer to a 33 | .Ft "struct sockaddr_in" 34 | then the appropriate fields in the structure should be defined. 35 | Note that 36 | .Fa sin->sin_family 37 | must be initialized to the address family of the socket, passed by 38 | .Fa sd . 39 | If 40 | .Fa sin->sin_port 41 | is 42 | .Sq 0 43 | then an anonymous port (in the range 600-1023) will be 44 | chosen, and if 45 | .Xr bind 2 46 | is successful, the 47 | .Fa sin->sin_port 48 | will be updated to contain the allocated port. 49 | .Pp 50 | If 51 | .Fa sin 52 | is the 53 | .Dv NULL 54 | pointer, 55 | an anonymous port will be allocated (as above). 56 | However, there is no way for 57 | .Fn bindresvport 58 | to return the allocated port in this case. 59 | .Pp 60 | Only root can bind to a privileged port; this call will fail for any 61 | other users. 62 | .Pp 63 | Function prototype of 64 | .Fn bindresvport 65 | is biased to 66 | .Dv AF_INET 67 | socket. 68 | The 69 | .Fn bindresvport_sa 70 | function 71 | acts exactly the same, with more neutral function prototype. 72 | Note that both functions behave exactly the same, and 73 | both support 74 | .Dv AF_INET6 75 | sockets as well as 76 | .Dv AF_INET 77 | sockets. 78 | .Sh RETURN VALUES 79 | .Rv -std bindresvport 80 | .Sh ERRORS 81 | .Bl -tag -width Er 82 | .It Bq Er EPFNOSUPPORT 83 | If second argument was supplied, 84 | and address family did not match between arguments. 85 | .El 86 | .Pp 87 | The 88 | .Fn bindresvport 89 | function 90 | may also fail and set 91 | .Va errno 92 | for any of the errors specified for the calls 93 | .Xr bind 2 , 94 | .Xr getsockopt 2 , 95 | or 96 | .Xr setsockopt 2 . 97 | .Sh SEE ALSO 98 | .Xr bind 2 , 99 | .Xr getsockopt 2 , 100 | .Xr setsockopt 2 , 101 | .Xr ip 4 102 | -------------------------------------------------------------------------------- /libtirpc/tirpc/rpc/svc_dg.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: svc_dg.h,v 1.1 2000/06/02 23:11:16 fvdl Exp $ */ 2 | /* $FreeBSD: src/include/rpc/svc_dg.h,v 1.1 2001/03/19 12:49:47 alfred Exp $ */ 3 | 4 | /* 5 | * Copyright (c) 2009, Sun Microsystems, Inc. 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions are met: 10 | * - Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * - Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | 32 | /* 33 | * XXX - this file exists only so that the rpcbind code can pull it in. 34 | * This should go away. It should only be include by svc_dg.c and 35 | * rpcb_svc_com.c in the rpcbind code. 36 | */ 37 | 38 | /* 39 | * kept in xprt->xp_p2 40 | */ 41 | struct svc_dg_data { 42 | /* XXX: optbuf should be the first field, used by ti_opts.c code */ 43 | size_t su_iosz; /* size of send.recv buffer */ 44 | u_int32_t su_xid; /* transaction id */ 45 | XDR su_xdrs; /* XDR handle */ 46 | char su_verfbody[MAX_AUTH_BYTES]; /* verifier body */ 47 | void *su_cache; /* cached data, NULL if none */ 48 | }; 49 | 50 | #define __rpcb_get_dg_xidp(x) (&((struct svc_dg_data *)(x)->xp_p2)->su_xid) 51 | -------------------------------------------------------------------------------- /libtirpc/tirpc/rpc/clnt_stat.h: -------------------------------------------------------------------------------- 1 | /* $FreeBSD: src/include/rpc/clnt_stat.h,v 1.2 2001/03/20 08:20:50 alfred Exp $ */ 2 | /* 3 | * Copyright (c) 1986 - 1991, 1994, 1996, 1997 by Sun Microsystems, Inc. 4 | * All rights reserved. 5 | */ 6 | 7 | /* 8 | * clnt_stat.h - Client side remote procedure call enum 9 | * 10 | */ 11 | 12 | #ifndef _RPC_CLNT_STAT_H 13 | #define _RPC_CLNT_STAT_H 14 | 15 | /* #pragma ident "@(#)clnt_stat.h 1.2 97/04/28 SMI" */ 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | enum clnt_stat { 22 | RPC_SUCCESS = 0, /* call succeeded */ 23 | /* 24 | * local errors 25 | */ 26 | RPC_CANTENCODEARGS = 1, /* can't encode arguments */ 27 | RPC_CANTDECODERES = 2, /* can't decode results */ 28 | RPC_CANTSEND = 3, /* failure in sending call */ 29 | RPC_CANTRECV = 4, 30 | /* failure in receiving result */ 31 | RPC_TIMEDOUT = 5, /* call timed out */ 32 | RPC_INTR = 18, /* call interrupted */ 33 | RPC_UDERROR = 23, /* recv got uderr indication */ 34 | /* 35 | * remote errors 36 | */ 37 | RPC_VERSMISMATCH = 6, /* rpc versions not compatible */ 38 | RPC_AUTHERROR = 7, /* authentication error */ 39 | RPC_PROGUNAVAIL = 8, /* program not available */ 40 | RPC_PROGVERSMISMATCH = 9, /* program version mismatched */ 41 | RPC_PROCUNAVAIL = 10, /* procedure unavailable */ 42 | RPC_CANTDECODEARGS = 11, /* decode arguments error */ 43 | RPC_SYSTEMERROR = 12, /* generic "other problem" */ 44 | 45 | /* 46 | * rpc_call & clnt_create errors 47 | */ 48 | RPC_UNKNOWNHOST = 13, /* unknown host name */ 49 | RPC_UNKNOWNPROTO = 17, /* unknown protocol */ 50 | RPC_UNKNOWNADDR = 19, /* Remote address unknown */ 51 | RPC_NOBROADCAST = 21, /* Broadcasting not supported */ 52 | 53 | /* 54 | * rpcbind errors 55 | */ 56 | RPC_RPCBFAILURE = 14, /* the pmapper failed in its call */ 57 | #define RPC_PMAPFAILURE RPC_RPCBFAILURE 58 | RPC_PROGNOTREGISTERED = 15, /* remote program is not registered */ 59 | RPC_N2AXLATEFAILURE = 22, 60 | /* Name to address translation failed */ 61 | /* 62 | * Misc error in the TLI library 63 | */ 64 | RPC_TLIERROR = 20, 65 | /* 66 | * unspecified error 67 | */ 68 | RPC_FAILED = 16, 69 | /* 70 | * asynchronous errors 71 | */ 72 | RPC_INPROGRESS = 24, 73 | RPC_STALERACHANDLE = 25, 74 | RPC_CANTCONNECT = 26, /* couldn't make connection (cots) */ 75 | RPC_XPRTFAILED = 27, /* received discon from remote (cots) */ 76 | RPC_CANTCREATESTREAM = 28 /* can't push rpc module (cots) */ 77 | }; 78 | 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | 83 | #endif /* !_RPC_CLNT_STAT_H */ 84 | -------------------------------------------------------------------------------- /libtirpc/src/rpc_dtablesize.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009, Sun Microsystems, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * - Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * - Redistributions in binary form must reproduce the above copyright notice, 10 | * this list of conditions and the following disclaimer in the documentation 11 | * and/or other materials provided with the distribution. 12 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #include 30 | #ifndef _WINTIRPC 31 | #include 32 | 33 | #include 34 | #endif /* !_WINTIRPC */ 35 | 36 | int _rpc_dtablesize(void); /* XXX */ 37 | 38 | /* 39 | * Cache the result of getdtablesize(), so we don't have to do an 40 | * expensive system call every time. 41 | */ 42 | /* 43 | * XXX In FreeBSD 2.x, you can have the maximum number of open file 44 | * descriptors be greater than FD_SETSIZE (which is 256 by default). 45 | * 46 | * Since old programs tend to use this call to determine the first arg 47 | * for _select(), having this return > FD_SETSIZE is a Bad Idea(TM)! 48 | */ 49 | int 50 | _rpc_dtablesize(void) 51 | { 52 | #ifdef _WINTIRPC 53 | return FD_SETSIZE; 54 | #else 55 | static int size; 56 | 57 | if (size == 0) { 58 | size = getdtablesize(); 59 | if (size > FD_SETSIZE) 60 | size = FD_SETSIZE; 61 | } 62 | return (size); 63 | #endif 64 | } 65 | -------------------------------------------------------------------------------- /libtirpc/man/getrpcent.3t: -------------------------------------------------------------------------------- 1 | .\" @(#)getrpcent.3n 2.2 88/08/02 4.0 RPCSRC; from 1.11 88/03/14 SMI 2 | .\" 3 | .Dd December 14, 1987 4 | .Dt GETRPCENT 3 5 | .Os 6 | .Sh NAME 7 | .Nm getrpcent , 8 | .Nm getrpcbyname , 9 | .Nm getrpcbynumber , 10 | .Nm endrpcent , 11 | .Nm setrpcent 12 | .Nd get RPC entry 13 | .Sh LIBRARY 14 | .Lb libc 15 | .Sh SYNOPSIS 16 | .In rpc/rpc.h 17 | .Ft struct rpcent * 18 | .Fn getrpcent void 19 | .Ft struct rpcent * 20 | .Fn getrpcbyname "char *name" 21 | .Ft struct rpcent * 22 | .Fn getrpcbynumber "int number" 23 | .Ft void 24 | .Fn setrpcent "int stayopen" 25 | .Ft void 26 | .Fn endrpcent void 27 | .Sh DESCRIPTION 28 | The 29 | .Fn getrpcent , 30 | .Fn getrpcbyname , 31 | and 32 | .Fn getrpcbynumber 33 | functions 34 | each return a pointer to an object with the 35 | following structure 36 | containing the broken-out 37 | fields of a line in the rpc program number data base, 38 | .Pa /etc/rpc : 39 | .Bd -literal 40 | struct rpcent { 41 | char *r_name; /* name of server for this rpc program */ 42 | char **r_aliases; /* alias list */ 43 | long r_number; /* rpc program number */ 44 | }; 45 | .Ed 46 | .Pp 47 | The members of this structure are: 48 | .Bl -tag -width r_aliases -offset indent 49 | .It Va r_name 50 | The name of the server for this rpc program. 51 | .It Va r_aliases 52 | A zero terminated list of alternate names for the rpc program. 53 | .It Va r_number 54 | The rpc program number for this service. 55 | .El 56 | .Pp 57 | The 58 | .Fn getrpcent 59 | function 60 | reads the next line of the file, opening the file if necessary. 61 | .Pp 62 | The 63 | .Fn setrpcent 64 | function 65 | opens and rewinds the file. If the 66 | .Fa stayopen 67 | flag is non-zero, 68 | the net data base will not be closed after each call to 69 | .Fn getrpcent 70 | (either directly, or indirectly through one of 71 | the other 72 | .Dq getrpc 73 | calls). 74 | .Pp 75 | The 76 | .Fn endrpcent 77 | function 78 | closes the file. 79 | .Pp 80 | The 81 | .Fn getrpcbyname 82 | and 83 | .Fn getrpcbynumber 84 | functions 85 | sequentially search from the beginning 86 | of the file until a matching rpc program name or 87 | program number is found, or until end-of-file is encountered. 88 | .Sh FILES 89 | .Bl -tag -width /etc/rpc -compact 90 | .It Pa /etc/rpc 91 | .El 92 | .Sh SEE ALSO 93 | .Xr rpc 5 , 94 | .Xr rpcinfo 8 , 95 | .Xr ypserv 8 96 | .Sh DIAGNOSTICS 97 | A 98 | .Dv NULL 99 | pointer is returned on 100 | .Dv EOF 101 | or error. 102 | .Sh BUGS 103 | All information 104 | is contained in a static area 105 | so it must be copied if it is 106 | to be saved. 107 | -------------------------------------------------------------------------------- /libtirpc/src/sources: -------------------------------------------------------------------------------- 1 | TARGETTYPE=DYNLINK 2 | TARGETNAME=libtirpc 3 | SOURCES=\ 4 | asprintf.c \ 5 | auth_none.c \ 6 | auth_time.c \ 7 | auth_unix.c \ 8 | auth_sspi.c \ 9 | authsspi_prot.c \ 10 | authunix_prot.c \ 11 | bindresvport.c \ 12 | clnt_bcast.c \ 13 | clnt_dg.c \ 14 | clnt_generic.c \ 15 | clnt_perror.c \ 16 | clnt_raw.c \ 17 | clnt_simple.c \ 18 | clnt_vc.c \ 19 | des_soft.c \ 20 | epoll_sub.c \ 21 | getnetconfig.c \ 22 | getnetpath.c \ 23 | getpeereid.c \ 24 | getpublickey.c \ 25 | getrpcent.c \ 26 | getrpcport.c \ 27 | gettimeofday.c \ 28 | key_call.c \ 29 | key_prot_xdr.c \ 30 | mt_misc.c \ 31 | netname.c \ 32 | netnamer.c \ 33 | pmap_clnt.c \ 34 | pmap_getmaps.c \ 35 | pmap_getport.c \ 36 | pmap_prot.c \ 37 | pmap_prot2.c \ 38 | pmap_rmt.c \ 39 | rpc_callmsg.c \ 40 | rpc_commondata.c \ 41 | rpc_dtablesize.c \ 42 | rpc_generic.c \ 43 | rpc_prot.c \ 44 | rpc_soc.c \ 45 | rpcb_clnt.c \ 46 | rpcb_prot.c \ 47 | rpcb_st_xdr.c \ 48 | rpcdname.c \ 49 | rtime.c \ 50 | svc.c \ 51 | svc_auth.c \ 52 | svc_auth_none.c \ 53 | svc_auth_unix.c \ 54 | svc_dg.c \ 55 | svc_generic.c \ 56 | svc_raw.c \ 57 | svc_run.c \ 58 | svc_simple.c \ 59 | svc_vc.c \ 60 | winstubs.c \ 61 | wintirpc.c \ 62 | xdr.c \ 63 | xdr_array.c \ 64 | xdr_float.c \ 65 | xdr_mem.c \ 66 | xdr_rec.c \ 67 | xdr_reference.c \ 68 | xdr_sizeof.c \ 69 | xdr_stdio.c 70 | 71 | # crypt_client.c \ 72 | # des_crypt.c \ 73 | # svc_auth_sspi.c \ 74 | # auth_des.c \ 75 | # authdes_prot.c \ 76 | # authgss_prot.c \ 77 | 78 | UMTYPE=console 79 | #UNICODE=1 80 | DLLBASE=0x1010000 81 | #USE_NTDLL=1 82 | #USE_MSVCRT=1 83 | USE_LIBCMT=1 84 | NET_C_DEFINES=-DUNICODE -DFD_SETSIZE=1024 -DINET6 -DNO_CB_4_KRB5P -DPORTMAP 85 | 86 | INCLUDES=..\sys; \ 87 | ..\tirpc; \ 88 | $(SDK_INC_PATH); 89 | 90 | TARGETLIBS=$(SDK_LIB_PATH)\user32.lib \ 91 | $(SDK_LIB_PATH)\kernel32.lib \ 92 | $(SDK_LIB_PATH)\ws2_32.lib \ 93 | $(SDK_LIB_PATH)\secur32.lib \ 94 | $(SDK_LIB_PATH)\Advapi32.lib 95 | 96 | 97 | DLLDEF=..\libtirpc\libtirpc.def 98 | #DLLENTRY=tirpc_main 99 | 100 | !IF 0 101 | /W3 is default level 102 | bump to /Wall, but suppress warnings generated by system includes, 103 | as well as the following warnings: 104 | 4100 - unused function call arguments (we have lots of stubs) 105 | 4127 - constant conditional (I like to use if(0) or if(1)) 106 | MSC_WARNING_LEVEL=/Wall /wd4668 /wd4619 /wd4820 /wd4255 /wd4100 /wd4127 /wd4711 107 | !ENDIF 108 | MSC_WARNING_LEVEL=/W3 109 | -------------------------------------------------------------------------------- /libtirpc/tirpc/netconfig.h: -------------------------------------------------------------------------------- 1 | #ifndef _NETCONFIG_H_ 2 | #define _NETCONFIG_H_ 3 | 4 | #ifndef _WINTIRPC 5 | #include 6 | #endif /* !_WINTIRPC */ 7 | 8 | /* XXX Should be in, or come from, the registry!!! */ 9 | #define NETCONFIG "c:\\etc\\netconfig" 10 | #define NETPATH "NETPATH" 11 | 12 | struct netconfig { 13 | char *nc_netid; /* Network ID */ 14 | unsigned long nc_semantics; /* Semantics (see below) */ 15 | unsigned long nc_flag; /* Flags (see below) */ 16 | char *nc_protofmly; /* Protocol family */ 17 | char *nc_proto; /* Protocol name */ 18 | char *nc_device; /* Network device pathname */ 19 | unsigned long nc_nlookups; /* Number of directory lookup libs */ 20 | char **nc_lookups; /* Names of the libraries */ 21 | unsigned long nc_unused[9]; /* reserved */ 22 | }; 23 | 24 | typedef struct { 25 | struct netconfig **nc_head; 26 | struct netconfig **nc_curr; 27 | } NCONF_HANDLE; 28 | 29 | /* 30 | * nc_semantics values 31 | */ 32 | #define NC_TPI_CLTS 1 33 | #define NC_TPI_COTS 2 34 | #define NC_TPI_COTS_ORD 3 35 | #define NC_TPI_RAW 4 36 | 37 | /* 38 | * nc_flag values 39 | */ 40 | #define NC_NOFLAG 0x00 41 | #define NC_VISIBLE 0x01 42 | #define NC_BROADCAST 0x02 43 | 44 | /* 45 | * nc_protofmly values 46 | */ 47 | #define NC_NOPROTOFMLY "-" 48 | #define NC_LOOPBACK "loopback" 49 | #define NC_INET "inet" 50 | #define NC_INET6 "inet6" 51 | #define NC_IMPLINK "implink" 52 | #define NC_PUP "pup" 53 | #define NC_CHAOS "chaos" 54 | #define NC_NS "ns" 55 | #define NC_NBS "nbs" 56 | #define NC_ECMA "ecma" 57 | #define NC_DATAKIT "datakit" 58 | #define NC_CCITT "ccitt" 59 | #define NC_SNA "sna" 60 | #define NC_DECNET "decnet" 61 | #define NC_DLI "dli" 62 | #define NC_LAT "lat" 63 | #define NC_HYLINK "hylink" 64 | #define NC_APPLETALK "appletalk" 65 | #define NC_NIT "nit" 66 | #define NC_IEEE802 "ieee802" 67 | #define NC_OSI "osi" 68 | #define NC_X25 "x25" 69 | #define NC_OSINET "osinet" 70 | #define NC_GOSIP "gosip" 71 | 72 | /* 73 | * nc_proto values 74 | */ 75 | #define NC_NOPROTO "-" 76 | #define NC_TCP "tcp" 77 | #define NC_UDP "udp" 78 | #define NC_ICMP "icmp" 79 | 80 | __BEGIN_DECLS 81 | 82 | extern void *setnetconfig (void); 83 | extern struct netconfig *getnetconfig (void *); 84 | extern struct netconfig *getnetconfigent (const char *); 85 | extern void freenetconfigent (struct netconfig *); 86 | extern int endnetconfig (void *); 87 | 88 | extern void *setnetpath (void); 89 | extern struct netconfig *getnetpath (void *); 90 | extern int endnetpath (void *); 91 | 92 | extern void nc_perror (const char *); 93 | extern char *nc_sperror (void); 94 | 95 | __END_DECLS 96 | 97 | #endif /* _NETCONFIG_H_ */ 98 | -------------------------------------------------------------------------------- /libtirpc/tirpc/rpc/nettype.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: nettype.h,v 1.2 2000/07/06 03:17:19 christos Exp $ */ 2 | /* $FreeBSD: src/include/rpc/nettype.h,v 1.2 2002/03/23 17:24:55 imp Exp $ */ 3 | 4 | /* 5 | * Copyright (c) 2009, Sun Microsystems, Inc. 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions are met: 10 | * - Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * - Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | /* 32 | * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. 33 | */ 34 | 35 | /* 36 | * nettype.h, Nettype definitions. 37 | * All for the topmost layer of rpc 38 | * 39 | */ 40 | 41 | #ifndef _TIRPC_NETTYPE_H 42 | #define _TIRPC_NETTYPE_H 43 | 44 | #include 45 | 46 | #define _RPC_NONE 0 47 | #define _RPC_NETPATH 1 48 | #define _RPC_VISIBLE 2 49 | #define _RPC_CIRCUIT_V 3 50 | #define _RPC_DATAGRAM_V 4 51 | #define _RPC_CIRCUIT_N 5 52 | #define _RPC_DATAGRAM_N 6 53 | #define _RPC_TCP 7 54 | #define _RPC_UDP 8 55 | 56 | __BEGIN_DECLS 57 | extern void *__rpc_setconf(const char *); 58 | extern void __rpc_endconf(void *); 59 | extern struct netconfig *__rpc_getconf(void *); 60 | extern struct netconfig *__rpc_getconfip(const char *); 61 | __END_DECLS 62 | 63 | #endif /* !_TIRPC_NETTYPE_H */ 64 | -------------------------------------------------------------------------------- /libtirpc/src/authunix_prot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009, Sun Microsystems, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * - Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * - Redistributions in binary form must reproduce the above copyright notice, 10 | * this list of conditions and the following disclaimer in the documentation 11 | * and/or other materials provided with the distribution. 12 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef _WINTIRPC 30 | #include 31 | #endif /* !_WINTIRPC */ 32 | 33 | /* 34 | * authunix_prot.c 35 | * XDR for UNIX style authentication parameters for RPC 36 | * 37 | * Copyright (C) 1984, Sun Microsystems, Inc. 38 | */ 39 | 40 | #include 41 | #include 42 | 43 | #include 44 | #include 45 | #include 46 | #include 47 | 48 | /* 49 | * XDR for unix authentication parameters. 50 | */ 51 | bool_t 52 | xdr_authunix_parms(XDR *xdrs, struct authunix_parms *p) 53 | { 54 | 55 | assert(xdrs != NULL); 56 | assert(p != NULL); 57 | 58 | if (xdr_u_long(xdrs, &(p->aup_time)) 59 | && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) 60 | && xdr_u_int(xdrs, &(p->aup_uid)) 61 | && xdr_u_int(xdrs, &(p->aup_gid)) 62 | && xdr_array(xdrs, (caddr_t *)&(p->aup_gids), 63 | &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { 64 | return (TRUE); 65 | } 66 | return (FALSE); 67 | } 68 | -------------------------------------------------------------------------------- /libtirpc/src/svc_auth_none.c: -------------------------------------------------------------------------------- 1 | /* 2 | svc_auth_none.c 3 | 4 | Copyright (c) 2000 The Regents of the University of Michigan. 5 | All rights reserved. 6 | 7 | Copyright (c) 2000 Dug Song . 8 | All rights reserved, all wrongs reversed. 9 | 10 | Redistribution and use in source and binary forms, with or without 11 | modification, are permitted provided that the following conditions 12 | are met: 13 | 14 | 1. Redistributions of source code must retain the above copyright 15 | notice, this list of conditions and the following disclaimer. 16 | 2. Redistributions in binary form must reproduce the above copyright 17 | notice, this list of conditions and the following disclaimer in the 18 | documentation and/or other materials provided with the distribution. 19 | 3. Neither the name of the University nor the names of its 20 | contributors may be used to endorse or promote products derived 21 | from this software without specific prior written permission. 22 | 23 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 24 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 31 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 32 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 33 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | 35 | $Id: svc_auth_none.c,v 1.1 2004/10/22 17:24:30 bfields Exp $ 36 | */ 37 | 38 | #include 39 | #include 40 | 41 | //static bool_t svcauth_none_destroy(SVCAUTH *); 42 | //static bool_t svcauth_none_wrap(SVCAUTH *, XDR *, bool_t (*)(XDR *, ...), char *); 43 | 44 | static bool_t 45 | svcauth_none_destroy(SVCAUTH *auth) 46 | { 47 | return (TRUE); 48 | } 49 | 50 | static bool_t 51 | svcauth_none_wrap(SVCAUTH *auth, XDR *xdrs, xdrproc_t xdr_func, 52 | caddr_t xdr_ptr) 53 | { 54 | return ((*xdr_func)(xdrs, xdr_ptr)); 55 | } 56 | 57 | struct svc_auth_ops svc_auth_none_ops = { 58 | svcauth_none_wrap, 59 | svcauth_none_wrap, 60 | svcauth_none_destroy 61 | }; 62 | 63 | SVCAUTH svc_auth_none = { 64 | &svc_auth_none_ops, 65 | NULL, 66 | }; 67 | 68 | enum auth_stat 69 | _svcauth_none(struct svc_req *rqst, struct rpc_msg *msg) 70 | { 71 | rqst->rq_xprt->xp_auth = &svc_auth_none; 72 | 73 | return (AUTH_OK); 74 | } 75 | -------------------------------------------------------------------------------- /libtirpc/tirpc/rpc/pmap_rmt.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: pmap_rmt.h,v 1.7 1998/02/11 23:01:23 lukem Exp $ */ 2 | 3 | /* 4 | * Copyright (c) 2009, Sun Microsystems, Inc. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * - Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * - Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 15 | * contributors may be used to endorse or promote products derived 16 | * from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * from: @(#)pmap_rmt.h 1.2 88/02/08 SMI 31 | * from: @(#)pmap_rmt.h 2.1 88/07/29 4.0 RPCSRC 32 | * $FreeBSD: src/include/rpc/pmap_rmt.h,v 1.12 2002/03/23 17:24:55 imp Exp $ 33 | */ 34 | 35 | /* 36 | * Structures and XDR routines for parameters to and replies from 37 | * the portmapper remote-call-service. 38 | * 39 | * Copyright (C) 1986, Sun Microsystems, Inc. 40 | */ 41 | 42 | #ifndef _RPC_PMAP_RMT_H 43 | #define _RPC_PMAP_RMT_H 44 | #ifndef _WINTIRPC 45 | #include 46 | #endif /* !_WINTIRPC */ 47 | 48 | struct rmtcallargs { 49 | u_long prog, vers, proc, arglen; 50 | caddr_t args_ptr; 51 | xdrproc_t xdr_args; 52 | }; 53 | 54 | struct rmtcallres { 55 | u_long *port_ptr; 56 | u_long resultslen; 57 | caddr_t results_ptr; 58 | xdrproc_t xdr_results; 59 | }; 60 | 61 | __BEGIN_DECLS 62 | extern bool_t xdr_rmtcall_args(XDR *, struct rmtcallargs *); 63 | extern bool_t xdr_rmtcallres(XDR *, struct rmtcallres *); 64 | __END_DECLS 65 | 66 | #endif /* !_RPC_PMAP_RMT_H */ 67 | -------------------------------------------------------------------------------- /libtirpc/src/getrpcport.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009, Sun Microsystems, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * - Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * - Redistributions in binary form must reproduce the above copyright notice, 10 | * this list of conditions and the following disclaimer in the documentation 11 | * and/or other materials provided with the distribution. 12 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | 30 | /* 31 | * Copyright (c) 1985 by Sun Microsystems, Inc. 32 | */ 33 | 34 | #include 35 | #include 36 | #ifndef _WINTIRPC 37 | #include 38 | #endif /* !_WINTIRPC */ 39 | 40 | #include 41 | #ifndef _WINTIRPC 42 | #include 43 | #endif /* !_WINTIRPC */ 44 | #include 45 | #include 46 | 47 | #include 48 | #include 49 | 50 | int 51 | getrpcport( 52 | char *host, 53 | int prognum, 54 | int versnum, 55 | int proto) 56 | { 57 | struct sockaddr_in addr; 58 | struct hostent *hp; 59 | 60 | assert(host != NULL); 61 | 62 | if ((hp = gethostbyname(host)) == NULL) 63 | return (0); 64 | memset(&addr, 0, sizeof(addr)); 65 | addr.sin_family = AF_INET; 66 | addr.sin_port = 0; 67 | if (hp->h_length > sizeof(addr)) 68 | hp->h_length = sizeof(addr); 69 | memcpy(&addr.sin_addr.s_addr, hp->h_addr, (size_t)hp->h_length); 70 | /* Inconsistent interfaces need casts! :-( */ 71 | return (pmap_getport(&addr, (u_long)prognum, (u_long)versnum, 72 | (u_int)proto)); 73 | } 74 | -------------------------------------------------------------------------------- /sys/nfs41sys_ioctl.c: -------------------------------------------------------------------------------- 1 | /* NFSv4.1 client for Windows 2 | * Copyright (C) 2012 The Regents of the University of Michigan 3 | * Copyright (C) 2023-2024 Roland Mainz 4 | * 5 | * Olga Kornievskaia 6 | * Casey Bodley 7 | * Roland Mainz 8 | * 9 | * This library is free software; you can redistribute it and/or modify it 10 | * under the terms of the GNU Lesser General Public License as published by 11 | * the Free Software Foundation; either version 2.1 of the License, or (at 12 | * your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, but 15 | * without any warranty; without even the implied warranty of merchantability 16 | * or fitness for a particular purpose. See the GNU Lesser General Public 17 | * License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public License 20 | * along with this library; if not, write to the Free Software Foundation, 21 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 22 | */ 23 | 24 | #ifndef _KERNEL_MODE 25 | #error module requires kernel mode 26 | #endif 27 | 28 | #if ((__STDC_VERSION__-0) < 201710L) 29 | #error Code requires ISO C17 30 | #endif 31 | 32 | /* FIXME: Why does VS22 need this, but not VC19 ? */ 33 | #if _MSC_VER >= 1900 34 | #if defined(_WIN64) && defined(_M_X64) 35 | #ifndef _AMD64_ 36 | #define _AMD64_ 37 | #endif 38 | #elif defined(_WIN32) && defined(_M_IX86) 39 | #ifndef _X86_ 40 | #define _X86_ 41 | #endif 42 | #elif defined(_WIN64) && defined(_M_ARM64) 43 | #ifndef _ARM64_ 44 | #define _ARM64_ 45 | #endif 46 | #elif defined(_WIN32) && defined(_M_ARM) 47 | #ifndef _ARM_ 48 | #define _ARM_ 49 | #endif 50 | #else 51 | #error Unsupported arch 52 | #endif 53 | #endif /* _MSC_VER >= 1900 */ 54 | 55 | #define MINIRDR__NAME MRxNFS41 56 | #include 57 | #include 58 | #include 59 | 60 | #include 61 | 62 | #include "nfs41sys_buildconfig.h" 63 | 64 | #include "nfs41_driver.h" 65 | #include "nfs41sys_debug.h" 66 | #include "nfs41_build_features.h" 67 | 68 | #include "nfs41sys_driver.h" 69 | #include "nfs41sys_util.h" 70 | 71 | 72 | NTSTATUS nfs41_IoCtl( 73 | IN OUT PRX_CONTEXT RxContext) 74 | { 75 | NTSTATUS status = STATUS_INVALID_DEVICE_REQUEST; 76 | #ifdef DEBUG_IOCTL 77 | DbgEn(); 78 | print_debug_header(RxContext); 79 | #endif /* DEBUG_IOCTL */ 80 | FsRtlEnterFileSystem(); 81 | 82 | const ULONG iocontrolcode = 83 | RxContext->LowIoContext.ParamsFor.IoCtl.IoControlCode; 84 | 85 | DbgP("nfs41_IoCtl: IoControlCode=0x%lx, status=0x%lx\n", 86 | (unsigned long)iocontrolcode, (long)status); 87 | 88 | FsRtlExitFileSystem(); 89 | #ifdef DEBUG_IOCTL 90 | DbgEx(); 91 | #endif 92 | return status; 93 | } 94 | -------------------------------------------------------------------------------- /libtirpc/man/rpc_clnt_auth.3t: -------------------------------------------------------------------------------- 1 | .\" @(#)rpc_clnt_auth.3n 1.21 93/05/07 SMI; from SVr4 2 | .\" Copyright 1989 AT&T 3 | .\" @(#)rpc_clnt_auth 1.4 89/07/20 SMI; 4 | .\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved. 5 | .\" $NetBSD: rpc_clnt_auth.3,v 1.1 2000/06/03 09:29:50 fvdl Exp $ 6 | .\" $FreeBSD: src/lib/libc/rpc/rpc_clnt_auth.3,v 1.5 2002/12/19 09:40:23 ru Exp $ 7 | .Dd May 7, 1993 8 | .Dt RPC_CLNT_AUTH 3 9 | .Os 10 | .Sh NAME 11 | .Nm auth_destroy , 12 | .Nm authnone_create , 13 | .Nm authsys_create , 14 | .Nm authsys_create_default 15 | .Nd library routines for client side remote procedure call authentication 16 | .Sh LIBRARY 17 | .Lb libc 18 | .Sh SYNOPSIS 19 | .In rpc/rpc.h 20 | .Ft "void" 21 | .Fn auth_destroy "AUTH *auth" 22 | .Ft "AUTH *" 23 | .Fn authnone_create "void" 24 | .Ft "AUTH *" 25 | .Fn authsys_create "const char *host" "const uid_t uid" "const gid_t gid" "const int len" "const gid_t *aup_gids" 26 | .Ft "AUTH *" 27 | .Fn authsys_create_default "void" 28 | .Sh DESCRIPTION 29 | These routines are part of the 30 | RPC library that allows C language programs to make procedure 31 | calls on other machines across the network, 32 | with desired authentication. 33 | .Pp 34 | These routines are normally called after creating the 35 | .Vt CLIENT 36 | handle. 37 | The 38 | .Va cl_auth 39 | field of the 40 | .Vt CLIENT 41 | structure should be initialized by the 42 | .Vt AUTH 43 | structure returned by some of the following routines. 44 | The client's authentication information 45 | is passed to the server when the 46 | RPC 47 | call is made. 48 | .Pp 49 | Only the 50 | .Dv NULL 51 | and the 52 | .Dv SYS 53 | style of authentication is discussed here. 54 | .Sh Routines 55 | .Bl -tag -width authsys_create_default() 56 | .It Fn auth_destroy 57 | A function macro that destroys the authentication 58 | information associated with 59 | .Fa auth . 60 | Destruction usually involves deallocation 61 | of private data structures. 62 | The use of 63 | .Fa auth 64 | is undefined after calling 65 | .Fn auth_destroy . 66 | .It Fn authnone_create 67 | Create and return an RPC 68 | authentication handle that passes nonusable 69 | authentication information with each remote procedure call. 70 | This is the default authentication used by RPC. 71 | .It Fn authsys_create 72 | Create and return an RPC authentication handle that contains 73 | .Dv AUTH_SYS 74 | authentication information. 75 | The 76 | .Fa host 77 | argument 78 | is the name of the machine on which the information was 79 | created; 80 | .Fa uid 81 | is the user's user ID; 82 | .Fa gid 83 | is the user's current group ID; 84 | .Fa len 85 | and 86 | .Fa aup_gids 87 | refer to a counted array of groups to which the user belongs. 88 | .It Fn authsys_create_default 89 | Call 90 | .Fn authsys_create 91 | with the appropriate arguments. 92 | .El 93 | .Sh SEE ALSO 94 | .Xr rpc 3 , 95 | .Xr rpc_clnt_calls 3 , 96 | .Xr rpc_clnt_create 3 97 | -------------------------------------------------------------------------------- /libtirpc/src/des_soft.c: -------------------------------------------------------------------------------- 1 | #ifndef _WINTIRPC 2 | #include 3 | #endif /* !_WINTIRPC */ 4 | 5 | /* 6 | * Copyright (c) 2009, Sun Microsystems, Inc. 7 | * All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions are met: 11 | * - Redistributions of source code must retain the above copyright notice, 12 | * this list of conditions and the following disclaimer. 13 | * - Redistributions in binary form must reproduce the above copyright notice, 14 | * this list of conditions and the following disclaimer in the documentation 15 | * and/or other materials provided with the distribution. 16 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 24 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 | * POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | /* 33 | * Table giving odd parity in the low bit for ASCII characters 34 | */ 35 | static char partab[128] = { 36 | 0x01, 0x01, 0x02, 0x02, 0x04, 0x04, 0x07, 0x07, 37 | 0x08, 0x08, 0x0b, 0x0b, 0x0d, 0x0d, 0x0e, 0x0e, 38 | 0x10, 0x10, 0x13, 0x13, 0x15, 0x15, 0x16, 0x16, 39 | 0x19, 0x19, 0x1a, 0x1a, 0x1c, 0x1c, 0x1f, 0x1f, 40 | 0x20, 0x20, 0x23, 0x23, 0x25, 0x25, 0x26, 0x26, 41 | 0x29, 0x29, 0x2a, 0x2a, 0x2c, 0x2c, 0x2f, 0x2f, 42 | 0x31, 0x31, 0x32, 0x32, 0x34, 0x34, 0x37, 0x37, 43 | 0x38, 0x38, 0x3b, 0x3b, 0x3d, 0x3d, 0x3e, 0x3e, 44 | 0x40, 0x40, 0x43, 0x43, 0x45, 0x45, 0x46, 0x46, 45 | 0x49, 0x49, 0x4a, 0x4a, 0x4c, 0x4c, 0x4f, 0x4f, 46 | 0x51, 0x51, 0x52, 0x52, 0x54, 0x54, 0x57, 0x57, 47 | 0x58, 0x58, 0x5b, 0x5b, 0x5d, 0x5d, 0x5e, 0x5e, 48 | 0x61, 0x61, 0x62, 0x62, 0x64, 0x64, 0x67, 0x67, 49 | 0x68, 0x68, 0x6b, 0x6b, 0x6d, 0x6d, 0x6e, 0x6e, 50 | 0x70, 0x70, 0x73, 0x73, 0x75, 0x75, 0x76, 0x76, 51 | 0x79, 0x79, 0x7a, 0x7a, 0x7c, 0x7c, 0x7f, 0x7f, 52 | }; 53 | 54 | /* 55 | * Add odd parity to low bit of 8 byte key 56 | */ 57 | void 58 | des_setparity(char *p) 59 | { 60 | int i; 61 | 62 | for (i = 0; i < 8; i++) { 63 | *p = partab[*p & 0x7f]; 64 | p++; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /libtirpc/tirpc/rpcsvc/crypt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Please do not edit this file. 3 | * It was generated using rpcgen. 4 | */ 5 | 6 | #ifndef _CRYPT_H_RPCGEN 7 | #define _CRYPT_H_RPCGEN 8 | 9 | #include 10 | 11 | #ifndef IXDR_GET_INT32 12 | #define IXDR_GET_INT32(buf) IXDR_GET_LONG((buf)) 13 | #endif 14 | #ifndef IXDR_PUT_INT32 15 | #define IXDR_PUT_INT32(buf, v) IXDR_PUT_LONG((buf), (v)) 16 | #endif 17 | #ifndef IXDR_GET_U_INT32 18 | #define IXDR_GET_U_INT32(buf) IXDR_GET_U_LONG((buf)) 19 | #endif 20 | #ifndef IXDR_PUT_U_INT32 21 | #define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_U_LONG((buf), (v)) 22 | #endif 23 | 24 | enum des_dir { 25 | ENCRYPT_DES = 0, 26 | DECRYPT_DES = 1, 27 | }; 28 | typedef enum des_dir des_dir; 29 | #ifdef __cplusplus 30 | extern "C" bool_t xdr_des_dir(XDR *, des_dir*); 31 | #elif __STDC__ 32 | extern bool_t xdr_des_dir(XDR *, des_dir*); 33 | #else /* Old Style C */ 34 | bool_t xdr_des_dir(); 35 | #endif /* Old Style C */ 36 | 37 | 38 | enum des_mode { 39 | CBC_DES = 0, 40 | ECB_DES = 1, 41 | }; 42 | typedef enum des_mode des_mode; 43 | #ifdef __cplusplus 44 | extern "C" bool_t xdr_des_mode(XDR *, des_mode*); 45 | #elif __STDC__ 46 | extern bool_t xdr_des_mode(XDR *, des_mode*); 47 | #else /* Old Style C */ 48 | bool_t xdr_des_mode(); 49 | #endif /* Old Style C */ 50 | 51 | 52 | struct desargs { 53 | u_char des_key[8]; 54 | des_dir des_dir; 55 | des_mode des_mode; 56 | u_char des_ivec[8]; 57 | struct { 58 | u_int desbuf_len; 59 | char *desbuf_val; 60 | } desbuf; 61 | }; 62 | typedef struct desargs desargs; 63 | #ifdef __cplusplus 64 | extern "C" bool_t xdr_desargs(XDR *, desargs*); 65 | #elif __STDC__ 66 | extern bool_t xdr_desargs(XDR *, desargs*); 67 | #else /* Old Style C */ 68 | bool_t xdr_desargs(); 69 | #endif /* Old Style C */ 70 | 71 | 72 | struct desresp { 73 | struct { 74 | u_int desbuf_len; 75 | char *desbuf_val; 76 | } desbuf; 77 | u_char des_ivec[8]; 78 | int stat; 79 | }; 80 | typedef struct desresp desresp; 81 | #ifdef __cplusplus 82 | extern "C" bool_t xdr_desresp(XDR *, desresp*); 83 | #elif __STDC__ 84 | extern bool_t xdr_desresp(XDR *, desresp*); 85 | #else /* Old Style C */ 86 | bool_t xdr_desresp(); 87 | #endif /* Old Style C */ 88 | 89 | 90 | #define CRYPT_PROG ((u_int32_t)600100029) 91 | #define CRYPT_VERS ((u_int32_t)1) 92 | 93 | #ifdef __cplusplus 94 | #define DES_CRYPT ((u_int32_t)1) 95 | extern "C" desresp * des_crypt_1(desargs *, CLIENT *); 96 | extern "C" desresp * des_crypt_1_svc(desargs *, struct svc_req *); 97 | 98 | #elif __STDC__ 99 | #define DES_CRYPT ((u_int32_t)1) 100 | extern desresp * des_crypt_1(desargs *, CLIENT *); 101 | extern desresp * des_crypt_1_svc(desargs *, struct svc_req *); 102 | 103 | #else /* Old Style C */ 104 | #define DES_CRYPT ((u_int32_t)1) 105 | extern desresp * des_crypt_1(); 106 | extern desresp * des_crypt_1_svc(); 107 | #endif /* Old Style C */ 108 | 109 | #endif /* !_CRYPT_H_RPCGEN */ 110 | -------------------------------------------------------------------------------- /libtirpc/tirpc/rpc/rpcent.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: rpcent.h,v 1.1 2000/06/02 22:57:56 fvdl Exp $ */ 2 | /* $FreeBSD: src/include/rpc/rpcent.h,v 1.2 2002/03/23 17:24:55 imp Exp $ */ 3 | 4 | /* 5 | * Copyright (c) 2009, Sun Microsystems, Inc. 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions are met: 10 | * - Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * - Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | /* 32 | * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. 33 | */ 34 | 35 | /* 36 | * rpcent.h, 37 | * For converting rpc program numbers to names etc. 38 | * 39 | */ 40 | 41 | #ifndef _RPC_RPCENT_H 42 | #define _RPC_RPCENT_H 43 | 44 | /* #pragma ident "@(#)rpcent.h 1.13 94/04/25 SMI" */ 45 | /* @(#)rpcent.h 1.1 88/12/06 SMI */ 46 | 47 | 48 | struct rpcent { 49 | char *r_name; /* name of server for this rpc program */ 50 | char **r_aliases; /* alias list */ 51 | int r_number; /* rpc program number */ 52 | }; 53 | 54 | __BEGIN_DECLS 55 | //extern struct rpcent *getrpcbyname_r(const char *, struct rpcent *, 56 | // char *, int); 57 | //extern struct rpcent *getrpcbynumber_r(int, struct rpcent *, char *, int); 58 | //extern struct rpcent *getrpcent_r(struct rpcent *, char *, int); 59 | 60 | /* Old interfaces that return a pointer to a static area; MT-unsafe */ 61 | //extern struct rpcent *getrpcbyname(char *); 62 | //extern struct rpcent *getrpcbynumber(int); 63 | //extern struct rpcent *getrpcent(void); 64 | extern void setrpcent(int) __THROW; 65 | extern void endrpcent(void) __THROW; 66 | __END_DECLS 67 | 68 | #endif /* !_RPC_CENT_H */ 69 | -------------------------------------------------------------------------------- /libtirpc/src/rpcdname.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009, Sun Microsystems, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * - Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * - Redistributions in binary form must reproduce the above copyright notice, 10 | * this list of conditions and the following disclaimer in the documentation 11 | * and/or other materials provided with the distribution. 12 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | #ifndef _WINTIRPC 29 | #include 30 | #endif /* !_WINTIRPC */ 31 | 32 | /* 33 | * rpcdname.c 34 | * Gets the default domain name 35 | */ 36 | 37 | #include 38 | #include 39 | #ifndef _WINTIRPC 40 | #include 41 | #endif /* !_WINTIRPC */ 42 | #include 43 | 44 | static char *default_domain = NULL; 45 | 46 | static char * 47 | get_default_domain() 48 | { 49 | #ifndef _WINTIRPC 50 | char temp[256]; 51 | #endif 52 | 53 | if (default_domain) 54 | return (default_domain); 55 | #ifndef _WINTIRPC // Need a WIN32 version? 56 | if (getdomainname(temp, sizeof(temp)) < 0) 57 | return (0); 58 | if ((int) strlen(temp) > 0) { 59 | default_domain = (char *)malloc((strlen(temp)+(unsigned)1)); 60 | if (default_domain == 0) 61 | return (NULL); 62 | (void) strcpy(default_domain, temp); 63 | return (default_domain); 64 | } 65 | #endif 66 | return (NULL); 67 | } 68 | 69 | /* 70 | * This is a wrapper for the system call getdomainname which returns a 71 | * ypclnt.h error code in the failure case. It also checks to see that 72 | * the domain name is non-null, knowing that the null string is going to 73 | * get rejected elsewhere in the NIS client package. 74 | */ 75 | int 76 | __rpc_get_default_domain(char **domain) 77 | { 78 | if ((*domain = get_default_domain()) != 0) 79 | return (0); 80 | return (-1); 81 | } 82 | -------------------------------------------------------------------------------- /libtirpc/tirpc/rpc/svc_auth.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: svc_auth.h,v 1.8 2000/06/02 22:57:57 fvdl Exp $ */ 2 | 3 | /* 4 | * Copyright (c) 2009, Sun Microsystems, Inc. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * - Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * - Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 15 | * contributors may be used to endorse or promote products derived 16 | * from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * from: @(#)svc_auth.h 1.6 86/07/16 SMI 31 | * @(#)svc_auth.h 2.1 88/07/29 4.0 RPCSRC 32 | * $FreeBSD: src/include/rpc/svc_auth.h,v 1.14 2002/03/23 17:24:55 imp Exp $ 33 | */ 34 | 35 | /* 36 | * svc_auth.h, Service side of rpc authentication. 37 | * 38 | * Copyright (C) 1984, Sun Microsystems, Inc. 39 | */ 40 | 41 | #ifndef _RPC_SVC_AUTH_H 42 | #define _RPC_SVC_AUTH_H 43 | 44 | /* 45 | * Interface to server-side authentication flavors. 46 | */ 47 | typedef struct __svcauth { 48 | struct svc_auth_ops { 49 | int (*svc_ah_wrap)(struct __svcauth *auth, XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr); 50 | int (*svc_ah_unwrap)(struct __svcauth *auth, XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr); 51 | int (*svc_ah_destroy)(struct __svcauth *auth); 52 | } *svc_ah_ops; 53 | caddr_t svc_ah_private; 54 | } SVCAUTH; 55 | 56 | #define SVCAUTH_DESTROY(cred) ((*(cred)->svc_ah_ops->svc_ah_destroy)()) 57 | #define svcauth_destroy(cred) ((*(cred)->svc_ah_ops->svc_ah_destroy)()) 58 | 59 | /* 60 | * Server side authenticator 61 | */ 62 | __BEGIN_DECLS 63 | extern enum auth_stat _authenticate(struct svc_req *, struct rpc_msg *); 64 | extern int svc_auth_reg(int, enum auth_stat (*)(struct svc_req *, 65 | struct rpc_msg *)); 66 | 67 | __END_DECLS 68 | 69 | #endif /* !_RPC_SVC_AUTH_H */ 70 | -------------------------------------------------------------------------------- /libtirpc/tirpc/spinlock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1998 John Birrell . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. All advertising materials mentioning features or use of this software 14 | * must display the following acknowledgement: 15 | * This product includes software developed by John Birrell. 16 | * 4. Neither the name of the author nor the names of any co-contributors 17 | * may be used to endorse or promote products derived from this software 18 | * without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND 21 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 | * SUCH DAMAGE. 31 | * 32 | * $FreeBSD: src/lib/libc/include/spinlock.h,v 1.7 2003/11/05 18:17:30 deischen Exp $ 33 | * 34 | * Lock definitions used in both libc and libpthread. 35 | * 36 | */ 37 | 38 | #ifndef _SPINLOCK_H_ 39 | #define _SPINLOCK_H_ 40 | #ifndef _WINTIRPC 41 | #include 42 | #endif /* !_WINTIRPC */ 43 | #include 44 | 45 | /* 46 | * Lock structure with room for debugging information. 47 | */ 48 | struct _spinlock { 49 | volatile long access_lock; 50 | volatile long lock_owner; 51 | volatile char *fname; 52 | volatile int lineno; 53 | }; 54 | typedef struct _spinlock spinlock_t; 55 | 56 | #define _SPINLOCK_INITIALIZER { 0, 0, 0, 0 } 57 | 58 | #define _SPINUNLOCK(_lck) _spinunlock(_lck); 59 | #ifdef _LOCK_DEBUG 60 | #define _SPINLOCK(_lck) _spinlock_debug(_lck, __FILE__, __LINE__) 61 | #else 62 | #define _SPINLOCK(_lck) _spinlock(_lck) 63 | #endif 64 | 65 | /* 66 | * Thread function prototype definitions: 67 | */ 68 | __BEGIN_DECLS 69 | long _atomic_lock(volatile long *); 70 | void _spinlock(spinlock_t *); 71 | void _spinunlock(spinlock_t *); 72 | void _spinlock_debug(spinlock_t *, char *, int); 73 | __END_DECLS 74 | 75 | #endif /* _SPINLOCK_H_ */ 76 | -------------------------------------------------------------------------------- /libtirpc/tirpc/misc/socket.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 3 | * The Regents of the University of California. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. All advertising materials mentioning features or use of this software 14 | * must display the following acknowledgement: 15 | * This product includes software developed by the University of 16 | * California, Berkeley and its contributors. 17 | * 4. Neither the name of the University nor the names of its contributors 18 | * may be used to endorse or promote products derived from this software 19 | * without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 | * SUCH DAMAGE. 32 | * 33 | * @(#)socket.h 8.4 (Berkeley) 2/21/94 34 | * $FreeBSD: src/sys/sys/socket.h,v 1.73 2003/11/14 18:48:15 bms Exp $ 35 | */ 36 | 37 | 38 | #ifndef _MISC_SYS_SOCKET_H_ 39 | #define _MISC_SYS_SOCKET_H_ 40 | 41 | #include 42 | 43 | #define CMGROUP_MAX 16 44 | #define SCM_CREDS 0x03 /* process creds (struct cmsgcred) */ 45 | 46 | /* 47 | * Credentials structure, used to verify the identity of a peer 48 | * process that has sent us a message. This is allocated by the 49 | * peer process but filled in by the kernel. This prevents the 50 | * peer from lying about its identity. (Note that cmcred_groups[0] 51 | * is the effective GID.) 52 | */ 53 | struct cmsgcred { 54 | pid_t cmcred_pid; /* PID of sending process */ 55 | uid_t cmcred_uid; /* real UID of sending process */ 56 | uid_t cmcred_euid; /* effective UID of sending process */ 57 | gid_t cmcred_gid; /* real GID of sending process */ 58 | short cmcred_ngroups; /* number or groups */ 59 | gid_t cmcred_groups[CMGROUP_MAX]; /* groups */ 60 | }; 61 | 62 | #endif /* _MISC_SYS_SOCKET_H_ */ 63 | -------------------------------------------------------------------------------- /libtirpc/man/rpc_svc_err.3t: -------------------------------------------------------------------------------- 1 | .\" @(#)rpc_svc_err.3n 1.23 93/08/31 SMI; from SVr4 2 | .\" Copyright 1989 AT&T 3 | .\" @(#)rpc_svc_err 1.4 89/06/28 SMI; 4 | .\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved. 5 | .\" $NetBSD: rpc_svc_err.3,v 1.1 2000/06/02 23:11:14 fvdl Exp $ 6 | .\" $FreeBSD: src/lib/libc/rpc/rpc_svc_err.3,v 1.4 2002/12/19 09:40:23 ru Exp $ 7 | .Dd May 3, 1993 8 | .Dt RPC_SVC_ERR 3 9 | .Os 10 | .Sh NAME 11 | .Nm rpc_svc_err , 12 | .Nm svcerr_auth , 13 | .Nm svcerr_decode , 14 | .Nm svcerr_noproc , 15 | .Nm svcerr_noprog , 16 | .Nm svcerr_progvers , 17 | .Nm svcerr_systemerr , 18 | .Nm svcerr_weakauth 19 | .Nd library routines for server side remote procedure call errors 20 | .Sh LIBRARY 21 | .Lb libc 22 | .Sh SYNOPSIS 23 | .In rpc/rpc.h 24 | .Ft void 25 | .Fn svcerr_auth "SVCXPRT *xprt" "enum auth_stat why" 26 | .Ft void 27 | .Fn svcerr_decode "SVCXPRT *xprt" 28 | .Ft void 29 | .Fn svcerr_noproc "SVCXPRT *xprt" 30 | .Ft void 31 | .Fn svcerr_noprog "SVCXPRT *xprt" 32 | .Ft void 33 | .Fn svcerr_progvers "SVCXPRT *xprt" "rpcvers_t low_vers" "rpcvers_t high_vers" 34 | .Ft void 35 | .Fn svcerr_systemerr "SVCXPRT *xprt" 36 | .Ft void 37 | .Fn svcerr_weakauth "SVCXPRT *xprt" 38 | .Sh DESCRIPTION 39 | These routines are part of the RPC 40 | library which allows C language programs to make procedure 41 | calls on other machines across the network. 42 | .Pp 43 | These routines can be called by the server side 44 | dispatch function if there is any error in the 45 | transaction with the client. 46 | .Sh Routines 47 | See 48 | .Xr rpc 3 49 | for the definition of the 50 | .Vt SVCXPRT 51 | data structure. 52 | .Bl -tag -width XXXXX 53 | .It Fn svcerr_auth 54 | Called by a service dispatch routine that refuses to perform 55 | a remote procedure call due to an authentication error. 56 | .It Fn svcerr_decode 57 | Called by a service dispatch routine that cannot successfully 58 | decode the remote arguments 59 | (see 60 | .Fn svc_getargs 61 | in 62 | .Xr rpc_svc_reg 3 ) . 63 | .It Fn svcerr_noproc 64 | Called by a service dispatch routine that does not implement 65 | the procedure number that the caller requests. 66 | .It Fn svcerr_noprog 67 | Called when the desired program is not registered with the 68 | RPC package. 69 | Service implementors usually do not need this routine. 70 | .It Fn svcerr_progvers 71 | Called when the desired version of a program is not registered with the 72 | RPC package. 73 | The 74 | .Fa low_vers 75 | argument 76 | is the lowest version number, 77 | and 78 | .Fa high_vers 79 | is the highest version number. 80 | Service implementors usually do not need this routine. 81 | .It Fn svcerr_systemerr 82 | Called by a service dispatch routine when it detects a system 83 | error not covered by any particular protocol. 84 | For example, if a service can no longer allocate storage, 85 | it may call this routine. 86 | .It Fn svcerr_weakauth 87 | Called by a service dispatch routine that refuses to perform 88 | a remote procedure call due to insufficient (but correct) 89 | authentication arguments. 90 | The routine calls 91 | .Fn svcerr_auth "xprt" "AUTH_TOOWEAK" . 92 | .El 93 | .Sh SEE ALSO 94 | .Xr rpc 3 , 95 | .Xr rpc_svc_calls 3 , 96 | .Xr rpc_svc_create 3 , 97 | .Xr rpc_svc_reg 3 98 | -------------------------------------------------------------------------------- /libtirpc/src/authdes_prot.c: -------------------------------------------------------------------------------- 1 | #ifndef _WINTIRPC 2 | #include 3 | #endif /* !_WINTIRPC */ 4 | /* 5 | * Copyright (c) 2009, Sun Microsystems, Inc. 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions are met: 10 | * - Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * - Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | /* 32 | * Copyright (c) 1986-1991 by Sun Microsystems Inc. 33 | */ 34 | 35 | /* 36 | * authdes_prot.c, XDR routines for DES authentication 37 | */ 38 | 39 | #include 40 | 41 | #include 42 | #include 43 | #include 44 | 45 | #define ATTEMPT(xdr_op) if (!(xdr_op)) return (FALSE) 46 | 47 | bool_t 48 | xdr_authdes_cred(xdrs, cred) 49 | XDR *xdrs; 50 | struct authdes_cred *cred; 51 | { 52 | /* 53 | * Unrolled xdr 54 | */ 55 | ATTEMPT(xdr_enum(xdrs, (enum_t *)&cred->adc_namekind)); 56 | switch (cred->adc_namekind) { 57 | case ADN_FULLNAME: 58 | ATTEMPT(xdr_string(xdrs, &cred->adc_fullname.name, 59 | MAXNETNAMELEN)); 60 | ATTEMPT(xdr_opaque(xdrs, (caddr_t)&cred->adc_fullname.key, 61 | sizeof(des_block))); 62 | ATTEMPT(xdr_opaque(xdrs, (caddr_t)&cred->adc_fullname.window, 63 | sizeof(cred->adc_fullname.window))); 64 | return (TRUE); 65 | case ADN_NICKNAME: 66 | ATTEMPT(xdr_opaque(xdrs, (caddr_t)&cred->adc_nickname, 67 | sizeof(cred->adc_nickname))); 68 | return (TRUE); 69 | default: 70 | return (FALSE); 71 | } 72 | } 73 | 74 | 75 | bool_t 76 | xdr_authdes_verf(xdrs, verf) 77 | XDR *xdrs; 78 | struct authdes_verf *verf; 79 | { 80 | /* 81 | * Unrolled xdr 82 | */ 83 | ATTEMPT(xdr_opaque(xdrs, (caddr_t)&verf->adv_xtimestamp, 84 | sizeof(des_block))); 85 | ATTEMPT(xdr_opaque(xdrs, (caddr_t)&verf->adv_int_u, 86 | sizeof(verf->adv_int_u))); 87 | return (TRUE); 88 | } 89 | -------------------------------------------------------------------------------- /libtirpc/tirpc/rpc/des.h: -------------------------------------------------------------------------------- 1 | /* @(#)des.h 2.2 88/08/10 4.0 RPCSRC; from 2.7 88/02/08 SMI */ 2 | /* $FreeBSD: src/include/rpc/des.h,v 1.4 2002/03/23 17:24:55 imp Exp $ */ 3 | /* 4 | * Copyright (c) 2009, Sun Microsystems, Inc. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * - Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * - Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 15 | * contributors may be used to endorse or promote products derived 16 | * from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | /* 31 | * Generic DES driver interface 32 | * Keep this file hardware independent! 33 | * Copyright (c) 1986 by Sun Microsystems, Inc. 34 | */ 35 | 36 | #define DES_MAXLEN 65536 /* maximum # of bytes to encrypt */ 37 | #define DES_QUICKLEN 16 /* maximum # of bytes to encrypt quickly */ 38 | 39 | enum desdir { ENCRYPT, DECRYPT }; 40 | enum desmode { CBC, ECB }; 41 | 42 | /* 43 | * parameters to ioctl call 44 | */ 45 | struct desparams { 46 | u_char des_key[8]; /* key (with low bit parity) */ 47 | enum desdir des_dir; /* direction */ 48 | enum desmode des_mode; /* mode */ 49 | u_char des_ivec[8]; /* input vector */ 50 | unsigned des_len; /* number of bytes to crypt */ 51 | union { 52 | u_char UDES_data[DES_QUICKLEN]; 53 | u_char *UDES_buf; 54 | } UDES; 55 | # define des_data UDES.UDES_data /* direct data here if quick */ 56 | # define des_buf UDES.UDES_buf /* otherwise, pointer to data */ 57 | }; 58 | 59 | #ifdef notdef 60 | 61 | /* 62 | * These ioctls are only implemented in SunOS. Maybe someday 63 | * if somebody writes a driver for DES hardware that works 64 | * with FreeBSD, we can being that back. 65 | */ 66 | 67 | /* 68 | * Encrypt an arbitrary sized buffer 69 | */ 70 | #define DESIOCBLOCK _IOWR('d', 6, struct desparams) 71 | 72 | /* 73 | * Encrypt of small amount of data, quickly 74 | */ 75 | #define DESIOCQUICK _IOWR('d', 7, struct desparams) 76 | 77 | #endif 78 | 79 | /* 80 | * Software DES. 81 | */ 82 | extern int _des_crypt( char *, int, struct desparams * ); 83 | -------------------------------------------------------------------------------- /daemon/fileinfoutil.h: -------------------------------------------------------------------------------- 1 | /* NFSv4.1 client for Windows 2 | * Copyright (C) 2024-2025 Roland Mainz 3 | * 4 | * Roland Mainz 5 | * 6 | * This library is free software; you can redistribute it and/or modify it 7 | * under the terms of the GNU Lesser General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or (at 9 | * your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, but 12 | * without any warranty; without even the implied warranty of merchantability 13 | * or fitness for a particular purpose. See the GNU Lesser General Public 14 | * License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public License 17 | * along with this library; if not, write to the Free Software Foundation, 18 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 | */ 20 | 21 | #ifndef __NFS41_DAEMON_FILEINFOUTIL_H__ 22 | #define __NFS41_DAEMON_FILEINFOUTIL_H__ 1 23 | 24 | #include 25 | #include 26 | 27 | #include "nfs41_build_features.h" 28 | #include "nfs41_types.h" 29 | #include "from_kernel.h" 30 | 31 | typedef struct _FILE_ID_128 FILE_ID_128, *PFILE_ID_128; 32 | typedef struct __nfs41_superblock nfs41_superblock; 33 | typedef struct __nfs41_open_state nfs41_open_state; 34 | 35 | void nfs41_file_info_to_FILE_ID_128( 36 | IN const nfs41_file_info *restrict info, 37 | OUT FILE_ID_128 *restrict out_fid128); 38 | ULONG nfs_file_info_to_attributes( 39 | IN const nfs41_superblock *restrict superblock, 40 | IN const nfs41_file_info *restrict info); 41 | void nfs_to_basic_info( 42 | IN const char *restrict name, 43 | IN const nfs41_superblock *restrict superblock, 44 | IN const nfs41_file_info *restrict info, 45 | OUT PFILE_BASIC_INFORMATION restrict basic_out); 46 | void nfs_to_standard_info( 47 | IN const nfs41_superblock *restrict superblock, 48 | IN const nfs41_file_info *restrict info, 49 | OUT PFILE_STANDARD_INFORMATION restrict std_out); 50 | void nfs_to_network_openinfo( 51 | IN const char *restrict name, 52 | IN const nfs41_superblock *restrict superblock, 53 | IN const nfs41_file_info *restrict info, 54 | OUT PFILE_NETWORK_OPEN_INFORMATION restrict std_out); 55 | void nfs_to_remote_protocol_info( 56 | IN nfs41_open_state *state, 57 | OUT PFILE_REMOTE_PROTOCOL_INFORMATION restrict rpi_out); 58 | #ifdef NFS41_DRIVER_WSL_SUPPORT 59 | void nfs_to_stat_info( 60 | IN const char *restrict name, 61 | IN const nfs41_superblock *restrict superblock, 62 | IN const nfs41_file_info *restrict info, 63 | OUT PFILE_STAT_INFORMATION restrict stat_out); 64 | void nfs_to_stat_lx_info( 65 | IN void *daemon_context, 66 | IN const char *restrict name, 67 | IN const nfs41_superblock *restrict superblock, 68 | IN const nfs41_file_info *restrict info, 69 | OUT PFILE_STAT_LX_INFORMATION restrict stat_lx_out); 70 | #endif /* NFS41_DRIVER_WSL_SUPPORT */ 71 | 72 | /* Copy |info->symlink_dir| */ 73 | #define NFS41FILEINFOCPY_COPY_SYMLINK_DIR (1 << 0) 74 | void nfs41_file_info_cpy( 75 | OUT nfs41_file_info *restrict dest, 76 | IN const nfs41_file_info *restrict src, 77 | IN int flags); 78 | 79 | #endif /* !__NFS41_DAEMON_FILEINFOUTIL_H__ */ 80 | -------------------------------------------------------------------------------- /libtirpc/man/rpc_xdr.3t: -------------------------------------------------------------------------------- 1 | .\" @(#)rpc_xdr.3n 1.24 93/08/31 SMI; from SVr4 2 | .\" Copyright 1989 AT&T 3 | .\" @(#)rpc_xdr.new 1.1 89/04/06 SMI; 4 | .\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved. 5 | .\" $FreeBSD: src/lib/libc/rpc/rpc_xdr.3,v 1.3 2001/10/03 16:47:56 bde Exp $ 6 | .Dd May 3, 1993 7 | .Dt RPC_XDR 3 8 | .Os 9 | .Sh NAME 10 | .Nm xdr_accepted_reply , 11 | .Nm xdr_authsys_parms , 12 | .Nm xdr_callhdr , 13 | .Nm xdr_callmsg , 14 | .Nm xdr_opaque_auth , 15 | .Nm xdr_rejected_reply , 16 | .Nm xdr_replymsg 17 | .Nd XDR library routines for remote procedure calls 18 | .Sh LIBRARY 19 | .Lb libc 20 | .Sh SYNOPSIS 21 | .In rpc/rpc.h 22 | .Ft bool_t 23 | .Fn xdr_accepted_reply "XDR *xdrs" "struct accepted_reply *ar" 24 | .Ft bool_t 25 | .Fn xdr_authsys_parms "XDR *xdrs" "struct authsys_parms *aupp" 26 | .Ft bool_t 27 | .Fn xdr_callhdr "XDR *xdrs" "struct rpc_msg *chdr" 28 | .Ft bool_t 29 | .Fn xdr_callmsg "XDR *xdrs" "struct rpc_msg *cmsg" 30 | .Ft bool_t 31 | .Fn xdr_opaque_auth "XDR *xdrs" "struct opaque_auth *ap" 32 | .Ft bool_t 33 | .Fn xdr_rejected_reply "XDR *xdrs" "struct rejected_reply *rr" 34 | .Ft bool_t 35 | .Fn xdr_replymsg "XDR *xdrs" "struct rpc_msg *rmsg" 36 | .Sh DESCRIPTION 37 | These routines are used for describing the 38 | RPC messages in XDR language. 39 | They should normally be used by those who do not 40 | want to use the RPC 41 | package directly. 42 | These routines return 43 | .Dv TRUE 44 | if they succeed, 45 | .Dv FALSE 46 | otherwise. 47 | .Sh Routines 48 | See 49 | .Xr rpc 3 50 | for the definition of the 51 | .Vt XDR 52 | data structure. 53 | .Bl -tag -width XXXXX 54 | .It Fn xdr_accepted_reply 55 | Used to translate between RPC 56 | reply messages and their external representation. 57 | It includes the status of the RPC 58 | call in the XDR language format. 59 | In the case of success, it also includes the call results. 60 | .It Fn xdr_authsys_parms 61 | Used for describing 62 | .Ux 63 | operating system credentials. 64 | It includes machine-name, uid, gid list, etc. 65 | .It Fn xdr_callhdr 66 | Used for describing 67 | RPC 68 | call header messages. 69 | It encodes the static part of the call message header in the 70 | XDR language format. 71 | It includes information such as transaction 72 | ID, RPC version number, program and version number. 73 | .It Fn xdr_callmsg 74 | Used for describing 75 | RPC call messages. 76 | This includes all the RPC 77 | call information such as transaction 78 | ID, RPC version number, program number, version number, 79 | authentication information, etc. 80 | This is normally used by servers to determine information about the client 81 | RPC call. 82 | .It Fn xdr_opaque_auth 83 | Used for describing RPC 84 | opaque authentication information messages. 85 | .It Fn xdr_rejected_reply 86 | Used for describing RPC reply messages. 87 | It encodes the rejected RPC message in the XDR language format. 88 | The message could be rejected either because of version 89 | number mis-match or because of authentication errors. 90 | .It Fn xdr_replymsg 91 | Used for describing RPC 92 | reply messages. 93 | It translates between the 94 | RPC reply message and its external representation. 95 | This reply could be either an acceptance, 96 | rejection or 97 | .Dv NULL . 98 | .El 99 | .Sh SEE ALSO 100 | .Xr rpc 3 , 101 | .Xr xdr 3 102 | -------------------------------------------------------------------------------- /libtirpc/tirpc/nss_tls.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2003 Networks Associates Technology, Inc. 3 | * All rights reserved. 4 | * 5 | * This software was developed for the FreeBSD Project by 6 | * Jacques A. Vidrine, Safeport Network Services, and Network 7 | * Associates Laboratories, the Security Research Division of Network 8 | * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 9 | * ("CBOSS"), as part of the DARPA CHATS research program. 10 | * 11 | * Redistribution and use in source and binary forms, with or without 12 | * modification, are permitted provided that the following conditions 13 | * are met: 14 | * 1. Redistributions of source code must retain the above copyright 15 | * notice, this list of conditions and the following disclaimer. 16 | * 2. Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in the 18 | * documentation and/or other materials provided with the distribution. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 21 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 | * SUCH DAMAGE. 31 | * 32 | * $FreeBSD: src/lib/libc/include/nss_tls.h,v 1.2 2003/04/21 15:44:25 nectar Exp $ 33 | * 34 | * Macros which generate thread local storage handling code in NSS modules. 35 | */ 36 | #ifndef _NSS_TLS_H_ 37 | #define _NSS_TLS_H_ 38 | 39 | #define NSS_TLS_HANDLING(name) \ 40 | static pthread_key_t name##_state_key; \ 41 | static void name##_keyinit(void); \ 42 | static int name##_getstate(struct name##_state **); \ 43 | \ 44 | static void \ 45 | name##_keyinit(void) \ 46 | { \ 47 | (void)_pthread_key_create(&name##_state_key, name##_endstate); \ 48 | } \ 49 | \ 50 | static int \ 51 | name##_getstate(struct name##_state **p) \ 52 | { \ 53 | static struct name##_state st; \ 54 | static pthread_once_t keyinit = PTHREAD_ONCE_INIT; \ 55 | int rv; \ 56 | \ 57 | if (!__isthreaded || _pthread_main_np() != 0) { \ 58 | *p = &st; \ 59 | return (0); \ 60 | } \ 61 | rv = _pthread_once(&keyinit, name##_keyinit); \ 62 | if (rv != 0) \ 63 | return (rv); \ 64 | *p = _pthread_getspecific(name##_state_key); \ 65 | if (*p != NULL) \ 66 | return (0); \ 67 | *p = calloc(1, sizeof(**p)); \ 68 | if (*p == NULL) \ 69 | return (ENOMEM); \ 70 | rv = _pthread_setspecific(name##_state_key, *p); \ 71 | if (rv != 0) { \ 72 | free(*p); \ 73 | *p = NULL; \ 74 | } \ 75 | return (rv); \ 76 | } \ 77 | /* allow the macro invocation to end with a semicolon */ \ 78 | typedef int _##name##_bmVjdGFy 79 | 80 | #endif /* _NSS_TLS_H_ */ 81 | -------------------------------------------------------------------------------- /libtirpc/man/des_crypt.3t: -------------------------------------------------------------------------------- 1 | .\" @(#)des_crypt.3 2.1 88/08/11 4.0 RPCSRC; from 1.16 88/03/02 SMI; 2 | .\" 3 | .Dd October 6, 1987 4 | .Dt DES_CRYPT 3 5 | .Os 6 | .Sh NAME 7 | .Nm des_crypt , ecb_crypt , cbc_crypt , des_setparity 8 | .Nd "fast DES encryption" 9 | .Sh LIBRARY 10 | .Lb libc 11 | .Sh SYNOPSIS 12 | .In rpc/des_crypt.h 13 | .Ft int 14 | .Fn ecb_crypt "char *key" "char *data" "unsigned datalen" "unsigned mode" 15 | .Ft int 16 | .Fn cbc_crypt "char *key" "char *data" "unsigned datalen" "unsigned mode" "char *ivec" 17 | .Ft void 18 | .Fn des_setparity "char *key" 19 | .Sh DESCRIPTION 20 | The 21 | .Fn ecb_crypt 22 | and 23 | .Fn cbc_crypt 24 | functions 25 | implement the 26 | .Tn NBS 27 | .Tn DES 28 | (Data Encryption Standard). 29 | These routines are faster and more general purpose than 30 | .Xr crypt 3 . 31 | They also are able to utilize 32 | .Tn DES 33 | hardware if it is available. 34 | The 35 | .Fn ecb_crypt 36 | function 37 | encrypts in 38 | .Tn ECB 39 | (Electronic Code Book) 40 | mode, which encrypts blocks of data independently. 41 | The 42 | .Fn cbc_crypt 43 | function 44 | encrypts in 45 | .Tn CBC 46 | (Cipher Block Chaining) 47 | mode, which chains together 48 | successive blocks. 49 | .Tn CBC 50 | mode protects against insertions, deletions and 51 | substitutions of blocks. 52 | Also, regularities in the clear text will 53 | not appear in the cipher text. 54 | .Pp 55 | Here is how to use these routines. 56 | The first argument, 57 | .Fa key , 58 | is the 8-byte encryption key with parity. 59 | To set the key's parity, which for 60 | .Tn DES 61 | is in the low bit of each byte, use 62 | .Fn des_setparity . 63 | The second argument, 64 | .Fa data , 65 | contains the data to be encrypted or decrypted. 66 | The 67 | third argument, 68 | .Fa datalen , 69 | is the length in bytes of 70 | .Fa data , 71 | which must be a multiple of 8. 72 | The fourth argument, 73 | .Fa mode , 74 | is formed by 75 | .Em OR Ns 'ing 76 | together some things. 77 | For the encryption direction 78 | .Em OR 79 | in either 80 | .Dv DES_ENCRYPT 81 | or 82 | .Dv DES_DECRYPT . 83 | For software versus hardware 84 | encryption, 85 | .Em OR 86 | in either 87 | .Dv DES_HW 88 | or 89 | .Dv DES_SW . 90 | If 91 | .Dv DES_HW 92 | is specified, and there is no hardware, then the encryption is performed 93 | in software and the routine returns 94 | .Er DESERR_NOHWDEVICE . 95 | For 96 | .Fn cbc_crypt , 97 | the 98 | .Fa ivec 99 | argument 100 | is the 8-byte initialization 101 | vector for the chaining. 102 | It is updated to the next initialization 103 | vector upon return. 104 | .Sh ERRORS 105 | .Bl -tag -width [DESERR_NOHWDEVICE] -compact 106 | .It Bq Er DESERR_NONE 107 | No error. 108 | .It Bq Er DESERR_NOHWDEVICE 109 | Encryption succeeded, but done in software instead of the requested hardware. 110 | .It Bq Er DESERR_HWERR 111 | An error occurred in the hardware or driver. 112 | .It Bq Er DESERR_BADPARAM 113 | Bad argument to routine. 114 | .El 115 | .Pp 116 | Given a result status 117 | .Va stat , 118 | the macro 119 | .Fn DES_FAILED stat 120 | is false only for the first two statuses. 121 | .Sh SEE ALSO 122 | .\" .Xr des 1 , 123 | .Xr crypt 3 124 | .Sh RESTRICTIONS 125 | These routines are not available in RPCSRC 4.0. 126 | This information is provided to describe the 127 | .Tn DES 128 | interface expected by 129 | Secure RPC. 130 | -------------------------------------------------------------------------------- /libtirpc/tirpc/rpc/auth_unix.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009, Sun Microsystems, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * - Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * - Redistributions in binary form must reproduce the above copyright notice, 10 | * this list of conditions and the following disclaimer in the documentation 11 | * and/or other materials provided with the distribution. 12 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | * 28 | * from: @(#)auth_unix.h 1.8 88/02/08 SMI 29 | * from: @(#)auth_unix.h 2.2 88/07/29 4.0 RPCSRC 30 | * $FreeBSD: src/include/rpc/auth_unix.h,v 1.11 2002/03/23 17:24:55 imp Exp $ 31 | */ 32 | 33 | /* 34 | * auth_unix.h, Protocol for UNIX style authentication parameters for RPC 35 | * 36 | * Copyright (C) 1984, Sun Microsystems, Inc. 37 | */ 38 | 39 | /* 40 | * The system is very weak. The client uses no encryption for it 41 | * credentials and only sends null verifiers. The server sends backs 42 | * null verifiers or optionally a verifier that suggests a new short hand 43 | * for the credentials. 44 | */ 45 | 46 | #ifndef _TIRPC_AUTH_UNIX_H 47 | #define _TIRPC_AUTH_UNIX_H 48 | #ifndef _WINTIRPC 49 | #include 50 | #endif /* !_WINTIRPC */ 51 | 52 | /* The machine name is part of a credential; it may not exceed 255 bytes */ 53 | #define MAX_MACHINE_NAME 255 54 | 55 | /* gids compose part of a credential; there may not be more than 16 of them */ 56 | #define NGRPS 16 57 | 58 | /* 59 | * Unix style credentials. 60 | */ 61 | struct authunix_parms { 62 | u_long aup_time; 63 | char *aup_machname; 64 | uid_t aup_uid; 65 | gid_t aup_gid; 66 | u_int aup_len; 67 | gid_t *aup_gids; 68 | }; 69 | 70 | #define authsys_parms authunix_parms 71 | 72 | __BEGIN_DECLS 73 | extern bool_t xdr_authunix_parms(XDR *, struct authunix_parms *); 74 | __END_DECLS 75 | 76 | /* 77 | * If a response verifier has flavor AUTH_SHORT, 78 | * then the body of the response verifier encapsulates the following structure; 79 | * again it is serialized in the obvious fashion. 80 | */ 81 | struct short_hand_verf { 82 | struct opaque_auth new_cred; 83 | }; 84 | 85 | #endif /* !_TIRPC_AUTH_UNIX_H */ 86 | -------------------------------------------------------------------------------- /libtirpc/src/svc_run.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009, Sun Microsystems, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * - Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * - Redistributions in binary form must reproduce the above copyright notice, 10 | * this list of conditions and the following disclaimer in the documentation 11 | * and/or other materials provided with the distribution. 12 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | /* 30 | * This is the rpc server side idle loop 31 | * Wait for input, call server program. 32 | */ 33 | #include 34 | #ifndef _WINTIRPC 35 | #include 36 | #endif /* !_WINTIRPC */ 37 | #include 38 | #ifndef _WINTIRPC 39 | #include 40 | #endif /* !_WINTIRPC */ 41 | #include 42 | #include 43 | #include 44 | #include 45 | #ifndef _WINTIRPC 46 | #include 47 | #endif /* !_WINTIRPC */ 48 | 49 | #include 50 | #include "rpc_com.h" 51 | #ifndef _WINTIRPC 52 | #include 53 | #endif /* !_WINTIRPC */ 54 | 55 | void 56 | svc_run() 57 | { 58 | fd_set readfds, cleanfds; 59 | struct timeval timeout; 60 | extern rwlock_t svc_fd_lock; 61 | 62 | 63 | for (;;) { 64 | rwlock_rdlock(&svc_fd_lock); 65 | readfds = svc_fdset; 66 | cleanfds = svc_fdset; 67 | rwlock_rdunlock(&svc_fd_lock); 68 | timeout.tv_sec = 30; 69 | timeout.tv_usec = 0; 70 | switch (select(svc_maxfd+1, &readfds, NULL, NULL, &timeout)) { 71 | case SOCKET_ERROR: 72 | FD_ZERO(&readfds); 73 | if (WSAGetLastError() == WSAEINTR) { 74 | continue; 75 | } 76 | // XXX warn("svc_run: - select failed"); 77 | return; 78 | case 0: 79 | __svc_clean_idle(&cleanfds, 30, FALSE); 80 | continue; 81 | default: 82 | svc_getreqset(&readfds); 83 | } 84 | } 85 | } 86 | 87 | /* 88 | * This function causes svc_run() to exit by telling it that it has no 89 | * more work to do. 90 | */ 91 | void 92 | svc_exit() 93 | { 94 | extern rwlock_t svc_fd_lock; 95 | 96 | rwlock_wrlock(&svc_fd_lock); 97 | FD_ZERO(&svc_fdset); 98 | rwlock_wrunlock(&svc_fd_lock); 99 | } 100 | -------------------------------------------------------------------------------- /libtirpc/src/pmap_getmaps.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009, Sun Microsystems, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * - Redistributions of source code must retain the above copyright notice, 8 | * this list of conditions and the following disclaimer. 9 | * - Redistributions in binary form must reproduce the above copyright notice, 10 | * this list of conditions and the following disclaimer in the documentation 11 | * and/or other materials provided with the distribution. 12 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 13 | * contributors may be used to endorse or promote products derived 14 | * from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | * POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #ifndef _WINTIRPC 30 | #include 31 | #endif /* !_WINTIRPC */ 32 | 33 | /* 34 | * pmap_getmap.c 35 | * Client interface to pmap rpc service. 36 | * contains pmap_getmaps, which is only tcp service involved 37 | * 38 | * Copyright (C) 1984, Sun Microsystems, Inc. 39 | */ 40 | 41 | #include 42 | #include 43 | #ifndef _WINTIRPC 44 | #include 45 | #include 46 | 47 | #include 48 | #include 49 | #endif /* !_WINTIRPC */ 50 | 51 | #include 52 | #include 53 | #ifndef _WINTIRPC 54 | #endif /* !_WINTIRPC */ 55 | #include 56 | #ifndef _WINTIRPC 57 | #include 58 | #endif /* !_WINTIRPC */ 59 | 60 | #include 61 | #include 62 | #include 63 | #ifndef _WINTIRPC 64 | #include 65 | #endif /* !_WINTIRPC */ 66 | #define NAMELEN 255 67 | #define MAX_BROADCAST_SIZE 1400 68 | 69 | /* 70 | * Get a copy of the current port maps. 71 | * Calls the pmap service remotely to do get the maps. 72 | */ 73 | struct pmaplist * 74 | pmap_getmaps(struct sockaddr_in *address) 75 | { 76 | struct pmaplist *head = NULL; 77 | int sock = -1; 78 | struct timeval minutetimeout; 79 | CLIENT *client; 80 | 81 | assert(address != NULL); 82 | 83 | minutetimeout.tv_sec = 60; 84 | minutetimeout.tv_usec = 0; 85 | address->sin_port = htons(PMAPPORT); 86 | client = clnttcp_create(address, PMAPPROG, 87 | PMAPVERS, &sock, 50, 500); 88 | if (client != NULL) { 89 | if (CLNT_CALL(client, (rpcproc_t)PMAPPROC_DUMP, 90 | (xdrproc_t)xdr_void, NULL, 91 | (xdrproc_t)xdr_pmaplist, &head, minutetimeout) != 92 | RPC_SUCCESS) { 93 | clnt_perror(client, "pmap_getmaps rpc problem"); 94 | } 95 | CLNT_DESTROY(client); 96 | } 97 | address->sin_port = 0; 98 | return (head); 99 | } -------------------------------------------------------------------------------- /sys/nfs41sys_util.h: -------------------------------------------------------------------------------- 1 | /* NFSv4.1 client for Windows 2 | * Copyright (C) 2012 The Regents of the University of Michigan 3 | * Copyright (C) 2023-2025 Roland Mainz 4 | * 5 | * Olga Kornievskaia 6 | * Casey Bodley 7 | * Roland Mainz 8 | * 9 | * This library is free software; you can redistribute it and/or modify it 10 | * under the terms of the GNU Lesser General Public License as published by 11 | * the Free Software Foundation; either version 2.1 of the License, or (at 12 | * your option) any later version. 13 | * 14 | * This library is distributed in the hope that it will be useful, but 15 | * without any warranty; without even the implied warranty of merchantability 16 | * or fitness for a particular purpose. See the GNU Lesser General Public 17 | * License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public License 20 | * along with this library; if not, write to the Free Software Foundation, 21 | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 22 | */ 23 | 24 | #ifndef _NFS41SYS_UTIL_H_ 25 | #define _NFS41SYS_UTIL_H_ 1 26 | 27 | #include "nfs41_build_features.h" 28 | 29 | #include 30 | 31 | static INLINE BOOL AnsiStrEq( 32 | IN const ANSI_STRING *lhs, 33 | IN const CHAR *rhs, 34 | IN const UCHAR rhs_len) 35 | { 36 | return lhs->Length == rhs_len && 37 | RtlCompareMemory(lhs->Buffer, rhs, rhs_len) == rhs_len; 38 | } 39 | 40 | /* convert strings from unicode -> ansi during marshalling to 41 | * save space in the upcall buffers and avoid extra copies */ 42 | static INLINE ULONG length_as_utf8( 43 | PCUNICODE_STRING str) 44 | { 45 | ULONG ActualCount = 0; 46 | RtlUnicodeToUTF8N(NULL, 0xffff, &ActualCount, str->Buffer, str->Length); 47 | /* Length of length field + string length + '\0'*/ 48 | return sizeof(USHORT) + ActualCount + 1; 49 | } 50 | 51 | /* Prototypes */ 52 | BOOLEAN isFilenameTooLong( 53 | PUNICODE_STRING name, 54 | PNFS41_V_NET_ROOT_EXTENSION pVNetRootContext); 55 | BOOLEAN isStream( 56 | PUNICODE_STRING name); 57 | BOOLEAN is_root_directory( 58 | PRX_CONTEXT RxContext); 59 | NTSTATUS nfs41_ProbeAndLockKernelPages( 60 | __inout PMDL MemoryDescriptorList, 61 | __in LOCK_OPERATION Operation); 62 | NTSTATUS nfs41_UnlockKernelPages( 63 | __inout PMDL MemoryDescriptorList); 64 | NTSTATUS nfs41_MapLockedPagesInNfsDaemonAddressSpace( 65 | __inout PVOID *outbuf, 66 | __in PMDL MemoryDescriptorList, 67 | __in MEMORY_CACHING_TYPE CacheType, 68 | __in ULONG Priority); 69 | NTSTATUS nfs41_UnmapLockedKernelPagesInNfsDaemonAddressSpace( 70 | __in PVOID BaseAddress, 71 | __in PMDL MemoryDescriptorList); 72 | PQUERY_ON_CREATE_ECP_CONTEXT get_queryoncreateecpcontext( 73 | __in PIRP Irp); 74 | _Success_(return == true) bool 75 | get_primarygroup_id( 76 | _Out_writes_bytes_(MAX_SID_BUFFER_SIZE) SID *restrict ret_sid); 77 | void qocec_file_stat_information( 78 | OUT QUERY_ON_CREATE_FILE_STAT_INFORMATION *restrict qocfsi, 79 | IN const NFS41_FCB *restrict nfs41_fcb); 80 | #ifdef NFS41_DRIVER_WSL_SUPPORT 81 | void qocec_file_stat_lx_information( 82 | OUT QUERY_ON_CREATE_FILE_LX_INFORMATION *restrict qocflxi, 83 | IN const NFS41_FCB *restrict nfs41_fcb, 84 | IN const NFS41_V_NET_ROOT_EXTENSION *restrict pVNetRootContext); 85 | #endif /* NFS41_DRIVER_WSL_SUPPORT */ 86 | 87 | #endif /* !_NFS41SYS_UTIL_H_ */ 88 | -------------------------------------------------------------------------------- /tests/wintartests/wintartest_comparewinvsgnu001.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # MIT License 5 | # 6 | # Copyright (c) 2023-2025 Roland Mainz 7 | # 8 | # Permission is hereby granted, free of charge, to any person obtaining a copy 9 | # of this software and associated documentation files (the "Software"), to deal 10 | # in the Software without restriction, including without limitation the rights 11 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | # copies of the Software, and to permit persons to whom the Software is 13 | # furnished to do so, subject to the following conditions: 14 | # 15 | # The above copyright notice and this permission notice shall be included in all 16 | # copies or substantial portions of the Software. 17 | # 18 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | # SOFTWARE. 25 | # 26 | 27 | # 28 | # wintartest_comparewinvsgnu001.bash - filesystem test 29 | # which compares files unpacked by /cygdrive/c/Windows/system32/tar 30 | # and /usr/bin/tar, and checks whether files have same hashes 31 | # 32 | # Written by Roland Mainz 33 | # 34 | 35 | # 36 | # Notes: 37 | # - Genreate test tar.bz2 files like this: 38 | # $ seq 1000000 >10000seq.txt ; tar -cvf - 10000seq.txt | bzip2 -9 >10000seq.tar.bz2 39 | # - Compare individual files with 40 | # $ diff -u <(od -x -v cygwintar/bin/ksh93.exe) <(od -x -v wintar/bin/ksh93.exe) 41 | # 42 | 43 | export PATH='/bin:/usr/bin' 44 | 45 | # set umask=0000 to avoid permission madness on SMB 46 | umask 0000 47 | 48 | typeset intarfile="$1" 49 | typeset f 50 | typeset -i num_failed_hash_compare=0 51 | 52 | if [[ ! -x '/cygdrive/c/Windows/system32/tar' ]] ; then 53 | printf $"%s: %s not found.\n" \ 54 | "$0" '/cygdrive/c/Windows/system32/tar' 1>&2 55 | exit 1 56 | fi 57 | 58 | if [[ ! -r "$intarfile" ]] ; then 59 | printf $"%s: Input file %q not readable.\n" \ 60 | "$0" "$intarfile" 1>&2 61 | exit 1 62 | fi 63 | 64 | typeset IFS=$'\n' 65 | 66 | set -o xtrace 67 | set -o errexit 68 | 69 | intarfile="$(realpath "$intarfile")" 70 | 71 | rm -Rf 'wintar_tmp' 'cygwintar_tmp' 72 | mkdir 'wintar_tmp' 'cygwintar_tmp' 73 | 74 | cd 'wintar_tmp' 75 | /cygdrive/c/Windows/system32/tar -xvf "$(cygpath -w "$intarfile")" 76 | cd '..' 77 | 78 | cd 'cygwintar_tmp' 79 | /usr/bin/tar -xvf "$intarfile" 80 | cd '..' 81 | 82 | typeset -a file_list=( 83 | $(cd 'cygwintar_tmp' && find . -type f) 84 | ) 85 | 86 | set +o xtrace +o errexit 87 | 88 | for f in "${file_list[@]}" ; do 89 | IFS=' ' read wintar_hash dummy < <(openssl md5 -r "wintar_tmp/$f") 90 | IFS=' ' read cygwintar_hash dummy < <(openssl md5 -r "cygwintar_tmp/$f") 91 | 92 | if [[ "$wintar_hash" == "$cygwintar_hash" ]] ; then 93 | printf $"NOTE:\tHashes for file %q OK\n" "$f" 94 | else 95 | printf $"ERROR:\tHashes for file %q differ, wintar_hash(%s) != cygwintar_hash(%s)\n" \ 96 | "$f" "$wintar_hash" "$cygwintar_hash" 97 | (( num_failed_hash_compare++ )) 98 | fi 99 | done 100 | 101 | exit $((num_failed_hash_compare > 0?1:0)) 102 | -------------------------------------------------------------------------------- /libtirpc/tirpc/rpc/rpc_com.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: rpc_com.h,v 1.3 2000/12/10 04:10:08 christos Exp $ */ 2 | /* $FreeBSD: src/include/rpc/rpc_com.h,v 1.6 2003/01/16 07:13:51 mbr Exp $ */ 3 | 4 | /* 5 | * Copyright (c) 2009, Sun Microsystems, Inc. 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions are met: 10 | * - Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * - Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | /* 32 | * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. 33 | */ 34 | 35 | /* 36 | * rpc_com.h, Common definitions for both the server and client side. 37 | * All for the topmost layer of rpc 38 | * 39 | */ 40 | 41 | #ifndef _RPC_RPCCOM_H 42 | #define _RPC_RPCCOM_H 43 | 44 | #ifndef _WINTIRPC 45 | #include 46 | #endif /* !_WINTIRPC */ 47 | 48 | /* #pragma ident "@(#)rpc_com.h 1.11 93/07/05 SMI" */ 49 | 50 | /* 51 | * The max size of the transport, if the size cannot be determined 52 | * by other means. 53 | */ 54 | #define RPC_MAXDATASIZE 9000 55 | #define RPC_MAXADDRSIZE 1024 56 | 57 | //#ifdef _WINTIRPC 58 | //#define __RPC_GETXID(now) ((u_int32_t)_getpid() ^ (u_int32_t)(now)->tv_sec ^ \ 59 | // (u_int32_t)(now)->tv_usec) 60 | //#else 61 | #define __RPC_GETXID(now) ((u_int32_t)getpid() ^ (u_int32_t)(now)->tv_sec ^ \ 62 | (u_int32_t)(now)->tv_usec) 63 | //#endif 64 | 65 | __BEGIN_DECLS 66 | extern u_int __rpc_get_a_size(int); 67 | extern int __rpc_dtbsize(void); 68 | extern int _rpc_dtablesize(void); 69 | extern struct netconfig * __rpcgettp(int); 70 | extern int __rpc_get_default_domain(char **); 71 | 72 | char *__rpc_taddr2uaddr_af(int, const struct netbuf *); 73 | struct netbuf *__rpc_uaddr2taddr_af(int, const char *); 74 | int __rpc_fixup_addr(struct netbuf *, const struct netbuf *); 75 | int __rpc_sockinfo2netid(struct __rpc_sockinfo *, const char **); 76 | int __rpc_seman2socktype(int); 77 | int __rpc_socktype2seman(int); 78 | void *rpc_nullproc(CLIENT *); 79 | int __rpc_sockisbound(int); 80 | 81 | struct netbuf *__rpcb_findaddr(rpcprog_t, rpcvers_t, const struct netconfig *, 82 | const char *, CLIENT **); 83 | bool_t rpc_control(int,void *); 84 | 85 | char *_get_next_token(char *, int); 86 | 87 | __END_DECLS 88 | 89 | #endif /* _RPC_RPCCOM_H */ 90 | -------------------------------------------------------------------------------- /tests/tests_software_compat.txt: -------------------------------------------------------------------------------- 1 | # 2 | # ms-nfs41-client software compatibility notes 3 | # 4 | 5 | # Name: MSYS2 6 | # Version: msys2-20250830 7 | # Download URL/x86_64: https://github.com/msys2/msys2-installer/releases/download/2025-08-30/msys2-x86_64-20250830.exe 8 | # Download URL/ARM64: https://github.com/msys2/msys2-installer/releases/download/2025-08-30/msys2-arm64-20250830.exe 9 | # Can use NFS for data storage: yes 10 | # Software can be installed on NFS: Yes, requires global-mount 11 | # Notes: 12 | # - Installation works on case-sensitive NFS filesystems mounted as global mount 13 | # - After installation 14 | # - edit /etc/pacman.conf and set "SigLevel = Never", because due to a Cygwin/MSYS2 bug there is a mismatch 15 | # between Cygwin/MSYS2 POSIX uid/gid and Win32 owner/owner_group SIDs 16 | # - chmod a+rwxt /tmp 17 | # 18 | 19 | # Name: FireFox 20 | # Version: FireFox 143.0b9 21 | # Download URL: https://download-installer.cdn.mozilla.net/pub/firefox/releases/143.0b9/win64/de/Firefox%20Setup%20143.0b9.exe 22 | # Can use NFS for data storage: yes 23 | # Software can be installed on NFS: Yes, requires global-mount, requires case-insensitive filesystem 24 | # Notes: 25 | # - Requires case-insensitive filesystem for installation on NFS because DLL 26 | # are stored with a different case than they are loaded 27 | # - Requires global-mount, because installer uses different, evelated logon than the caller 28 | # - The *.msi installer does not provide an option to install to a non-standard location, so the *.exe installer is needed 29 | # 30 | 31 | # Name: Seamonkey 32 | # Version: 33 | # Download URL: https://archive.seamonkey-project.org/releases/2.53.21/win64/de/seamonkey-2.53.21.de.win64.installer.exe 34 | # Can use NFS for data storage: yes 35 | # Software can be installed on NFS: Yes, requires global-mount, requires case-insensitive filesystem 36 | # Notes: 37 | # - Requires case-insensitive filesystem for installation on NFS because DLL 38 | # are stored with a different case than they are loaded 39 | # - Requires global-mount, because installer uses different, evelated logon than the caller 40 | # 41 | 42 | # Name: VMware Workstation 43 | # Version: VMware-workstation-full-17.5.0-22583795 44 | # Installer: VMware-workstation-full-17.5.0-22583795.exe 45 | # Download URL: XXX 46 | # Can use NFS for data storage: yes 47 | # Software can be installed on NFS: Yes, requires global-mount, requires case-insensitive filesystem 48 | # Notes: 49 | # - Requires case-insensitive filesystem for installation on NFS because DLL 50 | # are stored with a different case than they are loaded 51 | # - Requires global-mount, because installer uses different, evelated logon than the caller 52 | # 53 | 54 | # Name: Wireshark 55 | # Version: Wireshark-4.4.3-x64 56 | # Installer: Wireshark-4.4.3-x64.exe 57 | # Download URL: 58 | # Can use NFS for data storage: yes 59 | # Software can be installed on NFS: Yes, requires global-mount, requires case-insensitive filesystem 60 | # Notes: 61 | # - Requires case-insensitive filesystem for installation on NFS because DLL 62 | # are stored with a different case than they are loaded 63 | # - Requires global-mount, because installer uses different, evelated logon than the caller 64 | # 65 | 66 | # Name: JAVA SDK 67 | # Version: jdk-23_windows-x64 68 | # Installer: jdk-23_windows-x64_bin.msi 69 | # Download URL: 70 | # Can use NFS for data storage: yes 71 | # Software can be installed on NFS: No, MSI installer fails to unpack the files 72 | # Notes: 73 | # - MSI installer fails to unpack the files 74 | # - running java software via *.class or *.jar works fine, even on case-sensive filesystems 75 | # 76 | 77 | 78 | 79 | # EOF. 80 | -------------------------------------------------------------------------------- /tests/winfstest/0001-winfstest-Update-VS-project-file-to-VS19-and-make-fi.patch: -------------------------------------------------------------------------------- 1 | From 1774b2b23a49a1a5d672b624fe3750b6f04b818d Mon Sep 17 00:00:00 2001 2 | From: Roland Mainz 3 | Date: Sat, 6 Jan 2024 20:02:20 +0100 4 | Subject: [PATCH] winfstest: Update VS project file to VS19 and make files 5 | executable 6 | 7 | Update Visual Studio project file to Visual Studio 19 and make 8 | script files executable 9 | 10 | (requires https://github.com/dimov-cz/winfstest.git commit 11 | id #525f878c06c585619eadd769c8ed9dcdf175b026) 12 | 13 | Signed-off-by: Cedric Blancher 14 | --- 15 | TestSuite/run-winfstest | 3 +++ 16 | TestSuite/simpletap.py | 0 17 | TestSuite/winfstest.py | 0 18 | winfstest/winfstest.vcxproj | 10 +++++----- 19 | 4 files changed, 8 insertions(+), 5 deletions(-) 20 | mode change 100644 => 100755 TestSuite/run-winfstest 21 | mode change 100644 => 100755 TestSuite/simpletap.py 22 | mode change 100644 => 100755 TestSuite/winfstest.py 23 | 24 | diff --git a/TestSuite/run-winfstest b/TestSuite/run-winfstest 25 | old mode 100644 26 | new mode 100755 27 | index c7cc19f..8783703 28 | --- a/TestSuite/run-winfstest 29 | +++ b/TestSuite/run-winfstest 30 | @@ -1,5 +1,8 @@ 31 | #!/bin/bash 32 | 33 | +set -o xtrace 34 | +set -o nounset 35 | + 36 | case $(uname) in 37 | CYGWIN*) ;; 38 | *) echo "can only be run on Cygwin" 1>&2; exit 1 39 | diff --git a/TestSuite/simpletap.py b/TestSuite/simpletap.py 40 | old mode 100644 41 | new mode 100755 42 | diff --git a/TestSuite/winfstest.py b/TestSuite/winfstest.py 43 | old mode 100644 44 | new mode 100755 45 | diff --git a/winfstest/winfstest.vcxproj b/winfstest/winfstest.vcxproj 46 | index 6c8cbce..f13facf 100644 47 | --- a/winfstest/winfstest.vcxproj 48 | +++ b/winfstest/winfstest.vcxproj 49 | @@ -21,28 +21,28 @@ 50 | 51 | {71483DEC-695B-4EC8-9007-6E0CA9A0010C} 52 | MakeFileProj 53 | - 10.0.10586.0 54 | + 10.0.19041.0 55 | 56 | 57 | 58 | Application 59 | true 60 | - v140 61 | + v142 62 | 63 | 64 | Makefile 65 | false 66 | - v140 67 | + v142 68 | 69 | 70 | Application 71 | true 72 | - v140 73 | + v142 74 | 75 | 76 | Application 77 | false 78 | - v140 79 | + v142 80 | 81 | 82 | 83 | -- 84 | 2.42.1 85 | -------------------------------------------------------------------------------- /libtirpc/man/netconfig.5: -------------------------------------------------------------------------------- 1 | .Dd November 17, 2000 2 | .Dt NETCONFIG 5 3 | .Os 4 | .Sh NAME 5 | .Nm netconfig 6 | .Nd network configuration data base 7 | .Sh SYNOPSIS 8 | .Pa /etc/netconfig 9 | .Sh DESCRIPTION 10 | The 11 | .Nm 12 | file defines a list of 13 | .Dq transport names , 14 | describing their semantics and protocol. 15 | In 16 | .Fx , 17 | this file is only used by the RPC library code. 18 | .Pp 19 | Entries have the following format: 20 | .Pp 21 | .Ar network_id semantics flags family protoname device libraries 22 | .Pp 23 | Entries consist of the following fields: 24 | .Bl -tag -width network_id 25 | .It Ar network_id 26 | The name of the transport described. 27 | .It Ar semantics 28 | Describes the semantics of the transport. 29 | This can be one of: 30 | .Bl -tag -width tpi_cots_ord -offset indent 31 | .It Sy tpi_clts 32 | Connectionless transport. 33 | .It Sy tpi_cots 34 | Connection-oriented transport 35 | .It Sy tpi_cots_ord 36 | Connection-oriented, ordered transport. 37 | .It Sy tpi_raw 38 | A raw connection. 39 | .El 40 | .It Ar flags 41 | This field is either blank (specified by 42 | .Dq Li - ) , 43 | or contains a 44 | .Dq Li v , 45 | meaning visible to the 46 | .Xr getnetconfig 3 47 | function. 48 | .It Ar family 49 | The protocol family of the transport. 50 | This is currently one of: 51 | .Bl -tag -width loopback -offset indent 52 | .It Sy inet6 53 | The IPv6 54 | .Pq Dv PF_INET6 55 | family of protocols. 56 | .It Sy inet 57 | The IPv4 58 | .Pq Dv PF_INET 59 | family of protocols. 60 | .It Sy loopback 61 | The 62 | .Dv PF_LOCAL 63 | protocol family. 64 | .El 65 | .It Ar protoname 66 | The name of the protocol used for this transport. 67 | Can currently be either 68 | .Sy udp , 69 | .Sy tcp 70 | or empty. 71 | .It Ar device 72 | This field is always empty in 73 | .Fx . 74 | .It Ar libraries 75 | This field is always empty in 76 | .Fx . 77 | .El 78 | .Pp 79 | The order of entries in this file will determine which transport will 80 | be preferred by the RPC library code, given a match on a specified 81 | network type. 82 | For example, if a sample network config file would look like this: 83 | .Bd -literal -offset indent 84 | udp6 tpi_clts v inet6 udp - - 85 | tcp6 tpi_cots_ord v inet6 tcp - - 86 | udp tpi_clts v inet udp - - 87 | tcp tpi_cots_ord v inet tcp - - 88 | rawip tpi_raw - inet - - - 89 | local tpi_cots_ord - loopback - - - 90 | .Ed 91 | .Pp 92 | then using the network type 93 | .Sy udp 94 | in calls to the RPC library function (see 95 | .Xr rpc 3 ) 96 | will make the code first try 97 | .Sy udp6 , 98 | and then 99 | .Sy udp . 100 | .Pp 101 | .Xr getnetconfig 3 102 | and associated functions will parse this file and return structures of 103 | the following format: 104 | .Bd -literal 105 | struct netconfig { 106 | char *nc_netid; /* Network ID */ 107 | unsigned long nc_semantics; /* Semantics (see below) */ 108 | unsigned long nc_flag; /* Flags (see below) */ 109 | char *nc_protofmly; /* Protocol family */ 110 | char *nc_proto; /* Protocol name */ 111 | char *nc_device; /* Network device pathname (unused) */ 112 | unsigned long nc_nlookups; /* Number of lookup libs (unused) */ 113 | char **nc_lookups; /* Names of the libraries (unused) */ 114 | unsigned long nc_unused[9]; /* reserved */ 115 | }; 116 | .Ed 117 | .Sh FILES 118 | .Bl -tag -width /etc/netconfig -compact 119 | .It Pa /etc/netconfig 120 | .El 121 | .Sh SEE ALSO 122 | .Xr getnetconfig 3 , 123 | .Xr getnetpath 3 124 | -------------------------------------------------------------------------------- /libtirpc/tirpc/rpc/rpcb_clnt.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: rpcb_clnt.h,v 1.1 2000/06/02 22:57:56 fvdl Exp $ */ 2 | /* $FreeBSD: src/include/rpc/rpcb_clnt.h,v 1.2 2002/03/23 17:24:55 imp Exp $ */ 3 | 4 | /* 5 | * Copyright (c) 2009, Sun Microsystems, Inc. 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions are met: 10 | * - Redistributions of source code must retain the above copyright notice, 11 | * this list of conditions and the following disclaimer. 12 | * - Redistributions in binary form must reproduce the above copyright notice, 13 | * this list of conditions and the following disclaimer in the documentation 14 | * and/or other materials provided with the distribution. 15 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 16 | * contributors may be used to endorse or promote products derived 17 | * from this software without specific prior written permission. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | * POSSIBILITY OF SUCH DAMAGE. 30 | */ 31 | /* 32 | * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. 33 | */ 34 | 35 | /* 36 | * rpcb_clnt.h 37 | * Supplies C routines to get to rpcbid services. 38 | * 39 | */ 40 | 41 | /* 42 | * Usage: 43 | * success = rpcb_set(program, version, nconf, address); 44 | * success = rpcb_unset(program, version, nconf); 45 | * success = rpcb_getaddr(program, version, nconf, host); 46 | * head = rpcb_getmaps(nconf, host); 47 | * clnt_stat = rpcb_rmtcall(nconf, host, program, version, procedure, 48 | * xdrargs, argsp, xdrres, resp, tout, addr_ptr) 49 | * success = rpcb_gettime(host, timep) 50 | * uaddr = rpcb_taddr2uaddr(nconf, taddr); 51 | * taddr = rpcb_uaddr2uaddr(nconf, uaddr); 52 | */ 53 | 54 | #ifndef _RPC_RPCB_CLNT_H 55 | #define _RPC_RPCB_CLNT_H 56 | 57 | /* #pragma ident "@(#)rpcb_clnt.h 1.13 94/04/25 SMI" */ 58 | /* rpcb_clnt.h 1.3 88/12/05 SMI */ 59 | 60 | #include 61 | #include 62 | __BEGIN_DECLS 63 | extern bool_t rpcb_set(const rpcprog_t, const rpcvers_t, 64 | const struct netconfig *, const struct netbuf *); 65 | extern bool_t rpcb_unset(const rpcprog_t, const rpcvers_t, 66 | const struct netconfig *); 67 | extern rpcblist *rpcb_getmaps(const struct netconfig *, const char *); 68 | extern enum clnt_stat rpcb_rmtcall(const struct netconfig *, 69 | const char *, const rpcprog_t, 70 | const rpcvers_t, const rpcproc_t, 71 | const xdrproc_t, const caddr_t, 72 | const xdrproc_t, const caddr_t, 73 | const struct timeval, 74 | const struct netbuf *); 75 | extern bool_t rpcb_getaddr(const rpcprog_t, const rpcvers_t, 76 | const struct netconfig *, struct netbuf *, 77 | const char *); 78 | extern bool_t rpcb_gettime(const char *, time_t *); 79 | extern char *rpcb_taddr2uaddr(struct netconfig *, struct netbuf *); 80 | extern struct netbuf *rpcb_uaddr2taddr(struct netconfig *, char *); 81 | __END_DECLS 82 | 83 | #endif /* !_RPC_RPCB_CLNT_H */ 84 | -------------------------------------------------------------------------------- /libtirpc/src/asprintf.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2004 Darren Tucker. 2 | * 3 | * Based originally on asprintf.c from OpenBSD: 4 | * Copyright (c) 1997 Todd C. Miller 5 | * 6 | * Permission to use, copy, modify, and distribute this software for any 7 | * purpose with or without fee is hereby granted, provided that the above 8 | * copyright notice and this permission notice appear in all copies. 9 | * 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | */ 18 | 19 | #ifdef _WINTIRPC 20 | #include 21 | #include 22 | #else 23 | extern int vsnprintf(); 24 | #include 25 | #endif /* _WINTIRPC */ 26 | #include 27 | 28 | /* Include vasprintf() if not on your OS. */ 29 | #ifndef HAVE_VASPRINTF 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | #ifndef VA_COPY 37 | # ifdef HAVE_VA_COPY 38 | # define VA_COPY(dest, src) va_copy(dest, src) 39 | # else 40 | # ifdef HAVE___VA_COPY 41 | # define VA_COPY(dest, src) __va_copy(dest, src) 42 | # else 43 | # define VA_COPY(dest, src) (dest) = (src) 44 | # endif 45 | # endif 46 | #endif 47 | 48 | #define INIT_SZ 128 49 | 50 | int 51 | vasprintf(char **str, const char *fmt, va_list ap) 52 | { 53 | int ret = -1; 54 | va_list ap2; 55 | char *string, *newstr; 56 | size_t len; 57 | 58 | VA_COPY(ap2, ap); 59 | if ((string = malloc(INIT_SZ)) == NULL) 60 | goto fail; 61 | 62 | ret = _vsnprintf(string, INIT_SZ, fmt, ap2); 63 | if (ret >= 0 && ret < INIT_SZ) { /* succeeded with initial alloc */ 64 | *str = string; 65 | } else if (ret == INT_MAX || ret < 0) { /* Bad length */ 66 | goto fail; 67 | } else { /* bigger than initial, realloc allowing for nul */ 68 | len = (size_t)ret + 1; 69 | if ((newstr = realloc(string, len)) == NULL) { 70 | free(string); 71 | goto fail; 72 | } else { 73 | va_end(ap2); 74 | VA_COPY(ap2, ap); 75 | ret = _vsnprintf(newstr, len, fmt, ap2); 76 | if (ret >= 0 && (size_t)ret < len) { 77 | *str = newstr; 78 | } else { /* failed with realloc'ed string, give up */ 79 | free(newstr); 80 | goto fail; 81 | } 82 | } 83 | } 84 | va_end(ap2); 85 | return (ret); 86 | 87 | fail: 88 | *str = NULL; 89 | errno = ENOMEM; 90 | va_end(ap2); 91 | return (-1); 92 | } 93 | #endif 94 | 95 | /* Include asprintf() if not on your OS. */ 96 | #ifndef HAVE_ASPRINTF 97 | int asprintf(char **str, const char *fmt, ...) 98 | { 99 | va_list ap; 100 | int ret; 101 | 102 | *str = NULL; 103 | va_start(ap, fmt); 104 | ret = vasprintf(str, fmt, ap); 105 | va_end(ap); 106 | 107 | return ret; 108 | } 109 | #endif 110 | -------------------------------------------------------------------------------- /libtirpc/tirpc/rpc/pmap_clnt.h: -------------------------------------------------------------------------------- 1 | /* $NetBSD: pmap_clnt.h,v 1.9 2000/06/02 22:57:55 fvdl Exp $ */ 2 | 3 | /* 4 | * Copyright (c) 2009, Sun Microsystems, Inc. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions are met: 9 | * - Redistributions of source code must retain the above copyright notice, 10 | * this list of conditions and the following disclaimer. 11 | * - Redistributions in binary form must reproduce the above copyright notice, 12 | * this list of conditions and the following disclaimer in the documentation 13 | * and/or other materials provided with the distribution. 14 | * - Neither the name of Sun Microsystems, Inc. nor the names of its 15 | * contributors may be used to endorse or promote products derived 16 | * from this software without specific prior written permission. 17 | * 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 22 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 | * POSSIBILITY OF SUCH DAMAGE. 29 | * 30 | * from: @(#)pmap_clnt.h 1.11 88/02/08 SMI 31 | * from: @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC 32 | * $FreeBSD: src/include/rpc/pmap_clnt.h,v 1.14 2002/04/28 15:18:45 des Exp $ 33 | */ 34 | 35 | /* 36 | * pmap_clnt.h 37 | * Supplies C routines to get to portmap services. 38 | * 39 | * Copyright (C) 1984, Sun Microsystems, Inc. 40 | */ 41 | 42 | /* 43 | * Usage: 44 | * success = pmap_set(program, version, protocol, port); 45 | * success = pmap_unset(program, version); 46 | * port = pmap_getport(address, program, version, protocol); 47 | * head = pmap_getmaps(address); 48 | * clnt_stat = pmap_rmtcall(address, program, version, procedure, 49 | * xdrargs, argsp, xdrres, resp, tout, port_ptr) 50 | * (works for udp only.) 51 | * clnt_stat = clnt_broadcast(program, version, procedure, 52 | * xdrargs, argsp, xdrres, resp, eachresult) 53 | * (like pmap_rmtcall, except the call is broadcasted to all 54 | * locally connected nets. For each valid response received, 55 | * the procedure eachresult is called. Its form is: 56 | * done = eachresult(resp, raddr) 57 | * bool_t done; 58 | * caddr_t resp; 59 | * struct sockaddr_in raddr; 60 | * where resp points to the results of the call and raddr is the 61 | * address if the responder to the broadcast. 62 | */ 63 | 64 | #ifndef _RPC_PMAP_CLNT_H_ 65 | #define _RPC_PMAP_CLNT_H_ 66 | #ifndef _WINTIRPC 67 | #include 68 | #endif /* !_WINTIRPC */ 69 | 70 | __BEGIN_DECLS 71 | extern bool_t pmap_set(u_long, u_long, int, int); 72 | extern bool_t pmap_unset(u_long, u_long); 73 | extern struct pmaplist *pmap_getmaps(struct sockaddr_in *); 74 | extern enum clnt_stat pmap_rmtcall(struct sockaddr_in *, 75 | u_long, u_long, u_long, 76 | xdrproc_t, caddr_t, 77 | xdrproc_t, caddr_t, 78 | struct timeval, u_long *); 79 | extern enum clnt_stat clnt_broadcast(u_long, u_long, u_long, 80 | xdrproc_t, void *, 81 | xdrproc_t, void *, 82 | resultproc_t); 83 | extern u_short pmap_getport(struct sockaddr_in *, 84 | u_long, u_long, u_int); 85 | __END_DECLS 86 | 87 | #endif /* !_RPC_PMAP_CLNT_H_ */ 88 | --------------------------------------------------------------------------------