From 98544e6ab469a190c4e7c322365cc369c91484fc Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Fri, 21 Nov 2003 07:59:35 +0000 Subject: [PATCH] patch-from-shadow-to-jaltman-bkbox-20031120 This massive patch contains changes in several significant areas for Windows: - the ability to specify the mount point to be something other than /afs - functionality to assist debugging of the NT Services - support for languages other than English (NTLang.bat) - revisions to the Build system to support separate trees for src, obj, dest and free or checked; allow any MS compiler to be used - updates to NSIS installer build - mutex locking added to critical locations - updates to IS5 directory tree creation - update to afswsNetscape_config.sh --- src/GoLast.bat | 928 +++++ src/NTLang.bat | 206 ++ src/NTMakefile | 13 +- .../afs_setup_utils/GetWebDll/ntmakefile | 6 +- src/WINNT/afs_setup_utils/NTMakefile | 51 +- src/WINNT/afs_setup_utils/_isuser/ntmakefile | 17 +- src/WINNT/afs_setup_utils/lang/NTMakefile | 4 +- src/WINNT/afsadmsvr/NTMakefile | 55 +- src/WINNT/afsapplib/NTMakefile | 61 +- src/WINNT/afsapplib/al_creds.cpp | 2 +- src/WINNT/afsapplib/lang/NTMakefile | 5 +- src/WINNT/afsapplib/test/NTMakefile | 5 +- src/WINNT/afsclass/NTMakefile | 29 +- src/WINNT/afsclass/c_set.cpp | 30 +- src/WINNT/afsd/NTMakefile | 145 +- src/WINNT/afsd/afsd.c | 21 +- src/WINNT/afsd/afsd_init.c | 294 +- src/WINNT/afsd/afsd_init.h | 2 +- src/WINNT/afsd/afsd_service.c | 113 +- src/WINNT/afsd/afslogon.c | 7 +- src/WINNT/afsd/cm_buf.c | 35 + src/WINNT/afsd/cm_cell.c | 61 +- src/WINNT/afsd/cm_config.c | 232 +- src/WINNT/afsd/cm_conn.c | 127 +- src/WINNT/afsd/cm_ioctl.c | 127 +- src/WINNT/afsd/cm_ioctl.h | 1 + src/WINNT/afsd/cm_scache.c | 57 +- src/WINNT/afsd/cm_server.c | 43 +- src/WINNT/afsd/fs.c | 93 +- src/WINNT/afsd/fs_utils.c | 32 + src/WINNT/afsd/fs_utils.h | 4 + src/WINNT/afsd/sample/token.c | 582 +-- src/WINNT/afsd/smb.c | 231 +- src/WINNT/afsd/smb3.c | 4 +- src/WINNT/afsd/smb_iocons.h | 4 +- src/WINNT/afsd/smb_ioctl.c | 2 + src/WINNT/afslegal/NTMakefile | 9 +- src/WINNT/afslegal/lang/NTMakefile | 4 +- src/WINNT/afsreg/NTMakefile | 12 +- src/WINNT/afsreg/test/NTMakefile | 9 +- src/WINNT/afssvrcfg/NTMakefile | 66 +- src/WINNT/afssvrcfg/hourglass.h | 41 +- src/WINNT/afssvrcfg/lang/NTMakefile | 6 +- src/WINNT/afssvrcfg/validation.cpp | 268 +- src/WINNT/afssvrcfg/validation.h | 37 +- src/WINNT/afssvrcpa/NTMakefile | 12 +- src/WINNT/afssvrcpa/lang/NTMakefile | 6 +- src/WINNT/afssvrmgr/NTMakefile | 128 +- src/WINNT/afssvrmgr/lang/NTMakefile | 6 +- src/WINNT/afssvrmgr/svr_col.cpp | 2 +- src/WINNT/afsusrmgr/NTMakefile | 74 +- src/WINNT/afsusrmgr/lang/NTMakefile | 6 +- src/WINNT/bosctlsvc/NTMakefile | 7 +- src/WINNT/client_config/NTMakefile | 58 +- src/WINNT/client_config/dlg_automap.cpp | 7 +- src/WINNT/client_config/drivemap.cpp | 37 +- src/WINNT/client_config/lang/NTMakefile | 6 +- src/WINNT/client_config/main.cpp | 3 +- src/WINNT/client_config/resource.h | 1 + src/WINNT/client_config/tab_drives.cpp | 24 +- src/WINNT/client_cpa/NTMakefile | 12 +- src/WINNT/client_cpa/lang/NTMakefile | 4 +- src/WINNT/client_creds/NTMakefile | 40 +- src/WINNT/client_creds/afswiz.cpp | 3 +- src/WINNT/client_creds/lang/NTMakefile | 6 +- src/WINNT/client_creds/main.cpp | 7 +- src/WINNT/client_creds/mounttab.cpp | 15 +- src/WINNT/client_creds/resource.h | 1 + src/WINNT/client_exp/NTMakefile | 62 +- src/WINNT/client_exp/afs_shl_ext.cpp | 170 +- src/WINNT/client_exp/gui2fs.cpp | 66 + src/WINNT/client_exp/gui2fs.h | 1 - src/WINNT/client_exp/hourglass.h | 42 +- src/WINNT/client_exp/lang/NTMakefile | 6 +- .../client_exp/make_symbolic_link_dlg.cpp | 144 + src/WINNT/client_exp/make_symbolic_link_dlg.h | 47 + src/WINNT/client_exp/resource.h | 20 +- src/WINNT/client_exp/shell_ext.cpp | 102 +- src/WINNT/client_exp/shell_ext.h | 2 + src/WINNT/client_exp/stdafx.h | 3 + src/WINNT/client_osi/NTMakefile | 39 +- src/WINNT/client_osi/libosi.hpj | 12 +- src/WINNT/client_osi/osidebug.hpj | 12 +- src/WINNT/client_osi/osilog.c | 14 +- src/WINNT/eventlog/NTMakefile | 8 +- src/WINNT/eventlog/lang/NTMakefile | 5 +- src/WINNT/eventlog/test/NTMakefile | 3 +- .../InstallShield5/CreateISDirTree.bat | 72 +- src/WINNT/install/InstallShield5/NTMakefile | 25 +- src/WINNT/install/NSIS/MakeCommon.bat | 19 +- src/WINNT/install/NSIS/NTMakefile | 17 +- src/WINNT/install/NSIS/OpenAFS.nsi | 486 ++- src/WINNT/install/NSIS/killer.cpp | 380 ++ src/WINNT/install/Win9x/NTMakeFile | 17 +- src/WINNT/license/NTMakefile | 7 +- src/WINNT/license/lang/NTMakefile | 1 + src/WINNT/pthread/NTMakefile | 14 +- src/WINNT/pthread/test/NTMakefile | 7 +- src/WINNT/pthread/test/native.cpp | 800 ++--- src/WINNT/talocale/NTMakefile | 10 +- src/WINNT/win9xpanel/NTMakefile | 17 +- src/afs/NTMakefile | 4 +- src/afsweb/afswsNetscape_config.sh | 803 +++-- src/audit/NTMakefile | 4 +- src/auth/NTMakefile | 52 +- src/auth/test/NTMakefile | 9 +- src/bozo/NTMakefile | 34 +- src/bu_utils/NTMakefile | 8 +- src/bubasics/NTMakefile | 22 +- src/bucoord/NTMakefile | 60 +- src/budb/NTMakefile | 44 +- src/butc/NTMakefile | 26 +- src/butm/NTMakefile | 10 +- src/cmd/NTMakefile | 11 +- src/cmd/test/NTMakefile | 16 +- src/comerr/NTMakefile | 23 +- src/comerr/error_table_nt.h | 24 +- src/comerr/et_lex.lex_nt.c | 3146 ++++++++--------- src/comerr/test/NTMakefile | 11 +- src/config/NTMakefile | 350 +- src/config/NTMakefile.i386_nt40 | 43 +- src/des/NTMakefile | 83 +- src/des/test/NTMakefile | 9 +- src/des_stub/NTMakefile | 2 +- src/dir/NTMakefile | 11 +- src/dir/test/NTMakefile | 5 +- src/finale/NTMakefile | 8 +- src/fsint/NTMakefile | 47 +- src/kauth/NTMakefile | 118 +- src/kauth/test/NTMakefile | 22 +- src/libacl/NTMakefile | 7 +- src/libadmin/NTMakefile | 1 + src/libadmin/adminutil/NTMakefile | 63 +- src/libadmin/bos/NTMakefile | 12 +- src/libadmin/cfg/NTMakefile | 23 +- src/libadmin/cfg/test/NTMakefile | 6 +- src/libadmin/client/NTMakefile | 8 +- src/libadmin/kas/NTMakefile | 11 +- src/libadmin/pts/NTMakefile | 11 +- src/libadmin/test/NTMakefile | 20 +- src/libadmin/vos/NTMakefile | 27 +- src/libafsauthent/NTMakefile | 83 +- src/libafsrpc/NTMakefile | 47 +- src/lwp/NTMakefile | 24 +- src/lwp/test/NTMakefile | 9 +- src/ntbuild.bat | 32 +- src/procmgmt/NTMakefile | 15 +- src/procmgmt/test/NTMakefile | 5 +- src/ptserver/NTMakefile | 48 +- src/rx/NTMakefile | 29 +- src/rx/test/NTMakefile | 10 +- src/rxgen/NTMakefile | 21 +- src/rxkad/NTMakefile | 24 +- src/rxkad/test/NTMakefile | 18 +- src/rxstat/NTMakefile | 12 +- src/shlibafsauthent/NTMakefile | 78 +- src/shlibafsrpc/NTMakefile | 96 +- src/sys/NTMakefile | 3 +- src/sys/pioctl_nt.c | 36 +- src/tbutc/NTMakefile | 85 +- src/tviced/NTMakefile | 25 +- src/ubik/NTMakefile | 44 +- src/update/NTMakefile | 28 +- src/usd/NTMakefile | 6 +- src/usd/test/NTMakefile | 3 +- src/util/NTMakefile | 42 +- src/util/test/NTMakefile | 7 +- src/viced/NTMakefile | 26 +- src/viced/callback.c | 2 +- src/vlserver/NTMakefile | 44 +- src/vol/NTMakefile | 39 +- src/vol/test/NTMakefile | 10 +- src/volser/NTMakefile | 58 +- 173 files changed, 8511 insertions(+), 4868 deletions(-) create mode 100644 src/GoLast.bat create mode 100644 src/NTLang.bat create mode 100644 src/WINNT/client_exp/make_symbolic_link_dlg.cpp create mode 100644 src/WINNT/client_exp/make_symbolic_link_dlg.h create mode 100644 src/WINNT/install/NSIS/killer.cpp diff --git a/src/GoLast.bat b/src/GoLast.bat new file mode 100644 index 000000000..cc10c57a3 --- /dev/null +++ b/src/GoLast.bat @@ -0,0 +1,928 @@ +@CD src\WINNT\install\NSIS +echo Directory - src\WINNT\install\NSIS +@CD src\config +echo Directory - src\config +echo Directory - src\config +echo Directory - c:\src\openafs\openafs-cvs\src\config +echo Directory - c:\src\openafs\openafs-cvs\src\config +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\util +echo Directory - c:\src\openafs\openafs-cvs\src\config +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\util +echo Directory - c:\src\openafs\openafs-cvs\src\comerr +echo Directory - c:\src\openafs\openafs-cvs\src\afs +echo Directory - c:\src\openafs\openafs-cvs\src\cmd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\eventlog +echo Directory - c:\src\openafs\openafs-cvs\src\lwp +echo Directory - c:\src\openafs\openafs-cvs\src\rxgen +echo Directory - c:\src\openafs\openafs-cvs\src\des +echo Directory - c:\src\openafs\openafs-cvs\src\rx +echo Directory - c:\src\openafs\openafs-cvs\src\rxstat +echo Directory - c:\src\openafs\openafs-cvs\src\rxkad +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\pthread +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\fsint +echo Directory - c:\src\openafs\openafs-cvs\src\audit +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\sys +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\auth +echo Directory - c:\src\openafs\openafs-cvs\src\ubik +echo Directory - c:\src\openafs\openafs-cvs\src\ptserver +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\kauth +echo Directory - c:\src\openafs\openafs-cvs\src\vlserver +echo Directory - c:\src\openafs\openafs-cvs\src\usd +echo Directory - c:\src\openafs\openafs-cvs\src\bubasics +echo Directory - c:\src\openafs\openafs-cvs\src\budb +echo Directory - c:\src\openafs\openafs-cvs\src\butm +echo Directory - c:\src\openafs\openafs-cvs\src\dir +echo Directory - c:\src\openafs\openafs-cvs\src\vol +echo Directory - c:\src\openafs\openafs-cvs\src\volser +echo Directory - c:\src\openafs\openafs-cvs\src\viced +echo Directory - c:\src\openafs\openafs-cvs\src\update +echo Directory - c:\src\openafs\openafs-cvs\src\bucoord +echo Directory - c:\src\openafs\openafs-cvs\src\butc +echo Directory - c:\src\openafs\openafs-cvs\src\bozo +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\bosctlsvc +echo Directory - c:\src\openafs\openafs-cvs\src\bu_utils +echo Directory - c:\src\openafs\openafs-cvs\src\libafsrpc +echo Directory - c:\src\openafs\openafs-cvs\src\libafsauthent +echo Directory - c:\src\openafs\openafs-cvs\src\tviced +echo Directory - c:\src\openafs\openafs-cvs\src\config +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\util +echo Directory - c:\src\openafs\openafs-cvs\src\comerr +echo Directory - c:\src\openafs\openafs-cvs\src\afs +echo Directory - c:\src\openafs\openafs-cvs\src\cmd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\eventlog +echo Directory - c:\src\openafs\openafs-cvs\src\lwp +echo Directory - c:\src\openafs\openafs-cvs\src\rxgen +echo Directory - c:\src\openafs\openafs-cvs\src\des +echo Directory - c:\src\openafs\openafs-cvs\src\rx +echo Directory - c:\src\openafs\openafs-cvs\src\rxstat +echo Directory - c:\src\openafs\openafs-cvs\src\rxkad +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\pthread +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\fsint +echo Directory - c:\src\openafs\openafs-cvs\src\audit +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\sys +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\auth +echo Directory - c:\src\openafs\openafs-cvs\src\ubik +echo Directory - c:\src\openafs\openafs-cvs\src\ptserver +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\kauth +echo Directory - c:\src\openafs\openafs-cvs\src\vlserver +echo Directory - c:\src\openafs\openafs-cvs\src\usd +echo Directory - c:\src\openafs\openafs-cvs\src\bubasics +echo Directory - c:\src\openafs\openafs-cvs\src\budb +echo Directory - c:\src\openafs\openafs-cvs\src\butm +echo Directory - c:\src\openafs\openafs-cvs\src\dir +echo Directory - c:\src\openafs\openafs-cvs\src\vol +echo Directory - c:\src\openafs\openafs-cvs\src\volser +echo Directory - c:\src\openafs\openafs-cvs\src\viced +echo Directory - c:\src\openafs\openafs-cvs\src\update +echo Directory - c:\src\openafs\openafs-cvs\src\bucoord +echo Directory - c:\src\openafs\openafs-cvs\src\butc +echo Directory - c:\src\openafs\openafs-cvs\src\bozo +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\bosctlsvc +echo Directory - c:\src\openafs\openafs-cvs\src\bu_utils +echo Directory - c:\src\openafs\openafs-cvs\src\libafsrpc +echo Directory - c:\src\openafs\openafs-cvs\src\libafsauthent +echo Directory - c:\src\openafs\openafs-cvs\src\tviced +echo Directory - c:\src\openafs\openafs-cvs\src\tbutc +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\adminutil +echo Directory - c:\src\openafs\openafs-cvs\src\config +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\util +echo Directory - c:\src\openafs\openafs-cvs\src\comerr +echo Directory - c:\src\openafs\openafs-cvs\src\afs +echo Directory - c:\src\openafs\openafs-cvs\src\cmd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\eventlog +echo Directory - c:\src\openafs\openafs-cvs\src\lwp +echo Directory - c:\src\openafs\openafs-cvs\src\rxgen +echo Directory - c:\src\openafs\openafs-cvs\src\des +echo Directory - c:\src\openafs\openafs-cvs\src\rx +echo Directory - c:\src\openafs\openafs-cvs\src\rxstat +echo Directory - c:\src\openafs\openafs-cvs\src\rxkad +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\pthread +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\fsint +echo Directory - c:\src\openafs\openafs-cvs\src\audit +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\sys +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\auth +echo Directory - c:\src\openafs\openafs-cvs\src\ubik +echo Directory - c:\src\openafs\openafs-cvs\src\ptserver +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\kauth +echo Directory - c:\src\openafs\openafs-cvs\src\vlserver +echo Directory - c:\src\openafs\openafs-cvs\src\usd +echo Directory - c:\src\openafs\openafs-cvs\src\bubasics +echo Directory - c:\src\openafs\openafs-cvs\src\budb +echo Directory - c:\src\openafs\openafs-cvs\src\butm +echo Directory - c:\src\openafs\openafs-cvs\src\dir +echo Directory - c:\src\openafs\openafs-cvs\src\vol +echo Directory - c:\src\openafs\openafs-cvs\src\volser +echo Directory - c:\src\openafs\openafs-cvs\src\viced +echo Directory - c:\src\openafs\openafs-cvs\src\update +echo Directory - c:\src\openafs\openafs-cvs\src\bucoord +echo Directory - c:\src\openafs\openafs-cvs\src\butc +echo Directory - c:\src\openafs\openafs-cvs\src\bozo +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\bosctlsvc +echo Directory - c:\src\openafs\openafs-cvs\src\bu_utils +echo Directory - c:\src\openafs\openafs-cvs\src\libafsrpc +echo Directory - c:\src\openafs\openafs-cvs\src\libafsauthent +echo Directory - c:\src\openafs\openafs-cvs\src\tviced +echo Directory - c:\src\openafs\openafs-cvs\src\tbutc +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\adminutil +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\vos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\client +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\kas +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\pts +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\bos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\cfg +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\test +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\license +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsadmsvr +echo Directory - c:\src\openafs\openafs-cvs\src\config +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\util +echo Directory - c:\src\openafs\openafs-cvs\src\comerr +echo Directory - c:\src\openafs\openafs-cvs\src\afs +echo Directory - c:\src\openafs\openafs-cvs\src\cmd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\eventlog +echo Directory - c:\src\openafs\openafs-cvs\src\lwp +echo Directory - c:\src\openafs\openafs-cvs\src\rxgen +echo Directory - c:\src\openafs\openafs-cvs\src\des +echo Directory - c:\src\openafs\openafs-cvs\src\rx +echo Directory - c:\src\openafs\openafs-cvs\src\rxstat +echo Directory - c:\src\openafs\openafs-cvs\src\rxkad +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\pthread +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\fsint +echo Directory - c:\src\openafs\openafs-cvs\src\audit +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\sys +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\auth +echo Directory - c:\src\openafs\openafs-cvs\src\ubik +echo Directory - c:\src\openafs\openafs-cvs\src\ptserver +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\kauth +echo Directory - c:\src\openafs\openafs-cvs\src\vlserver +echo Directory - c:\src\openafs\openafs-cvs\src\usd +echo Directory - c:\src\openafs\openafs-cvs\src\bubasics +echo Directory - c:\src\openafs\openafs-cvs\src\budb +echo Directory - c:\src\openafs\openafs-cvs\src\butm +echo Directory - c:\src\openafs\openafs-cvs\src\dir +echo Directory - c:\src\openafs\openafs-cvs\src\vol +echo Directory - c:\src\openafs\openafs-cvs\src\volser +echo Directory - c:\src\openafs\openafs-cvs\src\viced +echo Directory - c:\src\openafs\openafs-cvs\src\update +echo Directory - c:\src\openafs\openafs-cvs\src\bucoord +echo Directory - c:\src\openafs\openafs-cvs\src\butc +echo Directory - c:\src\openafs\openafs-cvs\src\bozo +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\bosctlsvc +echo Directory - c:\src\openafs\openafs-cvs\src\bu_utils +echo Directory - c:\src\openafs\openafs-cvs\src\libafsrpc +echo Directory - c:\src\openafs\openafs-cvs\src\libafsauthent +echo Directory - c:\src\openafs\openafs-cvs\src\tviced +echo Directory - c:\src\openafs\openafs-cvs\src\tbutc +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\adminutil +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\vos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\client +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\kas +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\pts +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\bos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\cfg +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\test +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\license +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsadmsvr +echo Directory - c:\src\openafs\openafs-cvs\src\config +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\util +echo Directory - c:\src\openafs\openafs-cvs\src\comerr +echo Directory - c:\src\openafs\openafs-cvs\src\afs +echo Directory - c:\src\openafs\openafs-cvs\src\cmd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\eventlog +echo Directory - c:\src\openafs\openafs-cvs\src\lwp +echo Directory - c:\src\openafs\openafs-cvs\src\rxgen +echo Directory - c:\src\openafs\openafs-cvs\src\des +echo Directory - c:\src\openafs\openafs-cvs\src\rx +echo Directory - c:\src\openafs\openafs-cvs\src\rxstat +echo Directory - c:\src\openafs\openafs-cvs\src\rxkad +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\pthread +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\fsint +echo Directory - c:\src\openafs\openafs-cvs\src\audit +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\sys +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\auth +echo Directory - c:\src\openafs\openafs-cvs\src\ubik +echo Directory - c:\src\openafs\openafs-cvs\src\ptserver +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\kauth +echo Directory - c:\src\openafs\openafs-cvs\src\vlserver +echo Directory - c:\src\openafs\openafs-cvs\src\usd +echo Directory - c:\src\openafs\openafs-cvs\src\bubasics +echo Directory - c:\src\openafs\openafs-cvs\src\budb +echo Directory - c:\src\openafs\openafs-cvs\src\butm +echo Directory - c:\src\openafs\openafs-cvs\src\dir +echo Directory - c:\src\openafs\openafs-cvs\src\vol +echo Directory - c:\src\openafs\openafs-cvs\src\volser +echo Directory - c:\src\openafs\openafs-cvs\src\viced +echo Directory - c:\src\openafs\openafs-cvs\src\update +echo Directory - c:\src\openafs\openafs-cvs\src\bucoord +echo Directory - c:\src\openafs\openafs-cvs\src\butc +echo Directory - c:\src\openafs\openafs-cvs\src\bozo +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\bosctlsvc +echo Directory - c:\src\openafs\openafs-cvs\src\bu_utils +echo Directory - c:\src\openafs\openafs-cvs\src\libafsrpc +echo Directory - c:\src\openafs\openafs-cvs\src\libafsauthent +echo Directory - c:\src\openafs\openafs-cvs\src\tviced +echo Directory - c:\src\openafs\openafs-cvs\src\tbutc +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\adminutil +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\vos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\client +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\kas +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\pts +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\bos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\cfg +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\test +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\license +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsadmsvr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsusrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcfg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcpa +echo Directory - c:\src\openafs\openafs-cvs\src\config +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\util +echo Directory - c:\src\openafs\openafs-cvs\src\comerr +echo Directory - c:\src\openafs\openafs-cvs\src\afs +echo Directory - c:\src\openafs\openafs-cvs\src\cmd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\eventlog +echo Directory - c:\src\openafs\openafs-cvs\src\lwp +echo Directory - c:\src\openafs\openafs-cvs\src\rxgen +echo Directory - c:\src\openafs\openafs-cvs\src\des +echo Directory - c:\src\openafs\openafs-cvs\src\rx +echo Directory - c:\src\openafs\openafs-cvs\src\rxstat +echo Directory - c:\src\openafs\openafs-cvs\src\rxkad +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\pthread +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\fsint +echo Directory - c:\src\openafs\openafs-cvs\src\audit +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\sys +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\auth +echo Directory - c:\src\openafs\openafs-cvs\src\ubik +echo Directory - c:\src\openafs\openafs-cvs\src\ptserver +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\kauth +echo Directory - c:\src\openafs\openafs-cvs\src\vlserver +echo Directory - c:\src\openafs\openafs-cvs\src\usd +echo Directory - c:\src\openafs\openafs-cvs\src\bubasics +echo Directory - c:\src\openafs\openafs-cvs\src\budb +echo Directory - c:\src\openafs\openafs-cvs\src\butm +echo Directory - c:\src\openafs\openafs-cvs\src\dir +echo Directory - c:\src\openafs\openafs-cvs\src\vol +echo Directory - c:\src\openafs\openafs-cvs\src\volser +echo Directory - c:\src\openafs\openafs-cvs\src\viced +echo Directory - c:\src\openafs\openafs-cvs\src\update +echo Directory - c:\src\openafs\openafs-cvs\src\bucoord +echo Directory - c:\src\openafs\openafs-cvs\src\butc +echo Directory - c:\src\openafs\openafs-cvs\src\bozo +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\bosctlsvc +echo Directory - c:\src\openafs\openafs-cvs\src\bu_utils +echo Directory - c:\src\openafs\openafs-cvs\src\libafsrpc +echo Directory - c:\src\openafs\openafs-cvs\src\libafsauthent +echo Directory - c:\src\openafs\openafs-cvs\src\tviced +echo Directory - c:\src\openafs\openafs-cvs\src\tbutc +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\adminutil +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\vos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\client +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\kas +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\pts +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\bos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\cfg +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\test +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\license +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsadmsvr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsusrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcfg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcpa +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\config +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\util +echo Directory - c:\src\openafs\openafs-cvs\src\comerr +echo Directory - c:\src\openafs\openafs-cvs\src\afs +echo Directory - c:\src\openafs\openafs-cvs\src\cmd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\eventlog +echo Directory - c:\src\openafs\openafs-cvs\src\lwp +echo Directory - c:\src\openafs\openafs-cvs\src\rxgen +echo Directory - c:\src\openafs\openafs-cvs\src\des +echo Directory - c:\src\openafs\openafs-cvs\src\rx +echo Directory - c:\src\openafs\openafs-cvs\src\rxstat +echo Directory - c:\src\openafs\openafs-cvs\src\rxkad +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\pthread +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\fsint +echo Directory - c:\src\openafs\openafs-cvs\src\audit +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\sys +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\auth +echo Directory - c:\src\openafs\openafs-cvs\src\ubik +echo Directory - c:\src\openafs\openafs-cvs\src\ptserver +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\kauth +echo Directory - c:\src\openafs\openafs-cvs\src\vlserver +echo Directory - c:\src\openafs\openafs-cvs\src\usd +echo Directory - c:\src\openafs\openafs-cvs\src\bubasics +echo Directory - c:\src\openafs\openafs-cvs\src\budb +echo Directory - c:\src\openafs\openafs-cvs\src\butm +echo Directory - c:\src\openafs\openafs-cvs\src\dir +echo Directory - c:\src\openafs\openafs-cvs\src\vol +echo Directory - c:\src\openafs\openafs-cvs\src\volser +echo Directory - c:\src\openafs\openafs-cvs\src\viced +echo Directory - c:\src\openafs\openafs-cvs\src\update +echo Directory - c:\src\openafs\openafs-cvs\src\bucoord +echo Directory - c:\src\openafs\openafs-cvs\src\butc +echo Directory - c:\src\openafs\openafs-cvs\src\bozo +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\bosctlsvc +echo Directory - c:\src\openafs\openafs-cvs\src\bu_utils +echo Directory - c:\src\openafs\openafs-cvs\src\libafsrpc +echo Directory - c:\src\openafs\openafs-cvs\src\libafsauthent +echo Directory - c:\src\openafs\openafs-cvs\src\tviced +echo Directory - c:\src\openafs\openafs-cvs\src\tbutc +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\adminutil +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\vos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\client +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\kas +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\pts +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\bos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\cfg +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\test +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\license +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsadmsvr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsusrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcfg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcpa +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\config +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\util +echo Directory - c:\src\openafs\openafs-cvs\src\comerr +echo Directory - c:\src\openafs\openafs-cvs\src\afs +echo Directory - c:\src\openafs\openafs-cvs\src\cmd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\eventlog +echo Directory - c:\src\openafs\openafs-cvs\src\lwp +echo Directory - c:\src\openafs\openafs-cvs\src\rxgen +echo Directory - c:\src\openafs\openafs-cvs\src\des +echo Directory - c:\src\openafs\openafs-cvs\src\rx +echo Directory - c:\src\openafs\openafs-cvs\src\rxstat +echo Directory - c:\src\openafs\openafs-cvs\src\rxkad +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\pthread +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\fsint +echo Directory - c:\src\openafs\openafs-cvs\src\audit +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\sys +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\auth +echo Directory - c:\src\openafs\openafs-cvs\src\ubik +echo Directory - c:\src\openafs\openafs-cvs\src\ptserver +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\kauth +echo Directory - c:\src\openafs\openafs-cvs\src\vlserver +echo Directory - c:\src\openafs\openafs-cvs\src\usd +echo Directory - c:\src\openafs\openafs-cvs\src\bubasics +echo Directory - c:\src\openafs\openafs-cvs\src\budb +echo Directory - c:\src\openafs\openafs-cvs\src\butm +echo Directory - c:\src\openafs\openafs-cvs\src\dir +echo Directory - c:\src\openafs\openafs-cvs\src\vol +echo Directory - c:\src\openafs\openafs-cvs\src\volser +echo Directory - c:\src\openafs\openafs-cvs\src\viced +echo Directory - c:\src\openafs\openafs-cvs\src\update +echo Directory - c:\src\openafs\openafs-cvs\src\bucoord +echo Directory - c:\src\openafs\openafs-cvs\src\butc +echo Directory - c:\src\openafs\openafs-cvs\src\bozo +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\bosctlsvc +echo Directory - c:\src\openafs\openafs-cvs\src\bu_utils +echo Directory - c:\src\openafs\openafs-cvs\src\libafsrpc +echo Directory - c:\src\openafs\openafs-cvs\src\libafsauthent +echo Directory - c:\src\openafs\openafs-cvs\src\tviced +echo Directory - c:\src\openafs\openafs-cvs\src\tbutc +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\adminutil +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\vos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\client +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\kas +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\pts +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\bos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\cfg +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\test +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\license +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsadmsvr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsusrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcfg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcpa +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_cpa +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_config +echo Directory - c:\src\openafs\openafs-cvs\src\config +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\util +echo Directory - c:\src\openafs\openafs-cvs\src\comerr +echo Directory - c:\src\openafs\openafs-cvs\src\afs +echo Directory - c:\src\openafs\openafs-cvs\src\cmd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\eventlog +echo Directory - c:\src\openafs\openafs-cvs\src\lwp +echo Directory - c:\src\openafs\openafs-cvs\src\rxgen +echo Directory - c:\src\openafs\openafs-cvs\src\des +echo Directory - c:\src\openafs\openafs-cvs\src\rx +echo Directory - c:\src\openafs\openafs-cvs\src\rxstat +echo Directory - c:\src\openafs\openafs-cvs\src\rxkad +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\pthread +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\fsint +echo Directory - c:\src\openafs\openafs-cvs\src\audit +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\sys +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\auth +echo Directory - c:\src\openafs\openafs-cvs\src\ubik +echo Directory - c:\src\openafs\openafs-cvs\src\ptserver +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\kauth +echo Directory - c:\src\openafs\openafs-cvs\src\vlserver +echo Directory - c:\src\openafs\openafs-cvs\src\usd +echo Directory - c:\src\openafs\openafs-cvs\src\bubasics +echo Directory - c:\src\openafs\openafs-cvs\src\budb +echo Directory - c:\src\openafs\openafs-cvs\src\butm +echo Directory - c:\src\openafs\openafs-cvs\src\dir +echo Directory - c:\src\openafs\openafs-cvs\src\vol +echo Directory - c:\src\openafs\openafs-cvs\src\volser +echo Directory - c:\src\openafs\openafs-cvs\src\viced +echo Directory - c:\src\openafs\openafs-cvs\src\update +echo Directory - c:\src\openafs\openafs-cvs\src\bucoord +echo Directory - c:\src\openafs\openafs-cvs\src\butc +echo Directory - c:\src\openafs\openafs-cvs\src\bozo +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\bosctlsvc +echo Directory - c:\src\openafs\openafs-cvs\src\bu_utils +echo Directory - c:\src\openafs\openafs-cvs\src\libafsrpc +echo Directory - c:\src\openafs\openafs-cvs\src\libafsauthent +echo Directory - c:\src\openafs\openafs-cvs\src\tviced +echo Directory - c:\src\openafs\openafs-cvs\src\tbutc +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\adminutil +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\vos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\client +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\kas +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\pts +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\bos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\cfg +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\test +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\license +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsadmsvr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsusrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcfg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcpa +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_cpa +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_config +echo Directory - c:\src\openafs\openafs-cvs\src\config +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\util +echo Directory - c:\src\openafs\openafs-cvs\src\comerr +echo Directory - c:\src\openafs\openafs-cvs\src\afs +echo Directory - c:\src\openafs\openafs-cvs\src\cmd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\eventlog +echo Directory - c:\src\openafs\openafs-cvs\src\lwp +echo Directory - c:\src\openafs\openafs-cvs\src\rxgen +echo Directory - c:\src\openafs\openafs-cvs\src\des +echo Directory - c:\src\openafs\openafs-cvs\src\rx +echo Directory - c:\src\openafs\openafs-cvs\src\rxstat +echo Directory - c:\src\openafs\openafs-cvs\src\rxkad +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\pthread +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\fsint +echo Directory - c:\src\openafs\openafs-cvs\src\audit +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\sys +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\auth +echo Directory - c:\src\openafs\openafs-cvs\src\ubik +echo Directory - c:\src\openafs\openafs-cvs\src\ptserver +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\kauth +echo Directory - c:\src\openafs\openafs-cvs\src\vlserver +echo Directory - c:\src\openafs\openafs-cvs\src\usd +echo Directory - c:\src\openafs\openafs-cvs\src\bubasics +echo Directory - c:\src\openafs\openafs-cvs\src\budb +echo Directory - c:\src\openafs\openafs-cvs\src\butm +echo Directory - c:\src\openafs\openafs-cvs\src\dir +echo Directory - c:\src\openafs\openafs-cvs\src\vol +echo Directory - c:\src\openafs\openafs-cvs\src\volser +echo Directory - c:\src\openafs\openafs-cvs\src\viced +echo Directory - c:\src\openafs\openafs-cvs\src\update +echo Directory - c:\src\openafs\openafs-cvs\src\bucoord +echo Directory - c:\src\openafs\openafs-cvs\src\butc +echo Directory - c:\src\openafs\openafs-cvs\src\bozo +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\bosctlsvc +echo Directory - c:\src\openafs\openafs-cvs\src\bu_utils +echo Directory - c:\src\openafs\openafs-cvs\src\libafsrpc +echo Directory - c:\src\openafs\openafs-cvs\src\libafsauthent +echo Directory - c:\src\openafs\openafs-cvs\src\tviced +echo Directory - c:\src\openafs\openafs-cvs\src\tbutc +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\adminutil +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\vos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\client +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\kas +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\pts +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\bos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\cfg +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\test +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\license +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsadmsvr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsusrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcfg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcpa +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_cpa +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_config +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_exp +echo Directory - c:\src\openafs\openafs-cvs\src\config +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\util +echo Directory - c:\src\openafs\openafs-cvs\src\comerr +echo Directory - c:\src\openafs\openafs-cvs\src\afs +echo Directory - c:\src\openafs\openafs-cvs\src\cmd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\eventlog +echo Directory - c:\src\openafs\openafs-cvs\src\lwp +echo Directory - c:\src\openafs\openafs-cvs\src\rxgen +echo Directory - c:\src\openafs\openafs-cvs\src\des +echo Directory - c:\src\openafs\openafs-cvs\src\rx +echo Directory - c:\src\openafs\openafs-cvs\src\rxstat +echo Directory - c:\src\openafs\openafs-cvs\src\rxkad +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\pthread +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\fsint +echo Directory - c:\src\openafs\openafs-cvs\src\audit +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\sys +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\auth +echo Directory - c:\src\openafs\openafs-cvs\src\ubik +echo Directory - c:\src\openafs\openafs-cvs\src\ptserver +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\kauth +echo Directory - c:\src\openafs\openafs-cvs\src\vlserver +echo Directory - c:\src\openafs\openafs-cvs\src\usd +echo Directory - c:\src\openafs\openafs-cvs\src\bubasics +echo Directory - c:\src\openafs\openafs-cvs\src\budb +echo Directory - c:\src\openafs\openafs-cvs\src\butm +echo Directory - c:\src\openafs\openafs-cvs\src\dir +echo Directory - c:\src\openafs\openafs-cvs\src\vol +echo Directory - c:\src\openafs\openafs-cvs\src\volser +echo Directory - c:\src\openafs\openafs-cvs\src\viced +echo Directory - c:\src\openafs\openafs-cvs\src\update +echo Directory - c:\src\openafs\openafs-cvs\src\bucoord +echo Directory - c:\src\openafs\openafs-cvs\src\butc +echo Directory - c:\src\openafs\openafs-cvs\src\bozo +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\bosctlsvc +echo Directory - c:\src\openafs\openafs-cvs\src\bu_utils +echo Directory - c:\src\openafs\openafs-cvs\src\libafsrpc +echo Directory - c:\src\openafs\openafs-cvs\src\libafsauthent +echo Directory - c:\src\openafs\openafs-cvs\src\tviced +echo Directory - c:\src\openafs\openafs-cvs\src\tbutc +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\adminutil +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\vos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\client +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\kas +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\pts +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\bos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\cfg +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\test +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\license +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsadmsvr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsusrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcfg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcpa +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_cpa +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_config +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_exp +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_creds +echo Directory - c:\src\openafs\openafs-cvs\src\config +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\util +echo Directory - c:\src\openafs\openafs-cvs\src\comerr +echo Directory - c:\src\openafs\openafs-cvs\src\afs +echo Directory - c:\src\openafs\openafs-cvs\src\cmd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\eventlog +echo Directory - c:\src\openafs\openafs-cvs\src\lwp +echo Directory - c:\src\openafs\openafs-cvs\src\rxgen +echo Directory - c:\src\openafs\openafs-cvs\src\des +echo Directory - c:\src\openafs\openafs-cvs\src\rx +echo Directory - c:\src\openafs\openafs-cvs\src\rxstat +echo Directory - c:\src\openafs\openafs-cvs\src\rxkad +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\pthread +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\fsint +echo Directory - c:\src\openafs\openafs-cvs\src\audit +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\sys +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\auth +echo Directory - c:\src\openafs\openafs-cvs\src\ubik +echo Directory - c:\src\openafs\openafs-cvs\src\ptserver +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\kauth +echo Directory - c:\src\openafs\openafs-cvs\src\vlserver +echo Directory - c:\src\openafs\openafs-cvs\src\usd +echo Directory - c:\src\openafs\openafs-cvs\src\bubasics +echo Directory - c:\src\openafs\openafs-cvs\src\budb +echo Directory - c:\src\openafs\openafs-cvs\src\butm +echo Directory - c:\src\openafs\openafs-cvs\src\dir +echo Directory - c:\src\openafs\openafs-cvs\src\vol +echo Directory - c:\src\openafs\openafs-cvs\src\volser +echo Directory - c:\src\openafs\openafs-cvs\src\viced +echo Directory - c:\src\openafs\openafs-cvs\src\update +echo Directory - c:\src\openafs\openafs-cvs\src\bucoord +echo Directory - c:\src\openafs\openafs-cvs\src\butc +echo Directory - c:\src\openafs\openafs-cvs\src\bozo +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\bosctlsvc +echo Directory - c:\src\openafs\openafs-cvs\src\bu_utils +echo Directory - c:\src\openafs\openafs-cvs\src\libafsrpc +echo Directory - c:\src\openafs\openafs-cvs\src\libafsauthent +echo Directory - c:\src\openafs\openafs-cvs\src\tviced +echo Directory - c:\src\openafs\openafs-cvs\src\tbutc +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\adminutil +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\vos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\client +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\kas +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\pts +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\bos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\cfg +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\test +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\license +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsadmsvr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsusrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcfg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcpa +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_cpa +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_config +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_exp +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_creds +echo Directory - c:\src\openafs\openafs-cvs\src\finale +echo Directory - c:\src\openafs\openafs-cvs\src\config +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\util +echo Directory - c:\src\openafs\openafs-cvs\src\comerr +echo Directory - c:\src\openafs\openafs-cvs\src\afs +echo Directory - c:\src\openafs\openafs-cvs\src\cmd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\eventlog +echo Directory - c:\src\openafs\openafs-cvs\src\lwp +echo Directory - c:\src\openafs\openafs-cvs\src\rxgen +echo Directory - c:\src\openafs\openafs-cvs\src\des +echo Directory - c:\src\openafs\openafs-cvs\src\rx +echo Directory - c:\src\openafs\openafs-cvs\src\rxstat +echo Directory - c:\src\openafs\openafs-cvs\src\rxkad +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\pthread +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\fsint +echo Directory - c:\src\openafs\openafs-cvs\src\audit +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\sys +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\auth +echo Directory - c:\src\openafs\openafs-cvs\src\ubik +echo Directory - c:\src\openafs\openafs-cvs\src\ptserver +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\kauth +echo Directory - c:\src\openafs\openafs-cvs\src\vlserver +echo Directory - c:\src\openafs\openafs-cvs\src\usd +echo Directory - c:\src\openafs\openafs-cvs\src\bubasics +echo Directory - c:\src\openafs\openafs-cvs\src\budb +echo Directory - c:\src\openafs\openafs-cvs\src\butm +echo Directory - c:\src\openafs\openafs-cvs\src\dir +echo Directory - c:\src\openafs\openafs-cvs\src\vol +echo Directory - c:\src\openafs\openafs-cvs\src\volser +echo Directory - c:\src\openafs\openafs-cvs\src\viced +echo Directory - c:\src\openafs\openafs-cvs\src\update +echo Directory - c:\src\openafs\openafs-cvs\src\bucoord +echo Directory - c:\src\openafs\openafs-cvs\src\butc +echo Directory - c:\src\openafs\openafs-cvs\src\bozo +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\bosctlsvc +echo Directory - c:\src\openafs\openafs-cvs\src\bu_utils +echo Directory - c:\src\openafs\openafs-cvs\src\libafsrpc +echo Directory - c:\src\openafs\openafs-cvs\src\libafsauthent +echo Directory - c:\src\openafs\openafs-cvs\src\tviced +echo Directory - c:\src\openafs\openafs-cvs\src\tbutc +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\adminutil +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\vos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\client +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\kas +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\pts +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\bos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\cfg +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\test +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\license +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsadmsvr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsusrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcfg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcpa +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_cpa +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_config +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_exp +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_creds +echo Directory - c:\src\openafs\openafs-cvs\src\finale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\install\NSIS +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\install\NSIS +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\install\NSIS +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\install\NSIS +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\install\NSIS +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\install\NSIS +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\install\NSIS +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\install\NSIS +echo Directory - c:\src\openafs\openafs-cvs\src\config +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\util +echo Directory - c:\src\openafs\openafs-cvs\src\comerr +echo Directory - c:\src\openafs\openafs-cvs\src\afs +echo Directory - c:\src\openafs\openafs-cvs\src\cmd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsreg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\eventlog +echo Directory - c:\src\openafs\openafs-cvs\src\lwp +echo Directory - c:\src\openafs\openafs-cvs\src\rxgen +echo Directory - c:\src\openafs\openafs-cvs\src\des +echo Directory - c:\src\openafs\openafs-cvs\src\rx +echo Directory - c:\src\openafs\openafs-cvs\src\rxstat +echo Directory - c:\src\openafs\openafs-cvs\src\rxkad +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\pthread +echo Directory - c:\src\openafs\openafs-cvs\src\procmgmt +echo Directory - c:\src\openafs\openafs-cvs\src\fsint +echo Directory - c:\src\openafs\openafs-cvs\src\audit +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\sys +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\auth +echo Directory - c:\src\openafs\openafs-cvs\src\ubik +echo Directory - c:\src\openafs\openafs-cvs\src\ptserver +echo Directory - c:\src\openafs\openafs-cvs\src\libacl +echo Directory - c:\src\openafs\openafs-cvs\src\kauth +echo Directory - c:\src\openafs\openafs-cvs\src\vlserver +echo Directory - c:\src\openafs\openafs-cvs\src\usd +echo Directory - c:\src\openafs\openafs-cvs\src\bubasics +echo Directory - c:\src\openafs\openafs-cvs\src\budb +echo Directory - c:\src\openafs\openafs-cvs\src\butm +echo Directory - c:\src\openafs\openafs-cvs\src\dir +echo Directory - c:\src\openafs\openafs-cvs\src\vol +echo Directory - c:\src\openafs\openafs-cvs\src\volser +echo Directory - c:\src\openafs\openafs-cvs\src\viced +echo Directory - c:\src\openafs\openafs-cvs\src\update +echo Directory - c:\src\openafs\openafs-cvs\src\bucoord +echo Directory - c:\src\openafs\openafs-cvs\src\butc +echo Directory - c:\src\openafs\openafs-cvs\src\bozo +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\bosctlsvc +echo Directory - c:\src\openafs\openafs-cvs\src\bu_utils +echo Directory - c:\src\openafs\openafs-cvs\src\libafsrpc +echo Directory - c:\src\openafs\openafs-cvs\src\libafsauthent +echo Directory - c:\src\openafs\openafs-cvs\src\tviced +echo Directory - c:\src\openafs\openafs-cvs\src\tbutc +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\adminutil +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\vos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\client +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\kas +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\pts +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\bos +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\cfg +echo Directory - c:\src\openafs\openafs-cvs\src\libadmin\test +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\license +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsadmsvr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsusrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrmgr +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcfg +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afssvrcpa +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\talocale +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_osi +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\afsd +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_cpa +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_config +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_exp +echo Directory - c:\src\openafs\openafs-cvs\src\WINNT\client_creds +echo Directory - c:\src\openafs\openafs-cvs\src\finale diff --git a/src/NTLang.bat b/src/NTLang.bat new file mode 100644 index 000000000..d177ba547 --- /dev/null +++ b/src/NTLang.bat @@ -0,0 +1,206 @@ +@echo off +rem Copyright 2000, International Business Machines Corporation and others. +rem All Rights Reserved. +rem +rem This software has been released under the terms of the IBM Public +rem License. For details, see the LICENSE file in the top-level source +rem directory or online at http://www.openafs.org/dl/license10.html + +REM AFS build environment language selection for Windows NT. +REM ######################################################################## + + +REM ######################################################################## +REM Accept language name as an argument; default to English. + +rem # Detect requests for English +rem +if "%1"=="eng" goto en_US +if "%1"=="english" goto en_US +if "%1"=="English" goto en_US +if "%1"=="ENGLISH" goto en_US +if "%1"=="en_US" goto en_US +if "%1"=="EN_US" goto en_US +if "%1"=="en_us" goto en_US +if "%1"=="EN_us" goto en_US +if "%1"=="" goto en_US + +rem # Detect requests for Japanese +rem +if "%1"=="jap" goto ja_JP +if "%1"=="japanese" goto ja_JP +if "%1"=="Japanese" goto ja_JP +if "%1"=="JAPANESE" goto ja_JP +if "%1"=="ja_JP" goto ja_JP +if "%1"=="JA_JP" goto ja_JP +if "%1"=="ja_jp" goto ja_JP +if "%1"=="JA_jp" goto ja_JP + +rem # Detect requests for Korean +rem +if "%1"=="kor" goto ko_KR +if "%1"=="korean" goto ko_KR +if "%1"=="Korean" goto ko_KR +if "%1"=="KOREAN" goto ko_KR +if "%1"=="ko_KR" goto ko_KR +if "%1"=="KO_KR" goto ko_KR +if "%1"=="ko_kr" goto ko_KR +if "%1"=="KO_kr" goto ko_KR + +rem # Detect requests for Chinese (Simplified; PR China) +rem +if "%1"=="chi" goto zh_CN +if "%1"=="chinese" goto zh_CN +if "%1"=="Chinese" goto zh_CN +if "%1"=="CHINESE" goto zh_CN +if "%1"=="zh_CN" goto zh_CN +if "%1"=="ZH_CN" goto zh_CN +if "%1"=="zh_cn" goto zh_CN +if "%1"=="ZH_cn" goto zh_CN + +rem # Detect requests for Chinese (Traditional; Taiwan) +rem +if "%1"=="tai" goto zh_TW +if "%1"=="taiwan" goto zh_TW +if "%1"=="Taiwan" goto zh_TW +if "%1"=="TAIWAN" goto zh_TW +if "%1"=="zh_TW" goto zh_TW +if "%1"=="ZH_TW" goto zh_TW +if "%1"=="zh_tw" goto zh_TW +if "%1"=="ZH_tw" goto zh_TW + +rem # Detect requests for Brazilian Portuguese +rem +if "%1"=="bra" goto pt_BR +if "%1"=="por" goto pt_BR +if "%1"=="brazil" goto pt_BR +if "%1"=="Brazil" goto pt_BR +if "%1"=="BRAZIL" goto pt_BR +if "%1"=="pt_BR" goto pt_BR +if "%1"=="PT_BR" goto pt_BR +if "%1"=="pt_br" goto pt_BR +if "%1"=="PT_br" goto pt_BR + +rem # Detect requests for German +rem +if "%1"=="ger" goto de_DE +if "%1"=="german" goto de_DE +if "%1"=="German" goto de_DE +if "%1"=="GERMAN" goto de_DE +if "%1"=="de_DE" goto de_DE +if "%1"=="DE_DE" goto de_DE +if "%1"=="de_de" goto de_DE +if "%1"=="DE_de" goto de_DE + +rem # Detect requests for Spanish +rem +if "%1"=="esp" goto es_ES +if "%1"=="spa" goto es_ES +if "%1"=="spanish" goto es_ES +if "%1"=="Spanish" goto es_ES +if "%1"=="SPANISH" goto es_ES +if "%1"=="es_es" goto es_ES +if "%1"=="es_ES" goto es_ES +if "%1"=="ES_ES" goto es_ES +if "%1"=="ES_es" goto es_ES + +rem # Complain if we couldn't match the requested language +rem +echo Don't know how to build language %1. +goto end + +rem # Language Identifiers +rem # +rem # LANGNAME: +rem # A simple abbreviation reflecting a language and sublanguage. +rem # Our translation lab picks these and uses them when giving +rem # us back translated files. +rem # +rem # LANGID: +rem # A decimal representation of a 16-bit Win32 LANGID matching that +rem # language and sublanguage. The format and relevant constants are +rem # defined in WINNT.H--the upper 6 bits are the sublanguage, and +rem # the lower 10 bits are the language. For example: +rem # LANG_ENGLISH = 9 +rem # SUBLANG_ENGLISH_US = 1 +rem # LANGID = MAKELANGID(9,1) = 000001 0000001001 = 0x0409 = 1033 +rem # +rem # LANGCP: +rem # The default code page for this language; this value is used when +rem # building a .RC file with the /c switch. You'll have to look these +rem # up in a some table somewhere if you add more languages. +rem + +:en_US +set LANGID=1033 +set LANGNAME=en_US +set LANGCP=1252 +echo Building English resources (%LANGID%, %LANGNAME%) +goto arg2 + +:ja_JP +set LANGID=1041 +set LANGNAME=ja_JP +set LANGCP=932 +echo Building Japanese resources (%LANGID%, %LANGNAME%) +goto arg2_warn + +:ko_KR +set LANGID=1042 +set LANGNAME=ko_KR +set LANGCP=949 +echo Building Korean resources (%LANGID%, %LANGNAME%) +goto arg2_warn + +:zh_CN +set LANGID=2052 +set LANGNAME=zh_CN +set LANGCP=936 +echo Building Chinese (Simplified: PR China) resources (%LANGID%, %LANGNAME%) +goto arg2_warn + +:zh_TW +set LANGID=1028 +set LANGNAME=zh_TW +set LANGCP=950 +echo Building Chinese (Traditional: Taiwan) resources (%LANGID%, %LANGNAME%) +goto arg2_warn + +:pt_BR +set LANGID=1046 +set LANGNAME=pt_BR +set LANGCP=1252 +echo Building Brazilian Portuguese resources (%LANGID%, %LANGNAME%) +goto arg2_warn + +:es_ES +set LANGID=1034 +set LANGNAME=es_ES +set LANGCP=1252 +echo Building Spanish resources (%LANGID%, %LANGNAME%) +goto arg2_warn + +:de_DE +set LANGID=1032 +set LANGNAME=de_DE +set LANGCP=1252 +echo Building German resources (%LANGID%, %LANGNAME%) +goto arg2_warn + +############################################################################### +# Warn the user that ntlang.reg is required to build non-us languages + +:arg2_warn +echo NOTE: If you have not already run WINNT/docs/NTLang.reg, do so now! +goto arg2 + +############################################################################### +# Accept a second command-line argument reflecting a command to execute + +:arg2 +if "%2"=="" goto end +%2 %3 %4 %5 %6 %7 %8 %9 +goto end + +:end +echo. diff --git a/src/NTMakefile b/src/NTMakefile index 997ca655d..9315e2048 100644 --- a/src/NTMakefile +++ b/src/NTMakefile @@ -17,15 +17,12 @@ # update the 'finale' dependency to be the new directory. # These three macros define the source, object, and destination folders - -SRC=src +SRC=$(AFSROOT)\src #If AFS_OBJDIR is not defined then use obj as relative obj folder -!IFDEF AFS_OBJDIR -DESTDIR=$(AFS_OBJDIR)\dest -!ELSE -DESTDIR=obj\dest -AFS_OBJDIR=obj +!IFNDEF AFS_OBJDIR +AFS_OBJDIR=$(AFSROOT)\obj !ENDIF +DESTDIR=$(AFSROOT)\dest CD = cd NTMAKE = nmake /nologo /f ntmakefile install @@ -35,7 +32,7 @@ NTMAKE_OBJS = nmake /nologo /f ntmakefile install_objs MKDIR = mkdir #debug statement support jumping to last know error -DOCD=src\DOLASTCMP.BAT +DOCD=$(SRC)\DOLASTCMP.BAT config: echo ***** $@ diff --git a/src/WINNT/afs_setup_utils/GetWebDll/ntmakefile b/src/WINNT/afs_setup_utils/GetWebDll/ntmakefile index 35e5be39c..abd0d7239 100644 --- a/src/WINNT/afs_setup_utils/GetWebDll/ntmakefile +++ b/src/WINNT/afs_setup_utils/GetWebDll/ntmakefile @@ -1,5 +1,5 @@ # Microsoft Developer Studio Generated NMAKE File, Based on GetWebDll.dsp - +RELDIR=WINNT\afs_setup_utils\GetWebDll !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\..\config\NTMakefile.version @@ -9,8 +9,8 @@ NULL= NULL=nul !ENDIF -OUTDIR=$(OJT) -INTDIR=$(OJT) +OUTDIR=$(OUT) +INTDIR=$(OUT) # Begin Custom Macros OutDir=. # End Custom Macros diff --git a/src/WINNT/afs_setup_utils/NTMakefile b/src/WINNT/afs_setup_utils/NTMakefile index 6c5d1bd51..c5320f673 100644 --- a/src/WINNT/afs_setup_utils/NTMakefile +++ b/src/WINNT/afs_setup_utils/NTMakefile @@ -10,11 +10,10 @@ AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -WX # include the primary makefile - +RELDIR=WINNT\afs_setup_utils !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version - ############################################################################ ILIBDIR = $(DESTDIR)\lib\afs @@ -35,15 +34,15 @@ DOCS_UNINST_DLLFILE = $(DESTDIR)\root.server\usr\afs\bin\DocsUninst.dll # Source files and libraries that are shared by all of the targets. AFSAPPLIBOBJS = \ - $(OJT)\subclass.obj + $(OUT)\subclass.obj DLLOBJS = \ $(AFSAPPLIBOBJS) \ - $(OJT)\progress_dlg.obj \ - $(OJT)\animate_icon.obj \ - $(OJT)\sutil.obj \ - $(OJT)\forceremove.obj \ - $(OJT)\afs_setup_utils_stub.res + $(OUT)\progress_dlg.obj \ + $(OUT)\animate_icon.obj \ + $(OUT)\sutil.obj \ + $(OUT)\forceremove.obj \ + $(OUT)\afs_setup_utils_stub.res VCLIBS = \ comctl32.lib \ @@ -60,7 +59,7 @@ DLLLIBS = \ AFSAPPLIBDIR = ..\..\WINNT\afsapplib -$(OJT)\subclass.obj: $(AFSAPPLIBDIR)\subclass.cpp +$(OUT)\subclass.obj: $(AFSAPPLIBDIR)\subclass.cpp $(C2OBJ) -I$(AFSAPPLIBDIR) $(AFSAPPLIBDIR)\subclass.cpp @@ -70,10 +69,10 @@ $(OJT)\subclass.obj: $(AFSAPPLIBDIR)\subclass.cpp AFSRM_EXEFILE = $(DESTDIR)\bin\afsrm.exe AFSRM_EXEOBJS =\ - $(OJT)\afsrm.obj \ - $(OJT)\forceremove.obj \ - $(OJT)\sutil.obj \ - $(OJT)\AFS_component_version_number.obj + $(OUT)\afsrm.obj \ + $(OUT)\forceremove.obj \ + $(OUT)\sutil.obj \ + $(OUT)\AFS_component_version_number.obj AFSRM_EXELIBS =\ $(DESTDIR)\lib\afs\afsreg.lib \ @@ -110,55 +109,55 @@ $(DIRLANG) :: C2OBJ = $(C2OBJ) -DSERVER_UNINST -$(OJT)\s_afs_setup_utils.obj: afs_setup_utils.cpp +$(OUT)\s_afs_setup_utils.obj: afs_setup_utils.cpp $(C2OBJ) $** -$(OJT)\c_afs_setup_utils.obj: afs_setup_utils.cpp +$(OUT)\c_afs_setup_utils.obj: afs_setup_utils.cpp $(C2OBJ) $** -$(OJT)\cc_afs_setup_utils.obj: afs_setup_utils.cpp +$(OUT)\cc_afs_setup_utils.obj: afs_setup_utils.cpp $(C2OBJ) $** -$(OJT)\lc_afs_setup_utils.obj: afs_setup_utils.cpp +$(OUT)\lc_afs_setup_utils.obj: afs_setup_utils.cpp $(C2OBJ) $** -$(OJT)\d_afs_setup_utils.obj: afs_setup_utils.cpp +$(OUT)\d_afs_setup_utils.obj: afs_setup_utils.cpp $(C2OBJ) $** ############################################################################ -$(INSTALL_UTILS_DLLFILE) : $(OJT)\afs_setup_utils.obj $(DLLOBJS) $(DLLLIBS) +$(INSTALL_UTILS_DLLFILE) : $(OUT)\afs_setup_utils.obj $(DLLOBJS) $(DLLLIBS) $(DLLGUILINK) -entry:DllEntryPoint /DEF:install_utils.def $(VCLIBS) $(DLLPREP) $(COPY) $*.lib $(ILIBDIR) $(DEL) $*.lib $*.exp -$(SERVER_UNINST_DLLFILE) : $(OJT)\s_afs_setup_utils.obj $(DLLOBJS) $(DLLLIBS) +$(SERVER_UNINST_DLLFILE) : $(OUT)\s_afs_setup_utils.obj $(DLLOBJS) $(DLLLIBS) $(DLLGUILINK) -entry:DllEntryPoint /DEF:server_uninst.def $(VCLIBS) $(DLLPREP) $(COPY) $*.lib $(ILIBDIR) $(DEL) $*.lib $*.exp -$(CLIENT_UNINST_DLLFILE) : $(OJT)\c_afs_setup_utils.obj $(DLLOBJS) $(DLLLIBS) +$(CLIENT_UNINST_DLLFILE) : $(OUT)\c_afs_setup_utils.obj $(DLLOBJS) $(DLLLIBS) $(DLLGUILINK) -entry:DllEntryPoint /DEF:client_uninst.def $(VCLIBS) $(DLLPREP) $(COPY) $*.lib $(ILIBDIR) $(DEL) $*.lib $*.exp -$(CC_UNINST_DLLFILE) : $(OJT)\cc_afs_setup_utils.obj $(DLLOBJS) $(DLLLIBS) +$(CC_UNINST_DLLFILE) : $(OUT)\cc_afs_setup_utils.obj $(DLLOBJS) $(DLLLIBS) $(DLLGUILINK) -entry:DllEntryPoint /DEF:cc_uninst.def $(VCLIBS) $(DLLPREP) $(COPY) $*.lib $(ILIBDIR) $(DEL) $*.lib $*.exp -$(LIGHT_CLIENT_UNINST_DLLFILE) : $(OJT)\lc_afs_setup_utils.obj $(DLLOBJS) $(DLLLIBS) +$(LIGHT_CLIENT_UNINST_DLLFILE) : $(OUT)\lc_afs_setup_utils.obj $(DLLOBJS) $(DLLLIBS) $(DLLGUILINK) -entry:DllEntryPoint /DEF:light_client_uninst.def $(VCLIBS) $(DLLPREP) $(COPY) $*.lib $(ILIBDIR) $(DEL) $*.lib $*.exp -$(DOCS_UNINST_DLLFILE) : $(OJT)\d_afs_setup_utils.obj $(DLLOBJS) $(DLLLIBS) +$(DOCS_UNINST_DLLFILE) : $(OUT)\d_afs_setup_utils.obj $(DLLOBJS) $(DLLLIBS) $(DLLGUILINK) -entry:DllEntryPoint /DEF:docs_uninst.def $(VCLIBS) $(DLLPREP) $(COPY) $*.lib $(ILIBDIR) @@ -188,10 +187,10 @@ clean:: # Dependencies # -$(OJT)\afs_setup_utils_stub.res : afs_setup_utils_stub.rc AFS_component_version_number.h +$(OUT)\afs_setup_utils_stub.res : afs_setup_utils_stub.rc AFS_component_version_number.h mkdir: - -mkdir $(OJT)\lang + -mkdir $(OUT)\lang cd lang nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir cd .. diff --git a/src/WINNT/afs_setup_utils/_isuser/ntmakefile b/src/WINNT/afs_setup_utils/_isuser/ntmakefile index 3f60bf8e0..0e73bbedf 100644 --- a/src/WINNT/afs_setup_utils/_isuser/ntmakefile +++ b/src/WINNT/afs_setup_utils/_isuser/ntmakefile @@ -1,5 +1,6 @@ # include the primary makefile +RELDIR=WINNT\afs_setup_utils\_isuser !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) # Microsoft Developer Studio Generated NMAKE File, Based on _IsUser.dsp @@ -9,8 +10,8 @@ NULL= NULL=nul !ENDIF -OUTDIR=$(OJT) -INTDIR=$(OJT) +OUTDIR=$(OUT) +INTDIR=$(OUT) INSTALL : "$(DESTDIR)\WinInstall\Config\_IsUser.dll" $(DEL) *.PCH @@ -27,32 +28,32 @@ CLEAN :: CPP=cl.exe CPP_PROJ=/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ISUSER_EXPORTS" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c -.c.{$(OJT)\}obj:: +.c.{$(OUT)\}obj:: $(CPP) @<< $(CPP_PROJ) $< << -.cpp.{$(OJT)\}obj:: +.cpp.{$(OUT)\}obj:: $(CPP) @<< $(CPP_PROJ) $< << -.cxx.{$(OJT)\}obj:: +.cxx.{$(OUT)\}obj:: $(CPP) @<< $(CPP_PROJ) $< << -.c.$(OJT)\sbr:: +.c.$(OUT)\sbr:: $(CPP) @<< $(CPP_PROJ) $< << -.cpp.$(OJT)\sbr:: +.cpp.$(OUT)\sbr:: $(CPP) @<< $(CPP_PROJ) $< << -.cxx.$(OJT)\sbr:: +.cxx.$(OUT)\sbr:: $(CPP) @<< $(CPP_PROJ) $< << diff --git a/src/WINNT/afs_setup_utils/lang/NTMakefile b/src/WINNT/afs_setup_utils/lang/NTMakefile index 46267d913..89b5de4cc 100644 --- a/src/WINNT/afs_setup_utils/lang/NTMakefile +++ b/src/WINNT/afs_setup_utils/lang/NTMakefile @@ -10,7 +10,7 @@ AFSDEV_AUXRCFLAGS = $(AFSDEV_AUXRCFLAGS) -I$(DESTDIR)\include -I.. # include the primary makefile - +RELDIR=WINNT\afs_setup_utils\lang !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\..\config\NTMakefile.version @@ -35,7 +35,7 @@ DLLFILE = $(DESTDIR)\root.server\usr\afs\bin\afs_setup_utils_$(LANGID).dll RCFILE = $(LANGNAME)\afs_setup_utils.rc -RESFILE = $(OJT)\afs_setup_utils_$(LANGID).res +RESFILE = $(OUT)\afs_setup_utils_$(LANGID).res DLLOBJS = $(RESFILE) diff --git a/src/WINNT/afsadmsvr/NTMakefile b/src/WINNT/afsadmsvr/NTMakefile index c2b7c1a33..39481c70e 100644 --- a/src/WINNT/afsadmsvr/NTMakefile +++ b/src/WINNT/afsadmsvr/NTMakefile @@ -15,6 +15,7 @@ AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -DIGNORE_STDS_H # include the primary makefile +RELDIR=WINNT\afsadmsvr !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version @@ -41,37 +42,37 @@ IDLFILES = \ iTaAfsAdmSvrTypes.h LIBOBJS = \ - $(OJT)\TaAfsAdmSvrClient.obj \ - $(OJT)\TaAfsAdmSvrClientBind.obj \ - $(OJT)\TaAfsAdmSvrClientCache.obj \ - $(OJT)\TaAfsAdmSvrClientCell.obj \ - $(OJT)\TaAfsAdmSvrClientGroup.obj \ - $(OJT)\TaAfsAdmSvrClientInternal.obj \ - $(OJT)\TaAfsAdmSvrClientNotify.obj \ - $(OJT)\TaAfsAdmSvrClientPing.obj \ - $(OJT)\TaAfsAdmSvrClientUser.obj \ - $(OJT)\TaAfsAdmSvrCommon.obj \ - $(OJT)\iTaAfsAdmSvr_c.obj + $(OUT)\TaAfsAdmSvrClient.obj \ + $(OUT)\TaAfsAdmSvrClientBind.obj \ + $(OUT)\TaAfsAdmSvrClientCache.obj \ + $(OUT)\TaAfsAdmSvrClientCell.obj \ + $(OUT)\TaAfsAdmSvrClientGroup.obj \ + $(OUT)\TaAfsAdmSvrClientInternal.obj \ + $(OUT)\TaAfsAdmSvrClientNotify.obj \ + $(OUT)\TaAfsAdmSvrClientPing.obj \ + $(OUT)\TaAfsAdmSvrClientUser.obj \ + $(OUT)\TaAfsAdmSvrCommon.obj \ + $(OUT)\iTaAfsAdmSvr_c.obj -EXERES = $(OJT)\AfsAdmSvr.res +EXERES = $(OUT)\AfsAdmSvr.res $(EXERES):$$(@B).rc $(RC) $** EXEOBJS = \ - $(OJT)\TaAfsAdmSvr.obj \ - $(OJT)\TaAfsAdmSvrCallback.obj \ - $(OJT)\TaAfsAdmSvrCell.obj \ - $(OJT)\TaAfsAdmSvrCommon.obj \ - $(OJT)\TaAfsAdmSvrDebug.obj \ - $(OJT)\TaAfsAdmSvrGeneral.obj \ - $(OJT)\TaAfsAdmSvrGroup.obj \ - $(OJT)\TaAfsAdmSvrMain.obj \ - $(OJT)\TaAfsAdmSvrProperties.obj \ - $(OJT)\TaAfsAdmSvrSearch.obj \ - $(OJT)\TaAfsAdmSvrUser.obj \ - $(OJT)\iTaAfsAdmSvr_s.obj + $(OUT)\TaAfsAdmSvr.obj \ + $(OUT)\TaAfsAdmSvrCallback.obj \ + $(OUT)\TaAfsAdmSvrCell.obj \ + $(OUT)\TaAfsAdmSvrCommon.obj \ + $(OUT)\TaAfsAdmSvrDebug.obj \ + $(OUT)\TaAfsAdmSvrGeneral.obj \ + $(OUT)\TaAfsAdmSvrGroup.obj \ + $(OUT)\TaAfsAdmSvrMain.obj \ + $(OUT)\TaAfsAdmSvrProperties.obj \ + $(OUT)\TaAfsAdmSvrSearch.obj \ + $(OUT)\TaAfsAdmSvrUser.obj \ + $(OUT)\iTaAfsAdmSvr_s.obj VCLIBS =\ gdi32.lib \ @@ -168,14 +169,14 @@ clean:: afsclass_clean afsapplib_clean # Dependencies # -$(OJT)\AfsAdmSvr.res : AFS_component_version_number.h +$(OUT)\AfsAdmSvr.res : AFS_component_version_number.h mkdir: - -mkdir $(OJT)\..\afsapplib + -mkdir $(OUT)\..\afsapplib cd ..\afsapplib nmake /nologo /f ntmakefile mkdir cd ..\afsadmsvr - -mkdir $(OJT)\..\afsclass + -mkdir $(OUT)\..\afsclass cd ..\afsclass nmake /nologo /f ntmakefile mkdir cd ..\afsadmsvr diff --git a/src/WINNT/afsapplib/NTMakefile b/src/WINNT/afsapplib/NTMakefile index 2e62b6afc..e4503835b 100644 --- a/src/WINNT/afsapplib/NTMakefile +++ b/src/WINNT/afsapplib/NTMakefile @@ -11,6 +11,7 @@ AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -DEXPORT_AFSAPPLIB -DEXPORTED=_declsp # include the primary makefile +RELDIR=WINNT\afsapplib !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version @@ -43,34 +44,34 @@ INCFILES = \ $(INCFILEDIR)\subclass.h DLLOBJS = \ - $(OJT)\afsapplib_stub.res \ - $(OJT)\afsapplib.obj \ - $(OJT)\al_admsvr.obj \ - $(OJT)\al_browse.obj \ - $(OJT)\al_browseset.obj \ - $(OJT)\al_cover.obj \ - $(OJT)\al_creds.obj \ - $(OJT)\al_dynlink.obj \ - $(OJT)\al_error.obj \ - $(OJT)\al_help.obj \ - $(OJT)\al_misc.obj \ - $(OJT)\al_progress.obj \ - $(OJT)\al_pump.obj \ - $(OJT)\al_task.obj \ - $(OJT)\al_wizard.obj \ - $(OJT)\checklist.obj \ - $(OJT)\ctl_date.obj \ - $(OJT)\ctl_elapsed.obj \ - $(OJT)\ctl_sockaddr.obj \ - $(OJT)\ctl_spinner.obj \ - $(OJT)\ctl_time.obj \ - $(OJT)\dialog.obj \ - $(OJT)\fastlist.obj \ - $(OJT)\hashlist.obj \ - $(OJT)\regexp.obj \ - $(OJT)\resize.obj \ - $(OJT)\settings.obj \ - $(OJT)\subclass.obj + $(OUT)\afsapplib_stub.res \ + $(OUT)\afsapplib.obj \ + $(OUT)\al_admsvr.obj \ + $(OUT)\al_browse.obj \ + $(OUT)\al_browseset.obj \ + $(OUT)\al_cover.obj \ + $(OUT)\al_creds.obj \ + $(OUT)\al_dynlink.obj \ + $(OUT)\al_error.obj \ + $(OUT)\al_help.obj \ + $(OUT)\al_misc.obj \ + $(OUT)\al_progress.obj \ + $(OUT)\al_pump.obj \ + $(OUT)\al_task.obj \ + $(OUT)\al_wizard.obj \ + $(OUT)\checklist.obj \ + $(OUT)\ctl_date.obj \ + $(OUT)\ctl_elapsed.obj \ + $(OUT)\ctl_sockaddr.obj \ + $(OUT)\ctl_spinner.obj \ + $(OUT)\ctl_time.obj \ + $(OUT)\dialog.obj \ + $(OUT)\fastlist.obj \ + $(OUT)\hashlist.obj \ + $(OUT)\regexp.obj \ + $(OUT)\resize.obj \ + $(OUT)\settings.obj \ + $(OUT)\subclass.obj VCLIBS =\ comctl32.lib \ @@ -132,10 +133,10 @@ clean:: # Dependencies # -$(OJT)\AfsAppLib_stub.res : AFS_component_version_number.h +$(OUT)\AfsAppLib_stub.res : AFS_component_version_number.h mkdir: - -mkdir $(OJT)\lang + -mkdir $(OUT)\lang cd lang nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir cd .. diff --git a/src/WINNT/afsapplib/al_creds.cpp b/src/WINNT/afsapplib/al_creds.cpp index 34b305551..43acc5553 100644 --- a/src/WINNT/afsapplib/al_creds.cpp +++ b/src/WINNT/afsapplib/al_creds.cpp @@ -78,7 +78,7 @@ BOOL AfsAppLib_CrackCredentials (PVOID hCreds, LPTSTR pszCell, LPTSTR pszUser, L if (afsclient_TokenQuery (hCreds, &dateExpire, szUserA, szUser2A, szCellA, &fHasKasToken, (afs_status_p)&status)) { rc = TRUE; - CopyAnsiToString (pszUser, szUserA); + CopyAnsiToString (pszUser, szUserA); CopyAnsiToString (pszCell, szCellA); AfsAppLib_UnixTimeToSystemTime (pst, dateExpire); } diff --git a/src/WINNT/afsapplib/lang/NTMakefile b/src/WINNT/afsapplib/lang/NTMakefile index a555760ca..597ab0b4a 100644 --- a/src/WINNT/afsapplib/lang/NTMakefile +++ b/src/WINNT/afsapplib/lang/NTMakefile @@ -11,6 +11,7 @@ AFSDEV_AUXRCFLAGS = $(AFSDEV_AUXRCFLAGS) -I$(DESTDIR)\include -I.. # include the primary makefile +RELDIR=WINNT\afsapplib\lang !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\..\config\NTMakefile.version @@ -35,7 +36,7 @@ DLLFILE = $(DESTDIR)\root.server\usr\afs\bin\TaAfsAppLib_$(LANGID).dll RCFILE = $(LANGNAME)\afsapplib.rc -RESFILE = $(OJT)\afsapplib_$(LANGID).res +RESFILE = $(OUT)\afsapplib_$(LANGID).res DLLOBJS = $(RESFILE) @@ -48,7 +49,7 @@ $(DLLFILE) : $(DLLOBJS) install : $(DLLFILE) clean :: - @if exist $(OJT)\*.res del $(OJT)\*.res + @if exist $(OUT)\*.res del $(OUT)\*.res @if exist RC*. del RC*. @if exist RD*. del RD*. diff --git a/src/WINNT/afsapplib/test/NTMakefile b/src/WINNT/afsapplib/test/NTMakefile index be5bfce89..81be847db 100644 --- a/src/WINNT/afsapplib/test/NTMakefile +++ b/src/WINNT/afsapplib/test/NTMakefile @@ -16,6 +16,7 @@ AFSDEV_AUXRCDEFINES = $(AFSDEV_AUXRCDEFINES) -I$(DESTDIR)\include\winnt # include the primary makefile +RELDIR=WINNT\afsapplib\test !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) ############################################################################ @@ -26,8 +27,8 @@ AFSDEV_AUXRCDEFINES = $(AFSDEV_AUXRCDEFINES) -I$(DESTDIR)\include\winnt EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\WizTest.exe EXEOBJS = \ - $(OJT)\wiztest.res \ - $(OJT)\wiztest.obj + $(OUT)\wiztest.res \ + $(OUT)\wiztest.obj EXELIBS = \ $(DESTDIR)\lib\afs\TaAfsAppLib.lib \ diff --git a/src/WINNT/afsclass/NTMakefile b/src/WINNT/afsclass/NTMakefile index e4c0828e6..ea60db292 100644 --- a/src/WINNT/afsclass/NTMakefile +++ b/src/WINNT/afsclass/NTMakefile @@ -11,25 +11,26 @@ AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -WX # include the primary makefile +RELDIR=WINNT\afsclass !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) ############################################################################ LIBOBJS = \ - $(OJT)\c_debug.obj \ - $(OJT)\c_ident.obj \ - $(OJT)\c_identlist.obj \ - $(OJT)\c_cell.obj \ - $(OJT)\c_svr.obj \ - $(OJT)\c_svc.obj \ - $(OJT)\c_agg.obj \ - $(OJT)\c_set.obj \ - $(OJT)\c_usr.obj \ - $(OJT)\c_grp.obj \ - $(OJT)\c_notify.obj \ - $(OJT)\afsclassfn.obj \ - $(OJT)\internal.obj \ - $(OJT)\worker.obj + $(OUT)\c_debug.obj \ + $(OUT)\c_ident.obj \ + $(OUT)\c_identlist.obj \ + $(OUT)\c_cell.obj \ + $(OUT)\c_svr.obj \ + $(OUT)\c_svc.obj \ + $(OUT)\c_agg.obj \ + $(OUT)\c_set.obj \ + $(OUT)\c_usr.obj \ + $(OUT)\c_grp.obj \ + $(OUT)\c_notify.obj \ + $(OUT)\afsclassfn.obj \ + $(OUT)\internal.obj \ + $(OUT)\worker.obj LIBINCLUDES = \ $(DESTDIR)\include\winnt\afsclass.h \ diff --git a/src/WINNT/afsclass/c_set.cpp b/src/WINNT/afsclass/c_set.cpp index c4cb5d7e1..79520b989 100644 --- a/src/WINNT/afsclass/c_set.cpp +++ b/src/WINNT/afsclass/c_set.cpp @@ -408,21 +408,21 @@ void FILESET::SetStatusFromVOS (PVOID lp) m_fs.nFiles = pEntry->fileCount; m_fs.ckQuota = pEntry->maxQuota; m_fs.ckUsed = pEntry->currentSize; - - switch (pEntry->type) - { - case VOS_BACKUP_VOLUME: - m_fs.Type = ftCLONE; - m_fs.idClone = pEntry->id; - break; - case VOS_READ_ONLY_VOLUME: - m_fs.Type = ftREPLICA; - m_fs.idReplica = pEntry->id; - break; - case VOS_READ_WRITE_VOLUME: - m_fs.Type = ftREADWRITE; - m_fs.idReadWrite = pEntry->id; - break; + + switch (pEntry->type) + { + case VOS_BACKUP_VOLUME: + m_fs.Type = ftCLONE; + m_fs.idClone = pEntry->id; + break; + case VOS_READ_ONLY_VOLUME: + m_fs.Type = ftREPLICA; + m_fs.idReplica = pEntry->id; + break; + case VOS_READ_WRITE_VOLUME: + m_fs.Type = ftREADWRITE; + m_fs.idReadWrite = pEntry->id; + break; } m_fs.State &= fsMASK_VLDB; diff --git a/src/WINNT/afsd/NTMakefile b/src/WINNT/afsd/NTMakefile index 86af3a57b..0a3f5ec41 100644 --- a/src/WINNT/afsd/NTMakefile +++ b/src/WINNT/afsd/NTMakefile @@ -6,6 +6,7 @@ # directory or online at http://www.openafs.org/dl/license10.html AFSDEV_NETGUI = 1 +RELDIR=WINNT\afsd !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version @@ -39,19 +40,22 @@ INCFILES =\ $(INCFILEDIR)\smb_ioctl.h \ $(INCFILEDIR)\afsmsg95.h \ $(INCFILEDIR)\afsrpc.h \ - $(INCFILEDIR)\cm_dns.h \ !IFDEF OSICRASH $(INCFILEDIR)\afsdcrash.h \ !ENDIF $(INCFILEDIR)\cm_dns_private.h IDLFILES =\ - afsrpc.h $(OJT)\afsrpc_c.c + afsrpc.h $(OUT)\afsrpc_c.c + +CONFOBJS=$(OUT)\cm_config.obj \ + $(OUT)\cm_dns.obj + +$(CONFOBJS): -CONFOBJS=$(OJT)\cm_config.obj \ - $(OJT)\cm_dns.obj +RXOBJS = $(OUT)\xdr_int32.obj $(OUT)\xdr_int64.obj -RXOBJS = $(OJT)\xdr_int32.obj $(OJT)\xdr_int64.obj +$(RXOBJS): RX= ..\..\rx @@ -63,41 +67,41 @@ $(IDLFILES):afsrpc.idl AFSDOBJS=\ - $(OJT)\afsd_init.obj \ - $(OJT)\cm_cell.obj \ - $(OJT)\cm_server.obj \ - $(OJT)\cm_volume.obj \ - $(OJT)\cm_conn.obj \ - $(OJT)\cm_user.obj \ - $(OJT)\cm_buf.obj \ - $(OJT)\cm_scache.obj \ - $(OJT)\cm_dcache.obj \ - $(OJT)\cm_access.obj \ - $(OJT)\cm_callback.obj \ - $(OJT)\cm_vnodeops.obj \ - $(OJT)\cm_dir.obj \ - $(OJT)\cm_utils.obj \ - $(OJT)\largeintdotnet.obj \ - $(OJT)\smb.obj \ - $(OJT)\smb3.obj \ - $(OJT)\smb_ioctl.obj \ - $(OJT)\cm_ioctl.obj \ - $(OJT)\cm_daemon.obj \ - $(OJT)\cm_aclent.obj \ - $(OJT)\cm_dnlc.obj \ - $(OJT)\cm_rpc.obj \ - $(OJT)\afsrpc_s.obj \ + $(OUT)\afsd_init.obj \ + $(OUT)\cm_cell.obj \ + $(OUT)\cm_server.obj \ + $(OUT)\cm_volume.obj \ + $(OUT)\cm_conn.obj \ + $(OUT)\cm_user.obj \ + $(OUT)\cm_buf.obj \ + $(OUT)\cm_scache.obj \ + $(OUT)\cm_dcache.obj \ + $(OUT)\cm_access.obj \ + $(OUT)\cm_callback.obj \ + $(OUT)\cm_vnodeops.obj \ + $(OUT)\cm_dir.obj \ + $(OUT)\cm_utils.obj \ + $(OUT)\largeintdotnet.obj \ + $(OUT)\smb.obj \ + $(OUT)\smb3.obj \ + $(OUT)\smb_ioctl.obj \ + $(OUT)\cm_ioctl.obj \ + $(OUT)\cm_daemon.obj \ + $(OUT)\cm_aclent.obj \ + $(OUT)\cm_dnlc.obj \ + $(OUT)\cm_rpc.obj \ + $(OUT)\afsrpc_s.obj \ !IFDEF OSICRASH - $(OJT)\afsdcrash.obj \ + $(OUT)\afsdcrash.obj \ !ENDIF - $(OJT)\cm_freelance.obj + $(OUT)\cm_freelance.obj -$(OJT)\cm_conn.obj: cm_conn.c +$(OUT)\cm_conn.obj: cm_conn.c $(C2OBJ) -DAFS_PTHREAD_ENV $** -FSOBJS=$(OJT)\fs.obj $(OJT)\fs_utils.obj +FSOBJS=$(OUT)\fs.obj $(OUT)\fs_utils.obj -SLOBJS=$(OJT)\symlink.obj $(OJT)\fs_utils.obj +SLOBJS=$(OUT)\symlink.obj $(OUT)\fs_utils.obj ILIBDIR = $(DESTDIR)\lib @@ -132,7 +136,7 @@ MIDL_FLAGS=/app_config \ CONF_DLLFILE = $(DESTDIR)\root.client\usr\vice\etc\libafsconf.dll -$(CONF_DLLFILE): $(CONFOBJS) $(OJT)\libafsconf.res +$(CONF_DLLFILE): $(CONFOBJS) $(OUT)\libafsconf.res $(DLLGUILINK) -def:libafsconf.def $(DLLPREP) $(COPY) $*.lib $(ILIBDIR) @@ -144,8 +148,8 @@ $(CONF_DLLFILE): $(CONFOBJS) $(OJT)\libafsconf.res LOGON_DLLFILE = $(DESTDIR)\root.client\usr\vice\etc\afslogon.dll LOGON_DLLOBJS =\ - $(OJT)\afslogon.obj \ - $(OJT)\afslogon.res + $(OUT)\afslogon.obj \ + $(OUT)\afslogon.res LOGON_DLLLIBS =\ $(DESTDIR)\lib\afsauthent.lib \ @@ -163,8 +167,8 @@ $(LOGON_DLLFILE): $(LOGON_DLLOBJS) LOG95_DLLFILE = $(DESTDIR)\root.client\usr\vice\etc\afslog95.dll LOG95_DLLOBJS =\ - $(OJT)\afslog95.obj \ - $(OJT)\afslog95.res + $(OUT)\afslog95.obj \ + $(OUT)\afslog95.res LOG95_DLLLIBS =\ $(DESTDIR)\lib\afsauthent.lib \ @@ -179,13 +183,13 @@ $(LOG95_DLLFILE): $(LOG95_DLLOBJS) ############################################################################ # Install target; primary makefile target -install_objs: $(OJT)\cm_dns.obj $(OJT)\cm_config.obj - $(COPY) $(OJT)\cm_dns.obj $(DESTDIR)\lib - $(COPY) $(OJT)\cm_config.obj $(DESTDIR)\lib +install_objs: $(OUT)\cm_dns.obj $(OUT)\cm_config.obj + $(COPY) $(OUT)\cm_dns.obj $(DESTDIR)\lib + $(COPY) $(OUT)\cm_config.obj $(DESTDIR)\lib install_headers: $(IDLFILES) $(INCFILES) -install: install_headers $(CONF_DLLFILE) \ +install: install_headers install_objs $(CONF_DLLFILE) \ $(EXEDIR)\klog.exe \ $(EXEDIR)\tokens.exe \ $(EXEDIR)\unlog.exe $(EXEDIR)\afsd.exe $(EXEDIR)\afsd_service.exe \ @@ -236,17 +240,17 @@ EXELIBS = \ $(DESTDIR)\lib\libafsconf.lib # klog.exe -$(EXEDIR)\klog.exe: $(OJT)\cklog.obj $(OJT)\klog.res +$(EXEDIR)\klog.exe: $(OUT)\cklog.obj $(OUT)\klog.res $(EXECONLINK) $(EXELIBS) $(EXEPREP) # tokens.exe -$(EXEDIR)\tokens.exe: $(OJT)\ctokens.obj $(OJT)\tokens.res +$(EXEDIR)\tokens.exe: $(OUT)\ctokens.obj $(OUT)\tokens.res $(EXECONLINK) $(EXELIBS) $(EXEPREP) # unlog.exe -$(EXEDIR)\unlog.exe: $(OJT)\cunlog.obj $(OJT)\unlog.res +$(EXEDIR)\unlog.exe: $(OUT)\cunlog.obj $(OUT)\unlog.res $(EXECONLINK) $(EXELIBS) $(EXEPREP) @@ -266,29 +270,30 @@ AFSD_EXELIBS =\ $(DESTDIR)\lib\afs\afsreg.lib \ $(DESTDIR)\lib\libosi.lib \ rpcrt4.lib \ - user32.lib + user32.lib \ + Dbghelp.lib -$(AFSD_EXEFILE): $(OJT)\afsd.obj $(AFSDOBJS) $(OJT)\afsd.res $(RXOBJS) +$(AFSD_EXEFILE): $(OUT)\afsd.obj $(AFSDOBJS) $(OUT)\afsd.res $(RXOBJS) $(EXEGUILINK) $(AFSD_EXELIBS) $(EXEPREP) # afsd_service.exe -$(EXEDIR)\afsd_service.exe: $(OJT)\afsd_service.obj $(AFSDOBJS) $(OJT)\afsd_service.res $(RXOBJS) +$(EXEDIR)\afsd_service.exe: $(OUT)\afsd_service.obj $(AFSDOBJS) $(OUT)\afsd_service.res $(RXOBJS) $(EXECONLINK) $(AFSD_EXELIBS) $(EXEPREP) # fs.exe -$(EXEDIR)\fs.exe: $(FSOBJS) $(OJT)\fs.res +$(EXEDIR)\fs.exe: $(FSOBJS) $(OUT)\fs.res $(EXECONLINK) $(EXELIBS) $(EXEPREP) # symlink.exe -$(EXEDIR)\symlink.exe: $(SLOBJS) $(OJT)\symlink.res +$(EXEDIR)\symlink.exe: $(SLOBJS) $(OUT)\symlink.res $(EXECONLINK) $(EXELIBS) $(EXEPREP) # afsshare.exe -$(EXEDIR)\afsshare.exe: $(OJT)\afsshare.obj $(OJT)\afsshare.res +$(EXEDIR)\afsshare.exe: $(OUT)\afsshare.obj $(OUT)\afsshare.res $(EXECONLINK) $(EXEPREP) @@ -302,10 +307,10 @@ $(EXEDIR)\afsshare.exe: $(OJT)\afsshare.obj $(OJT)\afsshare.res KAUTH = ..\..\kauth KPASSWD_OBJS =\ - $(OJT)\kpasswd.obj \ - $(OJT)\kkids.obj \ - $(OJT)\kautils.obj \ - $(OJT)\$(KAUTH)\kpasswd.res + $(OUT)\kpasswd.obj \ + $(OUT)\kkids.obj \ + $(OUT)\kautils.obj \ + $(OUT)\$(KAUTH)\kpasswd.res KPASSWD_LIBS =\ $(DESTDIR)\lib\afsauthent.lib \ @@ -314,13 +319,13 @@ KPASSWD_LIBS =\ $(DESTDIR)\lib\afsdes.lib \ $(DESTDIR)\lib\afs\afsutil.lib -$(OJT)\kpasswd.obj: $(KAUTH)/kpasswd.c +$(OUT)\kpasswd.obj: $(KAUTH)/kpasswd.c $(C2OBJ) -DAFS_PTHREAD_ENV $** -$(OJT)\kkids.obj: $(KAUTH)/kkids.c +$(OUT)\kkids.obj: $(KAUTH)/kkids.c $(C2OBJ) -DAFS_PTHREAD_ENV $** -$(OJT)\kautils.obj: $(KAUTH)/kautils.c +$(OUT)\kautils.obj: $(KAUTH)/kautils.c $(C2OBJ) -DAFS_PTHREAD_ENV $** $(DESTDIR)\bin\kpasswd.exe: $(KPASSWD_OBJS) $(KPASSWD_LIBS) @@ -332,28 +337,28 @@ $(DESTDIR)\bin\kpasswd.exe: $(KPASSWD_OBJS) $(KPASSWD_LIBS) ############################################################################ # generate versioninfo resources -$(OJT)\afsshare.res: AFS_component_version_number.h +$(OUT)\afsshare.res: AFS_component_version_number.h -$(OJT)\fs.res: AFS_component_version_number.h +$(OUT)\fs.res: AFS_component_version_number.h -$(OJT)\symlink.res: AFS_component_version_number.h +$(OUT)\symlink.res: AFS_component_version_number.h -$(OJT)\klog.res: AFS_component_version_number.h +$(OUT)\klog.res: AFS_component_version_number.h -$(OJT)\tokens.res: AFS_component_version_number.h +$(OUT)\tokens.res: AFS_component_version_number.h -$(OJT)\unlog.res: AFS_component_version_number.h +$(OUT)\unlog.res: AFS_component_version_number.h -$(OJT)\afsd_service.res: AFS_component_version_number.h +$(OUT)\afsd_service.res: AFS_component_version_number.h -$(OJT)\afslogon.res: AFS_component_version_number.h +$(OUT)\afslogon.res: AFS_component_version_number.h -$(OJT)\afslog95.res: AFS_component_version_number.h +$(OUT)\afslog95.res: AFS_component_version_number.h -$(OJT)\libafsconf.res: AFS_component_version_number.h +$(OUT)\libafsconf.res: AFS_component_version_number.h clean:: - $(DEL) $(OJT)\*.res + $(DEL) $(OUT)\*.res $(DEL) afsrpc.h $(DEL) afsrpc_?.* $(DEL) $(CONF_DLLFILE) diff --git a/src/WINNT/afsd/afsd.c b/src/WINNT/afsd/afsd.c index a481f2e7d..85c120084 100644 --- a/src/WINNT/afsd/afsd.c +++ b/src/WINNT/afsd/afsd.c @@ -30,6 +30,9 @@ osi_log_t *afsd_logp; extern int traceOnPanic; +extern void afsd_DbgBreakAllocInit(); +extern void afsd_DbgBreakAdd(DWORD requestNumber); + /* * Notifier function for use by osi_panic */ @@ -69,7 +72,23 @@ int WINAPI WinMain( { MSG msg; - if (!InitClass(hInstance)) + afsd_SetUnhandledExceptionFilter(); + +#ifdef _DEBUG + afsd_DbgBreakAllocInit(); + _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF /* | _CRTDBG_CHECK_ALWAYS_DF */ | _CRTDBG_CHECK_CRT_DF | _CRTDBG_DELAY_FREE_MEM_DF ); + if (lpCmdLine) + { + char *allocRequest = strtok(lpCmdLine, " \t"); + while (allocRequest) + { + afsd_DbgBreakAdd(atoi(allocRequest)); + allocRequest = strtok(NULL, " \t"); + } + } +#endif + + if (!InitClass(hInstance)) return (FALSE); if (!InitInstance(hInstance, nCmdShow)) diff --git a/src/WINNT/afsd/afsd_init.c b/src/WINNT/afsd/afsd_init.c index 2c91d1d1e..95e04e81c 100644 --- a/src/WINNT/afsd/afsd_init.c +++ b/src/WINNT/afsd/afsd_init.c @@ -89,9 +89,7 @@ HANDLE afsi_file; int cm_dnsEnabled = 1; #endif -/*#ifdef AFS_FREELANCE_CLIENT -extern int cm_freelanceEnabled; -#endif*/ +char cm_NetBiosName[32]; void cm_InitFakeRootDir(); @@ -109,7 +107,8 @@ afsi_start() strcat(wd, "\\afsd_init.log"); GetTimeFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, t, sizeof(t)); afsi_file = CreateFile(wd, GENERIC_WRITE, FILE_SHARE_READ, NULL, - CREATE_ALWAYS, FILE_FLAG_WRITE_THROUGH, NULL); + OPEN_ALWAYS, FILE_FLAG_WRITE_THROUGH, NULL); + SetFilePointer(afsi_file, 0, NULL, FILE_END); GetTimeFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, u, sizeof(u)); strcat(t, ": Create log file\n"); strcat(u, ": Created log file\n"); @@ -117,6 +116,8 @@ afsi_start() WriteFile(afsi_file, u, strlen(u), &zilch, NULL); } +static int afsi_log_useTimestamp = 1; + void afsi_log(char *pattern, ...) { @@ -126,10 +127,15 @@ afsi_log(char *pattern, ...) va_start(ap, pattern); vsprintf(s, pattern, ap); - GetTimeFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, t, sizeof(t)); - sprintf(u, "%s: %s\n", t, s); - if (afsi_file != INVALID_HANDLE_VALUE) - WriteFile(afsi_file, u, strlen(u), &zilch, NULL); + if ( afsi_log_useTimestamp ) { + GetTimeFormat(LOCALE_SYSTEM_DEFAULT, 0, NULL, NULL, t, sizeof(t)); + sprintf(u, "%s: %s\n", t, s); + if (afsi_file != INVALID_HANDLE_VALUE) + WriteFile(afsi_file, u, strlen(u), &zilch, NULL); + } else { + if (afsi_file != INVALID_HANDLE_VALUE) + WriteFile(afsi_file, s, strlen(s), &zilch, NULL); + } } /* @@ -436,6 +442,16 @@ int afsd_InitCM(char **reasonP) } #endif /* AFS_FREELANCE_CLIENT */ + dummyLen = sizeof(cm_NetBiosName); + code = RegQueryValueEx(parmKey, "NetbiosName", NULL, NULL, + (BYTE *) &cm_NetBiosName, &dummyLen); + if (code == ERROR_SUCCESS) { + afsi_log("Explicit NetBios name is used %s", cm_NetBiosName); + } + else { + cm_NetBiosName[0] = 0; /* default off */ + } + RegCloseKey (parmKey); /* setup early variables */ @@ -624,21 +640,263 @@ int afsd_InitSMB(char **reasonP, void *aMBfunc) char *ctemp; /* Do this last so that we don't handle requests before init is done. - * Here we initialize the SMB listener. - */ - strcpy(hostName, cm_HostName); + * Here we initialize the SMB listener. + */ + if (!cm_NetBiosName[0]) + { + strcpy(hostName, cm_HostName); ctemp = strchr(hostName, '.'); /* turn ntdfs.* into ntdfs */ if (ctemp) *ctemp = 0; - hostName[11] = 0; /* ensure that even after adding the -A, we - * leave one byte free for the netbios server - * type. - */ + hostName[11] = 0; /* ensure that even after adding the -A, we + * leave one byte free for the netbios server + * type. + */ strcat(hostName, "-AFS"); - _strupr(hostName); - smb_Init(afsd_logp, hostName, smb_UseV3, LANadapter, numSvThreads, - aMBfunc); + } else { + strcpy(hostName, cm_NetBiosName); + } + _strupr(hostName); + + smb_Init(afsd_logp, hostName, smb_UseV3, LANadapter, numSvThreads, + aMBfunc); afsi_log("smb_Init"); return 0; } +#ifdef ReadOnly +#undef ReadOnly +#endif + +#ifdef File +#undef File +#endif + +#pragma pack( push, before_imagehlp, 8 ) +#include +#pragma pack( pop, before_imagehlp ) + +#define MAXNAMELEN 1024 + +void afsd_printStack(HANDLE hThread, CONTEXT *c) +{ + HANDLE hProcess = GetCurrentProcess(); + int frameNum; + DWORD offset; + DWORD symOptions; + char functionName[MAXNAMELEN]; + + IMAGEHLP_MODULE Module; + IMAGEHLP_LINE Line; + + STACKFRAME s; + IMAGEHLP_SYMBOL *pSym; + + afsi_log_useTimestamp = 0; + + pSym = (IMAGEHLP_SYMBOL *) GlobalAlloc(0, sizeof (IMAGEHLP_SYMBOL) + MAXNAMELEN); + + memset( &s, '\0', sizeof s ); + if (!SymInitialize(hProcess, NULL, 1) ) + { + afsi_log("SymInitialize(): GetLastError() = %lu\n", GetLastError() ); + + SymCleanup( hProcess ); + GlobalFree(pSym); + + return; + } + + symOptions = SymGetOptions(); + symOptions |= SYMOPT_LOAD_LINES; + symOptions &= ~SYMOPT_UNDNAME; + SymSetOptions( symOptions ); + + /* + * init STACKFRAME for first call + * Notes: AddrModeFlat is just an assumption. I hate VDM debugging. + * Notes: will have to be #ifdef-ed for Alphas; MIPSes are dead anyway, + * and good riddance. + */ +#if defined (_ALPHA_) || defined (_MIPS_) || defined (_PPC_) +#error The STACKFRAME initialization in afsd_printStack() for this platform +#error must be properly configured +#else + s.AddrPC.Offset = c->Eip; + s.AddrPC.Mode = AddrModeFlat; + s.AddrFrame.Offset = c->Ebp; + s.AddrFrame.Mode = AddrModeFlat; +#endif + + memset( pSym, '\0', sizeof (IMAGEHLP_SYMBOL) + MAXNAMELEN ); + pSym->SizeOfStruct = sizeof (IMAGEHLP_SYMBOL); + pSym->MaxNameLength = MAXNAMELEN; + + memset( &Line, '\0', sizeof Line ); + Line.SizeOfStruct = sizeof Line; + + memset( &Module, '\0', sizeof Module ); + Module.SizeOfStruct = sizeof Module; + + offset = 0; + + afsi_log("\n--# FV EIP----- RetAddr- FramePtr StackPtr Symbol\n" ); + + for ( frameNum = 0; ; ++ frameNum ) + { + /* + * get next stack frame (StackWalk(), SymFunctionTableAccess(), + * SymGetModuleBase()). if this returns ERROR_INVALID_ADDRESS (487) or + * ERROR_NOACCESS (998), you can assume that either you are done, or + * that the stack is so hosed that the next deeper frame could not be + * found. + */ + if ( ! StackWalk( IMAGE_FILE_MACHINE_I386, hProcess, hThread, &s, c, + NULL, SymFunctionTableAccess, SymGetModuleBase, + NULL ) ) + break; + + /* display its contents */ + afsi_log("\n%3d %c%c %08lx %08lx %08lx %08lx ", + frameNum, s.Far? 'F': '.', s.Virtual? 'V': '.', + s.AddrPC.Offset, s.AddrReturn.Offset, + s.AddrFrame.Offset, s.AddrStack.Offset ); + + if ( s.AddrPC.Offset == 0 ) + { + afsi_log("(-nosymbols- PC == 0)\n" ); + } + else + { + /* show procedure info from a valid PC */ + if (!SymGetSymFromAddr(hProcess, s.AddrPC.Offset, &offset, pSym)) + { + if ( GetLastError() != ERROR_INVALID_ADDRESS ) + { + afsi_log("SymGetSymFromAddr(): errno = %lu\n", + GetLastError()); + } + } + else + { + UnDecorateSymbolName(pSym->Name, functionName, MAXNAMELEN, + UNDNAME_NAME_ONLY); + afsi_log("%s", functionName ); + + if ( offset != 0 ) + { + afsi_log(" %+ld bytes\n", (long) offset); + } + } + + if (!SymGetLineFromAddr(hProcess, s.AddrPC.Offset, &offset, &Line)) + { + if (GetLastError() != ERROR_INVALID_ADDRESS) + { + afsi_log("Error: SymGetLineFromAddr(): errno = %lu\n", + GetLastError()); + } + } + else + { + afsi_log(" Line: %s(%lu) %+ld bytes\n", Line.FileName, + Line.LineNumber, offset); + } + + } + + /* no return address means no deeper stackframe */ + if (s.AddrReturn.Offset == 0) + { + SetLastError(0); + break; + } + } + + if (GetLastError() != 0) + { + afsi_log("\nStackWalk(): errno = %lu\n", GetLastError()); + } + + SymCleanup(hProcess); + GlobalFree(pSym); +} + +#ifdef _DEBUG +static DWORD *afsd_crtDbgBreakCurrent = NULL; +static DWORD afsd_crtDbgBreaks[256]; +#endif + +LONG __stdcall afsd_ExceptionFilter(EXCEPTION_POINTERS *ep) +{ + CONTEXT context; +#ifdef _DEBUG + BOOL allocRequestBrk = FALSE; +#endif + + afsi_log("UnhandledException : code : 0x%x, address: 0x%x\n", + ep->ExceptionRecord->ExceptionCode, + ep->ExceptionRecord->ExceptionAddress); + +#ifdef _DEBUG + if (afsd_crtDbgBreakCurrent && + *afsd_crtDbgBreakCurrent == _CrtSetBreakAlloc(*afsd_crtDbgBreakCurrent)) + { + allocRequestBrk = TRUE; + afsi_log("Breaking on alloc request # %d\n", *afsd_crtDbgBreakCurrent); + } +#endif + + /* save context if we want to print the stack information */ + context = *ep->ContextRecord; + + afsd_printStack(GetCurrentThread(), &context); + + if (ep->ExceptionRecord->ExceptionCode == EXCEPTION_BREAKPOINT) + { + afsi_log("EXCEPTION_BREAKPOINT - continue execition ...\n"); + +#ifdef _DEBUG + if (allocRequestBrk) + { + afsd_crtDbgBreakCurrent++; + _CrtSetBreakAlloc(*afsd_crtDbgBreakCurrent); + } +#endif + + ep->ContextRecord->Eip++; + return EXCEPTION_CONTINUE_EXECUTION; + } + else + { + return EXCEPTION_CONTINUE_SEARCH; + } +} + +void afsd_SetUnhandledExceptionFilter() +{ + SetUnhandledExceptionFilter(afsd_ExceptionFilter); +} + +#ifdef _DEBUG +void afsd_DbgBreakAllocInit() +{ + memset(afsd_crtDbgBreaks, -1, sizeof(afsd_crtDbgBreaks)); + afsd_crtDbgBreakCurrent = afsd_crtDbgBreaks; +} + +void afsd_DbgBreakAdd(DWORD requestNumber) +{ + int i; + for (i = 0; i < sizeof(afsd_crtDbgBreaks) - 1; i++) + { + if (afsd_crtDbgBreaks[i] == -1) + { + break; + } + } + afsd_crtDbgBreaks[i] = requestNumber; + + _CrtSetBreakAlloc(afsd_crtDbgBreaks[0]); +} +#endif diff --git a/src/WINNT/afsd/afsd_init.h b/src/WINNT/afsd/afsd_init.h index 803facc3a..0f09fd643 100644 --- a/src/WINNT/afsd/afsd_init.h +++ b/src/WINNT/afsd/afsd_init.h @@ -17,8 +17,8 @@ int afsd_InitCM(char **reasonP, struct cmd_syndesc *as, char *arock); int afsd_InitSMB(char **reasonP); #endif /* !DJGPP */ int afsd_InitDaemons(char **reasonP); - void afsd_ForceTrace(BOOL flush); +void afsd_SetUnhandledExceptionFilter(); extern char cm_HostName[]; diff --git a/src/WINNT/afsd/afsd_service.c b/src/WINNT/afsd/afsd_service.c index 3a4e0ca3b..1bcf2bcd7 100644 --- a/src/WINNT/afsd/afsd_service.c +++ b/src/WINNT/afsd/afsd_service.c @@ -200,11 +200,22 @@ void CheckMountDrive() } #endif +typedef BOOL ( APIENTRY * AfsdInitHook )(void); +#define AFSD_INIT_HOOK "AfsdInitHook" +#define AFSD_HOOK_DLL "afsdhook.dll" + void afsd_Main() { long code; char *reason; int jmpret; + HANDLE hInitHookDll; + AfsdInitHook initHook; + +#ifdef _DEBUG + _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF /*| _CRTDBG_CHECK_ALWAYS_DF*/ | + _CRTDBG_CHECK_CRT_DF /* | _CRTDBG_DELAY_FREE_MEM_DF */ ); +#endif osi_InitPanic(afsd_notifier); osi_InitTraceOption(); @@ -226,17 +237,55 @@ void afsd_Main() ServiceStatus.dwControlsAccepted = 0; SetServiceStatus(StatusHandle, &ServiceStatus); #endif -{ - HANDLE h; char *ptbuf[1]; - h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME); - ptbuf[0] = "AFS start pending"; - ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, ptbuf, NULL); - DeregisterEventSource(h); -} + { + HANDLE h; char *ptbuf[1]; + h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME); + ptbuf[0] = "AFS start pending"; + ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, ptbuf, NULL); + DeregisterEventSource(h); + } afsi_start(); - MainThreadId = GetCurrentThreadId(); + /* allow an exit to be called prior to any initialization */ + hInitHookDll = LoadLibrary(AFSD_HOOK_DLL); + if (hInitHookDll) + { + BOOL hookRc = FALSE; + initHook = ( AfsdInitHook ) GetProcAddress(hInitHookDll, AFSD_INIT_HOOK); + if (initHook) + { + hookRc = initHook(); + } + FreeLibrary(hInitHookDll); + + if (hookRc == FALSE) + { + ServiceStatus.dwCurrentState = SERVICE_STOPPED; + ServiceStatus.dwWin32ExitCode = NO_ERROR; + ServiceStatus.dwCheckPoint = 0; + ServiceStatus.dwWaitHint = 0; + ServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP; + SetServiceStatus(StatusHandle, &ServiceStatus); + + /* exit if initialization failed */ + return; + } + else + { + /* allow another 15 seconds to start */ + ServiceStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS; + ServiceStatus.dwServiceSpecificExitCode = 0; + ServiceStatus.dwCurrentState = SERVICE_START_PENDING; + ServiceStatus.dwWin32ExitCode = NO_ERROR; + ServiceStatus.dwCheckPoint = 2; + ServiceStatus.dwWaitHint = 15000; + ServiceStatus.dwControlsAccepted = 0; + SetServiceStatus(StatusHandle, &ServiceStatus); + } + } + + MainThreadId = GetCurrentThreadId(); jmpret = setjmp(notifier_jmp); if (jmpret == 0) { @@ -260,29 +309,28 @@ void afsd_Main() ServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP; SetServiceStatus(StatusHandle, &ServiceStatus); #endif - { - HANDLE h; char *ptbuf[1]; + { + HANDLE h; char *ptbuf[1]; h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME); ptbuf[0] = "AFS running"; ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, ptbuf, NULL); DeregisterEventSource(h); - } + } } - /* Check if we should mount a drive into AFS */ - CheckMountDrive(); + /* Check if we should mount a drive into AFS */ + CheckMountDrive(); WaitForSingleObject(WaitToTerminate, INFINITE); -{ - HANDLE h; char *ptbuf[1]; + { + HANDLE h; char *ptbuf[1]; h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME); ptbuf[0] = "AFS quitting"; - ReportEvent(h, - GlobalStatus ? EVENTLOG_ERROR_TYPE : EVENTLOG_INFORMATION_TYPE, - 0, 0, NULL, 1, 0, ptbuf, NULL); - DeregisterEventSource(h); -} + ReportEvent(h, GlobalStatus ? EVENTLOG_ERROR_TYPE : EVENTLOG_INFORMATION_TYPE, + 0, 0, NULL, 1, 0, ptbuf, NULL); + DeregisterEventSource(h); + } ServiceStatus.dwCurrentState = SERVICE_STOPPED; ServiceStatus.dwWin32ExitCode = NO_ERROR; @@ -292,23 +340,32 @@ void afsd_Main() SetServiceStatus(StatusHandle, &ServiceStatus); } -#ifdef NOTSERVICE -void main() +DWORD __stdcall afsdMain_thread(void* notUsed) { afsd_Main(); - Sleep(1000); - return ; + return(0); } -#else + void main() { - LONG status = ERROR_SUCCESS; SERVICE_TABLE_ENTRY dispatchTable[] = { {AFS_DAEMON_SERVICE_NAME, (LPSERVICE_MAIN_FUNCTION) afsd_Main}, {NULL, NULL} }; + afsd_SetUnhandledExceptionFilter(); + if (!StartServiceCtrlDispatcher(dispatchTable)) - status = GetLastError(); + { + LONG status = GetLastError(); + if (status == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) + { + DWORD tid; + CreateThread(NULL, 0, afsdMain_thread, 0, 0, &tid); + + printf("Hit to terminate OpenAFS Client Service\n"); + getchar(); + SetEvent(WaitToTerminate); + } + } } -#endif diff --git a/src/WINNT/afsd/afslogon.c b/src/WINNT/afsd/afslogon.c index ff671c1b9..7b3093199 100644 --- a/src/WINNT/afsd/afslogon.c +++ b/src/WINNT/afsd/afslogon.c @@ -74,7 +74,7 @@ void DebugEvent0(char *a) HANDLE h; char *ptbuf[1]; if (!ISLOGONTRACE(TraceOption)) return; - h = RegisterEventSource(NULL, a); + h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME); ptbuf[0] = a; ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, (const char **)ptbuf, NULL); DeregisterEventSource(h); @@ -87,7 +87,7 @@ void DebugEvent(char *a,char *b,...) va_list marker; if (!ISLOGONTRACE(TraceOption)) return; - h = RegisterEventSource(NULL, a); + h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME); va_start(marker,b); _vsnprintf(buf,MAXBUF_,b,marker); ptbuf[0] = buf; @@ -154,7 +154,7 @@ WCHAR *GetLogonScript(CHAR *pname) { HANDLE h; char *ptbuf[1],buf[132],tbuf[255]; WideCharToMultiByte(CP_ACP,0,script,LSPsize,tbuf,255,NULL,NULL); - h = RegisterEventSource(NULL, "AFS AfsLogon - GetLogonScript"); + h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME); sprintf(buf, "Script[%s,%d] Return Code[%x]",tbuf,LSPsize,code); ptbuf[0] = buf; ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, ptbuf, NULL); @@ -235,6 +235,7 @@ BOOLEAN APIENTRY DllEntryPoint(HANDLE dll, DWORD reason, PVOID reserved) case DLL_PROCESS_ATTACH: /* Initialize AFS libraries */ rx_Init(0); + initAFSDirPath(); ka_Init(0); break; diff --git a/src/WINNT/afsd/cm_buf.c b/src/WINNT/afsd/cm_buf.c index b4790d9d1..69c928dcf 100644 --- a/src/WINNT/afsd/cm_buf.c +++ b/src/WINNT/afsd/cm_buf.c @@ -1408,3 +1408,38 @@ long buf_CleanVnode(struct cm_scache *scp, cm_user_t *userp, cm_req_t *reqp) /* done */ return code; } + +/* dump the contents of the buf_hashTablepp. */ +int cm_DumpBufHashTable(FILE *outputFile, char *cookie) +{ + int zilch; + cm_buf_t *bp; + char output[1024]; + int i; + + lock_ObtainRead(&buf_globalLock); + + sprintf(output, "%s - dumping buf_HashTable - buf_hashSize=%d\n", cookie, buf_hashSize); + WriteFile(outputFile, output, strlen(output), &zilch, NULL); + + for (i = 0; i < buf_hashSize; i++) + { + for(bp = buf_hashTablepp[i]; bp; bp=bp->hashp) + { + if (bp->refCount) + { + sprintf(output, "%s bp=0x%08X, hash=%d, fid (cell=%d, volume=%d," + "vnode=%d, unique=%d), size=%d refCount=%d\n", + cookie, (void *)bp, i, bp->fid.cell, bp->fid.volume, + bp->fid.vnode, bp->fid.unique, bp->size, bp->refCount); + WriteFile(outputFile, output, strlen(output), &zilch, NULL); + } + } + } + + sprintf(output, "%s - Done dumping buf_HashTable.\n", cookie); + WriteFile(outputFile, output, strlen(output), &zilch, NULL); + + lock_ReleaseRead(&buf_globalLock); +} + diff --git a/src/WINNT/afsd/cm_cell.c b/src/WINNT/afsd/cm_cell.c index e2ba9e4ca..8752cb2dc 100644 --- a/src/WINNT/afsd/cm_cell.c +++ b/src/WINNT/afsd/cm_cell.c @@ -63,65 +63,66 @@ cm_cell_t *cm_GetCell(char *namep, long flags) cm_cell_t *cm_GetCell_Gen(char *namep, char *newnamep, long flags) { cm_cell_t *cp; - long code; - static cellCounter = 1; /* locked by cm_cellLock */ + long code; + static cellCounter = 1; /* locked by cm_cellLock */ int ttl; char fullname[200]; lock_ObtainWrite(&cm_cellLock); for(cp = cm_allCellsp; cp; cp=cp->nextp) { if (strcmp(namep, cp->namep) == 0) { - strcpy(fullname, cp->namep); - break; + strcpy(fullname, cp->namep); + break; } - } + } if ((!cp && (flags & CM_FLAG_CREATE)) #ifdef AFS_AFSDB_ENV - /* if it's from DNS, see if it has expired */ - || (cp && (cp->flags & CM_CELLFLAG_DNS) && (time(0) > cp->timeout)) + /* if it's from DNS, see if it has expired */ + || (cp && (cp->flags & CM_CELLFLAG_DNS) && (time(0) > cp->timeout)) #endif ) { if (!cp) cp = malloc(sizeof(*cp)); - memset(cp, 0, sizeof(*cp)); - code = cm_SearchCellFile(namep, fullname, cm_AddCellProc, cp); + memset(cp, 0, sizeof(*cp)); + code = cm_SearchCellFile(namep, fullname, cm_AddCellProc, cp); if (code) { #ifdef AFS_AFSDB_ENV - if (cm_dnsEnabled /*&& cm_DomainValid(namep)*/) - code = cm_SearchCellByDNS(namep, fullname, &ttl, cm_AddCellProc, cp); + if (cm_dnsEnabled /*&& cm_DomainValid(namep)*/) + code = cm_SearchCellByDNS(namep, fullname, &ttl, cm_AddCellProc, cp); #endif - if (code) { - free(cp); - cp = NULL; - goto done; - } + if (code) { + free(cp); + cp = NULL; + goto done; + } #ifdef AFS_AFSDB_ENV - else { /* got cell from DNS */ - cp->flags |= CM_CELLFLAG_DNS; - cp->timeout = time(0) + ttl; - } + else { /* got cell from DNS */ + cp->flags |= CM_CELLFLAG_DNS; + cp->timeout = time(0) + ttl; + } #endif } /* randomise among those vlservers having the same rank*/ cm_RandomizeServer(&cp->vlServersp); - /* otherwise we found the cell, and so we're nearly done */ - lock_InitializeMutex(&cp->mx, "cm_cell_t mutex"); + /* otherwise we found the cell, and so we're nearly done */ + lock_InitializeMutex(&cp->mx, "cm_cell_t mutex"); /* copy in name */ - cp->namep = malloc(strlen(fullname)+1); - strcpy(cp->namep, fullname); + cp->namep = malloc(strlen(fullname)+1); + strcpy(cp->namep, fullname); /* thread on global list */ - cp->nextp = cm_allCellsp; - cm_allCellsp = cp; + cp->nextp = cm_allCellsp; + cm_allCellsp = cp; - cp->cellID = cellCounter++; - } + cp->cellID = cellCounter++; + } -done: - if (newnamep) + done: + /* fullname is not valid if cp == NULL */ + if (cp && newnamep) strcpy(newnamep, fullname); lock_ReleaseWrite(&cm_cellLock); return cp; diff --git a/src/WINNT/afsd/cm_config.c b/src/WINNT/afsd/cm_config.c index ed5b789e6..1d52d4e7c 100644 --- a/src/WINNT/afsd/cm_config.c +++ b/src/WINNT/afsd/cm_config.c @@ -48,14 +48,14 @@ extern int errno; static long cm_ParsePair(char *lineBufferp, char *leftp, char *rightp) { char *tp; - char tc; - int sawEquals; + char tc; + int sawEquals; int sawBracket; - sawEquals = 0; + sawEquals = 0; sawBracket = 0; - for(tp = lineBufferp; *tp; tp++) { - tc = *tp; + for(tp = lineBufferp; *tp; tp++) { + tc = *tp; if (sawBracket) { if (tc == ']') @@ -64,33 +64,38 @@ static long cm_ParsePair(char *lineBufferp, char *leftp, char *rightp) } /* comment or line end */ - if (tc == '#' || tc == '\r' || tc == '\n') break; + if (tc == '#' || tc == '\r' || tc == '\n') + break; - /* square bracket comment -- look for closing delim - if (tc == '[') {sawBracket = 1; continue;} + /* square bracket comment -- look for closing delim */ + if (tc == '[') { + sawBracket = 1; + continue; + } /* space or tab */ - if (tc == ' ' || tc == '\t') continue; + if (tc == ' ' || tc == '\t') + continue; - if (tc == '=') { - sawEquals = 1; - continue; + if (tc == '=') { + sawEquals = 1; + continue; } - /* now we have a real character, put it in the appropriate bucket */ - if (sawEquals == 0) { + /* now we have a real character, put it in the appropriate bucket */ + if (sawEquals == 0) { *leftp++ = tc; - } - else { + } + else { *rightp++ = tc; - } } + } /* null terminate the strings */ *leftp = 0; - *rightp = 0; + *rightp = 0; - return 0; /* and return success */ + return 0; /* and return success */ } /* search for a cell, and either return an error code if we don't find it, @@ -106,68 +111,69 @@ long cm_SearchCellFile(char *cellNamep, char *newCellNamep, cm_configProc_t *procp, void *rockp) { char wdir[256]; - int tlen; - FILE *tfilep, *bestp, *tempp; - char *tp; - char lineBuffer[256]; - struct hostent *thp; - char *valuep; - struct sockaddr_in vlSockAddr; - int inRightCell; - int foundCell; - long code; + int tlen; + FILE *tfilep, *bestp, *tempp; + char *tp; + char lineBuffer[256]; + struct hostent *thp; + char *valuep; + struct sockaddr_in vlSockAddr; + int inRightCell; + int foundCell; + long code; int tracking = 1, partial = 0; #if defined(DJGPP) || defined(AFS_WIN95_ENV) long ip_addr; - int c1, c2, c3, c4; - char aname[256]; + int c1, c2, c3, c4; + char aname[256]; #endif - char *afsconf_path; + char *afsconf_path; foundCell = 0; #if !defined(DJGPP) code = GetWindowsDirectory(wdir, sizeof(wdir)); - if (code == 0 || code > sizeof(wdir)) return -1; + if (code == 0 || code > sizeof(wdir)) + return -1; /* add trailing backslash, if required */ - tlen = strlen(wdir); - if (wdir[tlen-1] != '\\') strcat(wdir, "\\"); + tlen = strlen(wdir); + if (wdir[tlen-1] != '\\') strcat(wdir, "\\"); #else - strcpy(wdir, cm_confDir); - strcat(wdir,"/"); + strcpy(wdir, cm_confDir); + strcat(wdir,"/"); #endif /* !DJGPP */ - strcat(wdir, AFS_CELLSERVDB); + strcat(wdir, AFS_CELLSERVDB); - tfilep = fopen(wdir, "r"); + tfilep = fopen(wdir, "r"); - if (!tfilep) { - /* If we are using DJGPP client, cellservdb will be in afsconf dir. */ - /* If we are in Win95 here, we are linking with klog etc. and are - using DJGPP client even though DJGPP is not defined. So we still - need to check AFSCONF for location. */ - afsconf_path = getenv("AFSCONF"); - if (!afsconf_path) - strcpy(wdir, AFSDIR_CLIENT_ETC_DIRPATH); - else - strcpy(wdir, afsconf_path); - strcat(wdir, "/"); - strcat(wdir, AFS_CELLSERVDB_UNIX); - /*fprintf(stderr, "opening cellservdb file %s\n", wdir);*/ - tfilep = fopen(wdir, "r"); - if (!tfilep) return -2; - } + if (!tfilep) { + /* If we are using DJGPP client, cellservdb will be in afsconf dir. */ + /* If we are in Win95 here, we are linking with klog etc. and are + using DJGPP client even though DJGPP is not defined. So we still + need to check AFSCONF for location. */ + afsconf_path = getenv("AFSCONF"); + if (!afsconf_path) + strcpy(wdir, AFSDIR_CLIENT_ETC_DIRPATH); + else + strcpy(wdir, afsconf_path); + strcat(wdir, "/"); + strcat(wdir, AFS_CELLSERVDB_UNIX); + /*fprintf(stderr, "opening cellservdb file %s\n", wdir);*/ + tfilep = fopen(wdir, "r"); + if (!tfilep) return -2; + } bestp = fopen(wdir, "r"); /* have we seen the cell line for the guy we're looking for? */ inRightCell = 0; while (1) { - tp = fgets(lineBuffer, sizeof(lineBuffer), tfilep); - if (tracking) + tp = fgets(lineBuffer, sizeof(lineBuffer), tfilep); + if (tracking) (void) fgets(lineBuffer, sizeof(lineBuffer), bestp); - if (tp == NULL) { + if (tp == NULL) { if (feof(tfilep)) { /* hit EOF */ if (partial) { @@ -188,36 +194,36 @@ long cm_SearchCellFile(char *cellNamep, char *newCellNamep, return (foundCell? 0 : -3); } } - } - - /* turn trailing cr or lf into null */ - tp = strchr(lineBuffer, '\r'); - if (tp) *tp = 0; - tp = strchr(lineBuffer, '\n'); - if (tp) *tp = 0; - + } + + /* turn trailing cr or lf into null */ + tp = strchr(lineBuffer, '\r'); + if (tp) *tp = 0; + tp = strchr(lineBuffer, '\n'); + if (tp) *tp = 0; + /* skip blank lines */ - if (lineBuffer[0] == 0) continue; + if (lineBuffer[0] == 0) continue; - if (lineBuffer[0] == '>') { + if (lineBuffer[0] == '>') { /* trim off at white space or '#' chars */ - tp = strchr(lineBuffer, ' '); - if (tp) *tp = 0; - tp = strchr(lineBuffer, '\t'); - if (tp) *tp = 0; - tp = strchr(lineBuffer, '#'); - if (tp) *tp = 0; + tp = strchr(lineBuffer, ' '); + if (tp) *tp = 0; + tp = strchr(lineBuffer, '\t'); + if (tp) *tp = 0; + tp = strchr(lineBuffer, '#'); + if (tp) *tp = 0; /* now see if this is the right cell */ - if (stricmp(lineBuffer+1, cellNamep) == 0) { + if (stricmp(lineBuffer+1, cellNamep) == 0) { /* found the cell we're looking for */ if (newCellNamep) strcpy(newCellNamep, lineBuffer+1); - inRightCell = 1; + inRightCell = 1; tracking = 0; } else if (strnicmp(lineBuffer+1, cellNamep, - strlen(cellNamep)) == 0) { + strlen(cellNamep)) == 0) { /* partial match */ if (partial) { /* ambiguous */ fclose(tfilep); @@ -230,58 +236,62 @@ long cm_SearchCellFile(char *cellNamep, char *newCellNamep, tracking = 0; partial = 1; } - else inRightCell = 0; - } - else { + else inRightCell = 0; + } + else { #if !defined(DJGPP) && !defined(AFS_WIN95_ENV) - valuep = strchr(lineBuffer, '#'); + valuep = strchr(lineBuffer, '#'); if (valuep == NULL) { fclose(tfilep); fclose(bestp); return -4; } - valuep++; /* skip the "#" */ + valuep++; /* skip the "#" */ - valuep += strspn(valuep, " \t"); /* skip SP & TAB */ - /* strip spaces and tabs in the end. They should not be there according to CellServDB format - so do this just in case */ - while (valuep[strlen(valuep) - 1] == ' ' || valuep[strlen(valuep) - 1] == '\t') valuep[strlen(valuep) - 1] = '\0'; + valuep += strspn(valuep, " \t"); /* skip SP & TAB */ + /* strip spaces and tabs in the end. They should not be there according to CellServDB format + so do this just in case */ + while (valuep[strlen(valuep) - 1] == ' ' || valuep[strlen(valuep) - 1] == '\t') + valuep[strlen(valuep) - 1] = '\0'; #endif /* !DJGPP */ if (inRightCell) { #if !defined(DJGPP) && !defined(AFS_WIN95_ENV) /* add the server to the VLDB list */ - thp = gethostbyname(valuep); - if (thp) { + thp = gethostbyname(valuep); + if (thp) { memcpy(&vlSockAddr.sin_addr.s_addr, thp->h_addr, - sizeof(long)); - vlSockAddr.sin_family = AF_INET; - /* sin_port supplied by connection code */ + sizeof(long)); + vlSockAddr.sin_family = AF_INET; + /* sin_port supplied by connection code */ if (procp) (*procp)(rockp, &vlSockAddr, valuep); - foundCell = 1; + foundCell = 1; } #else - /* For DJGPP, we will read IP address instead - of name/comment field */ - code = sscanf(lineBuffer, "%d.%d.%d.%d #%s", - &c1, &c2, &c3, &c4, aname); - tp = (char *) &ip_addr; - *tp++ = c1; - *tp++ = c2; - *tp++ = c3; - *tp++ = c4; - memcpy(&vlSockAddr.sin_addr.s_addr, &ip_addr, - sizeof(long)); - vlSockAddr.sin_family = AF_INET; - /* sin_port supplied by connection code */ - if (procp) - (*procp)(rockp, &vlSockAddr, valuep); - foundCell = 1; + /* For DJGPP, we will read IP address instead + of name/comment field */ + code = sscanf(lineBuffer, "%d.%d.%d.%d #%s", + &c1, &c2, &c3, &c4, aname); + tp = (char *) &ip_addr; + *tp++ = c1; + *tp++ = c2; + *tp++ = c3; + *tp++ = c4; + memcpy(&vlSockAddr.sin_addr.s_addr, &ip_addr, + sizeof(long)); + vlSockAddr.sin_family = AF_INET; + /* sin_port supplied by connection code */ + if (procp) + (*procp)(rockp, &vlSockAddr, valuep); + foundCell = 1; #endif /* !DJGPP */ - } - } /* a vldb line */ - } /* while loop processing all lines */ + } + } /* a vldb line */ + } /* while loop processing all lines */ + + /* if for some unknown reason cell is not found, return negative code (-11) ??? */ + return (foundCell) ? 0 : -11; } long cm_SearchCellByDNS(char *cellNamep, char *newCellNamep, int *ttl, diff --git a/src/WINNT/afsd/cm_conn.c b/src/WINNT/afsd/cm_conn.c index c597c79d2..4d35c0668 100644 --- a/src/WINNT/afsd/cm_conn.c +++ b/src/WINNT/afsd/cm_conn.c @@ -29,6 +29,9 @@ osi_rwlock_t cm_connLock; long RDRtimeout = CM_CONN_DEFAULTRDRTIMEOUT; +#define LANMAN_WKS_PARAM_KEY "SYSTEM\\CurrentControlSet\\Services\\lanmanworkstation\\parameters" +#define LANMAN_WKS_SESSION_TIMEOUT "SessTimeout" + afs_int32 cryptall = 0; void cm_PutConn(cm_conn_t *connp) @@ -41,11 +44,37 @@ void cm_PutConn(cm_conn_t *connp) void cm_InitConn(void) { static osi_once_t once; + long code; + DWORD sessTimeout; + HKEY parmKey; - if (osi_Once(&once)) { + if (osi_Once(&once)) { lock_InitializeRWLock(&cm_connLock, "connection global lock"); - osi_EndOnce(&once); + + /* keisa - read timeout value for lanmanworkstation service. + * It is used as hardtimeout for connections. + * Default value is 45 + */ + code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, LANMAN_WKS_PARAM_KEY, + 0, KEY_QUERY_VALUE, &parmKey); + if (code == ERROR_SUCCESS) + { + DWORD dummyLen = sizeof(sessTimeout); + code = RegQueryValueEx(parmKey, LANMAN_WKS_SESSION_TIMEOUT, NULL, NULL, + (BYTE *) &sessTimeout, &dummyLen); + if (code == ERROR_SUCCESS) + { + afsi_log("lanmanworkstation : SessTimeout %d", sessTimeout); + RDRtimeout = sessTimeout; + } + else + { + RDRtimeout = CM_CONN_DEFAULTRDRTIMEOUT; + } } + + osi_EndOnce(&once); + } } void cm_InitReq(cm_req_t *reqp) @@ -134,7 +163,30 @@ cm_Analyze(cm_conn_t *connp, cm_user_t *userp, cm_req_t *reqp, if (reqp->flags & CM_REQ_NORETRY) goto out; - /* if all servers are offline, mark them non-busy and start over */ + /* if timeout - check that is did not exceed the SMB timeout + and retry */ + if (errorCode == CM_ERROR_TIMEDOUT) + { + long timeUsed, timeLeft; + /* timeleft - get if from reqp the same way as cmXonnByMServers does */ +#ifndef DJGPP + timeUsed = (GetCurrentTime() - reqp->startTime) / 1000; +#else + gettimeofday(&now, NULL); + timeUsed = sub_time(now, reqp->startTime) / 1000; +#endif + + /* leave 5 seconds margin for sleep */ + timeLeft = RDRtimeout - timeUsed; + if (timeLeft > 5) + { + thrd_Sleep(3000); + cm_CheckServers(CM_FLAG_CHECKDOWNSERVERS, NULL); + retry = 1; + } + } + + /* if all servers are offline, mark them non-busy and start over */ if (errorCode == CM_ERROR_ALLOFFLINE) { osi_Log0(afsd_logp, "cm_Analyze passed CM_ERROR_ALLOFFLINE."); thrd_Sleep(5000); @@ -295,41 +347,42 @@ long cm_ConnByMServers(cm_serverRef_t *serversp, cm_user_t *usersp, lock_ObtainWrite(&cm_serverLock); - for(tsrp = serversp; tsrp; tsrp=tsrp->next) { - tsp = tsrp->server; - tsp->refCount++; - lock_ReleaseWrite(&cm_serverLock); - if (!(tsp->flags & CM_SERVERFLAG_DOWN)) { - if (tsrp->status == busy) - someBusy = 1; - else if (tsrp->status == offline) - someOffline = 1; - else { - code = cm_ConnByServer(tsp, usersp, connpp); - if (code == 0) { - cm_PutServer(tsp); - /* Set RPC timeout */ - if (timeLeft > CM_CONN_CONNDEADTIME) - timeLeft = CM_CONN_CONNDEADTIME; - - if (hardTimeLeft > CM_CONN_HARDDEADTIME) - hardTimeLeft = CM_CONN_HARDDEADTIME; - - lock_ObtainMutex(&(*connpp)->mx); - rx_SetConnDeadTime((*connpp)->callp, - timeLeft); - rx_SetConnHardDeadTime((*connpp)->callp, - (u_short) hardTimeLeft); - lock_ReleaseMutex(&(*connpp)->mx); - - return 0; - } - if (firstError == 0) firstError = code; - } + for(tsrp = serversp; tsrp; tsrp=tsrp->next) { + tsp = tsrp->server; + tsp->refCount++; + lock_ReleaseWrite(&cm_serverLock); + if (!(tsp->flags & CM_SERVERFLAG_DOWN)) { + if (tsrp->status == busy) + someBusy = 1; + else if (tsrp->status == offline) + someOffline = 1; + else { + code = cm_ConnByServer(tsp, usersp, connpp); + if (code == 0) { + cm_PutServer(tsp); + /* Set RPC timeout */ + if (timeLeft > CM_CONN_CONNDEADTIME) + timeLeft = CM_CONN_CONNDEADTIME; + + if (hardTimeLeft > CM_CONN_HARDDEADTIME) + hardTimeLeft = CM_CONN_HARDDEADTIME; + + lock_ObtainMutex(&(*connpp)->mx); + rx_SetConnDeadTime((*connpp)->callp, + timeLeft); + rx_SetConnHardDeadTime((*connpp)->callp, + (u_short) hardTimeLeft); + lock_ReleaseMutex(&(*connpp)->mx); + + return 0; } - lock_ObtainWrite(&cm_serverLock); - osi_assert(tsp->refCount-- > 0); + if (firstError == 0) + firstError = code; + } } + lock_ObtainWrite(&cm_serverLock); + osi_assert(tsp->refCount-- > 0); + } lock_ReleaseWrite(&cm_serverLock); if (firstError == 0) { @@ -341,7 +394,7 @@ long cm_ConnByMServers(cm_serverRef_t *serversp, cm_user_t *usersp, else firstError = CM_ERROR_NOSUCHVOLUME; } osi_Log1(afsd_logp, "cm_ConnByMServers returning %x", firstError); - return firstError; + return firstError; } /* called with a held server to GC all bad connections hanging off of the server */ diff --git a/src/WINNT/afsd/cm_ioctl.c b/src/WINNT/afsd/cm_ioctl.c index d17d5dcb9..70b7d116f 100644 --- a/src/WINNT/afsd/cm_ioctl.c +++ b/src/WINNT/afsd/cm_ioctl.c @@ -176,15 +176,19 @@ void cm_SkipIoctlPath(smb_ioctl_t *ioctlp) void cm_NormalizeAfsPath (char *outpathp, char *inpathp) { char *cp; - - if (!strnicmp (inpathp, "/afs", strlen("/afs"))) + char bslash_mountRoot[256]; + + strncpy(bslash_mountRoot, cm_mountRoot, sizeof(bslash_mountRoot) - 1); + bslash_mountRoot[0] = '\\'; + + if (!strnicmp (inpathp, cm_mountRoot, strlen(cm_mountRoot))) lstrcpy (outpathp, inpathp); - else if (!strnicmp (inpathp, "\\afs", strlen("\\afs"))) + else if (!strnicmp (inpathp, bslash_mountRoot, strlen(bslash_mountRoot))) lstrcpy (outpathp, inpathp); else if ((inpathp[0] == '/') || (inpathp[0] == '\\')) - sprintf (outpathp, "/afs%s", inpathp); + sprintf (outpathp, "%s%s", cm_mountRoot, inpathp); else // inpathp looks like "/usr" - sprintf (outpathp, "/afs/%s", inpathp); + sprintf (outpathp, "%s/%s", cm_mountRoot, inpathp); for (cp = outpathp; *cp != 0; ++cp) { if (*cp == '\\') @@ -195,8 +199,8 @@ void cm_NormalizeAfsPath (char *outpathp, char *inpathp) outpathp[strlen(outpathp)-1] = 0; } - if (!strcmpi (outpathp, "/afs")) { - strcpy (outpathp, "/afs/"); + if (!strcmpi (outpathp, cm_mountRoot)) { + strcpy (outpathp, cm_mountRoot); } } @@ -918,12 +922,35 @@ long cm_IoctlGetCell(struct smb_ioctl *ioctlp, struct cm_user *userp) else return CM_ERROR_NOMORETOKENS; /* mapped to EDOM */ } +extern long cm_AddCellProc(void *rockp, struct sockaddr_in *addrp, char *namep); + long cm_IoctlNewCell(struct smb_ioctl *ioctlp, struct cm_user *userp) { - /* don't need to do, since NT cache manager will re-read afsdcell.ini - * on every access to a new cell. - */ - return CM_ERROR_INVAL; + /* NT cache manager will read cell information from afsdcell.ini each time + * cell is accessed. So, this call is necessary only if list of server for a cell + * changes (or IP addresses of cell servers changes). + * All that needs to be done is to refresh server information for all cells that + * are already loaded. + + * cell list will be cm_CellLock and cm_ServerLock will be held for write. + */ + + cm_cell_t *tcellp; + + cm_SkipIoctlPath(ioctlp); + lock_ObtainWrite(&cm_cellLock); + + for(tcellp = cm_allCellsp; tcellp; tcellp=tcellp->nextp) + { + /* delete all previous server lists - cm_FreeServerList will ask for write on cm_ServerLock*/ + cm_FreeServerList(&tcellp->vlServersp); + tcellp->vlServersp = NULL; + cm_SearchCellFile(tcellp->namep, tcellp->namep, cm_AddCellProc, tcellp); + cm_RandomizeServer(&tcellp->vlServersp); + } + + lock_ReleaseWrite(&cm_cellLock); + return 0; } long cm_IoctlGetWsCell(smb_ioctl_t *ioctlp, cm_user_t *userp) @@ -1272,7 +1299,8 @@ long cm_IoctlListlink(struct smb_ioctl *ioctlp, struct cm_user *userp) if (code == 0) { cp = ioctlp->outDatap; if (newRootScp != NULL) { - strcpy(cp, "/afs/"); + strcpy(cp, cm_mountRoot); + strcat(cp, "/"); cp += strlen(cp); } strcpy(cp, spacep->data); @@ -1765,8 +1793,8 @@ long cm_IoctlMakeSubmount(smb_ioctl_t *ioctlp, cm_user_t *userp) */ WritePrivateProfileString("AFS Submounts", submountreqp, - (strlen(&afspath[strlen("/afs")])) ? - &afspath[strlen("/afs")]:"/", + (strlen(&afspath[strlen(cm_mountRoot)])) ? + &afspath[strlen(cm_mountRoot)]:"/", "afsdsbmt.ini"); strcpy(ioctlp->outDatap, submountreqp); @@ -1879,8 +1907,8 @@ long cm_IoctlMakeSubmount(smb_ioctl_t *ioctlp, cm_user_t *userp) sprintf(ioctlp->outDatap, "auto%ld", nextAutoSubmount); WritePrivateProfileString("AFS Submounts", ioctlp->outDatap, - (strlen(&afspath[lstrlen("/afs")])) ? - &afspath[lstrlen("/afs")]:"/", + (strlen(&afspath[lstrlen(cm_mountRoot)])) ? + &afspath[lstrlen(cm_mountRoot)]:"/", "afsdsbmt.ini"); ioctlp->outDatap += strlen(ioctlp->outDatap) +1; @@ -1927,3 +1955,70 @@ long cm_IoctlGetSMBName(smb_ioctl_t *ioctlp, cm_user_t *userp) return 0; } +/* + * functions to dump contents of various structures. + * In debug build (linked with crt debug library) will dump allocated but not freed memory + */ +extern int cm_DumpSCache(FILE *outputFile, char *cookie); +extern int cm_DumpBufHashTable(FILE *outputFile, char *cookie); +extern int smb_DumpVCP(FILE *outputFile, char *cookie); + +long cm_IoctlMemoryDump(struct smb_ioctl *ioctlp, struct cm_user *userp) +{ + long inValue = 0; + HANDLE hLogFile; + char logfileName[MAX_PATH+1]; + char *cookie; + +#ifdef _DEBUG + static _CrtMemState memstate; +#endif + + cm_SkipIoctlPath(ioctlp); + memcpy(&inValue, ioctlp->inDatap, sizeof(long)); + + GetWindowsDirectory(logfileName, sizeof(logfileName)); + strncat(logfileName, "\\afsd_alloc.log", sizeof(logfileName)); + + hLogFile = CreateFile(logfileName, GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + + if (!hLogFile) + { + /* error */ + inValue = -1; + memcpy(ioctlp->outDatap, &inValue, sizeof(long)); + ioctlp->outDatap += sizeof(long); + + return 0; + } + + SetFilePointer(hLogFile, 0, NULL, FILE_END); + + cookie = inValue ? "b" : "e"; + +#ifdef _DEBUG + + if (inValue) + { + _CrtMemCheckpoint(&memstate); + } + else + { + _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); + _CrtSetReportFile(_CRT_WARN, hLogFile); + _CrtMemDumpAllObjectsSince(&memstate); + } +#endif + + /* dump all interesting data */ + cm_DumpSCache(hLogFile, cookie); + cm_DumpBufHashTable(hLogFile, cookie); + smb_DumpVCP(hLogFile, cookie); + + CloseHandle(hLogFile); + + memcpy(ioctlp->outDatap, &inValue, sizeof(long)); + ioctlp->outDatap += sizeof(long); + + return 0; +} diff --git a/src/WINNT/afsd/cm_ioctl.h b/src/WINNT/afsd/cm_ioctl.h index 57b3ddf8e..4e9089e2e 100644 --- a/src/WINNT/afsd/cm_ioctl.h +++ b/src/WINNT/afsd/cm_ioctl.h @@ -131,6 +131,7 @@ extern long cm_IoctlFreemountAddCell(smb_ioctl_t *ioctlp, cm_user_t *userp); extern long cm_IoctlFreemountRemoveCell(smb_ioctl_t *ioctlp, cm_user_t *userp); +extern long cm_IoctlMemoryDump(smb_ioctl_t *ioctlp, cm_user_t *userp); #endif /* __CM_IOCTL_INTERFACES_ONLY__ */ #endif /* __CM_IOCTL_H_ENV__ */ diff --git a/src/WINNT/afsd/cm_scache.c b/src/WINNT/afsd/cm_scache.c index e8371b7d8..a72545e1c 100644 --- a/src/WINNT/afsd/cm_scache.c +++ b/src/WINNT/afsd/cm_scache.c @@ -964,5 +964,60 @@ int cm_FindFileType(cm_fid_t *fidp) } } lock_ReleaseWrite(&cm_scacheLock); - return NULL; + return 0; } + +/* dump all scp's that have reference count > 0 to a file. + * cookie is used to identify this batch for easy parsing, + * and it a string provided by a caller + */ +int cm_DumpSCache(FILE *outputFile, char *cookie) +{ + int zilch; + cm_scache_t *scp; + char output[1024]; + int i; + + lock_ObtainRead(&cm_scacheLock); + + sprintf(output, "%s - dumping scache - cm_currentSCaches=%d, cm_maxSCaches=%d\n", cookie, cm_currentSCaches, cm_maxSCaches); + WriteFile(outputFile, output, strlen(output), &zilch, NULL); + + for (scp = cm_scacheLRULastp; scp; scp = (cm_scache_t *) osi_QPrev(&scp->q)) + { + if (scp->refCount != 0) + { + sprintf(output, "%s fid (cell=%d, volume=%d, vnode=%d, unique=%d) refCount=%d\n", + cookie, scp->fid.cell, scp->fid.volume, scp->fid.vnode, scp->fid.unique, + scp->refCount); + WriteFile(outputFile, output, strlen(output), &zilch, NULL); + } + } + + sprintf(output, "%s - dumping cm_hashTable - cm_hashTableSize=%d\n", cookie, cm_hashTableSize); + WriteFile(outputFile, output, strlen(output), &zilch, NULL); + + for (i = 0; i < cm_hashTableSize; i++) + { + for(scp = cm_hashTablep[i]; scp; scp=scp->nextp) + { + if (scp) + { + if (scp->refCount) + { + sprintf(output, "%s scp=0x%08X, hash=%d, fid (cell=%d, volume=%d, vnode=%d, unique=%d) refCount=%d\n", + cookie, (void *)scp, i, scp->fid.cell, scp->fid.volume, scp->fid.vnode, + scp->fid.unique, scp->refCount); + WriteFile(outputFile, output, strlen(output), &zilch, NULL); + } + } + } + } + + sprintf(output, "%s - Done dumping scache.\n", cookie); + WriteFile(outputFile, output, strlen(output), &zilch, NULL); + + lock_ReleaseRead(&cm_scacheLock); + return (0); +} + diff --git a/src/WINNT/afsd/cm_server.c b/src/WINNT/afsd/cm_server.c index 16672eb8b..b630b6160 100644 --- a/src/WINNT/afsd/cm_server.c +++ b/src/WINNT/afsd/cm_server.c @@ -256,6 +256,8 @@ long cm_ChecksumServerList(cm_serverRef_t *serversp) int first = 1; cm_serverRef_t *tsrp; + lock_ObtainWrite(&cm_serverLock); + for (tsrp = serversp; tsrp; tsrp=tsrp->next) { if (first) first = 0; @@ -264,6 +266,7 @@ long cm_ChecksumServerList(cm_serverRef_t *serversp) sum ^= (long) tsrp->server; } + lock_ReleaseWrite(&cm_serverLock); return sum; } @@ -276,11 +279,14 @@ void cm_InsertServerList(cm_serverRef_t** list, cm_serverRef_t* element) cm_serverRef_t *current=*list; unsigned short ipRank = element->server->ipRank; + lock_ObtainWrite(&cm_serverLock); + /* insertion into empty list or at the beginning of the list */ if ( !current || (current->server->ipRank > ipRank) ) { element->next = *list; *list = element; + lock_ReleaseWrite(&cm_serverLock); return ; } @@ -292,6 +298,7 @@ void cm_InsertServerList(cm_serverRef_t** list, cm_serverRef_t* element) } element->next = current->next; current->next = element; + lock_ReleaseWrite(&cm_serverLock); } /* ** Re-sort the server list with the modified rank @@ -307,6 +314,7 @@ long cm_ChangeRankServer(cm_serverRef_t** list, cm_server_t* server) if ( (!*current) || !((*current)->next) ) return 1; /* list unchanged: return success */ + lock_ObtainWrite(&cm_serverLock); /* if the server is on the list, delete it from list */ while ( *current ) { @@ -319,11 +327,14 @@ long cm_ChangeRankServer(cm_serverRef_t** list, cm_server_t* server) current = & ( (*current)->next); } /* if this volume is not replicated on this server */ - if ( !element) + if (!element) { + lock_ReleaseWrite(&cm_serverLock); return 1; /* server is not on list */ + } /* re-insert deleted element into the list with modified rank*/ cm_InsertServerList(list, element); + lock_ReleaseWrite(&cm_serverLock); return 0; } /* @@ -340,6 +351,8 @@ void cm_RandomizeServer(cm_serverRef_t** list) if ( !tsrp || ! tsrp->next ) return ; + lock_ObtainWrite(&cm_serverLock); + /* count the number of servers with the lowest rank */ lowestRank = tsrp->server->ipRank; for ( count=1, tsrp=tsrp->next; tsrp; tsrp=tsrp->next) @@ -351,12 +364,17 @@ void cm_RandomizeServer(cm_serverRef_t** list) } /* if there is only one server with the lowest rank, we are done */ - if ( count <= 1 ) + if ( count <= 1 ) { + lock_ReleaseWrite(&cm_serverLock); return ; + } picked = rand() % count; - if ( !picked ) + if ( !picked ) { + lock_ReleaseWrite(&cm_serverLock); return ; + } + tsrp = *list; while (--picked >= 0) { @@ -366,4 +384,23 @@ void cm_RandomizeServer(cm_serverRef_t** list) lastTsrp->next = tsrp->next; /* delete random element from list*/ tsrp->next = *list; /* insert element at the beginning of list */ *list = tsrp; + lock_ReleaseWrite(&cm_serverLock); +} + +void cm_FreeServerList(cm_serverRef_t** list) +{ + cm_serverRef_t *current = *list; + cm_serverRef_t *next = 0; + + lock_ObtainWrite(&cm_serverLock); + + while (current) + { + next = current->next; + free(current); + current = next; + } + + lock_ReleaseWrite(&cm_serverLock); } + diff --git a/src/WINNT/afsd/fs.c b/src/WINNT/afsd/fs.c index a981f238a..5c4c384df 100644 --- a/src/WINNT/afsd/fs.c +++ b/src/WINNT/afsd/fs.c @@ -48,6 +48,7 @@ static char tspace[1024]; static struct ubik_client *uclient; #endif /* not WIN32 */ +static MemDumpCmd(struct cmd_syndesc *asp); extern afs_int32 VL_GetEntryByNameO(); @@ -1855,9 +1856,22 @@ register struct cmd_syndesc *as; { Die(errno, 0); return 0; #else /* WIN32 */ - fprintf(stderr, "fs: 'newcell' not implemented, since afsdcell.ini is\n"); - fprintf(stderr, "fs: re-read on every reference to a new cell, on Windows/NT.\n"); - return -1; + register afs_int32 code; + struct ViceIoctl blob; + + blob.in_size = 0; + blob.in = (char *) 0; + blob.out_size = MAXSIZE; + blob.out = space; + + code = pioctl((char *) 0, VIOCNEWCELL, &blob, 1); + + if (code) { + Die(errno, (char *) 0); + } + else + printf("Cell servers information refreshed\n"); + return 0; #endif /* WIN32 */ } @@ -2716,7 +2730,7 @@ char **argv; { cmd_AddParm(ts, "-file", CMD_SINGLE, CMD_OPTIONAL, "output to named file"); cmd_AddParm(ts, "-numeric", CMD_FLAG, CMD_OPTIONAL, "addresses only"); cmd_AddParm(ts, "-vlservers", CMD_FLAG, CMD_OPTIONAL, "VL servers"); -/* cmd_AddParm(ts, "-cell", CMD_FLAG, CMD_OPTIONAL, "cellname"); */ + /* cmd_AddParm(ts, "-cell", CMD_FLAG, CMD_OPTIONAL, "cellname"); */ cmd_CreateAlias(ts, "gp"); ts = cmd_CreateSyntax("setacl", SetACLCmd, 0, "set access control list"); @@ -2791,12 +2805,12 @@ char **argv; { cmd_AddParm(ts, "-rw", CMD_FLAG, CMD_OPTIONAL, "force r/w volume"); cmd_AddParm(ts, "-fast", CMD_FLAG, CMD_OPTIONAL, "don't check name with VLDB"); -/* - -defect 3069 - + /* + * + * defect 3069 + * cmd_AddParm(ts, "-root", CMD_FLAG, CMD_OPTIONAL, "create cellular mount point"); -*/ + */ ts = cmd_CreateSyntax("rmmount", RemoveMountCmd, 0, "remove mount point"); @@ -2831,17 +2845,19 @@ defect 3069 cmd_CreateAlias(ts, "sq"); ts = cmd_CreateSyntax("newcell", NewCellCmd, 0, "configure new cell"); +#ifndef WIN32 cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "cell name"); cmd_AddParm(ts, "-servers", CMD_LIST, CMD_REQUIRED, "primary servers"); cmd_AddParm(ts, "-linkedcell", CMD_SINGLE, CMD_OPTIONAL, "linked cell name"); +#endif #ifdef FS_ENABLE_SERVER_DEBUG_PORTS -/* - * Turn this on only if you wish to be able to talk to a server which is listening - * on alternative ports. This is not intended for general use and may not be - * supported in the cache manager. It is not a way to run two servers at the - * same host, since the cache manager cannot properly distinguish those two hosts. - */ + /* + * Turn this on only if you wish to be able to talk to a server which is listening + * on alternative ports. This is not intended for general use and may not be + * supported in the cache manager. It is not a way to run two servers at the + * same host, since the cache manager cannot properly distinguish those two hosts. + */ cmd_AddParm(ts, "-fsport", CMD_SINGLE, CMD_OPTIONAL, "cell's fileserver port"); cmd_AddParm(ts, "-vlport", CMD_SINGLE, CMD_OPTIONAL, "cell's vldb server port"); #endif @@ -2854,9 +2870,9 @@ defect 3069 ts = cmd_CreateSyntax("wscell", WSCellCmd, 0, "list workstation's cell"); -/* - ts = cmd_CreateSyntax("primarycell", PrimaryCellCmd, 0, "obsolete (listed primary cell)"); -*/ + /* + ts = cmd_CreateSyntax("primarycell", PrimaryCellCmd, 0, "obsolete (listed primary cell)"); + */ ts = cmd_CreateSyntax("monitor", MonitorCmd, 0, "set cache monitor host address"); cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "host name or 'off'"); @@ -2904,6 +2920,10 @@ defect 3069 cmd_AddParm(ts, "-dump", CMD_FLAG, CMD_OPTIONAL, "dump log contents"); cmd_CreateAlias(ts, "tr"); + ts = cmd_CreateSyntax("memdump", MemDumpCmd, 0, "dump memory allocs in debug builds"); + cmd_AddParm(ts, "-begin", CMD_FLAG, CMD_OPTIONAL, "set a memory checkpoint"); + cmd_AddParm(ts, "-end", CMD_FLAG, CMD_OPTIONAL, "dump memory allocs"); + code = cmd_Dispatch(argc, argv); #ifndef WIN32 @@ -2960,3 +2980,40 @@ void Die(code, filename) #endif /* not WIN32 */ } } /*Die*/ + +static MemDumpCmd(struct cmd_syndesc *asp) +{ + long code; + struct ViceIoctl blob; + long inValue; + long outValue; + + if ((asp->parms[0].items && asp->parms[1].items)) { + fprintf(stderr, "fs trace: must use at most one of '-begin' or '-end'\n"); + return EINVAL; + } + + /* determine if we're turning this tracing on or off */ + inValue = 0; + if (asp->parms[0].items) + inValue = 1; /* begin */ + else if (asp->parms[1].items) + inValue = 0; /* end */ + + blob.in_size = sizeof(long); + blob.in = (char *) &inValue; + blob.out_size = sizeof(long); + blob.out = (char *) &outValue; + + code = pioctl(NULL, VIOC_TRACEMEMDUMP, &blob, 1); + if (code) { + Die(errno, NULL); + return code; + } + + if (outValue) printf("AFS memdump begin.\n"); + else printf("AFS memdump end.\n"); + + return 0; +} + diff --git a/src/WINNT/afsd/fs_utils.c b/src/WINNT/afsd/fs_utils.c index 7f6d0d47c..4979eafa8 100644 --- a/src/WINNT/afsd/fs_utils.c +++ b/src/WINNT/afsd/fs_utils.c @@ -219,3 +219,35 @@ long *aval; else *aval = total; return 0; } + +char *cm_mount_root="afs"; +char *cm_slash_mount_root="/afs"; +char *cm_back_slash_mount_root="\\afs"; +#define AFSCONFIGKEYNAME TEXT("SYSTEM\\CurrentControlSet\\Services\\TransarcAFSDaemon\\Parameters") + +void fs_utils_InitMountRoot() +{ + HKEY parmKey; + char mountRoot[MAX_PATH+1]; + char *pmount=mountRoot; + DWORD len=sizeof(mountRoot)-1; + printf("int mountroot \n"); + if ((RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSCONFIGKEYNAME,0, KEY_QUERY_VALUE, &parmKey)!= ERROR_SUCCESS) + || (RegQueryValueEx(parmKey, "Mountroot", NULL, NULL,(LPBYTE)(mountRoot), &len)!= ERROR_SUCCESS) + || (len==sizeof(mountRoot)-1) + ) + strcpy(mountRoot, "\\afs"); + RegCloseKey(parmKey); + mountRoot[len]=0; /*safety see ms-help://MS.MSDNQTR.2002OCT.1033/sysinfo/base/regqueryvalueex.htm*/ + cm_mount_root=malloc(len+1); + cm_slash_mount_root=malloc(len+2); + cm_back_slash_mount_root=malloc(len+2); + if ((*pmount=='/') || (*pmount='\\')) + pmount++; + strcpy(cm_mount_root,pmount); + strcpy(cm_slash_mount_root+1,pmount); + cm_slash_mount_root[0]='/'; + strcpy(cm_back_slash_mount_root+1,pmount); + cm_back_slash_mount_root[0]='\\'; +} + diff --git a/src/WINNT/afsd/fs_utils.h b/src/WINNT/afsd/fs_utils.h index a7e1c7726..cdac4fc8a 100644 --- a/src/WINNT/afsd/fs_utils.h +++ b/src/WINNT/afsd/fs_utils.h @@ -37,4 +37,8 @@ extern long fs_StripDriveLetter(char *inPathp, char *outPathp, long outSize); extern long fs_ExtractDriveLetter(char *inPathp, char *outPathp); +extern char *cm_mount_root; /*"afs"*/ +extern char *cm_slash_mount_root; /*"/afs"*/ +extern char *cm_back_slash_mount_root; /*"\\afs"*/ +extern void fs_utils_InitMountRoot(); #endif /* FS_UTILS_H_ENV */ diff --git a/src/WINNT/afsd/sample/token.c b/src/WINNT/afsd/sample/token.c index d11b86d44..f3f1810ee 100644 --- a/src/WINNT/afsd/sample/token.c +++ b/src/WINNT/afsd/sample/token.c @@ -7,294 +7,294 @@ * directory or online at http://www.openafs.org/dl/license10.html */ -#include -#include "krb_auth.h" -#include "afs_tokens.h" -#include "cm_config.h" -#include "cmd.h" - -#define AFS_KERBEROS_ENV - -#define KABADARGUMENT 1 -#define KLOGEXIT(code) exit(code) - -int CommandProc(); - -static int zero_argc; -static char **zero_argv; - -void main (argc, argv) - int argc; - char *argv[]; -{ struct cmd_syndesc *ts; - int code; - WSADATA WSAjunk; - - zero_argc = argc; - zero_argv = argv; - - /* Start up sockets */ - WSAStartup(0x0101, &WSAjunk); - - ts = cmd_CreateSyntax((char *) 0, CommandProc, 0, "obtain Kerberos authentication"); - -#define aXFLAG 0 -#define aPRINCIPAL 1 -#define aPASSWORD 2 -#define aCELL 3 -#define aSERVERS 4 -#define aPIPE 5 -#define aSILENT 6 -#define aLIFETIME 7 -#define aSETPAG 8 -#define aTMP 9 - - - cmd_AddParm(ts, "-x", CMD_FLAG, CMD_OPTIONAL, "(obsolete, noop)"); - cmd_Seek(ts, aPRINCIPAL); - cmd_AddParm(ts, "-principal", CMD_SINGLE, CMD_OPTIONAL, "user name"); - cmd_AddParm(ts, "-password", CMD_SINGLE, CMD_OPTIONAL, "user's password"); - cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name"); - cmd_AddParm(ts, "-servers", CMD_LIST, CMD_OPTIONAL, "explicit list of servers"); - cmd_AddParm(ts, "-pipe", CMD_FLAG, CMD_OPTIONAL, "read password from stdin"); - cmd_AddParm(ts, "-silent", CMD_FLAG, CMD_OPTIONAL, "silent operation"); - cmd_AddParm(ts, "-lifetime", CMD_SINGLE, CMD_OPTIONAL, "ticket lifetime in hh[:mm[:ss]]"); - cmd_AddParm(ts, "-setpag", CMD_FLAG, CMD_OPTIONAL, "Create a new setpag before authenticating"); - cmd_AddParm(ts, "-tmp", CMD_FLAG, CMD_OPTIONAL, "write Kerberos-style ticket file in /tmp"); - - code = cmd_Dispatch(argc, argv); - KLOGEXIT(code); -} - -static char *getpipepass() { - static char gpbuf[BUFSIZ]; - /* read a password from stdin, stop on \n or eof */ - register int i, tc; - memset(gpbuf, 0, sizeof(gpbuf)); - for(i=0; i<(sizeof(gpbuf)-1); i++) { - tc = fgetc(stdin); - if (tc == '\n' || tc == EOF) break; - gpbuf[i] = tc; - } - return gpbuf; -} - -/* good_gets is like gets except that it take a max string length and won't - * write past the end of its input buffer. It returns a variety of negative - * numbers in case of errors and zero if there was no characters read (a blank - * line for instance). Otherwise it returns the length of the string read in. - */ - -static int good_gets (s, max) - char *s; - int max; -{ int l; /* length of string read */ - if (!fgets (s, max, stdin)) { - if (feof(stdin)) return EOF; /* EOF on input, nothing read */ - else return -2; /* I don't think this can happen */ - } - l = strlen (s); - if (l && (s[l-1] == '\n')) s[--l] = 0; - return l; -} - -static int read_pw_string(char *s, int max) -{ - int ok = 0; - HANDLE h; - int md; - - /* set no echo */ - h = GetStdHandle (STD_INPUT_HANDLE); - GetConsoleMode (h, &md); - SetConsoleMode (h, md & ~ENABLE_ECHO_INPUT); - - while (!ok) { - printf("Password:"); - fflush(stdout); - if (good_gets(s, max) <= 0) { - printf("\n"); fflush(stdout); - if (feof (stdin)) break; /* just give up */ - else continue; /* try again: blank line */ - } - ok = 1; - } - - if (!ok) - memset(s, 0, max); - - /* reset echo */ - SetConsoleMode (h, md); - printf("\n"); fflush(stdout); - - s[max-1] = 0; /* force termination */ - return !ok; -} - -CommandProc (as, arock) - char *arock; - struct cmd_syndesc *as; -{ - char name[MAXKTCNAMELEN]; - char defaultCell[256]; - char realm[MAXKTCREALMLEN]; - int code; - int i, dosetpag; - int lifetime; /* requested ticket lifetime */ - - char passwd[BUFSIZ]; - - static char rn[] = "klog"; /*Routine name*/ - static int Pipe = 0; /* reading from a pipe */ - static int Silent = 0; /* Don't want error messages */ - - int foundPassword = 0; /*Not yet, anyway*/ - int foundExplicitCell = 0; /*Not yet, anyway*/ - int writeTicketFile = 0; /* write ticket file to /tmp */ - int password_expires = -1; - - char *reason; /* string describing errors */ - - /* blow away command line arguments */ - for (i=1; iparms[aSILENT].itemsp ? 1 : 0); - Pipe = (as->parms[aPIPE].itemsp ? 1 : 0); - - /* Determine if we should also do a setpag based on -setpag switch */ - dosetpag = (as->parms[aSETPAG].itemsp ? 1 : 0); - - if (as->parms[aTMP].itemsp) { - writeTicketFile = 1; - } - - cm_GetRootCellName(defaultCell); - - /* Parse our arguments. */ - - if (as->parms[aCELL].itemsp) { - /* - * cell name explicitly mentioned; take it in if no other cell name - * has already been specified and if the name actually appears. If - * the given cell name differs from our own, we don't do a lookup. - */ - foundExplicitCell = 1; - strncpy (realm, as->parms[aCELL].itemsp->data, sizeof(realm)); - } - - if (as->parms[aSERVERS].itemsp) { - fprintf (stderr, "SERVERS option not available.\n"); - } - - if (as->parms[aPRINCIPAL].itemsp) { - strcpy(name, as->parms[aPRINCIPAL].itemsp->data); - } else { - /* No explicit name provided. */ - DWORD size = GetEnvironmentVariable("USERNAME", name, sizeof(name) - 1); - if (size <= 0 || size >= sizeof(name)) - KLOGEXIT( KABADARGUMENT ); - } - - if (as->parms[aPASSWORD].itemsp) { - /* - * Current argument is the desired password string. Remember it in - * our local buffer, and zero out the argument string - anyone can - * see it there with ps! - */ - foundPassword = 1; - strncpy (passwd, as->parms[aPASSWORD].itemsp->data, sizeof(passwd)); - memset (as->parms[aPASSWORD].itemsp->data, 0, - strlen(as->parms[aPASSWORD].itemsp->data)); - } - - if (as->parms[aLIFETIME].itemsp) { - char *life = as->parms[aLIFETIME].itemsp->data; - char *sp; /* string ptr to rest of life */ - lifetime = 3600*strtol (life, &sp, 0); /* hours */ - if (sp == life) { -bad_lifetime: - if (!Silent) fprintf (stderr, "%s: translating '%s' to lifetime failed\n", - rn, life); - return KABADARGUMENT; - } - if (*sp == ':') { - life = sp+1; /* skip the colon */ - lifetime += 60*strtol (life, &sp, 0); /* minutes */ - if (sp == life) goto bad_lifetime; - if (*sp == ':') { - life = sp+1; - lifetime += strtol (life, &sp, 0); /* seconds */ - if (sp == life) goto bad_lifetime; - if (*sp) goto bad_lifetime; - } else if (*sp) goto bad_lifetime; - } else if (*sp) goto bad_lifetime; - if (lifetime > MAXKTCTICKETLIFETIME) { - if (!Silent) - fprintf (stderr, - "%s: a lifetime of %.2f hours is too long, must be less than %d.\n", - rn, (double)lifetime/3600.0, MAXKTCTICKETLIFETIME/3600); - KLOGEXIT( KABADARGUMENT ); - } - } else lifetime = 0; - - if (!foundExplicitCell) strcpy (realm, defaultCell); - - /* Get the password if it wasn't provided. */ - if (!foundPassword) { - if (Pipe) { - strncpy(passwd, getpipepass(), sizeof(passwd)); - } - else { - if (read_pw_string(passwd, sizeof(passwd))) - reason = "can't read password from terminal"; - else if (strlen(passwd) == 0) - reason = "zero length password is illegal"; - else - reason = NULL; - if (reason) { - fprintf (stderr, "Unable to login because %s.\n", reason); - KLOGEXIT( KABADARGUMENT ); - } - } - } - - code = ka_UserAuthenticateGeneral (0, name, "", realm, passwd, lifetime, - &password_expires, 0, &reason); - memset (passwd, 0, sizeof(passwd)); - if (code) { - if (!Silent) { - fprintf (stderr, - "Unable to authenticate to AFS because %s.\n", reason); - } - KLOGEXIT( code ); - } - -#ifndef AFS_KERBEROS_ENV - if (writeTicketFile) { - code = krb_write_ticket_file (realm); - if (!Silent) { - if (code) - com_err (rn, code, "writing Kerberos ticket file"); - else fprintf (stderr, "Wrote ticket file to /tmp\n"); - } - } -#endif - -#ifdef DEBUGEXPIRES - if (password_expires >= 0) { - printf ("password expires at %ld\n", password_expires); - } -#endif /* DEBUGEXPIRES */ - - return 0; -} - -/* dummies to substitute for OSI */ -void *osi_Alloc(int sz) { - return malloc(sz); -} -void osi_Free(void *vs, int sz) { - free(vs); -} +#include +#include "krb_auth.h" +#include "afs_tokens.h" +#include "cm_config.h" +#include "cmd.h" + +#define AFS_KERBEROS_ENV + +#define KABADARGUMENT 1 +#define KLOGEXIT(code) exit(code) + +int CommandProc(); + +static int zero_argc; +static char **zero_argv; + +void main (argc, argv) + int argc; + char *argv[]; +{ struct cmd_syndesc *ts; + int code; + WSADATA WSAjunk; + + zero_argc = argc; + zero_argv = argv; + + /* Start up sockets */ + WSAStartup(0x0101, &WSAjunk); + + ts = cmd_CreateSyntax((char *) 0, CommandProc, 0, "obtain Kerberos authentication"); + +#define aXFLAG 0 +#define aPRINCIPAL 1 +#define aPASSWORD 2 +#define aCELL 3 +#define aSERVERS 4 +#define aPIPE 5 +#define aSILENT 6 +#define aLIFETIME 7 +#define aSETPAG 8 +#define aTMP 9 + + + cmd_AddParm(ts, "-x", CMD_FLAG, CMD_OPTIONAL, "(obsolete, noop)"); + cmd_Seek(ts, aPRINCIPAL); + cmd_AddParm(ts, "-principal", CMD_SINGLE, CMD_OPTIONAL, "user name"); + cmd_AddParm(ts, "-password", CMD_SINGLE, CMD_OPTIONAL, "user's password"); + cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name"); + cmd_AddParm(ts, "-servers", CMD_LIST, CMD_OPTIONAL, "explicit list of servers"); + cmd_AddParm(ts, "-pipe", CMD_FLAG, CMD_OPTIONAL, "read password from stdin"); + cmd_AddParm(ts, "-silent", CMD_FLAG, CMD_OPTIONAL, "silent operation"); + cmd_AddParm(ts, "-lifetime", CMD_SINGLE, CMD_OPTIONAL, "ticket lifetime in hh[:mm[:ss]]"); + cmd_AddParm(ts, "-setpag", CMD_FLAG, CMD_OPTIONAL, "Create a new setpag before authenticating"); + cmd_AddParm(ts, "-tmp", CMD_FLAG, CMD_OPTIONAL, "write Kerberos-style ticket file in /tmp"); + + code = cmd_Dispatch(argc, argv); + KLOGEXIT(code); +} + +static char *getpipepass() { + static char gpbuf[BUFSIZ]; + /* read a password from stdin, stop on \n or eof */ + register int i, tc; + memset(gpbuf, 0, sizeof(gpbuf)); + for(i=0; i<(sizeof(gpbuf)-1); i++) { + tc = fgetc(stdin); + if (tc == '\n' || tc == EOF) break; + gpbuf[i] = tc; + } + return gpbuf; +} + +/* good_gets is like gets except that it take a max string length and won't + * write past the end of its input buffer. It returns a variety of negative + * numbers in case of errors and zero if there was no characters read (a blank + * line for instance). Otherwise it returns the length of the string read in. + */ + +static int good_gets (s, max) + char *s; + int max; +{ int l; /* length of string read */ + if (!fgets (s, max, stdin)) { + if (feof(stdin)) return EOF; /* EOF on input, nothing read */ + else return -2; /* I don't think this can happen */ + } + l = strlen (s); + if (l && (s[l-1] == '\n')) s[--l] = 0; + return l; +} + +static int read_pw_string(char *s, int max) +{ + int ok = 0; + HANDLE h; + int md; + + /* set no echo */ + h = GetStdHandle (STD_INPUT_HANDLE); + GetConsoleMode (h, &md); + SetConsoleMode (h, md & ~ENABLE_ECHO_INPUT); + + while (!ok) { + printf("Password:"); + fflush(stdout); + if (good_gets(s, max) <= 0) { + printf("\n"); fflush(stdout); + if (feof (stdin)) break; /* just give up */ + else continue; /* try again: blank line */ + } + ok = 1; + } + + if (!ok) + memset(s, 0, max); + + /* reset echo */ + SetConsoleMode (h, md); + printf("\n"); fflush(stdout); + + s[max-1] = 0; /* force termination */ + return !ok; +} + +CommandProc (as, arock) + char *arock; + struct cmd_syndesc *as; +{ + char name[MAXKTCNAMELEN]; + char defaultCell[256]; + char realm[MAXKTCREALMLEN]; + int code; + int i, dosetpag; + int lifetime; /* requested ticket lifetime */ + + char passwd[BUFSIZ]; + + static char rn[] = "klog"; /*Routine name*/ + static int Pipe = 0; /* reading from a pipe */ + static int Silent = 0; /* Don't want error messages */ + + int foundPassword = 0; /*Not yet, anyway*/ + int foundExplicitCell = 0; /*Not yet, anyway*/ + int writeTicketFile = 0; /* write ticket file to /tmp */ + int password_expires = -1; + + char *reason; /* string describing errors */ + + /* blow away command line arguments */ + for (i=1; iparms[aSILENT].itemsp ? 1 : 0); + Pipe = (as->parms[aPIPE].itemsp ? 1 : 0); + + /* Determine if we should also do a setpag based on -setpag switch */ + dosetpag = (as->parms[aSETPAG].itemsp ? 1 : 0); + + if (as->parms[aTMP].itemsp) { + writeTicketFile = 1; + } + + cm_GetRootCellName(defaultCell); + + /* Parse our arguments. */ + + if (as->parms[aCELL].itemsp) { + /* + * cell name explicitly mentioned; take it in if no other cell name + * has already been specified and if the name actually appears. If + * the given cell name differs from our own, we don't do a lookup. + */ + foundExplicitCell = 1; + strncpy (realm, as->parms[aCELL].itemsp->data, sizeof(realm)); + } + + if (as->parms[aSERVERS].itemsp) { + fprintf (stderr, "SERVERS option not available.\n"); + } + + if (as->parms[aPRINCIPAL].itemsp) { + strcpy(name, as->parms[aPRINCIPAL].itemsp->data); + } else { + /* No explicit name provided. */ + DWORD size = GetEnvironmentVariable("USERNAME", name, sizeof(name) - 1); + if (size <= 0 || size >= sizeof(name)) + KLOGEXIT( KABADARGUMENT ); + } + + if (as->parms[aPASSWORD].itemsp) { + /* + * Current argument is the desired password string. Remember it in + * our local buffer, and zero out the argument string - anyone can + * see it there with ps! + */ + foundPassword = 1; + strncpy (passwd, as->parms[aPASSWORD].itemsp->data, sizeof(passwd)); + memset (as->parms[aPASSWORD].itemsp->data, 0, + strlen(as->parms[aPASSWORD].itemsp->data)); + } + + if (as->parms[aLIFETIME].itemsp) { + char *life = as->parms[aLIFETIME].itemsp->data; + char *sp; /* string ptr to rest of life */ + lifetime = 3600*strtol (life, &sp, 0); /* hours */ + if (sp == life) { +bad_lifetime: + if (!Silent) fprintf (stderr, "%s: translating '%s' to lifetime failed\n", + rn, life); + return KABADARGUMENT; + } + if (*sp == ':') { + life = sp+1; /* skip the colon */ + lifetime += 60*strtol (life, &sp, 0); /* minutes */ + if (sp == life) goto bad_lifetime; + if (*sp == ':') { + life = sp+1; + lifetime += strtol (life, &sp, 0); /* seconds */ + if (sp == life) goto bad_lifetime; + if (*sp) goto bad_lifetime; + } else if (*sp) goto bad_lifetime; + } else if (*sp) goto bad_lifetime; + if (lifetime > MAXKTCTICKETLIFETIME) { + if (!Silent) + fprintf (stderr, + "%s: a lifetime of %.2f hours is too long, must be less than %d.\n", + rn, (double)lifetime/3600.0, MAXKTCTICKETLIFETIME/3600); + KLOGEXIT( KABADARGUMENT ); + } + } else lifetime = 0; + + if (!foundExplicitCell) strcpy (realm, defaultCell); + + /* Get the password if it wasn't provided. */ + if (!foundPassword) { + if (Pipe) { + strncpy(passwd, getpipepass(), sizeof(passwd)); + } + else { + if (read_pw_string(passwd, sizeof(passwd))) + reason = "can't read password from terminal"; + else if (strlen(passwd) == 0) + reason = "zero length password is illegal"; + else + reason = NULL; + if (reason) { + fprintf (stderr, "Unable to login because %s.\n", reason); + KLOGEXIT( KABADARGUMENT ); + } + } + } + + code = ka_UserAuthenticateGeneral (0, name, "", realm, passwd, lifetime, + &password_expires, 0, &reason); + memset (passwd, 0, sizeof(passwd)); + if (code) { + if (!Silent) { + fprintf (stderr, + "Unable to authenticate to AFS because %s.\n", reason); + } + KLOGEXIT( code ); + } + +#ifndef AFS_KERBEROS_ENV + if (writeTicketFile) { + code = krb_write_ticket_file (realm); + if (!Silent) { + if (code) + com_err (rn, code, "writing Kerberos ticket file"); + else fprintf (stderr, "Wrote ticket file to /tmp\n"); + } + } +#endif + +#ifdef DEBUGEXPIRES + if (password_expires >= 0) { + printf ("password expires at %ld\n", password_expires); + } +#endif /* DEBUGEXPIRES */ + + return 0; +} + +/* dummies to substitute for OSI */ +void *osi_Alloc(int sz) { + return malloc(sz); +} +void osi_Free(void *vs, int sz) { + free(vs); +} diff --git a/src/WINNT/afsd/smb.c b/src/WINNT/afsd/smb.c index d2f1e0d1e..916fc3828 100644 --- a/src/WINNT/afsd/smb.c +++ b/src/WINNT/afsd/smb.c @@ -62,10 +62,10 @@ void afsi_log(); osi_hyper_t hzero = {0, 0}; osi_hyper_t hones = {0xFFFFFFFF, -1}; -osi_log_t *smb_logp; +osi_log_t * smb_logp; osi_rwlock_t smb_globalLock; osi_rwlock_t smb_rctLock; -osi_rwlock_t smb_ListenerLock; +osi_mutex_t smb_ListenerLock; char smb_LANadapter; unsigned char smb_sharename[NCBNAMSZ+1] = {0}; @@ -1057,7 +1057,7 @@ int smb_ListShares() fprintf(stderr, "The following shares are available:\n"); fprintf(stderr, "Share Name (AFS Path)\n"); fprintf(stderr, "---------------------\n"); - fprintf(stderr, "\\\\%s\\%-16s (/afs)\n", smb_localNamep, "ALL"); + fprintf(stderr, "\\\\%s\\%-16s (%s)\n", smb_localNamep, "ALL", cm_mountRoot); #ifndef DJGPP code = GetWindowsDirectory(sbmtpath, sizeof(sbmtpath)); @@ -1084,7 +1084,7 @@ int smb_ListShares() sbmtpath); if (!len) return num_shares; p = pathName; - if (strncmp(p, "/afs", 4) != 0) + if (strncmp(p, cm_mountRoot, 4) != 0) print_afs = 1; while (*p) { if (*p == '\\') *p = '/'; /* change to / */ @@ -1092,7 +1092,7 @@ int smb_ListShares() } fprintf(stderr, "\\\\%s\\%-16s (%s%s)\n", - smb_localNamep, this_share, (print_afs ? "/afs" : "\0"), + smb_localNamep, this_share, (print_afs ? cm_mountRoot : "\0"), pathName); num_shares++; while (*this_share != NULL) this_share++; /* find next NULL */ @@ -1141,8 +1141,8 @@ int smb_FindShare(smb_vc_t *vcp, smb_packet_t *inp, char *shareName, /* We can accept either unix or PC style AFS pathnames. Convert Unix-style to PC style here for internal use. */ p = pathName; - if (strncmp(p, "/afs", 4) == 0) - p += 4; /* skip /afs */ + if (strncmp(p, cm_mountRoot, 4) == 0) + p += strlen(cm_mountRoot); /* skip mount path */ q = p; while (*q) { if (*q == '/') *q = '\\'; /* change to \ */ @@ -1372,13 +1372,13 @@ static smb_packet_t *GetPacket(void) tbp = smb_packetFreeListp; if (tbp) smb_packetFreeListp = tbp->nextp; lock_ReleaseWrite(&smb_globalLock); - if (!tbp) { + if (!tbp) { #ifndef DJGPP - tbp = GlobalAlloc(GMEM_FIXED, 65540); + tbp = calloc(65540,1); #else /* DJGPP */ - tbp = malloc(sizeof(smb_packet_t)); + tbp = malloc(sizeof(smb_packet_t)); #endif /* !DJGPP */ - tbp->magic = SMB_PACKETMAGIC; + tbp->magic = SMB_PACKETMAGIC; tbp->ncbp = NULL; tbp->vcp = NULL; tbp->resumeCode = 0; @@ -1391,28 +1391,28 @@ static smb_packet_t *GetPacket(void) tbp->flags = 0; #ifdef DJGPP - npar = SMB_PACKETSIZE >> 4; /* number of paragraphs */ - { - signed int retval = - __dpmi_allocate_dos_memory(npar, &tb_sel); /* DOS segment */ - if (retval == -1) { - afsi_log("Cannot allocate %d paragraphs of DOS memory", - npar); - osi_panic("",__FILE__,__LINE__); - } - else { - afsi_log("Allocated %d paragraphs of DOS mem at 0x%X", - npar, retval); - seg = retval; - } - } - tbp->dos_pkt = (seg * 16) + 0; /* DOS physical address */ - tbp->dos_pkt_sel = tb_sel; + npar = SMB_PACKETSIZE >> 4; /* number of paragraphs */ + { + signed int retval = + __dpmi_allocate_dos_memory(npar, &tb_sel); /* DOS segment */ + if (retval == -1) { + afsi_log("Cannot allocate %d paragraphs of DOS memory", + npar); + osi_panic("",__FILE__,__LINE__); + } + else { + afsi_log("Allocated %d paragraphs of DOS mem at 0x%X", + npar, retval); + seg = retval; + } + } + tbp->dos_pkt = (seg * 16) + 0; /* DOS physical address */ + tbp->dos_pkt_sel = tb_sel; #endif /* DJGPP */ } - osi_assert(tbp->magic == SMB_PACKETMAGIC); + osi_assert(tbp->magic == SMB_PACKETMAGIC); - return tbp; + return tbp; } smb_packet_t *smb_CopyPacket(smb_packet_t *pkt) @@ -1420,63 +1420,63 @@ smb_packet_t *smb_CopyPacket(smb_packet_t *pkt) smb_packet_t *tbp; tbp = GetPacket(); memcpy(tbp, pkt, sizeof(smb_packet_t)); - tbp->wctp = tbp->data + ((unsigned int)pkt->wctp - - (unsigned int)pkt->data); + tbp->wctp = tbp->data + ((unsigned int)pkt->wctp - (unsigned int)pkt->data); return tbp; } static NCB *GetNCB(void) { smb_ncb_t *tbp; - NCB *ncbp; + NCB *ncbp; #ifdef DJGPP - unsigned int npar, seg, tb_sel; + unsigned int npar, seg, tb_sel; #endif /* DJGPP */ lock_ObtainWrite(&smb_globalLock); tbp = smb_ncbFreeListp; - if (tbp) smb_ncbFreeListp = tbp->nextp; + if (tbp) + smb_ncbFreeListp = tbp->nextp; lock_ReleaseWrite(&smb_globalLock); - if (!tbp) { + if (!tbp) { #ifndef DJGPP - tbp = GlobalAlloc(GMEM_FIXED, sizeof(*tbp)); + tbp = calloc(sizeof(*tbp),1); #else /* DJGPP */ - tbp = malloc(sizeof(*tbp)); - npar = (sizeof(NCB)+15) >> 4; /* number of paragraphs */ - { - signed int retval = - __dpmi_allocate_dos_memory(npar, &tb_sel); /* DOS segment */ - if (retval == -1) { - afsi_log("Cannot allocate %d paragraphs of DOS mem in GetNCB", - npar); - osi_panic("",__FILE__,__LINE__); - } else { - afsi_log("Allocated %d paragraphs of DOS mem at 0x%X in GetNCB", - npar, retval); - seg = retval; - } - } - tbp->dos_ncb = (seg * 16) + 0; /* DOS physical address */ - tbp->dos_ncb_sel = tb_sel; + tbp = malloc(sizeof(*tbp)); + npar = (sizeof(NCB)+15) >> 4; /* number of paragraphs */ + { + signed int retval = + __dpmi_allocate_dos_memory(npar, &tb_sel); /* DOS segment */ + if (retval == -1) { + afsi_log("Cannot allocate %d paragraphs of DOS mem in GetNCB", + npar); + osi_panic("",__FILE__,__LINE__); + } else { + afsi_log("Allocated %d paragraphs of DOS mem at 0x%X in GetNCB", + npar, retval); + seg = retval; + } + } + tbp->dos_ncb = (seg * 16) + 0; /* DOS physical address */ + tbp->dos_ncb_sel = tb_sel; #endif /* !DJGPP */ - tbp->magic = SMB_NCBMAGIC; + tbp->magic = SMB_NCBMAGIC; } - osi_assert(tbp->magic == SMB_NCBMAGIC); + osi_assert(tbp->magic == SMB_NCBMAGIC); memset(&tbp->ncb, 0, sizeof(NCB)); - ncbp = &tbp->ncb; + ncbp = &tbp->ncb; #ifdef DJGPP - dos_memset(tbp->dos_ncb, 0, sizeof(NCB)); + dos_memset(tbp->dos_ncb, 0, sizeof(NCB)); #endif /* DJGPP */ - return ncbp; + return ncbp; } void smb_FreePacket(smb_packet_t *tbp) { - osi_assert(tbp->magic == SMB_PACKETMAGIC); + osi_assert(tbp->magic == SMB_PACKETMAGIC); - lock_ObtainWrite(&smb_globalLock); + lock_ObtainWrite(&smb_globalLock); tbp->nextp = smb_packetFreeListp; smb_packetFreeListp = tbp; tbp->magic = SMB_PACKETMAGIC; @@ -1490,39 +1490,39 @@ void smb_FreePacket(smb_packet_t *tbp) tbp->oddByte = 0; tbp->ncb_length = 0; tbp->flags = 0; - lock_ReleaseWrite(&smb_globalLock); + lock_ReleaseWrite(&smb_globalLock); } static void FreeNCB(NCB *bufferp) { smb_ncb_t *tbp; - tbp = (smb_ncb_t *) bufferp; - osi_assert(tbp->magic == SMB_NCBMAGIC); + tbp = (smb_ncb_t *) bufferp; + osi_assert(tbp->magic == SMB_NCBMAGIC); - lock_ObtainWrite(&smb_globalLock); + lock_ObtainWrite(&smb_globalLock); tbp->nextp = smb_ncbFreeListp; smb_ncbFreeListp = tbp; - lock_ReleaseWrite(&smb_globalLock); + lock_ReleaseWrite(&smb_globalLock); } /* get a ptr to the data part of a packet, and its count */ unsigned char *smb_GetSMBData(smb_packet_t *smbp, int *nbytesp) { - int parmBytes; - int dataBytes; - unsigned char *afterParmsp; + int parmBytes; + int dataBytes; + unsigned char *afterParmsp; - parmBytes = *smbp->wctp << 1; + parmBytes = *smbp->wctp << 1; afterParmsp = smbp->wctp + parmBytes + 1; - dataBytes = afterParmsp[0] + (afterParmsp[1]<<8); - if (nbytesp) *nbytesp = dataBytes; + dataBytes = afterParmsp[0] + (afterParmsp[1]<<8); + if (nbytesp) *nbytesp = dataBytes; /* don't forget to skip the data byte count, since it follows - * the parameters; that's where the "2" comes from below. - */ - return (unsigned char *) (afterParmsp + 2); + * the parameters; that's where the "2" comes from below. + */ + return (unsigned char *) (afterParmsp + 2); } /* must set all the returned parameters before playing around with the @@ -5271,20 +5271,20 @@ long smb_ReceiveCoreSeek(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp) void smb_DispatchPacket(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp, NCB *ncbp, raw_write_cont_t *rwcp) { - static showErrors = 1; - smb_dispatch_t *dp; - smb_t *smbp; - unsigned long code; - unsigned char *outWctp; - int nparms; /* # of bytes of parameters */ - char tbuffer[200]; - int nbytes; /* bytes of data, excluding count */ - int temp; - unsigned char *tp; - unsigned short errCode; + static showErrors = 0; + smb_dispatch_t *dp; + smb_t *smbp; + unsigned long code; + unsigned char *outWctp; + int nparms; /* # of bytes of parameters */ + char tbuffer[200]; + int nbytes; /* bytes of data, excluding count */ + int temp; + unsigned char *tp; + unsigned short errCode; unsigned long NTStatus; - int noSend; - unsigned char errClass; + int noSend; + unsigned char errClass; unsigned int oldGen; DWORD oldTime, newTime; @@ -6168,6 +6168,9 @@ void smb_NetbiosInit() len = strlen(smb_localNamep); for(i=len; incb_name[i] = ' '; #endif + sprintf(s, "lana_list.length %d", lana_list.length); + afsi_log(s); + /* Keep the name so we can unregister it later */ for (l = 0; l < lana_list.length; l++) { lana = lana_list.lana[l]; @@ -6192,7 +6195,7 @@ void smb_NetbiosInit() if (code == 0) code = ncbp->ncb_retcode; if (code == 0) { - fprintf(stderr, "Netbios NCBADDNAME succeeded on lana %d\n", lana); + afsi_log("Netbios NCBADDNAME succeeded on lana %d", lana); #ifdef DJGPP /* we only use one LANA with djgpp */ lana_list.lana[0] = lana; @@ -6202,13 +6205,12 @@ void smb_NetbiosInit() else { sprintf(s, "Netbios NCBADDNAME lana %d error code %d", lana, code); afsi_log(s); - fprintf(stderr, "Netbios NCBADDNAME lana %d error code %d\n", lana, code); if (code == NRC_BRIDGE) { /* invalid LANA num */ lana_list.lana[l] = 255; continue; } else if (code == NRC_DUPNAME) { - /* Name already exists; try to delete it */ + afsi_log("Name already exists; try to delete it"); memset(ncbp, 0, sizeof(*ncbp)); ncbp->ncb_command = NCBDELNAME; memcpy(ncbp->ncb_name,smb_sharename,NCBNAMSZ); @@ -6219,9 +6221,10 @@ void smb_NetbiosInit() code = Netbios(ncbp, dos_ncb); #endif /* DJGPP */ if (code == 0) code = ncbp->ncb_retcode; - else - fprintf(stderr, "Netbios NCBDELNAME lana %d error code %d\n", lana, code); - fflush(stderr); + else { + sprintf(s, "Netbios NCBDELNAME lana %d error code %d\n", lana, code); + afsi_log(s); + } if (code != 0 || delname_tried) { lana_list.lana[l] = 255; } @@ -6336,10 +6339,10 @@ void smb_Init(osi_log_t *logp, char *snamep, int useV3, int LANadapt, /* 4 Raw I/O buffers */ #ifndef DJGPP - smb_RawBufs = GlobalAlloc(GMEM_FIXED, 65536); + smb_RawBufs = calloc(65536,1); *((char **)smb_RawBufs) = NULL; for (i=0; i<3; i++) { - char *rawBuf = GlobalAlloc(GMEM_FIXED, 65536); + char *rawBuf = calloc(65536,1); *((char **)rawBuf) = smb_RawBufs; smb_RawBufs = rawBuf; } @@ -6586,3 +6589,39 @@ void smb_Shutdown(void) #endif } #endif /* DJGPP */ + +int smb_DumpVCP(FILE *outputFile, char *cookie) +{ + int zilch; + char output[1024]; + int i; + + smb_vc_t *vcp; + + lock_ObtainRead(&smb_rctLock); + + for(vcp = smb_allVCsp; vcp; vcp=vcp->nextp) + { + smb_fid_t *fidp; + + sprintf(output, "%s vcp=0x%08X, refCount=%d, flags=%d, vcID=%d, lsn=%d, uidCounter=%d, tidCounter=%d, fidCounter=%d\n", + cookie, vcp, vcp->refCount, vcp->flags, vcp->vcID, vcp->lsn, vcp->uidCounter, vcp->tidCounter, vcp->fidCounter); + WriteFile(outputFile, output, strlen(output), &zilch, NULL); + + for(fidp = vcp->fidsp; fidp; fidp = (smb_fid_t *) osi_QNext(&fidp->q)) + { + sprintf(output, "%s -- fidp=0x%08X, refCount=%d, fid=%d, vcp=0x%08X, scp=0x%08X, ioctlp=0x%08X, NTopen_pathp=%s, NTopen_wholepathp=%s\n", + cookie, fidp, fidp->refCount, fidp->fid, fidp->vcp, fidp->scp, fidp->ioctlp, + fidp->NTopen_pathp ? fidp->NTopen_pathp : "NULL", + fidp->NTopen_wholepathp ? fidp->NTopen_wholepathp : "NULL"); + WriteFile(outputFile, output, strlen(output), &zilch, NULL); + } + + sprintf(output, "done dumping fidsp\n"); + WriteFile(outputFile, output, strlen(output), &zilch, NULL); + } + + lock_ReleaseRead(&smb_rctLock); +} + + diff --git a/src/WINNT/afsd/smb3.c b/src/WINNT/afsd/smb3.c index fd125bbda..9e08a5d1c 100644 --- a/src/WINNT/afsd/smb3.c +++ b/src/WINNT/afsd/smb3.c @@ -4119,9 +4119,9 @@ cm_user_t *smb_FindCMUserByName(/*smb_vc_t *vcp,*/ char *usern, char *machine) lock_ObtainMutex(&unp->mx); unp->userp = cm_NewUser(); lock_ReleaseMutex(&unp->mx); - osi_LogEvent("AFS smb_FindCMUserByName New User",NULL,"name[%s] machine[%s]",usern,machine); + osi_LogEvent("AFS smb_FindCMUserByName : New User",NULL,"name[%s] machine[%s]",usern,machine); } else { - osi_LogEvent("AFS smb_FindCMUserByName Found",NULL,"name[%s] machine[%s]",usern,machine); + osi_LogEvent("AFS smb_FindCMUserByName : Found",NULL,"name[%s] machine[%s]",usern,machine); } return unp->userp; } diff --git a/src/WINNT/afsd/smb_iocons.h b/src/WINNT/afsd/smb_iocons.h index d091965ea..f30fd50d0 100644 --- a/src/WINNT/afsd/smb_iocons.h +++ b/src/WINNT/afsd/smb_iocons.h @@ -87,9 +87,9 @@ typedef struct cm_cacheParms { #define VIOC_LISTSYMLINK 0x24 #define VIOC_DELSYMLINK 0x25 #define VIOC_MAKESUBMOUNT 0x26 -#define VIOC_SHUTDOWN 0x27 +#define VIOC_SHUTDOWN 0x27 #define VIOC_GETRXKCRYPT 0x27 #define VIOC_SETRXKCRYPT 0x28 - +#define VIOC_TRACEMEMDUMP 0x29 #endif /* __SMB_IOCONS_H_ENV_ */ diff --git a/src/WINNT/afsd/smb_ioctl.c b/src/WINNT/afsd/smb_ioctl.c index b35b416ca..9b6481b07 100644 --- a/src/WINNT/afsd/smb_ioctl.c +++ b/src/WINNT/afsd/smb_ioctl.c @@ -73,6 +73,8 @@ void smb_InitIoctl(void) #ifdef DJGPP smb_ioctlProcsp[VIOC_SHUTDOWN] = cm_IoctlShutdown; #endif + smb_ioctlProcsp[VIOC_TRACEMEMDUMP] = cm_IoctlMemoryDump; + smb_ioctlProcsp[VIOC_ISSYMLINK] = cm_IoctlIslink; } /* called to make a fid structure into an IOCTL fid structure */ diff --git a/src/WINNT/afslegal/NTMakefile b/src/WINNT/afslegal/NTMakefile index 3ed4908eb..522230e70 100644 --- a/src/WINNT/afslegal/NTMakefile +++ b/src/WINNT/afslegal/NTMakefile @@ -9,6 +9,7 @@ AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -WX # include the primary makefile +RELDIR=WINNT\afslegal !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version @@ -18,8 +19,8 @@ AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -WX EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\afslegal.exe EXEOBJS = \ - $(OJT)\afslegal_stub.res \ - $(OJT)\afslegal.obj + $(OUT)\afslegal_stub.res \ + $(OUT)\afslegal.obj EXELIBS = \ $(DESTDIR)\lib\afs\talocale.lib \ @@ -40,10 +41,10 @@ lang :: ############################################################################ # Dependencies -$(OJT)\afslegal_stub.res : AFS_component_version_number.h +$(OUT)\afslegal_stub.res : AFS_component_version_number.h mkdir: - -mkdir $(OJT)\lang + -mkdir $(OUT)\lang cd lang nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir cd .. diff --git a/src/WINNT/afslegal/lang/NTMakefile b/src/WINNT/afslegal/lang/NTMakefile index bcd00e094..c80da333e 100644 --- a/src/WINNT/afslegal/lang/NTMakefile +++ b/src/WINNT/afslegal/lang/NTMakefile @@ -10,7 +10,7 @@ AFSDEV_AUXRCFLAGS = $(AFSDEV_AUXRCFLAGS) -I$(DESTDIR)\include -I.. # include the primary makefile - +RELDIR=WINNT\afslegal\lang !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\..\config\NTMakefile.version @@ -35,7 +35,7 @@ DLLFILE = $(DESTDIR)\root.server\usr\afs\bin\afslegal_$(LANGID).dll RCFILE = $(LANGNAME)\afslegal.rc -RESFILE = $(OJT)\afslegal_$(LANGID).res +RESFILE = $(OUT)\afslegal_$(LANGID).res DLLOBJS = $(RESFILE) diff --git a/src/WINNT/afsreg/NTMakefile b/src/WINNT/afsreg/NTMakefile index 1b7e7e51a..e427baa32 100644 --- a/src/WINNT/afsreg/NTMakefile +++ b/src/WINNT/afsreg/NTMakefile @@ -5,6 +5,7 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=WINNT\afsreg !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) INCFILES = \ @@ -17,10 +18,13 @@ INCFILES = \ LIBFILE = $(DESTDIR)\lib\afs\afsreg.lib LIBOBJS = \ - $(OJT)\afsreg.obj \ - $(OJT)\syscfg.obj \ - $(OJT)\afssw.obj \ - $(OJT)\vptab.obj + $(OUT)\afsreg.obj \ + $(OUT)\syscfg.obj \ + $(OUT)\afssw.obj \ + $(OUT)\vptab.obj + +$(LIBOBJS): $$(@B).c + $(C2OBJ) $** $(LIBFILE): $(LIBOBJS) $(LIBARCH) diff --git a/src/WINNT/afsreg/test/NTMakefile b/src/WINNT/afsreg/test/NTMakefile index 8bf2ed253..62b8749bf 100644 --- a/src/WINNT/afsreg/test/NTMakefile +++ b/src/WINNT/afsreg/test/NTMakefile @@ -5,14 +5,15 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=WINNT\afsreg\test !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) -test tests: $(OJT)\getifinfo.exe $(OJT)\regman.exe $(OJT)\dupkey.exe +test tests: $(OUT)\getifinfo.exe $(OUT)\regman.exe $(OUT)\dupkey.exe -$(OJT)\getifinfo.exe: $(OJT)\getifinfo.obj $(DESTDIR)\lib\afs\afsreg.lib +$(OUT)\getifinfo.exe: $(OUT)\getifinfo.obj $(DESTDIR)\lib\afs\afsreg.lib $(EXECONLINK) -$(OJT)\dupkey.exe: $(OJT)\dupkey.obj $(DESTDIR)\lib\afs\afsreg.lib +$(OUT)\dupkey.exe: $(OUT)\dupkey.obj $(DESTDIR)\lib\afs\afsreg.lib $(EXECONLINK) REGMAN_EXELIBS =\ @@ -21,7 +22,7 @@ REGMAN_EXELIBS =\ $(DESTDIR)\lib\afs\afscom_err.lib \ $(DESTDIR)\lib\afs\afsutil.lib -$(OJT)\regman.exe: $(OJT)\regman.obj $(REGMAN_EXELIBS) +$(OUT)\regman.exe: $(OUT)\regman.obj $(REGMAN_EXELIBS) $(EXECONLINK) mkdir: diff --git a/src/WINNT/afssvrcfg/NTMakefile b/src/WINNT/afssvrcfg/NTMakefile index 39e30243c..cccceceb8 100644 --- a/src/WINNT/afssvrcfg/NTMakefile +++ b/src/WINNT/afssvrcfg/NTMakefile @@ -6,46 +6,46 @@ # directory or online at http://www.openafs.org/dl/license10.html # AFSDEV_AUXCDEFINES = /DUNICODE +RELDIR=WINNT\afssvrcfg !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version - ############################################################################ # Definitions for building afssvrcfg.exe. EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\afssvrcfg.exe EXEOBJS =\ - $(OJT)\char_conv.obj \ - $(OJT)\admin_info_dlg.obj \ - $(OJT)\cfg_utils.obj \ - $(OJT)\create_partition_dlg.obj \ - $(OJT)\file_server_page.obj \ - $(OJT)\graphics.obj \ - $(OJT)\info_page.obj \ - $(OJT)\intro_page.obj \ - $(OJT)\partitions_page.obj \ - $(OJT)\partition_page.obj \ - $(OJT)\replicatition_page.obj \ - $(OJT)\services_page.obj \ - $(OJT)\toolbox.obj \ - $(OJT)\afscfg.obj \ - $(OJT)\backup_server_page.obj \ - $(OJT)\config_server_page.obj \ - $(OJT)\db_server_page.obj \ - $(OJT)\get_cur_config.obj \ - $(OJT)\help.obj \ - $(OJT)\info2_page.obj \ - $(OJT)\logfile.obj \ - $(OJT)\partition_utils.obj \ - $(OJT)\root_afs_page.obj \ - $(OJT)\sys_control_page.obj \ - $(OJT)\volume_utils.obj \ - $(OJT)\salvage_dlg.obj \ - $(OJT)\get_pw_dlg.obj \ - $(OJT)\salvage_results_dlg.obj \ - $(OJT)\validation.obj \ - $(OJT)\afscfg_stub.res + $(OUT)\char_conv.obj \ + $(OUT)\admin_info_dlg.obj \ + $(OUT)\cfg_utils.obj \ + $(OUT)\create_partition_dlg.obj \ + $(OUT)\file_server_page.obj \ + $(OUT)\graphics.obj \ + $(OUT)\info_page.obj \ + $(OUT)\intro_page.obj \ + $(OUT)\partitions_page.obj \ + $(OUT)\partition_page.obj \ + $(OUT)\replicatition_page.obj \ + $(OUT)\services_page.obj \ + $(OUT)\toolbox.obj \ + $(OUT)\afscfg.obj \ + $(OUT)\backup_server_page.obj \ + $(OUT)\config_server_page.obj \ + $(OUT)\db_server_page.obj \ + $(OUT)\get_cur_config.obj \ + $(OUT)\help.obj \ + $(OUT)\info2_page.obj \ + $(OUT)\logfile.obj \ + $(OUT)\partition_utils.obj \ + $(OUT)\root_afs_page.obj \ + $(OUT)\sys_control_page.obj \ + $(OUT)\volume_utils.obj \ + $(OUT)\salvage_dlg.obj \ + $(OUT)\get_pw_dlg.obj \ + $(OUT)\salvage_results_dlg.obj \ + $(OUT)\validation.obj \ + $(OUT)\afscfg_stub.res VCLIBS =\ comctl32.lib \ @@ -69,7 +69,7 @@ $(EXEFILE): $(EXEOBJS) $(EXELIBS) ############################################################################ # Definitions for generating versioninfo resource via RC -$(OJT)\afscfg_stub.res: AFS_component_version_number.h +$(OUT)\afscfg_stub.res: AFS_component_version_number.h ############################################################################ # Install target; primary makefile target @@ -92,7 +92,7 @@ lang:: clean:: mkdir: - -mkdir $(OJT)\lang + -mkdir $(OUT)\lang cd lang nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir cd .. diff --git a/src/WINNT/afssvrcfg/hourglass.h b/src/WINNT/afssvrcfg/hourglass.h index 15c00688f..4b58c6a7b 100755 --- a/src/WINNT/afssvrcfg/hourglass.h +++ b/src/WINNT/afssvrcfg/hourglass.h @@ -7,24 +7,23 @@ * directory or online at http://www.openafs.org/dl/license10.html */ -#include - -typedef class HOURGLASS -{ - protected: - HCURSOR m_OldCursor; - - public: - HOURGLASS (LPCSTR idCursor = IDC_WAIT) - { - m_OldCursor = GetCursor(); - SetCursor (LoadCursor (NULL, idCursor)); - } - - virtual ~HOURGLASS (void) - { - SetCursor (m_OldCursor); - } - -} HOURGLASS, *PHOURGLASS; - +#include + +typedef class HOURGLASS +{ + protected: + HCURSOR m_OldCursor; + + public: + HOURGLASS (LPCSTR idCursor = IDC_WAIT) + { + m_OldCursor = GetCursor(); + SetCursor (LoadCursor (NULL, idCursor)); + } + + virtual ~HOURGLASS (void) + { + SetCursor (m_OldCursor); + } + +} HOURGLASS, *PHOURGLASS; diff --git a/src/WINNT/afssvrcfg/lang/NTMakefile b/src/WINNT/afssvrcfg/lang/NTMakefile index 3139740cf..a66a26382 100644 --- a/src/WINNT/afssvrcfg/lang/NTMakefile +++ b/src/WINNT/afssvrcfg/lang/NTMakefile @@ -10,7 +10,7 @@ AFSDEV_AUXRCFLAGS = $(AFSDEV_AUXRCFLAGS) -I$(DESTDIR)\include -I.. # include the primary makefile - +RELDIR=WINNT\afssvrcfg\lang !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\..\config\NTMakefile.version @@ -35,7 +35,7 @@ DLLFILE = $(DESTDIR)\root.server\usr\afs\bin\afssvrcfg_$(LANGID).dll RCFILE = $(LANGNAME)\afscfg.rc -RESFILE = $(OJT)\afscfg_$(LANGID).res +RESFILE = $(OUT)\afscfg_$(LANGID).res DLLOBJS = $(RESFILE) @@ -48,7 +48,7 @@ $(DLLFILE) : $(DLLOBJS) install : $(DLLFILE) clean :: - @if exist $(OJT)\*.res del $(OJT)\*.res + @if exist $(OUT)\*.res del $(OUT)\*.res @if exist RC*. del RC*. @if exist RD*. del RD*. diff --git a/src/WINNT/afssvrcfg/validation.cpp b/src/WINNT/afssvrcfg/validation.cpp index add51a8d1..40050a3e9 100644 --- a/src/WINNT/afssvrcfg/validation.cpp +++ b/src/WINNT/afssvrcfg/validation.cpp @@ -8,137 +8,137 @@ */ /* - * INCLUDES _________________________________________________________________ - * - */ -#include "afscfg.h" -#include "resource.h" -#include "validation.h" - - -/* - * DEFINITIONS _________________________________________________________________ - * - */ - - -/* - * PROTOTYPES _________________________________________________________________ - * - */ -BOOL Validation_IsValid(TCHAR *pszInput, VALIDATION_TYPE type, BOOL bShowError); - -static BOOL CheckAfsPartitionName(TCHAR *pszInput, int &nErrorMsgResID); -static BOOL CheckAfsCellName(TCHAR *pszInput, int &nErrorMsgResID); -static BOOL CheckAfsPassword(TCHAR *pszInput, int &nErrorMsgResID); -static BOOL CheckAfsUid(TCHAR *pszInput, int &nErrorMsgResID); -static BOOL CheckAfsServerName(TCHAR *pszInput, int &nErrorMsgResID); -static BOOL CheckFileName(TCHAR *pszInput, int &nErrorMsgResID); -static BOOL CheckPath(TCHAR *pszInput, int &nErrorMsgResID); -static void ShowError(int nErrorMsgResID); - - -/* - * EXPORTED FUNCTIONS _________________________________________________________________ - * - */ -BOOL Validation_IsValid(TCHAR *pszInput, VALIDATION_TYPE type, BOOL bShowError) -{ - BOOL bValid; - int nErrorMsgResID; - - switch (type) { - case VALID_AFS_PARTITION_NAME: bValid = CheckAfsPartitionName(pszInput, nErrorMsgResID); - break; - - case VALID_AFS_CELL_NAME: bValid = CheckAfsCellName(pszInput, nErrorMsgResID); - break; - - case VALID_AFS_PASSWORD: bValid = CheckAfsPassword(pszInput, nErrorMsgResID); - break; - - case VALID_AFS_UID: bValid = CheckAfsUid(pszInput, nErrorMsgResID); - break; - - case VALID_AFS_SERVER_NAME: bValid = CheckAfsServerName(pszInput, nErrorMsgResID); - break; - - default: nErrorMsgResID = 0; - ASSERT(FALSE); - return FALSE; - } - - if (!bValid && bShowError) - ShowError(nErrorMsgResID); - - return bValid; -} - - - -/* - * STATIC FUNCTIONS _________________________________________________________________ - * - */ - - /* - * Utility Functions _________________________________________________________________ - * - */ -static BOOL CheckAfsPartitionName(TCHAR *pszPartitionName, int &nErrorMsgResID) -{ - short bIsValid; - afs_status_t nStatus; - - char *pszName = new char[strlen("/vicpe") + lstrlen(pszPartitionName) + 1]; - if (!pszName) { - ASSERT(FALSE); - return TRUE; - } - - strcpy(pszName, "/vicep"); - strcat(pszName, S2A(pszPartitionName)); - - int nResult = cfg_HostPartitionNameValid(pszName, &bIsValid, &nStatus); - ASSERT(nResult); - - if (!bIsValid) - nErrorMsgResID = IDS_PARTITION_NAME_VALIDATION_TYPE; - - delete pszName; - - return bIsValid; -} - -static BOOL CheckAfsCellName(TCHAR *pszInput, int &nErrorMsgResID) -{ - nErrorMsgResID = 0; - - return TRUE; -} - -static BOOL CheckAfsPassword(TCHAR *pszInput, int &nErrorMsgResID) -{ - nErrorMsgResID = 0; - - return TRUE; -} - -static BOOL CheckAfsUid(TCHAR *pszInput, int &nErrorMsgResID) -{ - nErrorMsgResID = 0; - - return TRUE; -} - -static BOOL CheckAfsServerName(TCHAR *pszInput, int &nErrorMsgResID) -{ - nErrorMsgResID = 0; - - return TRUE; -} - -static void ShowError(int nErrorMsgResID) -{ - Message(MB_ICONSTOP | MB_OK, GetAppTitleID(), IDS_VALIDATION_ERROR_TEMPLATE, TEXT("%m%m"), nErrorMsgResID, nErrorMsgResID); -} +* INCLUDES _________________________________________________________________ +* +*/ +#include "afscfg.h" +#include "resource.h" +#include "validation.h" + + +/* + * DEFINITIONS _________________________________________________________________ + * + */ + + +/* + * PROTOTYPES _________________________________________________________________ + * + */ +BOOL Validation_IsValid(TCHAR *pszInput, VALIDATION_TYPE type, BOOL bShowError); + +static BOOL CheckAfsPartitionName(TCHAR *pszInput, int &nErrorMsgResID); +static BOOL CheckAfsCellName(TCHAR *pszInput, int &nErrorMsgResID); +static BOOL CheckAfsPassword(TCHAR *pszInput, int &nErrorMsgResID); +static BOOL CheckAfsUid(TCHAR *pszInput, int &nErrorMsgResID); +static BOOL CheckAfsServerName(TCHAR *pszInput, int &nErrorMsgResID); +static BOOL CheckFileName(TCHAR *pszInput, int &nErrorMsgResID); +static BOOL CheckPath(TCHAR *pszInput, int &nErrorMsgResID); +static void ShowError(int nErrorMsgResID); + + +/* + * EXPORTED FUNCTIONS _________________________________________________________________ + * + */ +BOOL Validation_IsValid(TCHAR *pszInput, VALIDATION_TYPE type, BOOL bShowError) +{ + BOOL bValid; + int nErrorMsgResID; + + switch (type) { + case VALID_AFS_PARTITION_NAME: bValid = CheckAfsPartitionName(pszInput, nErrorMsgResID); + break; + + case VALID_AFS_CELL_NAME: bValid = CheckAfsCellName(pszInput, nErrorMsgResID); + break; + + case VALID_AFS_PASSWORD: bValid = CheckAfsPassword(pszInput, nErrorMsgResID); + break; + + case VALID_AFS_UID: bValid = CheckAfsUid(pszInput, nErrorMsgResID); + break; + + case VALID_AFS_SERVER_NAME: bValid = CheckAfsServerName(pszInput, nErrorMsgResID); + break; + + default: nErrorMsgResID = 0; + ASSERT(FALSE); + return FALSE; + } + + if (!bValid && bShowError) + ShowError(nErrorMsgResID); + + return bValid; +} + + + +/* + * STATIC FUNCTIONS _________________________________________________________________ + * + */ + + /* + * Utility Functions _________________________________________________________________ + * + */ +static BOOL CheckAfsPartitionName(TCHAR *pszPartitionName, int &nErrorMsgResID) +{ + short bIsValid; + afs_status_t nStatus; + + char *pszName = new char[strlen("/vicpe") + lstrlen(pszPartitionName) + 1]; + if (!pszName) { + ASSERT(FALSE); + return TRUE; + } + + strcpy(pszName, "/vicep"); + strcat(pszName, S2A(pszPartitionName)); + + int nResult = cfg_HostPartitionNameValid(pszName, &bIsValid, &nStatus); + ASSERT(nResult); + + if (!bIsValid) + nErrorMsgResID = IDS_PARTITION_NAME_VALIDATION_TYPE; + + delete pszName; + + return bIsValid; +} + +static BOOL CheckAfsCellName(TCHAR *pszInput, int &nErrorMsgResID) +{ + nErrorMsgResID = 0; + + return TRUE; +} + +static BOOL CheckAfsPassword(TCHAR *pszInput, int &nErrorMsgResID) +{ + nErrorMsgResID = 0; + + return TRUE; +} + +static BOOL CheckAfsUid(TCHAR *pszInput, int &nErrorMsgResID) +{ + nErrorMsgResID = 0; + + return TRUE; +} + +static BOOL CheckAfsServerName(TCHAR *pszInput, int &nErrorMsgResID) +{ + nErrorMsgResID = 0; + + return TRUE; +} + +static void ShowError(int nErrorMsgResID) +{ + Message(MB_ICONSTOP | MB_OK, GetAppTitleID(), IDS_VALIDATION_ERROR_TEMPLATE, TEXT("%m%m"), nErrorMsgResID, nErrorMsgResID); +} diff --git a/src/WINNT/afssvrcfg/validation.h b/src/WINNT/afssvrcfg/validation.h index 0be954eb1..1621763fc 100644 --- a/src/WINNT/afssvrcfg/validation.h +++ b/src/WINNT/afssvrcfg/validation.h @@ -7,22 +7,21 @@ * directory or online at http://www.openafs.org/dl/license10.html */ -#ifndef _VALIDATION_H_ -#define _VALIDATION_H_ - - -enum VALIDATION_TYPE { - VALID_AFS_PARTITION_NAME, - VALID_AFS_CELL_NAME, - VALID_AFS_PASSWORD, - VALID_AFS_UID, - VALID_AFS_SERVER_NAME, - VALID_FILENAME, - VALID_PATH -}; - - -BOOL Validation_IsValid(TCHAR *pszInput, VALIDATION_TYPE type, BOOL bShowErorr = TRUE); - -#endif // _VALIDATION_H_ - +#ifndef _VALIDATION_H_ +#define _VALIDATION_H_ + + +enum VALIDATION_TYPE { + VALID_AFS_PARTITION_NAME, + VALID_AFS_CELL_NAME, + VALID_AFS_PASSWORD, + VALID_AFS_UID, + VALID_AFS_SERVER_NAME, + VALID_FILENAME, + VALID_PATH +}; + + +BOOL Validation_IsValid(TCHAR *pszInput, VALIDATION_TYPE type, BOOL bShowErorr = TRUE); + +#endif // _VALIDATION_H_ diff --git a/src/WINNT/afssvrcpa/NTMakefile b/src/WINNT/afssvrcpa/NTMakefile index 45e709efc..3c5210bc0 100644 --- a/src/WINNT/afssvrcpa/NTMakefile +++ b/src/WINNT/afssvrcpa/NTMakefile @@ -5,19 +5,19 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=WINNT\afssvrcpa !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version - ############################################################################ # Definitions for building a DLL. DLLFILE = $(DESTDIR)\root.server\usr\afs\bin\afsserver.cpl DLLOBJS =\ - $(OJT)\cpl_interface.obj \ - $(OJT)\AFS_component_version_number.obj \ - $(OJT)\afssvrcpa_stub.res + $(OUT)\cpl_interface.obj \ + $(OUT)\AFS_component_version_number.obj \ + $(OUT)\afssvrcpa_stub.res DLLLIBS =\ $(DESTDIR)\lib\afs\afsreg.lib \ @@ -34,7 +34,7 @@ $(DLLFILE): $(DLLOBJS) ############################################################################ # Definitions for generating versioninfo resource via RC -$(OJT)\afssvrcpa_stub.res: AFS_component_version_number.h +$(OUT)\afssvrcpa_stub.res: AFS_component_version_number.h ############################################################################ # Install target; primary makefile target @@ -58,7 +58,7 @@ clean:: mkdir: - -mkdir $(OJT)\lang + -mkdir $(OUT)\lang cd lang nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir cd .. diff --git a/src/WINNT/afssvrcpa/lang/NTMakefile b/src/WINNT/afssvrcpa/lang/NTMakefile index b97d825fb..88b6632fd 100644 --- a/src/WINNT/afssvrcpa/lang/NTMakefile +++ b/src/WINNT/afssvrcpa/lang/NTMakefile @@ -10,7 +10,7 @@ AFSDEV_AUXRCFLAGS = $(AFSDEV_AUXRCFLAGS) -I$(DESTDIR)\include -I.. # include the primary makefile - +RELDIR=WINNT\afssvrcpa\lang !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\..\config\NTMakefile.version @@ -35,7 +35,7 @@ DLLFILE = $(DESTDIR)\root.server\usr\afs\bin\afsserver_$(LANGID).dll RCFILE = $(LANGNAME)\afssvrcpa.rc -RESFILE = $(OJT)\afssvrcpa_$(LANGID).res +RESFILE = $(OUT)\afssvrcpa_$(LANGID).res DLLOBJS = $(RESFILE) @@ -48,7 +48,7 @@ $(DLLFILE) : $(DLLOBJS) install : $(DLLFILE) clean :: - @if exist $(OJT)\*.res del $(OJT)\*.res + @if exist $(OUT)\*.res del $(OUT)\*.res @if exist RC*. del RC*. @if exist RD*. del RD*. diff --git a/src/WINNT/afssvrmgr/NTMakefile b/src/WINNT/afssvrmgr/NTMakefile index d2708159d..97619e3e5 100644 --- a/src/WINNT/afssvrmgr/NTMakefile +++ b/src/WINNT/afssvrmgr/NTMakefile @@ -14,7 +14,7 @@ AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -WX AFSDEV_AUXRCFLAGS = $(AFSDEV_AUXRCFLAGS) -I$(DESTDIR)\include # include the primary makefile - +RELDIR=WINNT\afssvrmgr !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version @@ -26,67 +26,67 @@ AFSDEV_AUXRCFLAGS = $(AFSDEV_AUXRCFLAGS) -I$(DESTDIR)\include EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\TaAfsServerManager.exe EXEOBJS = \ - $(OJT)\svrmgr_stub.res \ - $(OJT)\action.obj \ - $(OJT)\agg_col.obj \ - $(OJT)\agg_general.obj \ - $(OJT)\agg_prop.obj \ - $(OJT)\agg_tab.obj \ - $(OJT)\alert.obj \ - $(OJT)\cmdline.obj \ - $(OJT)\columns.obj \ - $(OJT)\command.obj \ - $(OJT)\creds.obj \ - $(OJT)\dispatch.obj \ - $(OJT)\dispguts.obj \ - $(OJT)\display.obj \ - $(OJT)\general.obj \ - $(OJT)\helpfunc.obj \ - $(OJT)\options.obj \ - $(OJT)\prefs.obj \ - $(OJT)\problems.obj \ - $(OJT)\propcache.obj \ - $(OJT)\set_clone.obj \ - $(OJT)\set_col.obj \ - $(OJT)\set_create.obj \ - $(OJT)\set_createrep.obj \ - $(OJT)\set_delete.obj \ - $(OJT)\set_dump.obj \ - $(OJT)\set_general.obj \ - $(OJT)\set_move.obj \ - $(OJT)\set_prop.obj \ - $(OJT)\set_quota.obj \ - $(OJT)\set_release.obj \ - $(OJT)\set_rename.obj \ - $(OJT)\set_repprop.obj \ - $(OJT)\set_restore.obj \ - $(OJT)\set_tab.obj \ - $(OJT)\subset.obj \ - $(OJT)\svc_col.obj \ - $(OJT)\svc_create.obj \ - $(OJT)\svc_delete.obj \ - $(OJT)\svc_general.obj \ - $(OJT)\svc_prop.obj \ - $(OJT)\svc_startstop.obj \ - $(OJT)\svc_tab.obj \ - $(OJT)\svc_viewlog.obj \ - $(OJT)\svr_address.obj \ - $(OJT)\svr_col.obj \ - $(OJT)\svr_execute.obj \ - $(OJT)\svr_general.obj \ - $(OJT)\svr_getdates.obj \ - $(OJT)\svr_hosts.obj \ - $(OJT)\svr_install.obj \ - $(OJT)\svr_prop.obj \ - $(OJT)\svr_prune.obj \ - $(OJT)\svr_salvage.obj \ - $(OJT)\svr_security.obj \ - $(OJT)\svr_syncvldb.obj \ - $(OJT)\svr_uninstall.obj \ - $(OJT)\svr_window.obj \ - $(OJT)\svrmgr.obj \ - $(OJT)\task.obj \ - $(OJT)\window.obj + $(OUT)\svrmgr_stub.res \ + $(OUT)\action.obj \ + $(OUT)\agg_col.obj \ + $(OUT)\agg_general.obj \ + $(OUT)\agg_prop.obj \ + $(OUT)\agg_tab.obj \ + $(OUT)\alert.obj \ + $(OUT)\cmdline.obj \ + $(OUT)\columns.obj \ + $(OUT)\command.obj \ + $(OUT)\creds.obj \ + $(OUT)\dispatch.obj \ + $(OUT)\dispguts.obj \ + $(OUT)\display.obj \ + $(OUT)\general.obj \ + $(OUT)\helpfunc.obj \ + $(OUT)\options.obj \ + $(OUT)\prefs.obj \ + $(OUT)\problems.obj \ + $(OUT)\propcache.obj \ + $(OUT)\set_clone.obj \ + $(OUT)\set_col.obj \ + $(OUT)\set_create.obj \ + $(OUT)\set_createrep.obj \ + $(OUT)\set_delete.obj \ + $(OUT)\set_dump.obj \ + $(OUT)\set_general.obj \ + $(OUT)\set_move.obj \ + $(OUT)\set_prop.obj \ + $(OUT)\set_quota.obj \ + $(OUT)\set_release.obj \ + $(OUT)\set_rename.obj \ + $(OUT)\set_repprop.obj \ + $(OUT)\set_restore.obj \ + $(OUT)\set_tab.obj \ + $(OUT)\subset.obj \ + $(OUT)\svc_col.obj \ + $(OUT)\svc_create.obj \ + $(OUT)\svc_delete.obj \ + $(OUT)\svc_general.obj \ + $(OUT)\svc_prop.obj \ + $(OUT)\svc_startstop.obj \ + $(OUT)\svc_tab.obj \ + $(OUT)\svc_viewlog.obj \ + $(OUT)\svr_address.obj \ + $(OUT)\svr_col.obj \ + $(OUT)\svr_execute.obj \ + $(OUT)\svr_general.obj \ + $(OUT)\svr_getdates.obj \ + $(OUT)\svr_hosts.obj \ + $(OUT)\svr_install.obj \ + $(OUT)\svr_prop.obj \ + $(OUT)\svr_prune.obj \ + $(OUT)\svr_salvage.obj \ + $(OUT)\svr_security.obj \ + $(OUT)\svr_syncvldb.obj \ + $(OUT)\svr_uninstall.obj \ + $(OUT)\svr_window.obj \ + $(OUT)\svrmgr.obj \ + $(OUT)\task.obj \ + $(OUT)\window.obj VCLIBS =\ comctl32.lib \ @@ -114,10 +114,10 @@ install : $(EXEFILE) lang # Dependencies # -$(OJT)\svrmgr_stub.res : AFS_component_version_number.h +$(OUT)\svrmgr_stub.res : AFS_component_version_number.h mkdir: - -mkdir $(OJT)\lang + -mkdir $(OUT)\lang cd lang nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir cd .. diff --git a/src/WINNT/afssvrmgr/lang/NTMakefile b/src/WINNT/afssvrmgr/lang/NTMakefile index eabde4633..09e007177 100644 --- a/src/WINNT/afssvrmgr/lang/NTMakefile +++ b/src/WINNT/afssvrmgr/lang/NTMakefile @@ -10,7 +10,7 @@ AFSDEV_AUXRCFLAGS = $(AFSDEV_AUXRCFLAGS) -I$(DESTDIR)\include -I.. # include the primary makefile - +RELDIR=WINNT\afssvrmgr\lang !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\..\config\NTMakefile.version @@ -35,7 +35,7 @@ DLLFILE = $(DESTDIR)\root.server\usr\afs\bin\TaAfsServerManager_$(LANGID).dll RCFILE = $(LANGNAME)\svrmgr.rc -RESFILE = $(OJT)\svrmgr_$(LANGID).res +RESFILE = $(OUT)\svrmgr_$(LANGID).res DLLOBJS = $(RESFILE) @@ -48,7 +48,7 @@ $(DLLFILE) : $(DLLOBJS) install : $(DLLFILE) clean :: - @if exist $(OJT)\*.res del $(OJT)\*.res + @if exist $(OUT)\*.res del $(OUT)\*.res @if exist RC*. del RC*. @if exist RD*. del RD*. diff --git a/src/WINNT/afssvrmgr/svr_col.cpp b/src/WINNT/afssvrmgr/svr_col.cpp index 15b39dc26..40d0fb091 100644 --- a/src/WINNT/afssvrmgr/svr_col.cpp +++ b/src/WINNT/afssvrmgr/svr_col.cpp @@ -95,7 +95,7 @@ LPTSTR Server_GetColumnText (LPIDENT lpi, SERVERCOLUMN svrcol) break; case svrcolADDRESS: - if (lpss) + if (lpss) FormatSockAddr (pszBuffer, TEXT("%a"), &lpss->aAddresses[0]); break; diff --git a/src/WINNT/afsusrmgr/NTMakefile b/src/WINNT/afsusrmgr/NTMakefile index 4b27b6258..422c47816 100644 --- a/src/WINNT/afsusrmgr/NTMakefile +++ b/src/WINNT/afsusrmgr/NTMakefile @@ -18,7 +18,7 @@ AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -DIGNORE_STDS_H AFSDEV_AUXRCFLAGS = $(AFSDEV_AUXRCFLAGS) -I$(DESTDIR)\include # include the primary makefile - +RELDIR=WINNT\afsusrmgr !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version @@ -30,40 +30,40 @@ AFSDEV_AUXRCFLAGS = $(AFSDEV_AUXRCFLAGS) -I$(DESTDIR)\include EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\TaAfsAccountManager.exe EXEOBJS = \ - $(OJT)\AfsUsrMgr_stub.res \ - $(OJT)\action.obj \ - $(OJT)\browse.obj \ - $(OJT)\cell_prop.obj \ - $(OJT)\cmdline.obj \ - $(OJT)\columns.obj \ - $(OJT)\command.obj \ - $(OJT)\creds.obj \ - $(OJT)\display.obj \ - $(OJT)\errdata.obj \ - $(OJT)\general.obj \ - $(OJT)\grp_col.obj \ - $(OJT)\grp_create.obj \ - $(OJT)\grp_delete.obj \ - $(OJT)\grp_prop.obj \ - $(OJT)\grp_rename.obj \ - $(OJT)\grp_tab.obj \ - $(OJT)\helpfunc.obj \ - $(OJT)\main.obj \ - $(OJT)\mch_col.obj \ - $(OJT)\mch_create.obj \ - $(OJT)\mch_delete.obj \ - $(OJT)\mch_tab.obj \ - $(OJT)\options.obj \ - $(OJT)\task.obj \ - $(OJT)\usr_col.obj \ - $(OJT)\usr_cpw.obj \ - $(OJT)\usr_create.obj \ - $(OJT)\usr_delete.obj \ - $(OJT)\usr_prop.obj \ - $(OJT)\usr_search.obj \ - $(OJT)\usr_tab.obj \ - $(OJT)\window.obj \ - $(OJT)\winlist.obj + $(OUT)\AfsUsrMgr_stub.res \ + $(OUT)\action.obj \ + $(OUT)\browse.obj \ + $(OUT)\cell_prop.obj \ + $(OUT)\cmdline.obj \ + $(OUT)\columns.obj \ + $(OUT)\command.obj \ + $(OUT)\creds.obj \ + $(OUT)\display.obj \ + $(OUT)\errdata.obj \ + $(OUT)\general.obj \ + $(OUT)\grp_col.obj \ + $(OUT)\grp_create.obj \ + $(OUT)\grp_delete.obj \ + $(OUT)\grp_prop.obj \ + $(OUT)\grp_rename.obj \ + $(OUT)\grp_tab.obj \ + $(OUT)\helpfunc.obj \ + $(OUT)\main.obj \ + $(OUT)\mch_col.obj \ + $(OUT)\mch_create.obj \ + $(OUT)\mch_delete.obj \ + $(OUT)\mch_tab.obj \ + $(OUT)\options.obj \ + $(OUT)\task.obj \ + $(OUT)\usr_col.obj \ + $(OUT)\usr_cpw.obj \ + $(OUT)\usr_create.obj \ + $(OUT)\usr_delete.obj \ + $(OUT)\usr_prop.obj \ + $(OUT)\usr_search.obj \ + $(OUT)\usr_tab.obj \ + $(OUT)\window.obj \ + $(OUT)\winlist.obj VCLIBS =\ comctl32.lib \ @@ -91,10 +91,10 @@ install : $(EXEFILE) lang # Dependencies # -$(OJT)\AfsUsrMgr_stub.res : AFS_component_version_number.h +$(OUT)\AfsUsrMgr_stub.res : AFS_component_version_number.h mkdir: - -mkdir $(OJT)\lang + -mkdir $(OUT)\lang cd lang nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir cd .. diff --git a/src/WINNT/afsusrmgr/lang/NTMakefile b/src/WINNT/afsusrmgr/lang/NTMakefile index d0bc5be1e..9f0eb8f88 100644 --- a/src/WINNT/afsusrmgr/lang/NTMakefile +++ b/src/WINNT/afsusrmgr/lang/NTMakefile @@ -10,7 +10,7 @@ AFSDEV_AUXRCFLAGS = $(AFSDEV_AUXRCFLAGS) -I$(DESTDIR)\include -I.. # include the primary makefile - +RELDIR=WINNT\afsusrmgr\lang !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\..\config\NTMakefile.version @@ -35,7 +35,7 @@ DLLFILE = $(DESTDIR)\root.server\usr\afs\bin\TaAfsAccountManager_$(LANGID).dll RCFILE = $(LANGNAME)\AfsUsrMgr.rc -RESFILE = $(OJT)\AfsUsrMgr_$(LANGID).res +RESFILE = $(OUT)\AfsUsrMgr_$(LANGID).res DLLOBJS = $(RESFILE) @@ -48,7 +48,7 @@ $(DLLFILE) : $(DLLOBJS) install : $(DLLFILE) clean :: - @if exist $(OJT)\*.res del $(OJT)\*.res + @if exist $(OUT)\*.res del $(OUT)\*.res @if exist RC*. del RC*. @if exist RD*. del RD*. diff --git a/src/WINNT/bosctlsvc/NTMakefile b/src/WINNT/bosctlsvc/NTMakefile index 754f4d784..fa75d211e 100644 --- a/src/WINNT/bosctlsvc/NTMakefile +++ b/src/WINNT/bosctlsvc/NTMakefile @@ -5,6 +5,7 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=WINNT\bosctlsvc !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version @@ -14,8 +15,8 @@ EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\bosctlsvc.exe EXEOBJS =\ - $(OJT)\bosctlsvc.obj \ - $(OJT)\bosctlsvc.res + $(OUT)\bosctlsvc.obj \ + $(OUT)\bosctlsvc.res EXELIBS =\ $(DESTDIR)\lib\afs\afsutil.lib \ @@ -30,7 +31,7 @@ $(EXEFILE): $(EXEOBJS) $(EXELIBS) ############################################################################ # Definitions for generating versioninfo resource via RC -$(OJT)\bosctlsvc.res: AFS_component_version_number.h +$(OUT)\bosctlsvc.res: AFS_component_version_number.h ############################################################################ diff --git a/src/WINNT/client_config/NTMakefile b/src/WINNT/client_config/NTMakefile index 5bb2049c8..cea122e61 100644 --- a/src/WINNT/client_config/NTMakefile +++ b/src/WINNT/client_config/NTMakefile @@ -10,7 +10,7 @@ AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -I ..\afsd # include the primary makefile - +RELDIR=WINNT\client_config !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !include ..\..\config\NTMakefile.version @@ -22,30 +22,30 @@ AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -I ..\afsd EXEFILE = $(DESTDIR)\root.client\usr\vice\etc\afs_config.exe EXEOBJS = \ - $(OJT)\config.obj \ - $(OJT)\drivemap.obj \ - $(OJT)\main.obj \ - $(OJT)\misc.obj \ - $(OJT)\pagesize.obj \ - $(OJT)\tab_advanced.obj \ - $(OJT)\tab_drives.obj \ - $(OJT)\tab_hosts.obj \ - $(OJT)\tab_general.obj \ - $(OJT)\tab_prefs.obj \ - $(OJT)\dlg_logon.obj \ - $(OJT)\dlg_diag.obj \ - $(OJT)\dlg_misc.obj \ - $(OJT)\isadmin.obj \ - $(OJT)\dlg_automap.obj + $(OUT)\config.obj \ + $(OUT)\drivemap.obj \ + $(OUT)\main.obj \ + $(OUT)\misc.obj \ + $(OUT)\pagesize.obj \ + $(OUT)\tab_advanced.obj \ + $(OUT)\tab_drives.obj \ + $(OUT)\tab_hosts.obj \ + $(OUT)\tab_general.obj \ + $(OUT)\tab_prefs.obj \ + $(OUT)\dlg_logon.obj \ + $(OUT)\dlg_diag.obj \ + $(OUT)\dlg_misc.obj \ + $(OUT)\isadmin.obj \ + $(OUT)\dlg_automap.obj EXEOBJSc = \ - $(OJT)\cellservdb.obj + $(OUT)\cellservdb.obj EXERES = \ - $(OJT)\afs_config_stub.res + $(OUT)\afs_config_stub.res AFSDOBJS = \ - $(OJT)\fs_utils.obj + $(OUT)\fs_utils.obj AFSD= ..\afsd @@ -82,14 +82,14 @@ COPYHEADERS = \ $(DESTDIR)\include\WINNT\subclass.h AFSAPPLIBOBJS= \ - $(OJT)\hashlist.obj \ - $(OJT)\resize.obj \ - $(OJT)\subclass.obj \ - $(OJT)\fastlist.obj \ - $(OJT)\dialog.obj \ - $(OJT)\ctl_sockaddr.obj \ - $(OJT)\ctl_spinner.obj \ - $(OJT)\checklist.obj + $(OUT)\hashlist.obj \ + $(OUT)\resize.obj \ + $(OUT)\subclass.obj \ + $(OUT)\fastlist.obj \ + $(OUT)\dialog.obj \ + $(OUT)\ctl_sockaddr.obj \ + $(OUT)\ctl_spinner.obj \ + $(OUT)\checklist.obj AFSAPPLIB=..\afsapplib @@ -169,7 +169,7 @@ de_DE: @$(NTLANG) $@ $(MAKECMD) /nologo /f NTMakefile install $(CD) .. -$(OJT)\afs_config_stub.res : AFS_component_version_number.h +$(OUT)\afs_config_stub.res : AFS_component_version_number.h clean:: $(DEL) $(COPYHEADERS) @@ -185,7 +185,7 @@ clean:: $(CD) .. mkdir: - -mkdir $(OJT)\lang + -mkdir $(OUT)\lang cd lang nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir cd .. diff --git a/src/WINNT/client_config/dlg_automap.cpp b/src/WINNT/client_config/dlg_automap.cpp index 096b32412..7b65a571e 100644 --- a/src/WINNT/client_config/dlg_automap.cpp +++ b/src/WINNT/client_config/dlg_automap.cpp @@ -10,6 +10,7 @@ extern "C" { #include #include +#include } #include "afs_config.h" @@ -448,7 +449,7 @@ void AutoMapEdit_OnInitDialog (HWND hDlg) SendMessage (hCombo, CB_SETCURSEL, iItemSel, 0); TCHAR szMapping[ MAX_PATH ]; - AdjustAfsPath (szMapping, ((pMap->szMapping[0]) ? pMap->szMapping : TEXT("/afs")), TRUE, FALSE); + AdjustAfsPath (szMapping, ((pMap->szMapping[0]) ? pMap->szMapping : cm_slash_mount_root), TRUE, FALSE); SetDlgItemText (hDlg, IDC_PATH, szMapping); SetDlgItemText (hDlg, IDC_DESC, pMap->szSubmount); @@ -476,8 +477,8 @@ void AutoMapEdit_OnOK (HWND hDlg) return; } - if ( (lstrncmpi (pMap->szMapping, TEXT("/afs"), lstrlen(TEXT("/afs")))) && - (lstrncmpi (pMap->szMapping, TEXT("\\afs"), lstrlen(TEXT("\\afs")))) ) + if ( (lstrncmpi (pMap->szMapping, cm_slash_mount_root, lstrlen(cm_slash_mount_root))) && + (lstrncmpi (pMap->szMapping, cm_back_slash_mount_root, lstrlen(cm_back_slash_mount_root))) ) { Message (MB_ICONHAND, GetErrorTitle(), IDS_BADMAP_DESC); return; diff --git a/src/WINNT/client_config/drivemap.cpp b/src/WINNT/client_config/drivemap.cpp index db61e2731..83001128d 100644 --- a/src/WINNT/client_config/drivemap.cpp +++ b/src/WINNT/client_config/drivemap.cpp @@ -11,6 +11,7 @@ extern "C" { #include #include #include +#include } #include #include @@ -233,7 +234,7 @@ BOOL SubmountToPath (PDRIVEMAPLIST pList, LPTSTR pszPath, LPTSTR pszSubmount, BO // if (!lstrcmpi (pszSubmount, TEXT("all"))) { - lstrcpy (pszPath, TEXT("/afs")); + lstrcpy (pszPath, cm_slash_mount_root); return TRUE; } @@ -600,8 +601,8 @@ BOOL ActivateDriveMap (TCHAR chDrive, LPTSTR pszMapping, LPTSTR pszSubmountReq, { // We can only map drives to places in AFS using this function. // - if ( (lstrncmpi (pszMapping, TEXT("/afs"), lstrlen(TEXT("/afs")))) && - (lstrncmpi (pszMapping, TEXT("\\afs"), lstrlen(TEXT("\\afs")))) ) + if ( (lstrncmpi (pszMapping, cm_slash_mount_root, lstrlen(cm_slash_mount_root))) && + (lstrncmpi (pszMapping, cm_back_slash_mount_root, lstrlen(cm_back_slash_mount_root))) ) { if (pdwStatus) *pdwStatus = ERROR_BAD_NETPATH; @@ -681,21 +682,21 @@ void RemoveSubMount (LPTSTR pszSubmount) void AdjustAfsPath (LPTSTR pszTarget, LPCTSTR pszSource, BOOL fWantAFS, BOOL fWantForwardSlashes) { - if (!*pszSource) - lstrcpy (pszTarget, (fWantAFS) ? TEXT("/afs") : TEXT("")); - else if ((*pszSource != TEXT('/')) && (*pszSource != TEXT('\\'))) - wsprintf (pszTarget, TEXT("/afs/%s"), pszSource); - // We don't want to strip afs off the start if it is part of something for example afscell.company.com - else if (fWantAFS && (lstrncmpi (&pszSource[1], TEXT("afs"), 3)) || !((pszSource[4] == TEXT('/')) || - (pszSource[4] == TEXT('\\')) || - (lstrlen(pszSource) == 4))) - wsprintf (pszTarget, TEXT("/afs%s"), pszSource); - else if (!fWantAFS && (!lstrncmpi (&pszSource[1], TEXT("afs"), 3) && ((pszSource[4] == TEXT('/')) || - (pszSource[4] == TEXT('\\')) || - (lstrlen(pszSource) == 4)))) - lstrcpy (pszTarget, &pszSource[4]); - else - lstrcpy (pszTarget, pszSource); + if (!*pszSource) + lstrcpy (pszTarget, (fWantAFS) ? cm_slash_mount_root : TEXT("")); + else if ((*pszSource != TEXT('/')) && (*pszSource != TEXT('\\'))) + wsprintf (pszTarget, TEXT("%s/%s"),cm_slash_mount_root, pszSource); + // We don't want to strip afs off the start if it is part of something for example afscell.company.com + else if (fWantAFS && (lstrncmpi (&pszSource[1], cm_mount_root, strlen(cm_mount_root))) || !((pszSource[strlen(cm_slash_mount_root)] == TEXT('/')) || + (pszSource[strlen(cm_slash_mount_root)] == TEXT('\\')) || + (lstrlen(pszSource) == strlen(cm_slash_mount_root)))) + wsprintf (pszTarget, TEXT("%s%s"),cm_slash_mount_root, pszSource); + else if (!fWantAFS && (!lstrncmpi (&pszSource[1], cm_mount_root, strlen(cm_mount_root)) && ((pszSource[strlen(cm_slash_mount_root)] == TEXT('/')) || + (pszSource[strlen(cm_slash_mount_root)] == TEXT('\\')) || + (lstrlen(pszSource) == strlen(cm_slash_mount_root))))) + lstrcpy (pszTarget, &pszSource[strlen(cm_slash_mount_root)]); + else + lstrcpy (pszTarget, pszSource); for (LPTSTR pch = pszTarget; *pch; ++pch) { diff --git a/src/WINNT/client_config/lang/NTMakefile b/src/WINNT/client_config/lang/NTMakefile index 3843ebbf8..3cba5cb20 100644 --- a/src/WINNT/client_config/lang/NTMakefile +++ b/src/WINNT/client_config/lang/NTMakefile @@ -10,7 +10,7 @@ AFSDEV_AUXRCFLAGS = $(AFSDEV_AUXRCFLAGS) -I$(DESTDIR)\include -I.. # include the primary makefile - +RELDIR=WINNT\client_config\lang !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\..\config\NTMakefile.version @@ -35,7 +35,7 @@ DLLFILE = $(DESTDIR)\root.client\usr\vice\etc\afs_config_$(LANGID).dll RCFILE = $(LANGNAME)\afs_config.rc -RESFILE = $(OJT)\afs_config_$(LANGID).res +RESFILE = $(OUT)\afs_config_$(LANGID).res DLLOBJS = $(RESFILE) @@ -48,7 +48,7 @@ $(DLLFILE) : $(DLLOBJS) install : $(DLLFILE) clean :: - $(DEL) $(OJT)\*.res RC* RD* $(DLLFILE) + $(DEL) $(OUT)\*.res RC* RD* $(DLLFILE) ############################################################################ # diff --git a/src/WINNT/client_config/main.cpp b/src/WINNT/client_config/main.cpp index 8ec590572..5b10bedcb 100644 --- a/src/WINNT/client_config/main.cpp +++ b/src/WINNT/client_config/main.cpp @@ -10,6 +10,7 @@ extern "C" { #include #include +#include } #include "afs_config.h" @@ -20,7 +21,6 @@ extern "C" { #include "tab_drives.h" #include "tab_advanced.h" - /* * DEFINITIONS ________________________________________________________________ * @@ -62,6 +62,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR pCmdLine, int nCmdSh RegisterFastListClass(); RegisterSockAddrClass(); RegisterSpinnerClass(); + fs_utils_InitMountRoot(); // Initialize our global variables and window classes // diff --git a/src/WINNT/client_config/resource.h b/src/WINNT/client_config/resource.h index ccdaf504c..a12b165c4 100644 --- a/src/WINNT/client_config/resource.h +++ b/src/WINNT/client_config/resource.h @@ -165,6 +165,7 @@ #define IDC_ROOTVOLUME 1061 #define IDC_AUTOLANA 1062 #define IDC_STATICLANA 1063 +#define IDC_STATICSUBMOUNT 1064 #define IDC_STATIC -1 // Next default values for new objects diff --git a/src/WINNT/client_config/tab_drives.cpp b/src/WINNT/client_config/tab_drives.cpp index 565e660a1..501aa0d79 100644 --- a/src/WINNT/client_config/tab_drives.cpp +++ b/src/WINNT/client_config/tab_drives.cpp @@ -10,6 +10,7 @@ extern "C" { #include #include +#include } #include "afs_config.h" @@ -433,7 +434,13 @@ void DriveEdit_OnInitDialog (HWND hDlg) SendMessage (hCombo, CB_SETCURSEL, iItemSel, 0); TCHAR szMapping[ MAX_PATH ]; - AdjustAfsPath (szMapping, ((pMap->szMapping[0]) ? pMap->szMapping : TEXT("/afs")), TRUE, FALSE); + AdjustAfsPath (szMapping, ((pMap->szMapping[0]) ? pMap->szMapping : cm_slash_mount_root), TRUE, FALSE); + CHAR msg[256], msgf[256]; + if (GetDlgItemText(hDlg,IDC_STATICSUBMOUNT,(LPSTR)msg,sizeof(msg)-1)>0) + { + wsprintf(msgf,msg,cm_back_slash_mount_root,cm_back_slash_mount_root); + SetDlgItemText (hDlg, IDC_STATICSUBMOUNT, msgf); + } SetDlgItemText (hDlg, IDC_PATH, szMapping); SetDlgItemText (hDlg, IDC_DESC, pMap->szSubmount); @@ -461,9 +468,9 @@ void DriveEdit_OnOK (HWND hDlg) return; } - if ( (lstrncmpi (pMap->szMapping, TEXT("/afs"), lstrlen(TEXT("/afs")))) && - (lstrncmpi (pMap->szMapping, TEXT("\\afs"), lstrlen(TEXT("\\afs")))) ) - { + if ( (lstrncmpi (pMap->szMapping, cm_slash_mount_root, lstrlen(cm_slash_mount_root))) && + (lstrncmpi (pMap->szMapping, cm_back_slash_mount_root, lstrlen(cm_back_slash_mount_root))) ) + { Message (MB_ICONHAND, GetErrorTitle(), IDS_BADMAP_DESC); return; } @@ -781,9 +788,16 @@ BOOL CALLBACK SubEdit_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp) void SubEdit_OnInitDialog (HWND hDlg) { - PSUBMOUNT pSubmount = (PSUBMOUNT)GetWindowLong (hDlg, DWL_USER); + CHAR msg[256], msgf[256]; + PSUBMOUNT pSubmount = (PSUBMOUNT)GetWindowLong (hDlg, DWL_USER); + if (GetDlgItemText(hDlg,IDC_STATICSUBMOUNT,(LPSTR)msg,sizeof(msg)-1)>0) + { + wsprintf(msgf,msg,cm_back_slash_mount_root,cm_back_slash_mount_root); + SetDlgItemText (hDlg, IDC_STATICSUBMOUNT, msgf); + } SetDlgItemText (hDlg, IDC_SUBMOUNT, pSubmount->szSubmount); + SetDlgItemText (hDlg, IDC_MAPPING, pSubmount->szMapping); } diff --git a/src/WINNT/client_cpa/NTMakefile b/src/WINNT/client_cpa/NTMakefile index 0221e0eda..d4c18936e 100644 --- a/src/WINNT/client_cpa/NTMakefile +++ b/src/WINNT/client_cpa/NTMakefile @@ -5,19 +5,19 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=WINNT\client_cpa !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !include ..\..\config\NTMakefile.version - ############################################################################ # Definitions for building afs_cpa.cpl DLLFILE = $(DESTDIR)\root.client\usr\vice\etc\afs_cpa.cpl DLLOBJS =\ - $(OJT)\cpl_interface.obj \ - $(OJT)\AFS_component_version_number.obj \ - $(OJT)\afs_cpa_stub.res + $(OUT)\cpl_interface.obj \ + $(OUT)\AFS_component_version_number.obj \ + $(OUT)\afs_cpa_stub.res DLLLIBS =\ $(DESTDIR)\lib\afs\TaLocale.lib \ @@ -62,7 +62,7 @@ clean:: ############################################################################ # Dependencies -$(OJT)\afs_cpa_stub.res : AFS_component_version_number.h +$(OUT)\afs_cpa_stub.res : AFS_component_version_number.h en_US: $(CD) lang @@ -105,7 +105,7 @@ de_DE: $(CD) .. mkdir: - -mkdir $(OJT)\lang + -mkdir $(OUT)\lang cd lang nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir cd .. diff --git a/src/WINNT/client_cpa/lang/NTMakefile b/src/WINNT/client_cpa/lang/NTMakefile index 91749657b..ff6e80e41 100644 --- a/src/WINNT/client_cpa/lang/NTMakefile +++ b/src/WINNT/client_cpa/lang/NTMakefile @@ -10,7 +10,7 @@ AFSDEV_AUXRCFLAGS = $(AFSDEV_AUXRCFLAGS) -I$(DESTDIR)\include -I.. # include the primary makefile - +RELDIR=WINNT\client_cpa\lang !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) !include ..\..\..\config\NTMakefile.version @@ -35,7 +35,7 @@ DLLFILE = $(DESTDIR)\root.client\usr\vice\etc\afs_cpa_$(LANGID).dll RCFILE = $(LANGNAME)\afs_cpa.rc -RESFILE = $(OJT)\afs_cpa_$(LANGID).res +RESFILE = $(OUT)\afs_cpa_$(LANGID).res DLLOBJS = $(RESFILE) diff --git a/src/WINNT/client_creds/NTMakefile b/src/WINNT/client_creds/NTMakefile index 5967c034d..9a94eedfd 100644 --- a/src/WINNT/client_creds/NTMakefile +++ b/src/WINNT/client_creds/NTMakefile @@ -9,7 +9,9 @@ AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -I ..\afsd -I..\client_config + # include the primary makefile +RELDIR=WINNT\client_creds !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version @@ -21,31 +23,31 @@ AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -I ..\afsd -I..\client_config EXEFILE = $(DESTDIR)\root.client\usr\vice\etc\afscreds.exe EXEOBJS = \ - $(OJT)\advtab.obj \ - $(OJT)\afswiz.obj \ - $(OJT)\creds.obj \ - $(OJT)\main.obj \ - $(OJT)\misc.obj \ - $(OJT)\credstab.obj \ - $(OJT)\mounttab.obj \ - $(OJT)\settings.obj \ - $(OJT)\shortcut.obj \ - $(OJT)\trayicon.obj \ - $(OJT)\window.obj + $(OUT)\advtab.obj \ + $(OUT)\afswiz.obj \ + $(OUT)\creds.obj \ + $(OUT)\main.obj \ + $(OUT)\misc.obj \ + $(OUT)\credstab.obj \ + $(OUT)\mounttab.obj \ + $(OUT)\settings.obj \ + $(OUT)\shortcut.obj \ + $(OUT)\trayicon.obj \ + $(OUT)\window.obj EXERES = \ - $(OJT)\afscreds_stub.res + $(OUT)\afscreds_stub.res AFSDOBJS = \ - $(OJT)\fs_utils.obj + $(OUT)\fs_utils.obj AFSAPPLIBOBJS= \ - $(OJT)\checklist.obj \ - $(OJT)\al_wizard.obj \ - $(OJT)\subclass.obj + $(OUT)\checklist.obj \ + $(OUT)\al_wizard.obj \ + $(OUT)\subclass.obj CLIENTOBJS = \ - $(OJT)\drivemap.obj + $(OUT)\drivemap.obj VCLIBS =\ comctl32.lib \ @@ -109,10 +111,10 @@ lang :: # Dependencies # -$(OJT)\afscreds_stub.res : afscreds_stub.rc AFS_component_version_number.h +$(OUT)\afscreds_stub.res : afscreds_stub.rc AFS_component_version_number.h mkdir: - -mkdir $(OJT)\lang + -mkdir $(OUT)\lang cd lang nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir cd .. diff --git a/src/WINNT/client_creds/afswiz.cpp b/src/WINNT/client_creds/afswiz.cpp index b3d7fce4a..928bd28ee 100644 --- a/src/WINNT/client_creds/afswiz.cpp +++ b/src/WINNT/client_creds/afswiz.cpp @@ -10,6 +10,7 @@ extern "C" { #include #include +#include } #include "afscreds.h" @@ -495,7 +496,7 @@ void WizMount_OnInitDialog (HWND hDlg) SendMessage (hCombo, WM_SETREDRAW, TRUE, 0); SendMessage (hCombo, CB_SETCURSEL, iItemSel, 0); - SetDlgItemText (hDlg, IDC_MAP_PATH, TEXT("/afs")); + SetDlgItemText (hDlg, IDC_MAP_PATH, cm_slash_mount_root); CheckDlgButton (hDlg, IDC_NOMAP, FALSE); CheckDlgButton (hDlg, IDC_YESMAP, TRUE); diff --git a/src/WINNT/client_creds/lang/NTMakefile b/src/WINNT/client_creds/lang/NTMakefile index e987966e2..2f6e443ce 100644 --- a/src/WINNT/client_creds/lang/NTMakefile +++ b/src/WINNT/client_creds/lang/NTMakefile @@ -10,7 +10,7 @@ AFSDEV_AUXRCFLAGS = $(AFSDEV_AUXRCFLAGS) -I$(DESTDIR)\include -I.. # include the primary makefile - +RELDIR=WINNT\client_creds\lang !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\..\config\NTMakefile.version @@ -35,7 +35,7 @@ DLLFILE = $(DESTDIR)\root.client\usr\vice\etc\afscreds_$(LANGID).dll RCFILE = $(LANGNAME)\afscreds.rc -RESFILE = $(OJT)\afscreds_$(LANGID).res +RESFILE = $(OUT)\afscreds_$(LANGID).res DLLOBJS = $(RESFILE) @@ -48,7 +48,7 @@ $(DLLFILE) : $(DLLOBJS) install : $(DLLFILE) clean :: - $(DEL) $(OJT)\*.res RC* RD* $(DLLFILE) + $(DEL) $(OUT)\*.res RC* RD* $(DLLFILE) ############################################################################ # diff --git a/src/WINNT/client_creds/main.cpp b/src/WINNT/client_creds/main.cpp index 747c32dd2..2cafd0c90 100644 --- a/src/WINNT/client_creds/main.cpp +++ b/src/WINNT/client_creds/main.cpp @@ -10,6 +10,8 @@ extern "C" { #include #include +#include +#include } #include "afscreds.h" @@ -17,7 +19,6 @@ extern "C" { #include "drivemap.h" #include #include -#include #include "rxkad.h" /* @@ -58,6 +59,10 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR pCmdLine, int nCmdSh Shortcut_Init(); TaLocale_LoadCorrespondingModule (hInst); + osi_InitTraceOption(); + osi_LogEvent0("AFSCreds Main command line",pCmdLine); + fs_utils_InitMountRoot(); + if (InitApp (pCmdLine)) { MSG msg; diff --git a/src/WINNT/client_creds/mounttab.cpp b/src/WINNT/client_creds/mounttab.cpp index fafb15899..4694deb6b 100644 --- a/src/WINNT/client_creds/mounttab.cpp +++ b/src/WINNT/client_creds/mounttab.cpp @@ -10,6 +10,7 @@ extern "C" { #include #include +#include } #include "afscreds.h" @@ -419,7 +420,13 @@ void Mapping_OnInitDialog (HWND hDlg) SendMessage (hCombo, CB_SETCURSEL, iItemSel, 0); TCHAR szMapping[ MAX_PATH ]; - AdjustAfsPath (szMapping, ((pMap->szMapping[0]) ? pMap->szMapping : TEXT("/afs")), TRUE, FALSE); + AdjustAfsPath (szMapping, ((pMap->szMapping[0]) ? pMap->szMapping : cm_slash_mount_root), TRUE, FALSE); + CHAR msg[256], msgf[256]; + if (GetDlgItemText(hDlg,IDC_STATICSUBMOUNT,(LPSTR)msg,sizeof(msg)-1)>0) + { + wsprintf(msgf,msg,cm_back_slash_mount_root,cm_back_slash_mount_root); + SetDlgItemText (hDlg, IDC_STATICSUBMOUNT, msgf); + } SetDlgItemText (hDlg, IDC_MAP_PATH, szMapping); SetDlgItemText (hDlg, IDC_MAP_DESC, pMap->szSubmount); @@ -448,9 +455,9 @@ void Mapping_OnOK (HWND hDlg) return; } - if ( (lstrncmpi (pMap->szMapping, TEXT("/afs"), lstrlen(TEXT("/afs")))) && - (lstrncmpi (pMap->szMapping, TEXT("\\afs"), lstrlen(TEXT("\\afs")))) ) - { + if ( (lstrncmpi (pMap->szMapping, cm_slash_mount_root, lstrlen(cm_slash_mount_root))) && /*TEXT("/afs")*/ + (lstrncmpi (pMap->szMapping, cm_back_slash_mount_root, lstrlen(cm_back_slash_mount_root))) ) /*TEXT("\\afs")*/ + { Message (MB_ICONHAND, IDS_BADMAP_TITLE, IDS_BADMAP_DESC); return; } diff --git a/src/WINNT/client_creds/resource.h b/src/WINNT/client_creds/resource.h index e80c45668..4cc3cc9db 100644 --- a/src/WINNT/client_creds/resource.h +++ b/src/WINNT/client_creds/resource.h @@ -133,6 +133,7 @@ #define IDC_MAP_PERSISTENT 5049 #define IDC_RUNNING 5050 #define IDC_STOPPED 5051 +#define IDC_STATICSUBMOUNT 5052 #define IDC_STATIC -1 // Next default values for new objects diff --git a/src/WINNT/client_exp/NTMakefile b/src/WINNT/client_exp/NTMakefile index 686d73dd5..066560f6e 100644 --- a/src/WINNT/client_exp/NTMakefile +++ b/src/WINNT/client_exp/NTMakefile @@ -8,47 +8,47 @@ AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -I..\afsd /D"_WINDOWS" /D"_WINDLL" /D"_AFXDLL" /D"_USRDLL" NO_CRTDBG=1 #define this to disable any CRT_DBG flag +RELDIR=WINNT\client_exp !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !include ..\..\config\NTMakefile.version - ############################################################################ # afs_shl_ext.dll DLLFILE = $(DESTDIR)\root.client\usr\vice\etc\afs_shl_ext.dll DLLOBJS =\ - $(OJT)\add_acl_entry_dlg.obj \ - $(OJT)\add_submount_dlg.obj \ - $(OJT)\afs_shl_ext.obj \ - $(OJT)\afs_shl_ext_stub.res \ - $(OJT)\auth_dlg.obj \ - $(OJT)\clear_acl_dlg.obj \ - $(OJT)\copy_acl_dlg.obj \ - $(OJT)\down_servers_dlg.obj \ - $(OJT)\fs_utils.obj \ - $(OJT)\gui2fs.obj \ - $(OJT)\help.obj \ - $(OJT)\klog_dlg.obj \ - $(OJT)\make_mount_point_dlg.obj \ - $(OJT)\mount_points_dlg.obj \ - $(OJT)\msgs.obj \ - $(OJT)\partition_info_dlg.obj \ - $(OJT)\results_dlg.obj \ - $(OJT)\server_status_dlg.obj \ - $(OJT)\set_afs_acl.obj \ - $(OJT)\shell_ext.obj \ - $(OJT)\stdafx.obj \ - $(OJT)\submount_info.obj \ - $(OJT)\submounts_dlg.obj \ - $(OJT)\unlog_dlg.obj \ - $(OJT)\volumeinfo.obj \ -# $(OJT)\make_symbolic_link_dlg.obj \ - $(OJT)\AFS_component_version_number.obj + $(OUT)\add_acl_entry_dlg.obj \ + $(OUT)\add_submount_dlg.obj \ + $(OUT)\afs_shl_ext.obj \ + $(OUT)\afs_shl_ext_stub.res \ + $(OUT)\auth_dlg.obj \ + $(OUT)\clear_acl_dlg.obj \ + $(OUT)\copy_acl_dlg.obj \ + $(OUT)\down_servers_dlg.obj \ + $(OUT)\fs_utils.obj \ + $(OUT)\gui2fs.obj \ + $(OUT)\help.obj \ + $(OUT)\klog_dlg.obj \ + $(OUT)\make_mount_point_dlg.obj \ + $(OUT)\mount_points_dlg.obj \ + $(OUT)\msgs.obj \ + $(OUT)\partition_info_dlg.obj \ + $(OUT)\results_dlg.obj \ + $(OUT)\server_status_dlg.obj \ + $(OUT)\set_afs_acl.obj \ + $(OUT)\shell_ext.obj \ + $(OUT)\stdafx.obj \ + $(OUT)\submount_info.obj \ + $(OUT)\submounts_dlg.obj \ + $(OUT)\unlog_dlg.obj \ + $(OUT)\volumeinfo.obj \ + $(OUT)\make_symbolic_link_dlg.obj \ + $(OUT)\AFS_component_version_number.obj AFSD = ..\afsd -$(OJT)\fs_utils.obj: $(AFSD)\fs_utils.c +$(OUT)\fs_utils.obj: $(AFSD)\fs_utils.c $(C2OBJ) $** DLLLIBS =\ @@ -66,7 +66,7 @@ $(DLLFILE): $(DLLOBJS) ############################################################################ # Definitions for generating versioninfo resources -$(OJT)\afs_shl_ext_stub.res: AFS_component_version_number.h +$(OUT)\afs_shl_ext_stub.res: AFS_component_version_number.h ############################################################################ # Install target; primary makefile target @@ -137,7 +137,7 @@ clean:: $(CD) .. mkdir: - -mkdir $(OJT)\lang + -mkdir $(OUT)\lang cd lang nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir cd .. diff --git a/src/WINNT/client_exp/afs_shl_ext.cpp b/src/WINNT/client_exp/afs_shl_ext.cpp index d0917b201..d1eebfa89 100644 --- a/src/WINNT/client_exp/afs_shl_ext.cpp +++ b/src/WINNT/client_exp/afs_shl_ext.cpp @@ -17,6 +17,7 @@ extern "C" { #include #include "help.h" #include "shell_ext.h" +#include "winreg.h" #ifdef _DEBUG #define new DEBUG_NEW @@ -24,6 +25,8 @@ extern "C" { static char THIS_FILE[] = __FILE__; #endif +static const IID IID_IShellExt = +{ 0xdc515c27, 0x6cac, 0x11d1, { 0xba, 0xe7, 0x0, 0xc0, 0x4f, 0xd1, 0x40, 0xd2 } }; ///////////////////////////////////////////////////////////////////////////// // CAfsShlExt @@ -52,6 +55,7 @@ CAfsShlExt theApp; ///////////////////////////////////////////////////////////////////////////// // CAfsShlExt initialization +HINSTANCE g_hInstance; BOOL CAfsShlExt::InitInstance() { @@ -86,6 +90,32 @@ STDAPI DllCanUnloadNow(void) return S_FALSE; } +int WideCharToLocal(LPTSTR pLocal, LPCWSTR pWide, DWORD dwChars) +{ + *pLocal = 0; + WideCharToMultiByte( CP_ACP, 0, pWide, -1, pLocal, dwChars, NULL, NULL); + return lstrlen(pLocal); +} + +LRESULT DoRegCLSID(HKEY hKey,PTCHAR szSubKey,PTCHAR szData,PTCHAR szValue=NULL) +{ + DWORD dwDisp; + LRESULT lResult; + HKEY thKey; + lResult = RegCreateKeyEx(hKey, szSubKey, 0, NULL, + REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, + &thKey, &dwDisp); + if(NOERROR == lResult) + { + lResult = RegSetValueEx(thKey, szValue, 0, REG_SZ, + (LPBYTE)szData, (lstrlen(szData) + 1) + * sizeof(TCHAR)); + RegCloseKey(thKey); + } + RegCloseKey(hKey); + return lResult; +} + // by exporting DllRegisterServer, you can use regsvr.exe STDAPI DllRegisterServer(void) { @@ -99,7 +129,86 @@ STDAPI DllRegisterServer(void) LPWSTR pwsz; AFX_MANAGE_STATE(AfxGetStaticModuleState()); COleObjectFactory::UpdateRegistryAll(); + + StringFromIID(IID_IShellExt, &pwsz); + if(pwsz) + { + WideCharToMultiByte( CP_ACP, 0,pwsz, -1, szCLSID, sizeof(szCLSID), NULL, NULL); + LPMALLOC pMalloc; + CoGetMalloc(1, &pMalloc); + if(pMalloc) + { + (pMalloc->Free)(pwsz); + (pMalloc->Release)(); + } + } else { + return E_FAIL; + } + + /* + [HKEY_CLASSES_ROOT\CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32] + @="Y:\\DEST\\root.client\\usr\\vice\\etc\\afs_shl_ext.dll" + "ThreadingModel"="Apartment" + */ + HMODULE hModule=GetModuleHandle("afs_shl_ext.dll"); + DWORD z=GetModuleFileName(hModule,szModule,sizeof(szModule)); + wsprintf(szSubKey, TEXT("CLSID\\%s\\InprocServer32"),szCLSID); + if ((lResult=DoRegCLSID(HKEY_CLASSES_ROOT,szSubKey,szModule))!=NOERROR) + return lResult; + + wsprintf(szSubKey, TEXT("CLSID\\%s\\InprocServer32"),szCLSID); + if ((lResult=DoRegCLSID(HKEY_CLASSES_ROOT,szSubKey,"Apartment","ThreadingModel"))!=NOERROR) + return lResult; + + /* + [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\AFS Client Shell Extension] + @="{EA3775F2-28BE-11D3-9C8D-00105A24ED29}" + */ + wsprintf(szSubKey, TEXT("%s\\%s"), STR_REG_PATH, STR_EXT_TITLE); + if ((lResult=DoRegCLSID(HKEY_LOCAL_MACHINE,szSubKey,szCLSID))!=NOERROR) + return lResult; + + //If running on NT, register the extension as approved. + /* + [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved] + "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"="AFS Client Shell Extension" + + [HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers\AFS Client Shell Extension] + @="{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" + */ + + OSVERSIONINFO osvi; + osvi.dwOSVersionInfoSize = sizeof(osvi); + GetVersionEx(&osvi); + if(VER_PLATFORM_WIN32_NT == osvi.dwPlatformId) + { + wsprintf(szSubKey, TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved")); + if ((lResult=DoRegCLSID(HKEY_LOCAL_MACHINE,szSubKey,STR_EXT_TITLE,szCLSID))!=NOERROR) + return lResult; + } + wsprintf(szSubKey, TEXT("*\\shellex\\ContextMenuHandlers\\%s"),STR_EXT_TITLE); + if ((lResult=DoRegCLSID(HKEY_CLASSES_ROOT,szSubKey,szCLSID))!=NOERROR) + return lResult; + wsprintf(szSubKey, TEXT("Folder\\shellex\\ContextMenuHandlers\\%s"),STR_EXT_TITLE); + if ((lResult=DoRegCLSID(HKEY_CLASSES_ROOT,szSubKey,szCLSID))!=NOERROR) + return lResult; + + /* + Register InfoTip + + [HKEY_CLASSES_ROOT\Folder\shellex\{00021500-0000-0000-C000-000000000046}] + @="{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" + */ + + wsprintf(szSubKey, TEXT("Folder\\shellex\\{00021500-0000-0000-C000-000000000046}")); + if ((lResult=DoRegCLSID(HKEY_CLASSES_ROOT,szSubKey,szCLSID))!=NOERROR) + return lResult; + + + /* Below needs to be merged with above */ + + wsprintf(szSubKey, TEXT("%s\\%s"), STR_REG_PATH, STR_EXT_TITLE); lResult = RegCreateKeyEx( HKEY_LOCAL_MACHINE, szSubKey, 0, @@ -112,7 +221,7 @@ STDAPI DllRegisterServer(void) if(NOERROR == lResult) { - //Create the value string. + //Create the value string. lResult = RegSetValueEx( hKey, NULL, 0, @@ -125,7 +234,6 @@ STDAPI DllRegisterServer(void) return SELFREG_E_CLASS; //If running on NT, register the extension as approved. - OSVERSIONINFO osvi; osvi.dwOSVersionInfoSize = sizeof(osvi); GetVersionEx(&osvi); if(VER_PLATFORM_WIN32_NT == osvi.dwPlatformId) @@ -162,3 +270,61 @@ STDAPI DllRegisterServer(void) } return S_OK; } + +//returnValue = RegOpenKeyEx (HKEY_CLASSES_ROOT, keyName, 0, KEY_ALL_ACCESS, ®istryKey); + +LRESULT DoValueDelete(HKEY hKey,PTCHAR pszSubKey,PTCHAR szValue=NULL) +{ + LRESULT lResult; + HKEY thKey; + if (szValue==NULL) { + lResult=RegDeleteKey(hKey, pszSubKey); + return lResult; + } + lResult = RegOpenKeyEx( hKey, + pszSubKey, + 0, + KEY_ALL_ACCESS, + &thKey); + if(NOERROR == lResult) + { + lResult=RegDeleteValue(hKey, szValue); + RegCloseKey(thKey); + } + return lResult; +} + +STDAPI DllUnregisterServer(void) +{ + TCHAR szSubKey[MAX_PATH]; + TCHAR szCLSID[MAX_PATH]; + LPWSTR pwsz; + AFX_MANAGE_STATE(AfxGetStaticModuleState()); + COleObjectFactory::UpdateRegistryAll(FALSE); + StringFromIID(IID_IShellExt, &pwsz); + if(pwsz) + { + WideCharToMultiByte( CP_ACP, 0,pwsz, -1, szCLSID, sizeof(szCLSID), NULL, NULL); + LPMALLOC pMalloc; + CoGetMalloc(1, &pMalloc); + if(pMalloc) + { + (pMalloc->Free)(pwsz); + (pMalloc->Release)(); + } + } else { + return E_FAIL; + } + wsprintf(szSubKey, TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved")); + DoValueDelete(HKEY_LOCAL_MACHINE,szSubKey,szCLSID); + wsprintf(szSubKey, TEXT("*\\shellex\\ContextMenuHandlers\\%s"),STR_EXT_TITLE); + DoValueDelete(HKEY_CLASSES_ROOT, szSubKey); + wsprintf(szSubKey, TEXT("Folder\\shellex\\{00021500-0000-0000-C000-000000000046}")); + DoValueDelete(HKEY_CLASSES_ROOT, szSubKey); + wsprintf(szSubKey, TEXT("Folder\\shellex\\ContextMenuHandlers\\%s"),STR_EXT_TITLE); + DoValueDelete(HKEY_CLASSES_ROOT, szSubKey); + wsprintf(szSubKey, TEXT("%s\\%s"), STR_REG_PATH, STR_EXT_TITLE); + DoValueDelete(HKEY_LOCAL_MACHINE, szSubKey); + return S_OK; +} + diff --git a/src/WINNT/client_exp/gui2fs.cpp b/src/WINNT/client_exp/gui2fs.cpp index 4b5283bd0..0359abfd6 100644 --- a/src/WINNT/client_exp/gui2fs.cpp +++ b/src/WINNT/client_exp/gui2fs.cpp @@ -1586,3 +1586,69 @@ BOOL IsPathInAfs(const CHAR *strPath) return TRUE; } +UINT MakeSymbolicLink(const char *strName ,const char *strDir) +{ + struct ViceIoctl blob; + char space[MAXSIZE]; + UINT code; + /*lets confirm its a good symlink*/ + if (!IsPathInAfs(strDir)) + return 1; + LPTSTR lpsz = new TCHAR[strlen(strDir)+1]; + _tcscpy(lpsz, strName); + strcpy(space, strDir); + blob.out_size = 0; + blob.in_size = 1 + strlen(space); + blob.in = space; + blob.out = NULL; + if ((code=pioctl(lpsz, VIOC_SYMLINK, &blob, 0))!=0) + return code; + return 0; +} + +void ListSymbolicLinkPath(const char *strName,char *strPath,UINT nlenPath) +{ + ASSERT(nlenPath - -typedef class HOURGLASS -{ - protected: - HCURSOR m_OldCursor; - - public: - HOURGLASS (LPCSTR idCursor = IDC_WAIT) - { - m_OldCursor = GetCursor(); - SetCursor (LoadCursor (NULL, idCursor)); - } - - virtual ~HOURGLASS (void) - { - SetCursor (m_OldCursor); - } - -} HOURGLASS, *PHOURGLASS; - +#include + +typedef class HOURGLASS +{ + protected: + HCURSOR m_OldCursor; + + public: + HOURGLASS (LPCSTR idCursor = IDC_WAIT) + { + m_OldCursor = GetCursor(); + SetCursor (LoadCursor (NULL, idCursor)); + } + + virtual ~HOURGLASS (void) + { + SetCursor (m_OldCursor); + } + +} HOURGLASS, *PHOURGLASS; + diff --git a/src/WINNT/client_exp/lang/NTMakefile b/src/WINNT/client_exp/lang/NTMakefile index 0ddae6b85..5e50b3493 100644 --- a/src/WINNT/client_exp/lang/NTMakefile +++ b/src/WINNT/client_exp/lang/NTMakefile @@ -10,7 +10,7 @@ AFSDEV_AUXRCFLAGS = $(AFSDEV_AUXRCFLAGS) -I$(DESTDIR)\include -I.. # include the primary makefile - +RELDIR=WINNT\client_exp\lang !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\..\config\NTMakefile.version @@ -35,7 +35,7 @@ DLLFILE = $(DESTDIR)\root.client\usr\vice\etc\afs_shl_ext_$(LANGID).dll RCFILE = $(LANGNAME)\afs_shl_ext.rc -RESFILE = $(OJT)\afs_shl_ext_$(LANGID).res +RESFILE = $(OUT)\afs_shl_ext_$(LANGID).res DLLOBJS = $(RESFILE) @@ -48,7 +48,7 @@ $(DLLFILE) : $(DLLOBJS) install : $(DLLFILE) clean :: - $(DEL) $(OJT)\*.res RC* RD* $(DLLFILE) + $(DEL) $(OUT)\*.res RC* RD* $(DLLFILE) ############################################################################ # diff --git a/src/WINNT/client_exp/make_symbolic_link_dlg.cpp b/src/WINNT/client_exp/make_symbolic_link_dlg.cpp new file mode 100644 index 000000000..d1889fbc1 --- /dev/null +++ b/src/WINNT/client_exp/make_symbolic_link_dlg.cpp @@ -0,0 +1,144 @@ +/* + * Copyright 2000, International Business Machines Corporation and others. + * All Rights Reserved. + * + * This software has been released under the terms of the IBM Public + * License. For details, see the LICENSE file in the top-level source + * directory or online at http://www.openafs.org/dl/license10.html + */ + +extern "C" { +#include +#include +} + +#include "stdafx.h" +#include "afs_shl_ext.h" +#include "make_symbolic_link_dlg.h" +#include "gui2fs.h" +#include "msgs.h" +#define MAXSIZE 2048 /* most I'll get back from PIOCTL */ + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMakeMountPointDlg dialog + + +CMakeSymbolicLinkDlg::CMakeSymbolicLinkDlg(CWnd* pParent /*=NULL*/) + : CDialog() +{ + InitModalIndirect (TaLocale_GetDialogResource (CMakeSymbolicLinkDlg::IDD), pParent); + + //{{AFX_DATA_INIT(CMakeSymbolicLinkDlg) + m_strName = _T(""); + m_strDir = _T(""); + //}}AFX_DATA_INIT +} + + +void CMakeSymbolicLinkDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CMakeSymbolicLinkDlg) + DDX_Control(pDX, IDOK, m_OK); + DDX_Control(pDX, IDC_NAME, m_Name); + DDX_Control(pDX, IDC_DIR, m_Dir); + DDX_Text(pDX, IDC_NAME, m_strName); + DDV_MaxChars(pDX, m_strName, 63); + DDX_Text(pDX, IDC_DIR, m_strDir); + DDV_MaxChars(pDX, m_strDir, 63); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CMakeSymbolicLinkDlg, CDialog) + //{{AFX_MSG_MAP(CMakeSymbolicLinkDlg) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMakeSymbolicLinkDlg message handlers + +void CMakeSymbolicLinkDlg::OnOK() +{ + char space[64]; + UINT code; + int i; + UpdateData(TRUE); + CString strName; + CString strDir; + m_Name.GetWindowText(strName); + m_Dir.GetWindowText(strDir); + if (!IsPathInAfs(m_sBase)) { + MessageBeep((UINT)-1); + strDir+=" - Path is not in AFS directory"; + AfxMessageBox(strDir,MB_OK); + return; + } + if (m_sBase.GetLength()>MAX_PATH-2) + { + MessageBeep((UINT)-1); + ShowMessageBox(IDS_CURRENT_DIRECTORY_PATH_TOO_LONG,MB_OK,IDS_CURRENT_DIRECTORY_PATH_TOO_LONG); + } + if (!SetCurrentDirectory(m_sBase)) + { + MessageBeep((UINT)-1); + ShowMessageBox(IDS_UNABLE_TO_SET_CURRENT_DIRECTORY,MB_OK,IDS_UNABLE_TO_SET_CURRENT_DIRECTORY); + return; + } + if ((code=MakeSymbolicLink(strName,strDir))!=0){ + MessageBeep((UINT)-1); + ShowMessageBox(IDS_UNABLE_TO_CREATE_SYMBOLIC_LINK,MB_OK,IDS_UNABLE_TO_CREATE_SYMBOLIC_LINK,code); + return; + } + CDialog::OnOK(); +} +/* +void CMakeSymbolicLinkDlg::OnChangeName() +{ + CString strName; + m_Name.GetWindowText(strName); + if (strName.GetLength() > 63) { + MessageBeep((UINT)-1); + m_Name.SetWindowText(m_strName); + } else + m_strName = strName; + CheckEnableOk(); +} + +void CMakeSymbolicLinkDlg::OnChangeDir() +{ + m_Dir.GetWindowText(m_strDir); + if (!IsPathInAfs(m_strDir)) { + MessageBeep((UINT)-1); + m_Dir.SetWindowText(m_strDir); + } + CheckEnableOk(); +} +*/ +void CMakeSymbolicLinkDlg::CheckEnableOk() +{ + BOOL bEnable = FALSE; + + if ((m_strName.GetLength() > 0) && (m_strDir.GetLength() > 0)) + bEnable = TRUE; + + m_OK.EnableWindow(bEnable); +} + +BOOL CMakeSymbolicLinkDlg::OnInitDialog() +{ + CDialog::OnInitDialog(); + +// m_Dir.SetWindowText(m_strDir); +// m_Name.SetWindowText(m_strName); + UpdateData(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} diff --git a/src/WINNT/client_exp/make_symbolic_link_dlg.h b/src/WINNT/client_exp/make_symbolic_link_dlg.h new file mode 100644 index 000000000..db3c86dde --- /dev/null +++ b/src/WINNT/client_exp/make_symbolic_link_dlg.h @@ -0,0 +1,47 @@ +/* + * Copyright 2000, International Business Machines Corporation and others. + * All Rights Reserved. + * + * This software has been released under the terms of the IBM Public + * License. For details, see the LICENSE file in the top-level source + * directory or online at http://www.openafs.org/dl/license10.html + */ + +class CMakeSymbolicLinkDlg : public CDialog +{ + void CheckEnableOk(); + +// Construction +public: + CMakeSymbolicLinkDlg(CWnd* pParent = NULL); // standard constructor + void Setbase(const char *msg){m_sBase=msg;} +// Dialog Data + //{{AFX_DATA(CMakeSymbolicLinkDlg) + enum { IDD = IDD_SYMBOLICLINK_ADD }; + CButton m_OK; + CEdit m_Name; + CEdit m_Dir; + CString m_strName; + CString m_strDir; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMakeSymbolicLinkDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + CString m_sBase; //Base directory + // Generated message map functions + //{{AFX_MSG(CMakeSymbolicLinkDlg) + afx_msg void OnChangeDir(); + afx_msg void OnChangeName(); + virtual void OnOK(); + virtual BOOL OnInitDialog(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; diff --git a/src/WINNT/client_exp/resource.h b/src/WINNT/client_exp/resource.h index 4550009c9..2f2c50afa 100644 --- a/src/WINNT/client_exp/resource.h +++ b/src/WINNT/client_exp/resource.h @@ -21,13 +21,13 @@ #define IDM_SHOW_SERVER 10 #define IDM_SHOWCELL 11 #define IDM_SERVER_STATUS 12 -#define IDM_REMOVE_SYMLINK 13 -#define IDM_SUBMOUNTS_EDIT 14 +#define IDM_SYMBOLICLINK_REMOVE 13 +#define IDM_SYMBOLICLINK_ADD 14 #define IDM_SUBMOUNTS 15 #define IDM_ACL_CLEAN 16 #define ID_GET_TOKENS 17 #define ID_DISCARD_TOKENS 18 -#define IDM_SUBMOUNTS_CREATE 19 +#define IDM_SUBMOUNTS_EDIT 19 #define IDD_KLOG_DIALOG 102 #define IDR_MENU_FILE 129 #define IDD_VOLUME_INFO 130 @@ -50,6 +50,8 @@ #define IDD_AUTHENTICATION 149 #define IDD_UNLOG_DIALOG 150 #define IDD_ADD_SUBMOUNT 154 +#define IDD_SYMBOLICLINK_ADD 155 +#define IDM_REMOVE_SYMLINK 156 #define IDC_LIST 1001 #define IDC_PASSWORD 1002 #define IDC_OFFLINE_MSG 1003 @@ -237,12 +239,22 @@ #define IDS_REMOVE_MP_COLUMN 59188 #define IDS_REMOVE_SYMLINK_ITEM 59189 #define IDS_REALLY_REMOVE_SYMLINK 59190 +#define IDS_SYMBOLICLINK_ADD 59191 +#define IDS_SYMBOLICLINK_EDIT 59192 +#define IDS_SYMBOLICLINK_REMOVE 59193 +#define IDS_SYMBOLIC_LINK_ITEM 59194 +#define ID_SYMBOLICLINK_ADD 59195 +#define ID_SYMBOLICLINK_REMOVE 59196 +#define IDS_UNABLE_TO_CREATE_SYMBOLIC_LINK 59197 +#define IDS_UNABLE_TO_SET_CURRENT_DIRECTORY 59198 +#define IDS_CURRENT_DIRECTORY_PATH_TOO_LONG 59199 + // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 155 +#define _APS_NEXT_RESOURCE_VALUE 163 #define _APS_NEXT_COMMAND_VALUE 32829 #define _APS_NEXT_CONTROL_VALUE 1087 #define _APS_NEXT_SYMED_VALUE 101 diff --git a/src/WINNT/client_exp/shell_ext.cpp b/src/WINNT/client_exp/shell_ext.cpp index 304cd7796..c44fe4949 100644 --- a/src/WINNT/client_exp/shell_ext.cpp +++ b/src/WINNT/client_exp/shell_ext.cpp @@ -27,7 +27,10 @@ extern "C" { #include "server_status_dlg.h" #include "auth_dlg.h" #include "submounts_dlg.h" -#include "gui2fs.h" +#include "make_symbolic_link_dlg.h" +#if (_MSC_VER<=1200) +#include +#endif #ifdef _DEBUG #define new DEBUG_NEW @@ -60,21 +63,35 @@ static BOOL IsADir(const CString& strName) // CShellExt IMPLEMENT_DYNCREATE(CShellExt, CCmdTarget) +#define REG_CLIENT_PARMS_KEY "SYSTEM\\CurrentControlSet\\Services\\TransarcAFSDaemon\\Parameters" +#define OVERLAYENABLED 1 CShellExt::CShellExt() { + HKEY NPKey; EnableAutomation(); nCMRefCount++; HRESULT hr; + UINT code; + DWORD ShellOption,LSPsize,LSPtype; hr = SHGetMalloc(&m_pAlloc); + m_bIsOverlayEnabled=FALSE; if (FAILED(hr)) m_pAlloc = NULL; + RegOpenKeyEx(HKEY_LOCAL_MACHINE, REG_CLIENT_PARMS_KEY,0, KEY_QUERY_VALUE, &NPKey); + LSPsize=sizeof(ShellOption); + code=RegQueryValueEx(NPKey, "ShellOption", NULL, + &LSPtype, (LPBYTE)&ShellOption, &LSPsize); + RegCloseKey (NPKey); + m_bIsOverlayEnabled=((code==0) && (LSPtype==REG_DWORD) && ((ShellOption & OVERLAYENABLED)!=0)); + TRACE("Create CShellExt, Ref count %d/n",nCMRefCount); } CShellExt::~CShellExt() { if(m_pAlloc) m_pAlloc->Release(); nCMRefCount--; + TRACE("Destroy CShellExt, Ref count %d/n",nCMRefCount); } @@ -219,8 +236,16 @@ STDMETHODIMP CShellExt::XMenuExt::QueryContextMenu(HMENU hMenu,UINT indexMenu, ::InsertMenu(hAfsMenu, indexAfsMenu++, MF_STRING | MF_BYPOSITION, idCmdFirst + IDM_SHOW_SERVER, GetMessageString(IDS_SHOW_FILE_SERVERS_ITEM)); ::InsertMenu(hAfsMenu, indexAfsMenu++, MF_STRING | MF_BYPOSITION, idCmdFirst + IDM_SHOWCELL, GetMessageString(IDS_SHOW_CELL_ITEM)); ::InsertMenu(hAfsMenu, indexAfsMenu++, MF_STRING | MF_BYPOSITION, idCmdFirst + IDM_SERVER_STATUS, GetMessageString(IDS_SHOW_SERVER_STATUS_ITEM)); - if (pThis->m_bIsSymlink) - ::InsertMenu(hAfsMenu, indexAfsMenu++, MF_STRING | MF_BYPOSITION, idCmdFirst + IDM_REMOVE_SYMLINK, GetMessageString(IDS_REMOVE_SYMLINK_ITEM)); + + HMENU hSymbolicMenu = CreatePopupMenu(); + int indexSymbolicMenu = 0; + ::InsertMenu(hSymbolicMenu, indexSymbolicMenu++, MF_STRING | MF_BYPOSITION, idCmdFirst + IDM_SYMBOLICLINK_ADD, GetMessageString(IDS_SYMBOLICLINK_ADD)); + // ::InsertMenu(hSymbolicMenu, indexSymbolicMenu++, MF_STRING | MF_BYPOSITION, idCmdFirst + IDM_SYMBOLICLINK_EDIT, GetMessageString(IDS_SYMBOLICLINK_EDIT)); + ::InsertMenu(hSymbolicMenu, indexSymbolicMenu++, MF_STRING | MF_BYPOSITION, idCmdFirst + IDM_SYMBOLICLINK_REMOVE, GetMessageString(IDS_SYMBOLICLINK_REMOVE)); + + ::EnableMenuItem(hSymbolicMenu,1,((pThis->m_bIsSymlink)?MF_ENABLED:MF_GRAYED)|MF_BYPOSITION); + // ::EnableMenuItem(hSymbolicMenu,2,((pThis->m_bIsSymlink)?MF_ENABLED:MF_GRAYED)|MF_BYPOSITION); + ::InsertMenu(hAfsMenu, indexAfsMenu++, MF_STRING | MF_BYPOSITION | MF_POPUP, (UINT)hSymbolicMenu, GetMessageString(IDS_SYMBOLIC_LINK_ITEM)); // The Submounts menu has been removed because the AFS tray icon // and control panel now support mapping drives directly to an AFS @@ -242,7 +267,7 @@ STDMETHODIMP CShellExt::XMenuExt::QueryContextMenu(HMENU hMenu,UINT indexMenu, ::InsertMenu (hMenu, indexMenu + indexShellMenu++, MF_STRING | MF_BYPOSITION | MF_SEPARATOR, 0, TEXT("")); return ResultFromScode(MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_NULL, - (USHORT)indexAfsMenu + indexVolPartMenu + indexMountPointMenu + indexShellMenu)); + (USHORT)indexAfsMenu + indexVolPartMenu + indexMountPointMenu + indexShellMenu + indexSymbolicMenu)); } STDMETHODIMP CShellExt::XMenuExt::InvokeCommand(LPCMINVOKECOMMANDINFO lpici) @@ -318,7 +343,8 @@ STDMETHODIMP CShellExt::XMenuExt::InvokeCommand(LPCMINVOKECOMMANDINFO lpici) dlg.DoModal(); } break; - + + /* case IDM_SUBMOUNTS_EDIT: { CSubmountsDlg dlg; dlg.DoModal(); @@ -332,18 +358,56 @@ STDMETHODIMP CShellExt::XMenuExt::InvokeCommand(LPCMINVOKECOMMANDINFO lpici) dlg.DoModal(); } break; - case IDM_REMOVE_SYMLINK: { - if (files.GetSize()>1) - break; - int nChoice = ShowMessageBox(IDS_REALLY_REMOVE_SYMLINK, MB_ICONQUESTION | MB_YESNO, IDS_REALLY_REMOVE_SYMLINK); - if (nChoice == IDYES) - RemoveSymlink(files.GetAt(0)); - } - break; - default: - ASSERT(FALSE); - Release(); - return E_INVALIDARG; + */ + case IDM_SYMBOLICLINK_REMOVE: { + if (files.GetSize()>1) + break; + CString msg=files.GetAt(0); + int i; + if ((i=msg.ReverseFind('\\'))>0) + msg=msg.Left(i+1); + else if ((i=msg.ReverseFind(':'))>0) + msg=msg.Left(i+1)+"\\"; + if (!SetCurrentDirectory(msg)) + { + MessageBeep((UINT)-1); + ShowMessageBox(IDS_UNABLE_TO_SET_CURRENT_DIRECTORY,MB_OK,IDS_UNABLE_TO_SET_CURRENT_DIRECTORY); + break; + } + msg=files.GetAt(0); + if ((i=msg.ReverseFind('\\'))>0||((i=msg.ReverseFind(':'))>0)) + msg=msg.Right(msg.GetLength()-i-1); + int nChoice = ShowMessageBox(IDS_REALLY_REMOVE_SYMLINK, MB_ICONQUESTION | MB_YESNO, IDS_REALLY_REMOVE_SYMLINK,msg); + if (nChoice == IDYES) + RemoveSymlink(files.GetAt(0)); + } + break; + + case IDM_SYMBOLICLINK_ADD: { + CString msg=files.GetAt(0); + int i; + if ((i=msg.ReverseFind('\\'))>0) + msg=msg.Left(i+1); + else if ((i=msg.ReverseFind(':'))>0) + msg=msg.Left(i+1)+"\\"; + CMakeSymbolicLinkDlg dlg; + dlg.Setbase(msg); + dlg.DoModal(); + } + break; + + case IDM_REMOVE_SYMLINK: { + if (files.GetSize()>1) + break; + int nChoice = ShowMessageBox(IDS_REALLY_REMOVE_SYMLINK, MB_ICONQUESTION | MB_YESNO, IDS_REALLY_REMOVE_SYMLINK); + if (nChoice == IDYES) + RemoveSymlink(files.GetAt(0)); + } + break; + default: + ASSERT(FALSE); + Release(); + return E_INVALIDARG; } Release(); @@ -399,10 +463,10 @@ STDMETHODIMP CShellExt::XMenuExt::GetCommandString(UINT idCmd, UINT uType, case IDM_SERVER_STATUS: nCmdStrID = ID_SERVER_STATUS; break; - case IDM_SUBMOUNTS_CREATE: nCmdStrID = ID_SUBMOUNTS_CREATE; + case IDM_SYMBOLICLINK_ADD: nCmdStrID = ID_SYMBOLICLINK_ADD; break; - case IDM_SUBMOUNTS_EDIT: nCmdStrID = ID_SUBMOUNTS_EDIT; + case IDM_SYMBOLICLINK_REMOVE: nCmdStrID = ID_SYMBOLICLINK_REMOVE; break; case IDM_REMOVE_SYMLINK: nCmdStrID= ID_REMOVE_SYMLINK; diff --git a/src/WINNT/client_exp/shell_ext.h b/src/WINNT/client_exp/shell_ext.h index de826a2eb..e357f80fb 100644 --- a/src/WINNT/client_exp/shell_ext.h +++ b/src/WINNT/client_exp/shell_ext.h @@ -37,6 +37,8 @@ class CShellExt : public CCmdTarget BOOL m_bDirSelected; BOOL m_bIsSymlink; // is symbolic link! TCHAR m_szFile[MAX_PATH]; + BOOL m_bIsOverlayEnabled; + BOOL IsOverlayEnabled(){return m_bIsOverlayEnabled;} CStringArray m_astrFileNames; diff --git a/src/WINNT/client_exp/stdafx.h b/src/WINNT/client_exp/stdafx.h index 422384337..ea5853f1e 100644 --- a/src/WINNT/client_exp/stdafx.h +++ b/src/WINNT/client_exp/stdafx.h @@ -48,5 +48,8 @@ #include +#if defined (_DEBUG) && defined (AFS_CRTDBG_MAP_ALLOC) +#define new DEBUG_NEW +#endif #endif // !defined(AFX_STDAFX_H__601A9D0D_6CD3_11D1_BAE7_00C04FD140D2__INCLUDED_) diff --git a/src/WINNT/client_osi/NTMakefile b/src/WINNT/client_osi/NTMakefile index abf58f67b..2eb25fedb 100644 --- a/src/WINNT/client_osi/NTMakefile +++ b/src/WINNT/client_osi/NTMakefile @@ -5,11 +5,10 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html # - +RELDIR=WINNT\client_osi !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version - ############################################################################ # Definitions for installing header files @@ -57,17 +56,17 @@ DLLFILE = $(DESTDIR)\root.client\usr\vice\etc\libosi.dll ILIBDIR = $(DESTDIR)\lib DLLOBJS =\ - $(OJT)\dbrpc_s.obj \ - $(OJT)\osistatl.obj \ - $(OJT)\osibasel.obj \ - $(OJT)\osisleep.obj \ - $(OJT)\osiqueue.obj \ - $(OJT)\osiltype.obj \ - $(OJT)\osidb.obj \ - $(OJT)\osifd.obj \ - $(OJT)\osilog.obj \ - $(OJT)\osiutils.obj \ - $(OJT)\libosi.res + $(OUT)\dbrpc_s.obj \ + $(OUT)\osistatl.obj \ + $(OUT)\osibasel.obj \ + $(OUT)\osisleep.obj \ + $(OUT)\osiqueue.obj \ + $(OUT)\osiltype.obj \ + $(OUT)\osidb.obj \ + $(OUT)\osifd.obj \ + $(OUT)\osilog.obj \ + $(OUT)\osiutils.obj \ + $(OUT)\libosi.res DLLLIBS =\ rpcndr.lib \ @@ -89,18 +88,18 @@ OSIEVENTDLL = $(DESTDIR)\root.client\usr\vice\etc\osievent.dll osievent.rc: osievent.mc mc $*.mc -$(OJT)\osievent.res: osievent.rc +$(OUT)\osievent.res: osievent.rc -$(OJT)\osievent.dll: $(OJT)\osievent.res +$(OUT)\osievent.dll: $(OUT)\osievent.res link -dll -noentry -out:$*.dll $*.res -$(OSIEVENTDLL): $(OJT)\osievent.dll +$(OSIEVENTDLL): $(OUT)\osievent.dll $(COPY) osievent.dll $(DESTDIR)\root.client\usr\vice\etc\. ############################################################################ # build osidebug too -$(OJT)\osidebug.res: osidebug.rc +$(OUT)\osidebug.res: osidebug.rc $(EXEOBJS) : osidebug.c @@ -115,7 +114,7 @@ dbrpc.h dbrpc_c.c dbrpc_s.c: dbrpc.idl ############################################################################ # generate versioninfo resources -$(OJT)\libosi.res: libosi.rc AFS_component_version_number.h +$(OUT)\libosi.res: libosi.rc AFS_component_version_number.h ############################################################################ # Install target; primary makefile target @@ -128,7 +127,7 @@ install: $(OSIEVENTDLL) install_headers $(DLLFILE) install: install_headers $(DLLFILE) !ENDIF -install_debug: $(OJT)\osidebug.res $(EXEFILE) +install_debug: $(OUT)\osidebug.res $(EXEFILE) install9x: install @@ -137,7 +136,7 @@ install9x: install clean:: $(DEL) dbrpc_s.c dbrpc_c.c dbrpc.h $(DLLFILE) $(INCFILES) $(OSIEVENTDLL) - $(DEL) $(EXEOBJS) $(EXEFILE) $(OJT)\*.res $(OJT)\*.DLL + $(DEL) $(EXEOBJS) $(EXEFILE) $(OUT)\*.res $(OUT)\*.DLL mkdir: diff --git a/src/WINNT/client_osi/libosi.hpj b/src/WINNT/client_osi/libosi.hpj index e29b3e12c..bed2a42fc 100644 --- a/src/WINNT/client_osi/libosi.hpj +++ b/src/WINNT/client_osi/libosi.hpj @@ -1,6 +1,6 @@ -[OPTIONS] -COMPRESS=TRUE -TITLE=LibOSI Help - -[FILES] -libosi.rtf +[OPTIONS] +COMPRESS=TRUE +TITLE=LibOSI Help + +[FILES] +libosi.rtf diff --git a/src/WINNT/client_osi/osidebug.hpj b/src/WINNT/client_osi/osidebug.hpj index 1ba52d698..df3e91523 100644 --- a/src/WINNT/client_osi/osidebug.hpj +++ b/src/WINNT/client_osi/osidebug.hpj @@ -1,6 +1,6 @@ -[OPTIONS] -COMPRESS=TRUE -TITLE=OSIDebug Help - -[FILES] -osidebug.rtf +[OPTIONS] +COMPRESS=TRUE +TITLE=OSIDebug Help + +[FILES] +osidebug.rtf diff --git a/src/WINNT/client_osi/osilog.c b/src/WINNT/client_osi/osilog.c index a97198fb1..13a76ab30 100644 --- a/src/WINNT/client_osi/osilog.c +++ b/src/WINNT/client_osi/osilog.c @@ -24,6 +24,8 @@ #include #include +#define AFS_DAEMON_EVENT_NAME "TransarcAFSDaemon" + /* the size; overrideable */ long osi_logSize = OSI_LOG_DEFAULTSIZE; @@ -346,7 +348,7 @@ void osi_InitTraceOption() 0, KEY_QUERY_VALUE, &NPKey); LSPsize=sizeof(osi_TraceOption); RegQueryValueEx(NPKey, "TraceOption", NULL, - &LSPtype, (LPBYTE)&osi_TraceOption, &LSPsize); + &LSPtype, (LPBYTE)&osi_TraceOption, &LSPsize); } @@ -356,7 +358,7 @@ void osi_LogEvent0(char *a,char *b) HANDLE h; char *ptbuf[1],buf[MAXBUF_+1]; if (!ISLOGONTRACE(osi_TraceOption)) return; - h = RegisterEventSource(NULL, a); + h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME); ptbuf[0] = b; ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, (const char **)ptbuf, NULL); DeregisterEventSource(h); @@ -369,13 +371,7 @@ void osi_LogEvent(char *a,char *b,char *c,...) va_list marker; if (!ISLOGONTRACE(osi_TraceOption)) return; - if (b) - { - wsprintf(buf,a,b); - h = RegisterEventSource(NULL, buf); - } - else - h = RegisterEventSource(NULL, a); + h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME); va_start(marker,c); _vsnprintf(buf,MAXBUF_,c,marker); ptbuf[0] = buf; diff --git a/src/WINNT/eventlog/NTMakefile b/src/WINNT/eventlog/NTMakefile index d0e14defc..87c81774e 100644 --- a/src/WINNT/eventlog/NTMakefile +++ b/src/WINNT/eventlog/NTMakefile @@ -5,6 +5,7 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=WINNT\eventlog !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version @@ -12,7 +13,10 @@ LIBFILE = $(DESTDIR)\lib\afs\afseventlog.lib LIBOBJS =\ - $(OJT)\logevent.obj + $(OUT)\logevent.obj + +$(LIBOBJS): $$(@B).c + $(C2OBJ) $** $(LIBFILE): $(LIBOBJS) $(LIBARCH) @@ -79,7 +83,7 @@ clean:: $(CD) .. mkdir: - -mkdir $(OJT)\lang + -mkdir $(OUT)\lang cd lang nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir cd .. diff --git a/src/WINNT/eventlog/lang/NTMakefile b/src/WINNT/eventlog/lang/NTMakefile index 6fab1b3ce..98ea8ec7c 100644 --- a/src/WINNT/eventlog/lang/NTMakefile +++ b/src/WINNT/eventlog/lang/NTMakefile @@ -5,6 +5,7 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=WINNT\eventlog\lang !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\..\config\NTMakefile.version @@ -29,13 +30,13 @@ INCFILES =\ ############################################################################ DLLFILE = $(DESTDIR)\root.server\usr\afs\bin\afseventmsg_$(LANGID).dll -DLLRESFILE = $(OJT)\afseventmsg_$(LANGID).res +DLLRESFILE = $(OUT)\afseventmsg_$(LANGID).res DLLRCFILE = afseventmsg.rc EVENTRCFILE = $(LANGNAME)\event.rc -EVENTRESFILE = $(OJT)\$(LANGNAME)\event.res +EVENTRESFILE = $(OUT)\$(LANGNAME)\event.res DLLOBJS = $(DLLRESFILE) diff --git a/src/WINNT/eventlog/test/NTMakefile b/src/WINNT/eventlog/test/NTMakefile index b0edda77c..6408e9d9d 100644 --- a/src/WINNT/eventlog/test/NTMakefile +++ b/src/WINNT/eventlog/test/NTMakefile @@ -5,11 +5,12 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=WINNT\eventlog\test !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) test tests: elogtest.exe -$(OJT)\elogtest.exe: $(OJT)\elogtest.obj \ +$(OUT)\elogtest.exe: $(OUT)\elogtest.obj \ $(DESTDIR)\lib\afs\afseventlog.lib $(DESTDIR)\lib\afs\afsreg.lib $(EXECONLINK) diff --git a/src/WINNT/install/InstallShield5/CreateISDirTree.bat b/src/WINNT/install/InstallShield5/CreateISDirTree.bat index 648a9e009..d5cbb7e63 100644 --- a/src/WINNT/install/InstallShield5/CreateISDirTree.bat +++ b/src/WINNT/install/InstallShield5/CreateISDirTree.bat @@ -18,43 +18,47 @@ if not exist "Media\OpenAFS" mkdir "Media\OpenAFS" if not exist "Registry Entries" mkdir "Registry Entries" if not exist "Script Files" mkdir "Script Files" if not exist "Setup Files" mkdir "Setup Files" - -set sub1=Uncompressed Files -call :gencomp -set sub1=Compressed Files -call :gencomp -goto shell - -:gencomp -if not exist "Setup Files\%sub1%" mkdir "Setup Files\%sub1%" -set sub2=Language Independent -call :gencomp2 -set sub2=0009-English -call :gencomp2 -set sub2=0007-German -call :gencomp2 -set sub2=0011-Japanese -call :gencomp2 -set sub2=0012-Korean -call :gencomp2 -set sub2=0416-Portuguese (Brazilian) -call :gencomp2 -set sub2=0404-Chinese (Taiwan) -call :gencomp2 -set sub2=000a-Spanish -call :gencomp2 -set sub2=0804-Chinese (PRC) -call :gencomp2 -goto :eof - -:gencomp2 -rem echo ]%sub1%] ]%sub2%] + +if not exist "Registry Entries" mkdir "Registry Entries" +if not exist "Script Files" mkdir "Script Files" +if not exist "Setup Files" mkdir "Setup Files" + +set sub1=Uncompressed Files +call :gencomp +set sub1=Compressed Files +call :gencomp +goto shell + +:gencomp +if not exist "Setup Files\%sub1%" mkdir "Setup Files\%sub1%" +set sub2=Language Independent +call :gencomp2 +set sub2=0009-English +call :gencomp2 +set sub2=0007-German +call :gencomp2 +set sub2=0011-Japanese +call :gencomp2 +set sub2=0012-Korean +call :gencomp2 +set sub2=0416-Portuguese (Brazilian) +call :gencomp2 +set sub2=0404-Chinese (Taiwan) +call :gencomp2 +set sub2=000a-Spanish +call :gencomp2 +set sub2=0804-Chinese (PRC) +call :gencomp2 +goto :eof + +:gencomp2 +rem echo ]%sub1%] ]%sub2%] if not exist "Setup Files\%sub1%\%sub2%" mkdir "Setup Files\%sub1%\%sub2%" if not exist "Setup Files\%sub1%\%sub2%\OS Independent" mkdir "Setup Files\%sub1%\%sub2%\OS Independent" if not exist "Setup Files\%sub1%\%sub2%\Intel 32" mkdir "Setup Files\%sub1%\%sub2%\Intel 32" -goto :eof - -:shell +goto :eof + +:shell if not exist "Shell Objects" mkdir "Shell Objects" if not exist "String Tables" mkdir "String Tables" if not exist "String Tables\0009-English" mkdir "String Tables\0009-English" diff --git a/src/WINNT/install/InstallShield5/NTMakefile b/src/WINNT/install/InstallShield5/NTMakefile index 44e13fcda..132379402 100644 --- a/src/WINNT/install/InstallShield5/NTMakefile +++ b/src/WINNT/install/InstallShield5/NTMakefile @@ -5,6 +5,7 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=WINNT\install\InstallShield5 !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\..\config\NTMakefile.version @@ -28,22 +29,22 @@ XCOPY= xcopy /s/e ############################################################################ prep: AFS_component_version_number.txt - $(DESTDIR)\bin\util_cr.exe } "$(AFSPRODUCT_VERSION)" ".\lang\en_US\value.txt" "$(OJT)\lang\en_US\value.shl" + $(DESTDIR)\bin\util_cr.exe } "$(AFSPRODUCT_VERSION)" ".\lang\en_US\value.txt" "$(OUT)\lang\en_US\value.shl" $(DESTDIR)\bin\util_cr.exe } "$(AFSPRODUCT_VERSION)" "default.txt" "default.rge" - $(DESTDIR)\bin\util_cr.exe @ "$(OJT)\lang\en_US\value.shl" "[DATA] CELLSERVDB_CONFIGNAME=$(CELLSERVDB_CONFIGNAME)" - $(DESTDIR)\bin\util_cr.exe @ "$(OJT)\lang\en_US\value.shl" "[DATA] CELLNAME_DEFAULT=$(CELLNAME_DEFAULT)" - $(DESTDIR)\bin\util_cr.exe @ "$(OJT)\lang\en_US\value.shl" "[DATA] CELLSERVDB_INSTALL=$(CELLSERVDB_INSTALL)" - $(DESTDIR)\bin\util_cr.exe @ "$(OJT)\lang\en_US\value.shl" "[DATA] CELLSERVDB_WEB=$(CELLSERVDB_WEB)" + $(DESTDIR)\bin\util_cr.exe @ "$(OUT)\lang\en_US\value.shl" "[DATA] CELLSERVDB_CONFIGNAME=$(CELLSERVDB_CONFIGNAME)" + $(DESTDIR)\bin\util_cr.exe @ "$(OUT)\lang\en_US\value.shl" "[DATA] CELLNAME_DEFAULT=$(CELLNAME_DEFAULT)" + $(DESTDIR)\bin\util_cr.exe @ "$(OUT)\lang\en_US\value.shl" "[DATA] CELLSERVDB_INSTALL=$(CELLSERVDB_INSTALL)" + $(DESTDIR)\bin\util_cr.exe @ "$(OUT)\lang\en_US\value.shl" "[DATA] CELLSERVDB_WEB=$(CELLSERVDB_WEB)" !IF "$(WELCOMEMESSAGE)" != "" - $(DESTDIR)\bin\util_cr.exe @ "$(OJT)\lang\en_US\value.shl" "[DATA] WELCOME_MESSAGE=$(WELCOMEMESSAGE)" + $(DESTDIR)\bin\util_cr.exe @ "$(OUT)\lang\en_US\value.shl" "[DATA] WELCOME_MESSAGE=$(WELCOMEMESSAGE)" !ENDIF ! IF ((EXIST("$(ISWEB)")) &&("$(ISWEB)"!="")) - $(DESTDIR)\bin\util_cr.exe @ "$(OJT)\packageweb.pfw" "[Options] Version=$(AFSPRODUCT_VERSION)" - $(DESTDIR)\bin\util_cr.exe @ "$(OJT)\packageweb.pfw" "[Options] Comments=$(AFSBUILDCOMMENTS)" - $(DESTDIR)\bin\util_cr.exe @ "$(OJT)\packageweb.pfw" "[Options] ApplicationName=AFSforWindows" - $(DESTDIR)\bin\util_cr.exe @ "$(OJT)\packageweb.pfw" "[Options] Company=Open AFS" - $(DESTDIR)\bin\util_cr.exe @ "$(OJT)\packageweb.pfw" "[Options] Title=Open AFS for Windows" - $(DESTDIR)\bin\util_cr.exe @ "$(OJT)\packageweb.pfw" "[Options] OutputSpec="$(DESTDIR)\WinInstall\PackageWeb\AFSforWindows.exe" + $(DESTDIR)\bin\util_cr.exe @ "$(OUT)\packageweb.pfw" "[Options] Version=$(AFSPRODUCT_VERSION)" + $(DESTDIR)\bin\util_cr.exe @ "$(OUT)\packageweb.pfw" "[Options] Comments=$(AFSBUILDCOMMENTS)" + $(DESTDIR)\bin\util_cr.exe @ "$(OUT)\packageweb.pfw" "[Options] ApplicationName=AFSforWindows" + $(DESTDIR)\bin\util_cr.exe @ "$(OUT)\packageweb.pfw" "[Options] Company=Open AFS" + $(DESTDIR)\bin\util_cr.exe @ "$(OUT)\packageweb.pfw" "[Options] Title=Open AFS for Windows" + $(DESTDIR)\bin\util_cr.exe @ "$(OUT)\packageweb.pfw" "[Options] OutputSpec="$(DESTDIR)\WinInstall\PackageWeb\AFSforWindows.exe" ! ENDIF CreateISDirTree.bat ScatterFiles.bat diff --git a/src/WINNT/install/NSIS/MakeCommon.bat b/src/WINNT/install/NSIS/MakeCommon.bat index 122d49d7e..cad9c89d9 100644 --- a/src/WINNT/install/NSIS/MakeCommon.bat +++ b/src/WINNT/install/NSIS/MakeCommon.bat @@ -1,9 +1,10 @@ -@echo off -@rem Create common include file for NSIS installer - -echo !define AFS_DESTDIR %AFSROOT%\OBJ\DEST\%AFSDEV_BUILDTYPE% > nsi-includes.nsi -echo !define MUI_VERSION %1 >> nsi-includes.nsi - -echo !define MUI_MAJORVERSION 1 >>nsi-includes.nsi -echo !define MUI_MINORVERSION 2 >>nsi-includes.nsi -echo !define MUI_PATCHLEVEL 1100 >>nsi-includes.nsi +@echo off +@rem Create common include file for NSIS installer + +del nsi-includes.nsi +echo !define AFS_DESTDIR %AFSROOT%\DEST\%AFSDEV_BUILDTYPE% > nsi-includes.nsi +echo !define MUI_VERSION %1 >> nsi-includes.nsi + +echo !define MUI_MAJORVERSION 1 >>nsi-includes.nsi +echo !define MUI_MINORVERSION 2 >>nsi-includes.nsi +echo !define MUI_PATCHLEVEL 1100 >>nsi-includes.nsi diff --git a/src/WINNT/install/NSIS/NTMakefile b/src/WINNT/install/NSIS/NTMakefile index d1167cf1d..42684047c 100644 --- a/src/WINNT/install/NSIS/NTMakefile +++ b/src/WINNT/install/NSIS/NTMakefile @@ -1,13 +1,20 @@ +RELDIR=WINNT\install\NSIS !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\..\config\NTMakefile.version EXEDIR = $(DESTDIR)\WinInstall\Config -$(OJT)\Service.obj: Service.cpp +$(OUT)\Service.obj: Service.cpp $(C2OBJ) Service.cpp -$(EXEDIR)\Service.exe: $(OJT)\Service.obj - $(EXECONLINK) $(OJT)\Service.obj +$(EXEDIR)\Service.exe: $(OUT)\Service.obj + $(EXECONLINK) $(OUT)\Service.obj + +$(OUT)\Killer.obj: Killer.cpp + $(C2OBJ) Killer.cpp + +$(EXEDIR)\Killer.exe: $(OUT)\Killer.obj + $(EXECONLINK) $(OUT)\Killer.obj prebuild: $(COPY) %SystemRoot%\System32\Msvcr71.dll $(EXEDIR) @@ -18,10 +25,10 @@ build: prebuild "C:\Program Files\NSIS\makensis.exe" OpenAFS.nsi $(COPY) OpenAFSforWindows.exe $(DESTDIR)\Wininstall\ -install: $(OJT)\Service.obj $(EXEDIR)\Service.exe build +install: $(OUT)\Service.obj $(EXEDIR)\Service.exe $(OUT)\Killer.obj $(EXEDIR)\Killer.exe build #clean: -# $(DEL) $(OJT)\Service.obj +# $(DEL) $(OUT)\Service.obj # $(DEL) $(EXEDIR)\Service.exe # $(DEL) $(EXEDIR)\Msvcr71.dll # $(DEL) $(EXEDIR)\MFC42.DLL diff --git a/src/WINNT/install/NSIS/OpenAFS.nsi b/src/WINNT/install/NSIS/OpenAFS.nsi index 9e8d7c5a8..1feef9318 100644 --- a/src/WINNT/install/NSIS/OpenAFS.nsi +++ b/src/WINNT/install/NSIS/OpenAFS.nsi @@ -7,12 +7,10 @@ ;MultiLanguage Example Script ;Written by Joost Verburg -!define MUI_PRODUCT "OpenAFS for Windows" ;Define your own software name here -;!define MUI_VERSION "1.2.11" ;Define your own software version here -;!define MUI_MAJORVERSION 1 -;!define MUI_MINORVERSION 2 -;!define MUI_PATCHLEVEL 110 +!define MUI_PRODUCT "OpenAFS" ;Define your own software name here !include nsi-includes.nsi +; Define DEBUG if building a DEBUG installer +;!define DEBUG 1 !include "MUI.nsh" !include Sections.nsh @@ -21,10 +19,14 @@ ;Configuration ;General +!ifndef DEBUG OutFile "OpenAFSforWindows.exe" +!else + OutFile "OpenAFSforWindows-DEBUG.exe" +!endif SilentInstall normal SetCompressor bzip2 - !define MUI_ICON "..\..\client_cpa\afs_conf.ico" + !define MUI_ICON "..\..\client_config\afs_config.ico" !define MUI_UNICON "c:\Program Files\NSIS\Contrib\Icons\normal-uninstall.ico" !define AFS_COMPANY_NAME "OpenAFS" !define AFS_PRODUCT_NAME "OpenAFS" @@ -53,6 +55,7 @@ ;-------------------------------- ;Modern UI Configuration + ;!define MUI_LICENSEPAGE !define MUI_CUSTOMPAGECOMMANDS !define MUI_WELCOMEPAGE !define MUI_COMPONENTSPAGE @@ -67,13 +70,16 @@ !insertmacro MUI_PAGECOMMAND_WELCOME + ;!insertmacro MUI_PAGECOMMAND_LICENSE !insertmacro MUI_PAGECOMMAND_COMPONENTS !insertmacro MUI_PAGECOMMAND_DIRECTORY Page custom AFSPageGetCellServDB Page custom AFSPageGetCellName + ;Page custom AFSPageGetConfigURL !insertmacro MUI_PAGECOMMAND_INSTFILES !insertmacro MUI_PAGECOMMAND_FINISH + ;LicenseData "Licenses.rtf" ;-------------------------------- ;Languages @@ -114,7 +120,7 @@ LangString DESC_SecCopyUI ${LANG_SIMPCHINESE} "OpenAFS for Windows: Simplified Chinese" LangString DESC_SecCopyUI ${LANG_TRADCHINESE} "OpenAFS for Windows: Traditional Chinese description" LangString DESC_SecCopyUI ${LANG_JAPANESE} "OpenAFS for Windows: Japanese description" - LangString DESC_SecCopyUI ${LANG_KOREAN} "OpenAFS for Windows: Korean description" + ;LangString DESC_SecCopyUI ${LANG_KOREAN} "OpenAFS for Windows: Korean description" ;LangString DESC_SecCopyUI ${LANG_ITALIAN} "OpenAFS for Windows: Italian description" ;LangString DESC_SecCopyUI ${LANG_DUTCH} "OpenAFS for Windows: Dutch description" ;LangString DESC_SecCopyUI ${LANG_DANISH} "OpenAFS for Windows: Danish description" @@ -139,7 +145,7 @@ LangString DESC_SecClient ${LANG_SIMPCHINESE} "OpenAFS Client: Allows you to access AFS from your Windows PC." LangString DESC_SecClient ${LANG_TRADCHINESE} "OpenAFS Client: Allows you to access AFS from your Windows PC." LangString DESC_SecClient ${LANG_JAPANESE} "OpenAFS Client: Allows you to access AFS from your Windows PC." - LangString DESC_SecClient ${LANG_KOREAN} "OpenAFS Client: Allows you to access AFS from your Windows PC." + ;LangString DESC_SecClient ${LANG_KOREAN} "OpenAFS Client: Allows you to access AFS from your Windows PC." LangString DESC_SecClient ${LANG_PORTUGUESEBR} "OpenAFS Client: Allows you to access AFS from your Windows PC." LangString DESC_SecServer ${LANG_ENGLISH} "OpenAFS Server: Allows you to run an AFS file server." @@ -148,7 +154,7 @@ LangString DESC_SecServer ${LANG_SIMPCHINESE} "OpenAFS Server: Allows you to run an AFS file server." LangString DESC_SecServer ${LANG_TRADCHINESE} "OpenAFS Server: Allows you to run an AFS file server." LangString DESC_SecServer ${LANG_JAPANESE} "OpenAFS Server: Allows you to run an AFS file server." - LangString DESC_SecServer ${LANG_KOREAN} "OpenAFS Server: Allows you to run an AFS file server." + ;LangString DESC_SecServer ${LANG_KOREAN} "OpenAFS Server: Allows you to run an AFS file server." LangString DESC_SecServer ${LANG_PORTUGUESEBR} "OpenAFS Server: Allows you to run an AFS file server." LangString DESC_SecControl ${LANG_ENGLISH} "OpenAFS Control Center: GUI utilities for managing and configuring AFS." @@ -157,16 +163,16 @@ LangString DESC_SecControl ${LANG_SIMPCHINESE} "OpenAFS Control Center: GUI utilities for managing and configuring AFS." LangString DESC_SecControl ${LANG_TRADCHINESE} "OpenAFS Control Center: GUI utilities for managing and configuring AFS." LangString DESC_SecControl ${LANG_JAPANESE} "OpenAFS Control Center: GUI utilities for managing and configuring AFS." - LangString DESC_SecControl ${LANG_KOREAN} "OpenAFS Control Center: GUI utilities for managing and configuring AFS." + ;LangString DESC_SecControl ${LANG_KOREAN} "OpenAFS Control Center: GUI utilities for managing and configuring AFS." LangString DESC_SecControl ${LANG_PORTUGUESEBR} "OpenAFS Control Center: GUI utilities for managing and configuring AFS." - LangString DESC_SecDocs ${LANG_ENGLISH} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS." + LangString DESC_SecDocs ${LANG_ENGLISH} "Supplemental Documentation: Additional documentation for using OpenAFS." LangString DESC_SecDocs ${LANG_GERMAN} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS." LangString DESC_SecDocs ${LANG_SPANISH} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS." LangString DESC_SecDocs ${LANG_SIMPCHINESE} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS." LangString DESC_SecDocs ${LANG_TRADCHINESE} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS." LangString DESC_SecDocs ${LANG_JAPANESE} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS." - LangString DESC_SecDocs ${LANG_KOREAN} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS." + ;LangString DESC_SecDocs ${LANG_KOREAN} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS." LangString DESC_SecDocs ${LANG_PORTUGUESEBR} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS." ; Popup error messages @@ -176,7 +182,7 @@ LangString CellError ${LANG_SIMPCHINESE} "You must specify a valid CellServDB file to copy during the install" LangString CellError ${LANG_TRADCHINESE} "You must specify a valid CellServDB file to copy during the install" LangString CellError ${LANG_JAPANESE} "You must specify a valid CellServDB file to copy during the install" - LangString CellError ${LANG_KOREAN} "You must specify a valid CellServDB file to copy during the install" + ;LangString CellError ${LANG_KOREAN} "You must specify a valid CellServDB file to copy during the install" LangString CellError ${LANG_PORTUGUESEBR} "You must specify a valid CellServDB file to copy during the install" @@ -187,7 +193,7 @@ LangString UPGRADE_CLIENT ${LANG_SIMPCHINESE} "Upgrade AFS Client" LangString UPGRADE_CLIENT ${LANG_TRADCHINESE} "Upgrade AFS Client" LangString UPGRADE_CLIENT ${LANG_JAPANESE} "Upgrade AFS Client" - LangString UPGRADE_CLIENT ${LANG_KOREAN} "Upgrade AFS Client" + ;LangString UPGRADE_CLIENT ${LANG_KOREAN} "Upgrade AFS Client" LangString UPGRADE_CLIENT ${LANG_PORTUGUESEBR} "Upgrade AFS Client" @@ -197,7 +203,7 @@ LangString REINSTALL_SERVER ${LANG_SIMPCHINESE} "Re-install AFS Server" LangString REINSTALL_SERVER ${LANG_TRADCHINESE} "Re-install AFS Server" LangString REINSTALL_SERVER ${LANG_JAPANESE} "Re-install AFS Server" - LangString REINSTALL_SERVER ${LANG_KOREAN} "Re-install AFS Server" + ;LangString REINSTALL_SERVER ${LANG_KOREAN} "Re-install AFS Server" LangString REINSTALL_SERVER ${LANG_PORTUGUESEBR} "Re-install AFS Server" ;-------------------------------- @@ -363,7 +369,30 @@ Section "AFS Client" SecClient File "${AFS_DESTDIR}\etc\rxdebug.exe" File "${AFS_DESTDIR}\etc\backup.exe" - +!ifdef DEBUG + File "${AFS_CLIENT_BUILDDIR}\afsshare.pdb" + File "${AFS_CLIENT_BUILDDIR}\libosi.pdb" + File "${AFS_CLIENT_BUILDDIR}\libafsconf.pdb" + File "${AFS_CLIENT_BUILDDIR}\klog.pdb" + File "${AFS_CLIENT_BUILDDIR}\tokens.pdb" + File "${AFS_CLIENT_BUILDDIR}\unlog.pdb" + File "${AFS_CLIENT_BUILDDIR}\fs.pdb" + File "${AFS_CLIENT_BUILDDIR}\afscreds.pdb" + File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.pdb" + File "${AFS_CLIENT_BUILDDIR}\afsd_service.pdb" + File "${AFS_CLIENT_BUILDDIR}\afslogon.pdb" + File "${AFS_CLIENT_BUILDDIR}\symlink.pdb" + File "${AFS_DESTDIR}\bin\kpasswd.pdb" + ;File "${AFS_SERVER_BUILDDIR}\pts.pdb" + File "${AFS_SERVER_BUILDDIR}\bos.pdb" + File "${AFS_SERVER_BUILDDIR}\kas.pdb" + File "${AFS_SERVER_BUILDDIR}\vos.pdb" + File "${AFS_SERVER_BUILDDIR}\udebug.pdb" + File "${AFS_DESTDIR}\bin\translate_et.pdb" + File "${AFS_DESTDIR}\etc\rxdebug.pdb" + File "${AFS_DESTDIR}\etc\backup.pdb" +!endif + ; Client_headers SetOutPath "$INSTDIR\Client\Program\Include" File "${AFS_BUILD_INCDIR}\lock.h" @@ -528,6 +557,13 @@ Section "AFS Client" SecClient ; Do WINDOWSDIR components ; Get AFS CellServDB file Call afs.GetCellServDB + ;Call afs.InstallMSLoopback + + ; Include Kerberos for Windows files in the installer... + ;SetOutPath "$INSTDIR\kfw\bin\" + ;File "${KFW_SOURCE}\bin\*" + ;SetOutPath "$INSTDIR\kfw\doc" + ;File "${KFW_SOURCE}\doc\*" ReadINIStr $R0 $0 "Field 2" "State" StrCmp $R0 "1" UsePkg DontUsePkg @@ -546,13 +582,13 @@ DontUseFile: WriteRegStr HKCU "${AFS_REGKEY_ROOT}\Client" "" $INSTDIR Call AFSCommon.Install - ; Write registry entries WriteRegStr HKCR "*\shellex\ContextMenuHandlers\AFS Client Shell Extension" "" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" - WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" "(Default)" "AFS Client Shell Extension" + WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" "" "AFS Client Shell Extension" WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32" "" "$INSTDIR\Client\Program\afs_shl_ext.dll" WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32" "ThreadingModel" "Apartment" WriteRegStr HKCR "FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension" "" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" "AFS Client Shell Extension" ; AFS Reg entries DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" @@ -573,42 +609,52 @@ DontUseFile: WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${MUI_VERSION}" "MinorVersion" ${MUI_MINORVERSION} WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${MUI_VERSION}" "PatchLevel" ${MUI_PATCHLEVEL} - ; Daemon entries - WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "(Default)" "" - WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "AuthentProviderPath" "$INSTDIR\Client\Program\afslogon.dll" - WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Class" 2 - WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonOptions" 0 - WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonScript" "$INSTDIR\Client\Program\afscreds.exe -:%s -x" - WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Name" "OpenAFSDaemon" - WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "ProviderPath" "$INSTDIR\Client\Program\afslogon.dll" - ; Set network settings WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled" 0 ;Write start menu entries CreateDirectory "$SMPROGRAMS\OpenAFS\Client" CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe" - CreateShortCut "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk" "$INSTDIR\Client\Program\afscreds.exe" - CreateShortCut "$SMSTARTUP\AFS Credentials.lnk" "$INSTDIR\Client\Program\afscreds.exe" + CreateShortCut "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk" "$INSTDIR\Client\Program\afscreds.exe" + CreateShortCut "$SMSTARTUP\AFS Credentials.lnk" "$INSTDIR\Client\Program\afscreds.exe" Push "$INSTDIR\Client\Program" Call AddToPath Push "$INSTDIR\Common" Call AddToPath + ; Add kfw to path too + Push "$INSTDIR\kfw\bin" + Call AddToPath + ; Create the AFS service - GetTempFileName $R0 - File /oname=$R0 "${AFS_WININSTALL_DIR}\Service.exe" - ExecWait "net stop TransarcAFSDaemon" - ExecWait '$R0 u TransarcAFSDaemon' - ExecWait '$R0 TransarcAFSDaemon "$INSTDIR\Client\Program\afsd_service.exe" "OpenAFS Client Service"' - Delete $R0 + SetOutPath "$INSTDIR\Common" + File "${AFS_WININSTALL_DIR}\Service.exe" + nsExec::Exec "net stop TransarcAFSDaemon" + ;IMPORTANT! If we are not refreshing the config files, do NOT remove the service + ;Don't re-install because it must be present or we wouldn't have passed the Reg check + ReadINIStr $R2 $1 "Field 2" "State" + + StrCmp $R2 "" skipremove + nsExec::Exec '$INSTDIR\Common\Service.exe u TransarcAFSDaemon' + nsExec::Exec '$INSTDIR\Common\Service.exe TransarcAFSDaemon "$INSTDIR\Client\Program\afsd_service.exe" "OpenAFS Client Service"' +skipremove: + Delete "$INSTDIR\Common\service.exe" + + ; Daemon entries + WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "(Default)" "" + WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "AuthentProviderPath" "$INSTDIR\Client\Program\afslogon.dll" + WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Class" 2 + WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonOptions" 2 + WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonScript" "$INSTDIR\Client\Program\afscreds.exe -:%s -x" + WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Name" "OpenAFSDaemon" + WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "ProviderPath" "$INSTDIR\Client\Program\afslogon.dll" ;Write cell name ReadINIStr $R0 $1 "Field 2" "State" WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "Cell" $R0 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "ShowTrayIcon" 1 - + WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "SecurityLevel" 1 SetRebootFlag true WriteUninstaller "$INSTDIR\Uninstall.exe" @@ -678,12 +724,12 @@ Section "AFS Server" SecServer WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${MUI_VERSION}" "PatchLevel" ${MUI_PATCHLEVEL} ; Install the service - GetTempFileName $R0 - File /oname=$R0 "${AFS_WININSTALL_DIR}\Service.exe" - ExecWait "net stop TransarcAFSServer" - ExecWait '$R0 u TransarcAFSServer' - ExecWait '$R0 TransarcAFSServer "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe" "OpenAFS AFS Server"' - Delete $R0 + SetOutPath "$INSTDIR\Common" + File "${AFS_WININSTALL_DIR}\Service.exe" + nsExec::Exec "net stop TransarcAFSServer" + nsExec::Exec '$INSTDIR\Common\service.exe u TransarcAFSServer' + nsExec::Exec '$INSTDIR\Common\service.exe TransarcAFSServer "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe" "OpenAFS AFS Server"' + Delete "$INSTDIR\Common\service.exe" CreateDirectory "$SMPROGRAMS\OpenAFS\Server" CreateShortCut "$SMPROGRAMS\OpenAFS\Server\Configuration Wizard.lnk" "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe" "/wizard" @@ -710,7 +756,7 @@ Section "AFS Control Center" SecControl SetOutPath "$INSTDIR\Common" SetOutPath "$INSTDIR\Common" - File "${AFS_WININSTALL_DIR}\Msvcr71.dll" + File "${AFS_WININSTALL_DIR}\msvcr71.dll" ;Store install folder @@ -768,7 +814,7 @@ DoGerman: File "..\..\doc\install\Documentation\de_DE\README.TXT" SetOutPath "$INSTDIR\Documentation\html" File "..\..\doc\install\Documentation\de_DE\html\*" - ;SetOutPath "$INSTDIR\Documentation\html\CmdRef" + SetOutPath "$INSTDIR\Documentation\html\CmdRef" ;File "..\..\doc\install\Documentation\de_DE\html\CmdRef\*" SetOutPath "$INSTDIR\Documentation\html\InstallGd" File "..\..\doc\install\Documentation\de_DE\html\InstallGd\*" @@ -783,13 +829,13 @@ DoSpanish: File "..\..\doc\install\Documentation\es_ES\README.TXT" SetOutPath "$INSTDIR\Documentation\html" File "..\..\doc\install\Documentation\es_ES\html\*" - ;SetOutPath "$INSTDIR\Documentation\html\CmdRef" + SetOutPath "$INSTDIR\Documentation\html\CmdRef" ;File "..\..\doc\install\Documentation\es_ES\html\CmdRef\*" SetOutPath "$INSTDIR\Documentation\html\InstallGd" - File "..\..\doc\install\Documentation\es_ES\html\InstallGd\*" - ;SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes" + ;File "..\..\doc\install\Documentation\es_ES\html\InstallGd\*" + SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes" ;File "..\..\doc\install\Documentation\es_ES\html\ReleaseNotes\*" - ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd" + SetOutPath "$INSTDIR\Documentation\html\SysAdminGd" ;File "..\..\doc\install\Documentation\es_ES\html\SysAdminGd\*" goto DoneLanguage @@ -803,9 +849,9 @@ DoJapanese: SetOutPath "$INSTDIR\Documentation\html\InstallGd" File "..\..\doc\install\Documentation\ja_JP\html\InstallGd\*" SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes" - File "..\..\doc\install\Documentation\ja_JP\html\ReleaseNotes\*" + ;File "..\..\doc\install\Documentation\ja_JP\html\ReleaseNotes\*" SetOutPath "$INSTDIR\Documentation\html\SysAdminGd" - File "..\..\doc\install\Documentation\ja_JP\html\SysAdminGd\*" + ;File "..\..\doc\install\Documentation\ja_JP\html\SysAdminGd\*" goto DoneLanguage DoKorean: @@ -904,6 +950,14 @@ Function .onInit ; Set the default install options Push $0 + Call IsUserAdmin + Pop $R0 + StrCmp $R0 "true" contInstall + + MessageBox MB_OK|MB_ICONSTOP|MB_TOPMOST "You must be an administrator of this machine to install this software." + Abort + +contInstall: Call ShouldClientInstall Pop $R2 @@ -914,7 +968,7 @@ Function .onInit SectionGetFlags ${secClient} $0 IntOp $0 $0 | ${SF_SELECTED} SectionSetFlags ${secClient} $0 - # !insertmacro SelectSection ${secClient} + ;# !insertmacro SelectSection ${secClient} goto skipClient NoClient: StrCpy $1 ${secClient} ; Gotta remember which section we are at now... @@ -940,25 +994,25 @@ skipClient: SectionGetFlags ${secServer} $0 IntOp $0 $0 & ${SF_SELECTED} SectionSetFlags ${secServer} $0 - # !insertmacro UnselectSection ${secServer} + ;# !insertmacro UnselectSection ${secServer} goto skipServer NoServer: SectionGetFlags ${secServer} $0 IntOp $0 $0 & ${SECTION_OFF} SectionSetFlags ${secServer} $0 - # !insertmacro UnselectSection ${secServer} + ;# !insertmacro UnselectSection ${secServer} skipServer: SectionGetFlags ${secControl} $0 IntOp $0 $0 & ${SECTION_OFF} SectionSetFlags ${secControl} $0 - # !insertmacro UnselectSection ${secControl} + ;# !insertmacro UnselectSection ${secControl} SectionGetFlags ${secDocs} $0 IntOp $0 $0 | ${SF_SELECTED} SectionSetFlags ${secDocs} $0 - # !insertmacro UnselectSection ${secDocs} + ;# !insertmacro UnselectSection ${secDocs} Pop $0 @@ -968,7 +1022,7 @@ skipServer: File /oname=$0 CellServPage.ini GetTempFilename $1 File /oname=$1 AFSCell.ini - + ;File /oname=$1 ConfigURL.ini FunctionEnd @@ -1005,19 +1059,27 @@ FunctionEnd Section "Uninstall" SetShellVarContext all + ; Stop the running processes + GetTempFileName $R0 + File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe" + nsExec::Exec '$R0 afscreds.exe' + nsExec::Exec '$R0 krbcc32s.exe' + ; Delete the AFS service GetTempFileName $R0 File /oname=$R0 "${AFS_WININSTALL_DIR}\Service.exe" - ExecWait "net stop TransarcAFSDaemon" - ExecWait "net stop TransarcAFSServer" - ExecWait '$R0 u TransarcAFSDaemon' - ExecWait '$R0 u TransarcAFSServer' + nsExec::Exec "net stop TransarcAFSDaemon" + nsExec::Exec "net stop TransarcAFSServer" + nsExec::Exec '$R0 u TransarcAFSDaemon' + nsExec::Exec '$R0 u TransarcAFSServer' Delete $R0 Push "$INSTDIR\Client\Program" Call un.RemoveFromPath Push "$INSTDIR\Common" Call un.RemoveFromPath + Push "$INSTDIR\kfw\bin" + Call un.RemoveFromPath ; Delete documentation Delete "$INSTDIR\Documentation\README.TXT" @@ -1027,38 +1089,53 @@ Section "Uninstall" Delete "$INSTDIR\Documentation\html\ReleaseNotes\*" Delete "$INSTDIR\Documentation\html\SysAdminGd\*" - Delete "$WINDIR\afs_cpa.cpl" + Delete /REBOOTOK "$INSTDIR\Common\afs_config.exe" + Delete /REBOOTOK "$INSTDIR\Common\afs_shl_ext.dll" + Delete /REBOOTOK "$INSTDIR\Common\afsadminutil.dll" + Delete /REBOOTOK "$INSTDIR\Common\lib\afsauthent.dll" + Delete /REBOOTOK "$INSTDIR\Common\lib\afspthread.dll" + Delete /REBOOTOK "$INSTDIR\Common\lib\afsrpc.dll" + Delete /REBOOTOK "$INSTDIR\Common\afsclientadmin.dll" + Delete /REBOOTOK "$INSTDIR\Common\afsprocmgmt.dll" + Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.dll" + Delete /REBOOTOK "$INSTDIR\Common\TaAfsAppLib.dll" + Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.dll" + Delete /REBOOTOK "$INSTDIR\Common\afsbosadmin.dll" + Delete /REBOOTOK "$INSTDIR\Common\afscfgadmin.dll" + Delete /REBOOTOK "$INSTDIR\Common\afskasadmin.dll" + Delete /REBOOTOK "$INSTDIR\Common\afsptsadmin.dll" + Delete /REBOOTOK "$INSTDIR\Common\msvcr71.dll" + ;Delete /REBOOTOK "$INSTDIR\Common\msvcp60.dll" Call un.IsSilent Pop $R1 StrCmp $R1 "/S" SkipAsk - IfFileExists "$WINDIR\afsdcell.ini" CellExists SkipDelCell - CellExists: - MessageBox MB_YESNO "Would you like to keep your Cell file?" IDYES SkipDelCell +; IfFileExists "$WINDIR\afsdcell.ini" CellExists SkipDelAsk +; CellExists: + MessageBox MB_YESNO "Would you like to keep your configuration files?" IDYES SkipDel SkipAsk: Delete "$WINDIR\afsdcell.ini" - SkipDelCell: - StrCmp $R1 "/S" SkipAsk2 - MessageBox MB_YESNO "Would you like to keep your submount file?" IDYES SkipSubFile - SkipAsk2: Delete "$WINDIR\afsdsbmt.ini" + Delete "$WINDIR\krb5.ini" + Delete "$WINDIR\afsdns.ini" + Delete "$WINDIR\afs_freelance.ini" - SkipSubFile: + SkipDel: Delete "$WINDIR\afsd_init.log" Delete "$INSTDIR\Uninstall.exe" ; Remove server - Delete "$INSTDIR\Server\usr\afs\bin\afskill.exe" - Delete "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe" - Delete "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe" - Delete "$INSTDIR\Server\usr\afs\bin\bosserver.exe" - Delete "$INSTDIR\Server\usr\afs\bin\buserver.exe" - Delete "$INSTDIR\Server\usr\afs\bin\butc.exe" - Delete "$INSTDIR\Server\usr\afs\bin\fileserver.exe" - Delete "$INSTDIR\Server\usr\afs\bin\fms.exe" - Delete "$INSTDIR\Server\usr\afs\bin\kaserver.exe" - Delete "$INSTDIR\Server\usr\afs\bin\ptserver.exe" + Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afskill.exe" + Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe" + Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe" + Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosserver.exe" + Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\buserver.exe" + Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\butc.exe" + Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fileserver.exe" + Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fms.exe" + Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\kaserver.exe" + Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\ptserver.exe" Delete "$INSTDIR\Server\usr\afs\bin\salvager.exe" Delete "$INSTDIR\Server\usr\afs\bin\ServerUninst.dll" Delete "$INSTDIR\Server\usr\afs\bin\upclient.exe" @@ -1082,24 +1159,39 @@ Section "Uninstall" RMDir "$INSTDIR\Documentation" ; Delete DOC short cut - RMDir /r "$INSTDIR\Client\Program" - RMDir /r "$INSTDIR\Client" + Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.exe" + Delete /REBOOTOK "$INSTDIR\Client\Program\*" + Delete /REBOOTOK "$INSTDIR\Client\Program\Include\*" + Delete /REBOOTOK "$INSTDIR\Client\Program\Include\afs\*" + Delete /REBOOTOK "$INSTDIR\Client\Program\Include\rx\*" + Delete /REBOOTOK "$INSTDIR\Client\Program\Sample\*" + RMDir "$INSTDIR\Client\Program\Sample" + RMDir "$INSTDIR\Client\Program\Include\afs" + RMDir "$INSTDIR\Client\Program\Include\rx" + RMDir "$INSTDIR\Client\Program\Include" + RMDir "$INSTDIR\Client\Program" + RMDir "$INSTDIR\Client" Delete /REBOOTOK "$INSTDIR\Common\msvcr71.dll" Delete /REBOOTOK "$INSTDIR\Common\*" - RMDir /r "$INSTDIR\Common" + RMDir "$INSTDIR\Common" + + ;Remove KfW files + Delete /REBOOTOK "$INSTDIR\kfw\bin\*" + RMDIR /r "$INSTDIR\kfw\bin" + Delete /REBOOTOK "$INSTDIR\kfw\doc\*" + RMDIR /r "$INSTDIR\kfw\doc" + RMDIR /r "$INSTDIR\kfw" Delete "$SMPROGRAMS\OpenAFS\Documentation.lnk" ; Remove control center - Delete "$INSTDIR\Control Center\TaAfsAccountManager.exe" - Delete "$INSTDIR\Control Center\TaAfsAdmSvr.exe" - Delete "$INSTDIR\Control Center\TaAfsServerManager.exe" - Delete "$INSTDIR\Control Center\CCUninst.dll" - RMDir "$INSTDIR\Control Center" + Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAccountManager.exe" + Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAdmSvr.exe" + Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsServerManager.exe" + Delete /REBOOTOK "$INSTDIR\Control Center\CCUninst.dll" + RMDir "$INSTDIR\Control Center" - RMDir "$INSTDIR" - Delete "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" Delete "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk" Delete "$SMPROGRAMS\OpenAFS\Control Center\Account Manager.lnk" @@ -1107,11 +1199,19 @@ Section "Uninstall" RMDIR "$SMPROGRAMS\OpenAFS\Control Center" RMDir /r "$SMPROGRAMS\OpenAFS\Client" RMDir /r "$SMPROGRAMS\OpenAFS" + Delete "$SMSTARTUP\AFS Credentials.lnk" ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "CachePath" IfErrors +2 Delete "$R0\AFSCache" Delete "C:\AFSCache" + + DeleteRegKey HKCR "*\shellex\ContextMenuHandlers\AFS Client Shell Extension" + DeleteRegKey HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32" + DeleteRegKey HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" + DeleteRegKey HKCR "FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension" + DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" + DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client" DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" @@ -1124,7 +1224,8 @@ Section "Uninstall" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled" - + RMDir "$INSTDIR" + ;Display the Finish header !insertmacro MUI_UNFINISHHEADER @@ -1137,9 +1238,14 @@ Function un.onInit ;Get language from registry ReadRegStr $LANGUAGE HKCU "Software\OpenAFS\AFS" "Installer Language" - + FunctionEnd +Function un.onUninstSuccess + + MessageBox MB_OK "Please reboot your machine to complete uninstallation of the software" + +FunctionEnd ;------------------------------ ; Get the CellServDB file from the Internet @@ -1147,8 +1253,8 @@ FunctionEnd Function afs.GetCellServDB ;Check if we should download CellServDB -ReadINIStr $R0 $0 "Field 4" "State" -StrCmp $R0 "0" CheckIncl +;ReadINIStr $R0 $0 "Field 4" "State" +;StrCmp $R0 "0" CheckIncl ReadINIStr $R0 $0 "Field 5" "State" NSISdl::download $R0 "$WINDIR\afsdcell.ini" @@ -1183,6 +1289,7 @@ startOver: WriteINIStr $0 "Field 2" "Flags" "DISABLED" WriteINIStr $0 "Field 3" "State" "1" + !insertmacro MUI_HEADER_TEXT "CellServDB Configuration" "Please choose a method for installing the CellServDB file:" InstallOptions::dialog $0 Pop $R1 StrCmp $R1 "cancel" exit @@ -1211,6 +1318,7 @@ Function AFSPageGetCellName Call IsSilent Pop $R1 StrCmp $R1 "/S" exit + !insertmacro MUI_HEADER_TEXT "Cell Name Configuration" "Please enter the name for your default cell:" InstallOptions::dialog $1 Pop $R1 StrCmp $R1 "cancel" exit @@ -1479,7 +1587,26 @@ Function AFSLangFiles File "${AFS_SERVER_BUILDDIR}\afscfgadmin.dll" File "${AFS_SERVER_BUILDDIR}\afskasadmin.dll" File "${AFS_SERVER_BUILDDIR}\afsptsadmin.dll" - File "${AFS_WININSTALL_DIR}\Msvcr71.dll" + File "${AFS_WININSTALL_DIR}\msvcr71.dll" + ;File "${AFS_WININSTALL_DIR}\msvcp60.dll" + +!ifdef DEBUG + File "${AFS_CLIENT_BUILDDIR}\afs_config.pdb" + File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.pdb" + File "${AFS_SERVER_BUILDDIR}\afsadminutil.pdb" + File "${AFS_DESTDIR}\lib\afsauthent.pdb" + File "${AFS_DESTDIR}\lib\afspthread.pdb" + File "${AFS_DESTDIR}\lib\afsrpc.pdb" + File "${AFS_SERVER_BUILDDIR}\afsclientadmin.pdb" + File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.pdb" + File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb" + File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib.pdb" + File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb" + File "${AFS_SERVER_BUILDDIR}\afsbosadmin.pdb" + File "${AFS_SERVER_BUILDDIR}\afscfgadmin.pdb" + File "${AFS_SERVER_BUILDDIR}\afskasadmin.pdb" + File "${AFS_SERVER_BUILDDIR}\afsptsadmin.pdb" +!endif StrCmp $LANGUAGE ${LANG_ENGLISH} DoEnglish StrCmp $LANGUAGE ${LANG_GERMAN} DoGerman @@ -1550,6 +1677,21 @@ DoGerman: File "..\..\doc\help\de_DE\taafssvrmgr.hlp" File "..\..\doc\help\de_DE\taafsusrmgr.CNT" File "..\..\doc\help\de_DE\taafsusrmgr.hlp" + +!ifdef DEBUG + ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1033.pdb" + ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.pdb" + ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1033.pdb" + ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.pdb" + ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1033.pdb" + ;File "${AFS_SERVER_BUILDDIR}\afsserver_1033.pdb" + ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1033.pdb" + ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1033.pdb" + ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1033.pdb" + ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.pdb" + File "${AFS_WININSTALL_DIR}\msvcr71d.dll" + File "${AFS_WININSTALL_DIR}\msvcr71d.pdb" +!endif goto done DoSpanish: @@ -1990,3 +2132,159 @@ FunctionEnd Pop $R1 FunctionEnd + Function afs.InstallMSLoopback + ;GetTempFileName $R0 + ;File /oname=$R0 "loopback_install.dll" + ;nsExec::Exec "rundll32.exe $R0 doLoopBackEntry quiet" + ;Call GetWindowsVersion + ;Pop $R1 + ;StrCmp $R1 "2000" +1 +2 + ;nsExec::Exec "rundll32.exe $R0 disableLoopBackEntry" + ;Delete $R0 +FunctionEnd + + + +; GetWindowsVersion +; +; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/ +; Updated by Joost Verburg +; +; Returns on top of stack +; +; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003) +; or +; '' (Unknown Windows Version) +; +; Usage: +; Call GetWindowsVersion +; Pop $R0 +; ; at this point $R0 is "NT 4.0" or whatnot + +Function GetWindowsVersion + + Push $R0 + Push $R1 + + ClearErrors + + ReadRegStr $R0 HKLM \ + "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion + + IfErrors 0 lbl_winnt + + ; we are not NT + ReadRegStr $R0 HKLM \ + "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber + + StrCpy $R1 $R0 1 + StrCmp $R1 '4' 0 lbl_error + + StrCpy $R1 $R0 3 + + StrCmp $R1 '4.0' lbl_win32_95 + StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98 + + lbl_win32_95: + StrCpy $R0 '95' + Goto lbl_done + + lbl_win32_98: + StrCpy $R0 '98' + Goto lbl_done + + lbl_win32_ME: + StrCpy $R0 'ME' + Goto lbl_done + + lbl_winnt: + + StrCpy $R1 $R0 1 + + StrCmp $R1 '3' lbl_winnt_x + StrCmp $R1 '4' lbl_winnt_x + + StrCpy $R1 $R0 3 + + StrCmp $R1 '5.0' lbl_winnt_2000 + StrCmp $R1 '5.1' lbl_winnt_XP + StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error + + lbl_winnt_x: + StrCpy $R0 "NT $R0" 6 + Goto lbl_done + + lbl_winnt_2000: + Strcpy $R0 '2000' + Goto lbl_done + + lbl_winnt_XP: + Strcpy $R0 'XP' + Goto lbl_done + + lbl_winnt_2003: + Strcpy $R0 '2003' + Goto lbl_done + + lbl_error: + Strcpy $R0 '' + lbl_done: + + Pop $R1 + Exch $R0 + +FunctionEnd + + +; Author: Lilla (lilla@earthlink.net) 2003-06-13 +; function IsUserAdmin uses plugin \NSIS\PlusgIns\UserInfo.dll +; This function is based upon code in \NSIS\Contrib\UserInfo\UserInfo.nsi +; This function was tested under NSIS 2 beta 4 (latest CVS as of this writing). +; +; Usage: +; Call IsUserAdmin +; Pop $R0 ; at this point $R0 is "true" or "false" +; +Function IsUserAdmin +Push $R0 +Push $R1 +Push $R2 + +ClearErrors +UserInfo::GetName +IfErrors Win9x +Pop $R1 +UserInfo::GetAccountType +Pop $R2 + +StrCmp $R2 "Admin" 0 Continue +; Observation: I get here when running Win98SE. (Lilla) +; The functions UserInfo.dll looks for are there on Win98 too, +; but just don't work. So UserInfo.dll, knowing that admin isn't required +; on Win98, returns admin anyway. (per kichik) +; MessageBox MB_OK 'User "$R1" is in the Administrators group' +StrCpy $R0 "true" +Goto Done + +Continue: +; You should still check for an empty string because the functions +; UserInfo.dll looks for may not be present on Windows 95. (per kichik) +StrCmp $R2 "" Win9x +StrCpy $R0 "false" +;MessageBox MB_OK 'User "$R1" is in the "$R2" group' +Goto Done + +Win9x: +; comment/message below is by UserInfo.nsi author: +; This one means you don't need to care about admin or +; not admin because Windows 9x doesn't either +;MessageBox MB_OK "Error! This DLL can't run under Windows 9x!" +StrCpy $R0 "false" + +Done: +;MessageBox MB_OK 'User= "$R1" AccountType= "$R2" IsUserAdmin= "$R0"' + +Pop $R2 +Pop $R1 +Exch $R0 +FunctionEnd diff --git a/src/WINNT/install/NSIS/killer.cpp b/src/WINNT/install/NSIS/killer.cpp new file mode 100644 index 000000000..7ba27fc20 --- /dev/null +++ b/src/WINNT/install/NSIS/killer.cpp @@ -0,0 +1,380 @@ +/* + Process Killer for NSIS script + + Rob Murawski + + Released under terms of IBM Open Source agreement for OpenAFS + + */ + + +#include +#include +#include +#include + +char strProcessName[256]; + +typedef BOOL (CALLBACK *PROCENUMPROC)(DWORD, WORD, LPSTR, LPARAM); + +typedef struct { + DWORD dwPID; + PROCENUMPROC lpProc; + DWORD lParam; + BOOL bEnd; +} EnumInfoStruct; + +BOOL WINAPI EnumProcs(PROCENUMPROC lpProc, LPARAM lParam); + +BOOL WINAPI Enum16(DWORD dwThreadId, WORD hMod16, WORD hTask16, + PSZ pszModName, PSZ pszFileName, LPARAM lpUserDefined); + +// +// The EnumProcs function takes a pointer to a callback function +// that will be called once per process with the process filename +// and process ID. +// +// lpProc -- Address of callback routine. +// +// lParam -- A user-defined LPARAM value to be passed to +// the callback routine. +// +// Callback function definition: +// BOOL CALLBACK Proc(DWORD dw, WORD w, LPCSTR lpstr, LPARAM lParam); +// +BOOL WINAPI EnumProcs(PROCENUMPROC lpProc, LPARAM lParam) { + + OSVERSIONINFO osver; + HINSTANCE hInstLib = NULL; + HINSTANCE hInstLib2 = NULL; + HANDLE hSnapShot = NULL; + LPDWORD lpdwPIDs = NULL; + PROCESSENTRY32 procentry; + BOOL bFlag; + DWORD dwSize; + DWORD dwSize2; + DWORD dwIndex; + HMODULE hMod; + HANDLE hProcess; + char szFileName[MAX_PATH]; + EnumInfoStruct sInfo; + + // ToolHelp Function Pointers. + HANDLE (WINAPI *lpfCreateToolhelp32Snapshot)(DWORD, DWORD); + BOOL (WINAPI *lpfProcess32First)(HANDLE, LPPROCESSENTRY32); + BOOL (WINAPI *lpfProcess32Next)(HANDLE, LPPROCESSENTRY32); + + // PSAPI Function Pointers. + BOOL (WINAPI *lpfEnumProcesses)(DWORD *, DWORD, DWORD *); + BOOL (WINAPI *lpfEnumProcessModules)(HANDLE, HMODULE *, DWORD, + LPDWORD); + DWORD (WINAPI *lpfGetModuleBaseName)(HANDLE, HMODULE, LPTSTR, DWORD); + + // VDMDBG Function Pointers. + INT (WINAPI *lpfVDMEnumTaskWOWEx)(DWORD, TASKENUMPROCEX, LPARAM); + + // Retrieve the OS version + osver.dwOSVersionInfoSize = sizeof(osver); + if (!GetVersionEx(&osver)) + return FALSE; + + // If Windows NT 4.0 + if (osver.dwPlatformId == VER_PLATFORM_WIN32_NT + && osver.dwMajorVersion == 4) { + + __try { + + // Get the procedure addresses explicitly. We do + // this so we don't have to worry about modules + // failing to load under OSes other than Windows NT 4.0 + // because references to PSAPI.DLL can't be resolved. + hInstLib = LoadLibraryA("PSAPI.DLL"); + if (hInstLib == NULL) + __leave; + + hInstLib2 = LoadLibraryA("VDMDBG.DLL"); + if (hInstLib2 == NULL) + __leave; + + // Get procedure addresses. + lpfEnumProcesses = (BOOL (WINAPI *)(DWORD *, DWORD, DWORD*)) + GetProcAddress(hInstLib, "EnumProcesses"); + + lpfEnumProcessModules = (BOOL (WINAPI *)(HANDLE, HMODULE *, + DWORD, LPDWORD)) GetProcAddress(hInstLib, + "EnumProcessModules"); + + lpfGetModuleBaseName = (DWORD (WINAPI *)(HANDLE, HMODULE, + LPTSTR, DWORD)) GetProcAddress(hInstLib, + "GetModuleBaseNameA"); + + lpfVDMEnumTaskWOWEx = (INT (WINAPI *)(DWORD, TASKENUMPROCEX, + LPARAM)) GetProcAddress(hInstLib2, "VDMEnumTaskWOWEx"); + + if (lpfEnumProcesses == NULL + || lpfEnumProcessModules == NULL + || lpfGetModuleBaseName == NULL + || lpfVDMEnumTaskWOWEx == NULL) + __leave; + + // + // Call the PSAPI function EnumProcesses to get all of the + // ProcID's currently in the system. + // + // NOTE: In the documentation, the third parameter of + // EnumProcesses is named cbNeeded, which implies that you + // can call the function once to find out how much space to + // allocate for a buffer and again to fill the buffer. + // This is not the case. The cbNeeded parameter returns + // the number of PIDs returned, so if your buffer size is + // zero cbNeeded returns zero. + // + // NOTE: The "HeapAlloc" loop here ensures that we + // actually allocate a buffer large enough for all the + // PIDs in the system. + // + dwSize2 = 256 * sizeof(DWORD); + do { + + if (lpdwPIDs) { + HeapFree(GetProcessHeap(), 0, lpdwPIDs); + dwSize2 *= 2; + } + + lpdwPIDs = (LPDWORD) HeapAlloc(GetProcessHeap(), 0, + dwSize2); + if (lpdwPIDs == NULL) + __leave; + + if (!lpfEnumProcesses(lpdwPIDs, dwSize2, &dwSize)) + __leave; + + } while (dwSize == dwSize2); + + // How many ProcID's did we get? + dwSize /= sizeof(DWORD); + + // Loop through each ProcID. + for (dwIndex = 0; dwIndex < dwSize; dwIndex++) { + + szFileName[0] = 0; + + // Open the process (if we can... security does not + // permit every process in the system to be opened). + hProcess = OpenProcess( + PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, + FALSE, lpdwPIDs[dwIndex]); + if (hProcess != NULL) { + + // Here we call EnumProcessModules to get only the + // first module in the process. This will be the + // EXE module for which we will retrieve the name. + if (lpfEnumProcessModules(hProcess, &hMod, + sizeof(hMod), &dwSize2)) { + + // Get the module name + if (!lpfGetModuleBaseName(hProcess, hMod, + szFileName, sizeof(szFileName))) + szFileName[0] = 0; + } + CloseHandle(hProcess); + } + // Regardless of OpenProcess success or failure, we + // still call the enum func with the ProcID. + if (!lpProc(lpdwPIDs[dwIndex], 0, szFileName, lParam)) + break; + + // Did we just bump into an NTVDM? + if (_stricmp(szFileName, "NTVDM.EXE") == 0) { + + // Fill in some info for the 16-bit enum proc. + sInfo.dwPID = lpdwPIDs[dwIndex]; + sInfo.lpProc = lpProc; + sInfo.lParam = (DWORD) lParam; + sInfo.bEnd = FALSE; + + // Enum the 16-bit stuff. + lpfVDMEnumTaskWOWEx(lpdwPIDs[dwIndex], + (TASKENUMPROCEX) Enum16, (LPARAM) &sInfo); + + // Did our main enum func say quit? + if (sInfo.bEnd) + break; + } + } + + } __finally { + + if (hInstLib) + FreeLibrary(hInstLib); + + if (hInstLib2) + FreeLibrary(hInstLib2); + + if (lpdwPIDs) + HeapFree(GetProcessHeap(), 0, lpdwPIDs); + } + + // If any OS other than Windows NT 4.0. + } else if (osver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS + || (osver.dwPlatformId == VER_PLATFORM_WIN32_NT + && osver.dwMajorVersion > 4)) { + + __try { + + hInstLib = LoadLibraryA("Kernel32.DLL"); + if (hInstLib == NULL) + __leave; + + // If NT-based OS, load VDMDBG.DLL. + if (osver.dwPlatformId == VER_PLATFORM_WIN32_NT) { + hInstLib2 = LoadLibraryA("VDMDBG.DLL"); + if (hInstLib2 == NULL) + __leave; + } + + // Get procedure addresses. We are linking to + // these functions explicitly, because a module using + // this code would fail to load under Windows NT, + // which does not have the Toolhelp32 + // functions in KERNEL32.DLL. + lpfCreateToolhelp32Snapshot = + (HANDLE (WINAPI *)(DWORD,DWORD)) + GetProcAddress(hInstLib, "CreateToolhelp32Snapshot"); + + lpfProcess32First = + (BOOL (WINAPI *)(HANDLE,LPPROCESSENTRY32)) + GetProcAddress(hInstLib, "Process32First"); + + lpfProcess32Next = + (BOOL (WINAPI *)(HANDLE,LPPROCESSENTRY32)) + GetProcAddress(hInstLib, "Process32Next"); + + if (lpfProcess32Next == NULL + || lpfProcess32First == NULL + || lpfCreateToolhelp32Snapshot == NULL) + __leave; + + if (osver.dwPlatformId == VER_PLATFORM_WIN32_NT) { + lpfVDMEnumTaskWOWEx = (INT (WINAPI *)(DWORD, TASKENUMPROCEX, + LPARAM)) GetProcAddress(hInstLib2, "VDMEnumTaskWOWEx"); + if (lpfVDMEnumTaskWOWEx == NULL) + __leave; + } + + // Get a handle to a Toolhelp snapshot of all processes. + hSnapShot = lpfCreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); + if (hSnapShot == INVALID_HANDLE_VALUE) { + FreeLibrary(hInstLib); + return FALSE; + } + + // Get the first process' information. + procentry.dwSize = sizeof(PROCESSENTRY32); + bFlag = lpfProcess32First(hSnapShot, &procentry); + + // While there are processes, keep looping. + while (bFlag) { + + // Call the enum func with the filename and ProcID. + if (lpProc(procentry.th32ProcessID, 0, + procentry.szExeFile, lParam)) { + + // Did we just bump into an NTVDM? + if (_stricmp(procentry.szExeFile, "NTVDM.EXE") == 0) { + + // Fill in some info for the 16-bit enum proc. + sInfo.dwPID = procentry.th32ProcessID; + sInfo.lpProc = lpProc; + sInfo.lParam = (DWORD) lParam; + sInfo.bEnd = FALSE; + + // Enum the 16-bit stuff. + lpfVDMEnumTaskWOWEx(procentry.th32ProcessID, + (TASKENUMPROCEX) Enum16, (LPARAM) &sInfo); + + // Did our main enum func say quit? + if (sInfo.bEnd) + break; + } + + procentry.dwSize = sizeof(PROCESSENTRY32); + bFlag = lpfProcess32Next(hSnapShot, &procentry); + + } else + bFlag = FALSE; + } + + } __finally { + + if (hInstLib) + FreeLibrary(hInstLib); + + if (hInstLib2) + FreeLibrary(hInstLib2); + } + + } else + return FALSE; + + // Free the library. + FreeLibrary(hInstLib); + + return TRUE; +} + + +BOOL WINAPI Enum16(DWORD dwThreadId, WORD hMod16, WORD hTask16, + PSZ pszModName, PSZ pszFileName, LPARAM lpUserDefined) { + + BOOL bRet; + + EnumInfoStruct *psInfo = (EnumInfoStruct *)lpUserDefined; + + bRet = psInfo->lpProc(psInfo->dwPID, hTask16, pszFileName, + psInfo->lParam); + + if (!bRet) + psInfo->bEnd = TRUE; + + return !bRet; +} + + +BOOL CALLBACK MyProcessEnumerator(DWORD dwPID, WORD wTask, + LPCSTR szProcess, LPARAM lParam) { + + /*if (wTask == 0) + printf("%5u %s\n", dwPID, szProcess); + else + printf(" %5u %s\n", wTask, szProcess);*/ + + if(stricmp(szProcess,strProcessName)==0) + { + HANDLE hProcess=OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwPID); + if(hProcess!=NULL) + TerminateProcess(hProcess,0); + CloseHandle(hProcess); + } + + return TRUE; +} + + +void main(int argc, char *argv[]) +{ + if(argc<2) + { + printf("Please specify the process name to kill\n"); + + return; + } + + if(strlen((argv[1]))<255) + strcpy(strProcessName,(argv[1])); + else + return; + + EnumProcs((PROCENUMPROC) MyProcessEnumerator, 0); + +} diff --git a/src/WINNT/install/Win9x/NTMakeFile b/src/WINNT/install/Win9x/NTMakeFile index acdc8d9d0..368fbebfc 100644 --- a/src/WINNT/install/Win9x/NTMakeFile +++ b/src/WINNT/install/Win9x/NTMakeFile @@ -5,6 +5,7 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=WINNT\install\Win9x !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\..\config\NTMakefile.version OUTDIR = $(DESTDIR)\WinInstall @@ -34,11 +35,11 @@ DLLCOMPONENTS = \ $(COMPONENTS):: $(DESTDIR)\bin\util_cr.exe ~ $@ - $(COPY) $@ $(DESTDIR)\WinInstall\. + $(COPY) $@ $(OUTDIR) $(DLLCOMPONENTS):: $(DESTDIR)\bin\util_cr.exe ~ $@ - $(COPY) $@ $(DESTDIR)\WinInstall\Dll\. + $(COPY) $@ $(OUTDIR)\Dll\. !IF (EXIST(ISBUILD.MAK)) !INCLUDE ISBUILD.MAK @@ -55,12 +56,12 @@ clean :: $(DEL) $(OUTDIR)\DiskIm~1\WebInstall\* prep : - $(COPY) "$(DESTDIR)\WinInstall\config\sock.vxd" "$(DESTDIR)\WinInstall\." - $(COPY) "$(DESTDIR)\WinInstall\config\MMAP.vxd" "$(DESTDIR)\WinInstall\." - $(COPY) "$(DESTDIR)\WinInstall\config\AFSD.EXE" "$(DESTDIR)\WinInstall\." - $(DESTDIR)\bin\util_cr.exe ~ "$(DESTDIR)\WinInstall\sock.vxd" - $(DESTDIR)\bin\util_cr.exe ~ "$(DESTDIR)\WinInstall\MMAP.vxd" - $(DESTDIR)\bin\util_cr.exe ~ "$(DESTDIR)\WinInstall\AFSD.EXE" + $(COPY) "$(OUTDIR)\config\sock.vxd" "$(OUTDIR)" + $(COPY) "$(OUTDIR)\config\MMAP.vxd" "$(OUTDIR)" + $(COPY) "$(OUTDIR)\config\AFSD.EXE" "$(OUTDIR)" + $(DESTDIR)\bin\util_cr.exe ~ "$(OUTDIR)\sock.vxd" + $(DESTDIR)\bin\util_cr.exe ~ "$(OUTDIR)\MMAP.vxd" + $(DESTDIR)\bin\util_cr.exe ~ "$(OUTDIR)\AFSD.EXE" mkdir: diff --git a/src/WINNT/license/NTMakefile b/src/WINNT/license/NTMakefile index 230764763..a2ea66027 100644 --- a/src/WINNT/license/NTMakefile +++ b/src/WINNT/license/NTMakefile @@ -9,6 +9,7 @@ AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -WX # include the primary makefile +RELDIR=WINNT\license !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version @@ -17,8 +18,8 @@ AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -WX EXEFILE = $(DESTDIR)\bin\sgml2rtf.exe EXEOBJS = \ - $(OJT)\main.obj \ - $(OJT)\multistring.obj + $(OUT)\main.obj \ + $(OUT)\multistring.obj EXELIBS = \ user32.lib @@ -36,7 +37,7 @@ lang :: $(CD) .. mkdir: - -mkdir $(OJT)\lang + -mkdir $(OUT)\lang cd lang nmake /nologo /f ntmakefile SRC=$(SRC) OBJ=$(OBJ) mkdir cd .. diff --git a/src/WINNT/license/lang/NTMakefile b/src/WINNT/license/lang/NTMakefile index 83a299559..47c3fe889 100644 --- a/src/WINNT/license/lang/NTMakefile +++ b/src/WINNT/license/lang/NTMakefile @@ -9,6 +9,7 @@ AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -WX # include the primary makefile +RELDIR=WINNT\license\lang !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\..\config\NTMakefile.version diff --git a/src/WINNT/pthread/NTMakefile b/src/WINNT/pthread/NTMakefile index 37d4c47b5..c9fd2a850 100644 --- a/src/WINNT/pthread/NTMakefile +++ b/src/WINNT/pthread/NTMakefile @@ -5,10 +5,10 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=WINNT\pthread !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version - ############################################################################ # Export header files @@ -21,8 +21,8 @@ LIBINCLUDES = \ PTHR_DLLFILE = $(DESTDIR)\lib\afspthread.dll PTHR_DLLOBJS = \ - $(OJT)\pthread.obj \ - $(OJT)\pthread.res + $(OUT)\pthread.obj \ + $(OUT)\pthread.res $(PTHR_DLLFILE): $(PTHR_DLLOBJS) $(DLLCONLINK) /DEF:pthread.def @@ -34,21 +34,21 @@ $(PTHR_DLLFILE): $(PTHR_DLLOBJS) PTHR95_DLLFILE = $(DESTDIR)\lib\win95\afspthread.dll PTHR95_DLLOBJS = \ - $(OJT)\pthread_95.obj \ - $(OJT)\pthread95.res + $(OUT)\pthread_95.obj \ + $(OUT)\pthread95.res $(PTHR95_DLLFILE): $(PTHR95_DLLOBJS) $(DLLCONLINK) /DEF:pthread.def $(DLLPREP) -$(OJT)\pthread_95.obj: pthread.c +$(OUT)\pthread_95.obj: pthread.c $(C2OBJ) $** -DAFS_WIN95_ENV install: $(PTHR95_DLLFILE) $(PTHR_DLLFILE) $(LIBINCLUDES) install9x: install -$(OJT)\pthread95.res: pthread95.rc AFS_component_version_number.h +$(OUT)\pthread95.res: pthread95.rc AFS_component_version_number.h $(RC) /fo$*.res $(*F).rc clean:: diff --git a/src/WINNT/pthread/test/NTMakefile b/src/WINNT/pthread/test/NTMakefile index 6ff084fe6..d4926c28c 100644 --- a/src/WINNT/pthread/test/NTMakefile +++ b/src/WINNT/pthread/test/NTMakefile @@ -5,18 +5,19 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=WINNT\pthread\test !INCLUDE ../../../config/NTMakefile.$(SYS_NAME) test tests: ptest.exe tsd.exe native.exe -$(OJT)\ptest.exe: $(OJT)\ptest.obj $(DESTDIR)/lib/afspthread.lib $(DESTDIR)/lib/afs/afsutil.lib +$(OUT)\ptest.exe: $(OUT)\ptest.obj $(DESTDIR)/lib/afspthread.lib $(DESTDIR)/lib/afs/afsutil.lib $(EXECONLINK) -$(OJT)\tsd.exe: $(OJT)\tsd.obj $(DESTDIR)/lib/afspthread.lib $(DESTDIR)/lib/afs/afsutil.lib +$(OUT)\tsd.exe: $(OUT)\tsd.obj $(DESTDIR)/lib/afspthread.lib $(DESTDIR)/lib/afs/afsutil.lib $(EXECONLINK) -$(OJT)\native.exe: $(OJT)\native.obj $(DESTDIR)/lib/afspthread.lib $(DESTDIR)/lib/afs/afsutil.lib +$(OUT)\native.exe: $(OUT)\native.obj $(DESTDIR)/lib/afspthread.lib $(DESTDIR)/lib/afs/afsutil.lib $(EXECONLINK) clean:: diff --git a/src/WINNT/pthread/test/native.cpp b/src/WINNT/pthread/test/native.cpp index 87c356607..377b5f922 100644 --- a/src/WINNT/pthread/test/native.cpp +++ b/src/WINNT/pthread/test/native.cpp @@ -1,400 +1,400 @@ -/* - * Copyright 2000, International Business Machines Corporation and others. - * All Rights Reserved. - * - * This software has been released under the terms of the IBM Public - * License. For details, see the LICENSE file in the top-level source - * directory or online at http://www.openafs.org/dl/license10.html - */ - -/* - * Test pthread interaction with native Win32 threads - * - */ - - -#include -#include - -#include -#include -#include - -extern "C" { -#include -#include -#include -} - - -#define nTESTS 3 -#define nPASSES_MAX 256 - - -/* - * Test1 - Tests the main thread calling pthread_self() - * - */ - -BOOL Test1 (void) -{ - BOOL rc = TRUE; - printf ("Begin Test1:\n"); - - PVOID hSelf; - if ((hSelf = pthread_self()) == NULL) - rc = FALSE; - - printf (" 1: pthread_self() on main thread returned 0x%08lX\n", hSelf); - - printf ("--> Test1 %s\n", (rc) ? TEXT("succeeded") : TEXT("FAILED")); - return rc; -} - - -/* - * Test2 - Tests a Win32 thread's ability to join onto a pthread - * - */ -#define TEST2_RETURNVALUE 'Test' - -DWORD WINAPI Test2_Thread1 (LPVOID lp) -{ - printf (" 1-1: waiting for thread 2 to begin\n"); - - while (!*(volatile DWORD*)lp) - ; - - printf (" 1-1: calling pthread_join (0x%08lX)\n", *(DWORD*)lp); - - DWORD status; - int rc; - if ((rc = pthread_join ((pthread_t)(*(DWORD*)lp), (void**)&status)) != 0) - { - printf (" 1-1: pthread_join failed; rc=%lu\n", rc); - return 0; - } - - if (status != TEST2_RETURNVALUE) - { - printf (" 1-1: pthread_join succeeded with wrong status (rc=%lu)\n", status); - return 0; - } - - printf (" 1-1: pthread_join succeeded; terminating\n"); - return 1; -} - -extern "C" void *Test2_Thread2 (void *pdwCommonParam) -{ - printf (" 1-2: signalling that thread 2 began\n"); - *(volatile DWORD*)pdwCommonParam = (DWORD)pthread_self(); - Sleep (1500); - - printf (" 1-2: terminating\n"); - return (void*)TEST2_RETURNVALUE; -} - -BOOL Test2 (void) -{ - BOOL rc = TRUE; - printf ("Begin Test2:\n"); - - DWORD dwCommonParam = 0; - DWORD idThread; - - printf (" 1: creating win32 thread\n"); - HANDLE hThread1 = CreateThread (0, 0, Test2_Thread1, (LPVOID)&dwCommonParam, 0, &idThread); - Sleep(500); - - printf (" 1: creating pthread thread\n"); - pthread_t hThread2; - pthread_create (&hThread2, NULL, Test2_Thread2, (void *)&dwCommonParam); - Sleep(500); - - printf (" 1: blocking until win32 thread (thread1) terminates...\n"); - - WaitForSingleObject (hThread1, INFINITE); - GetExitCodeThread (hThread1, (ULONG*)&rc); - - printf (" 1: detected thread1 termination\n"); - - printf ("--> Test2 %s\n", (rc) ? TEXT("succeeded") : TEXT("FAILED")); - return rc; -} - - -/* - * Test3 - Makes sure the pthread library recognizes when native threads die - * - */ - -DWORD WINAPI Test3_Thread1 (LPVOID lp) -{ - LONG *pdw = (LONG*)lp; - - // We're awake. Do something pthready. - // - pthread_t pMe; - if ((pMe = pthread_self()) == NULL) - printf (" 3-1: could not get a pthread_self!\n"); - else - printf (" 3-1: ready\n"); - - InterlockedIncrement (pdw); - - // Now wait until we see the signal to die. - // - while (*(volatile LONG*)pdw != 5) - ; - - printf (" 3-1: terminating\n"); - InterlockedIncrement (pdw); - return 1; -} - - -DWORD WINAPI Test3_Thread2 (LPVOID lp) -{ - LONG *pdw = (LONG*)lp; - - // We're awake. Do something pthready. - // - pthread_t pMe; - if ((pMe = pthread_self()) == NULL) - printf (" 3-2: could not get a pthread_self!\n"); - else - printf (" 3-2: ready\n"); - - InterlockedIncrement (pdw); - - // Now wait until we see the signal to die. - // - while (*(volatile LONG*)pdw != 7) - ; - - printf (" 3-2: terminating\n"); - InterlockedIncrement (pdw); - return 1; -} - - -extern "C" void *Test3_Thread3 (void *pdwParam) -{ - LONG *pdw = (LONG*)pdwParam; - - // We're awake. - // - printf (" 3-3: ready\n"); - InterlockedIncrement (pdw); - - // Now wait until we see the signal to die. - // - while (*(volatile LONG*)pdw != 9) - ; - - printf (" 3-3: terminating\n"); - InterlockedIncrement (pdw); - return (void*)1; -} - - -extern "C" void *Test3_Thread4 (void *pdwParam) -{ - LONG *pdw = (LONG*)pdwParam; - - // We're awake. - // - printf (" 3-4: ready\n"); - InterlockedIncrement (pdw); - - // Now wait until we see the signal to die. - // - while (*(volatile LONG*)pdw != 11) - ; - - printf (" 3-4: terminating\n"); - InterlockedIncrement (pdw); - return (void*)1; -} - - -extern "C" void *Test3_ThreadCount (void *pdwParam) -{ - volatile LONG *pdw = (LONG*)pdwParam; - - pthread_t pMe; - if ((pMe = pthread_self()) == NULL) - return (void*)0; - - try { - struct rx_queue *pNow = (rx_queue*)pMe; - - for (struct rx_queue *pWalk = pNow->next; pWalk != pNow; pWalk = pWalk->next) - ++(*pdw); - - } catch(...) { - *pdw = 0; - } - - return (void*)*pdw; -} - -size_t Test3_CountActiveQueue (void) -{ - DWORD dwArg = 0; - pthread_t pThread; - pthread_create (&pThread, NULL, Test3_ThreadCount, (void *)&dwArg); - - DWORD status; - int rc; - if ((rc = pthread_join (pThread, (void**)&status)) != 0) - { - printf (" 3: counter: pthread_join failed; rc=%lu\n", rc); - return 0; - } - - return dwArg; -} - -BOOL Test3 (void) -{ - BOOL rc = TRUE; - printf ("Begin Test3:\n"); - - // Find the size of the active queue - // - size_t cInitialQueueSize; - if ((cInitialQueueSize = Test3_CountActiveQueue()) == 0) - { - printf (" 3: unable to determine active queue size\n"); - rc = FALSE; - } - else - { - // Start two Win32 threads and two pthreads. We'll use a single, common - // parameter for each thread: dwSignal. Each thread will increment the - // signal param when it's ready for us to go; once that's done, a - // thread will kill itself and inc the signal *again* each die we - // increment the signal: - // - // starts at 0 - // thread 1 wakes up and incs signal to 1 - // thread 2 wakes up and incs signal to 2 - // thread 3 wakes up and incs signal to 3 - // thread 4 wakes up and incs signal to 4 - // we notice signal is 4, and we increment signal to 5 - // thread 1 notices signal is 5, incs to 6 and dies - // we notice signal is 6, and we increment signal to 7 - // thread 1 notices signal is 7, incs to 8 and dies - // we notice signal is 8, and we increment signal to 9 - // thread 1 notices signal is 9, incs to 10 and dies - // we notice signal is 10, and we increment signal to 11 - // thread 1 notices signal is 11, incs to 12 and dies - // we notice signal is 12 and finish our tests - // - volatile LONG dwSignal = 0; - printf (" 3: creating test threads\n"); - - DWORD idThread; - CreateThread (0, 0, Test3_Thread1, (LPVOID)&dwSignal, 0, &idThread); - Sleep (500); - - CreateThread (0, 0, Test3_Thread2, (LPVOID)&dwSignal, 0, &idThread); - Sleep (500); - - pthread_attr_t attr; - attr.is_joinable = PTHREAD_CREATE_DETACHED; - - pthread_t hThread; - pthread_create (&hThread, &attr, Test3_Thread3, (void *)&dwSignal); - Sleep (500); - - pthread_create (&hThread, &attr, Test3_Thread4, (void *)&dwSignal); - Sleep (500); - - // Count the active queue again as soon as we're sure all the threads - // are ready for us to do so. - // - while (dwSignal != 4) - ; - - size_t cQueueSize; - if ((cQueueSize = Test3_CountActiveQueue()) == 0) - { - printf (" 3: unable to determine active queue size\n"); - rc = FALSE; - } - else if (cQueueSize != cInitialQueueSize+4) - { - printf (" 3: error: active queue wasn't increased by 4\n"); - rc = FALSE; - } - else while (rc && (dwSignal < 12)) - { - LONG dwTarget = dwSignal +2; - InterlockedIncrement ((LONG*)&dwSignal); - - // wait for a thread to notice the change and kill itself - while (dwSignal != dwTarget) - ; - Sleep (500); // give a little time for cleanup after thread incremented - - if ((cQueueSize = Test3_CountActiveQueue()) == 0) - { - printf (" 3: unable to determine active queue size (dwSignal=%ld)\n", dwSignal); - rc = FALSE; - } - else if (cQueueSize != (cInitialQueueSize + 4 - ((dwTarget -4) /2))) - { - printf (" 3: active queue size did not diminish (dwSignal=%ld)\n", dwSignal); - rc = FALSE; - } - } - } - - printf ("--> Test3 %s\n", (rc) ? TEXT("succeeded") : TEXT("FAILED")); - return rc; -} - - -/* - * main - Runs all tests (unless the command-line says otherwise) - * - */ -int main(int argc, char **argv) -{ - DWORD iRunTest[nPASSES_MAX]; - for (size_t ii = 0; ii < nPASSES_MAX; ++ii) - iRunTest[ii] = (ii < nTESTS) ? (ii+1) : 0; - - ii = 0; - for (--argc,++argv; argc; --argc,++argv) - { - DWORD iTest; - if ( ((iTest = (size_t)atol (*argv)) > 0) && (iTest <= nTESTS) ) - { - if (ii == 0) - memset (iRunTest, 0x00, sizeof(iRunTest)); - if (ii < nPASSES_MAX) - iRunTest[ ii++ ] = iTest; - } - } - - BOOL rc = TRUE; - - for (ii = 0; ii < nPASSES_MAX; ++ii) - { - if (iRunTest[ ii ] == 0) - break; - else switch (iRunTest[ ii ]) - { - case 1: if (!Test1()) rc = FALSE; break; - case 2: if (!Test2()) rc = FALSE; break; - case 3: if (!Test3()) rc = FALSE; break; - } - } - - return rc; -} - +/* + * Copyright 2000, International Business Machines Corporation and others. + * All Rights Reserved. + * + * This software has been released under the terms of the IBM Public + * License. For details, see the LICENSE file in the top-level source + * directory or online at http://www.openafs.org/dl/license10.html + */ + +/* + * Test pthread interaction with native Win32 threads + * + */ + + +#include +#include + +#include +#include +#include + +extern "C" { +#include +#include +#include +} + + +#define nTESTS 3 +#define nPASSES_MAX 256 + + +/* + * Test1 - Tests the main thread calling pthread_self() + * + */ + +BOOL Test1 (void) +{ + BOOL rc = TRUE; + printf ("Begin Test1:\n"); + + PVOID hSelf; + if ((hSelf = pthread_self()) == NULL) + rc = FALSE; + + printf (" 1: pthread_self() on main thread returned 0x%08lX\n", hSelf); + + printf ("--> Test1 %s\n", (rc) ? TEXT("succeeded") : TEXT("FAILED")); + return rc; +} + + +/* + * Test2 - Tests a Win32 thread's ability to join onto a pthread + * + */ +#define TEST2_RETURNVALUE 'Test' + +DWORD WINAPI Test2_Thread1 (LPVOID lp) +{ + printf (" 1-1: waiting for thread 2 to begin\n"); + + while (!*(volatile DWORD*)lp) + ; + + printf (" 1-1: calling pthread_join (0x%08lX)\n", *(DWORD*)lp); + + DWORD status; + int rc; + if ((rc = pthread_join ((pthread_t)(*(DWORD*)lp), (void**)&status)) != 0) + { + printf (" 1-1: pthread_join failed; rc=%lu\n", rc); + return 0; + } + + if (status != TEST2_RETURNVALUE) + { + printf (" 1-1: pthread_join succeeded with wrong status (rc=%lu)\n", status); + return 0; + } + + printf (" 1-1: pthread_join succeeded; terminating\n"); + return 1; +} + +extern "C" void *Test2_Thread2 (void *pdwCommonParam) +{ + printf (" 1-2: signalling that thread 2 began\n"); + *(volatile DWORD*)pdwCommonParam = (DWORD)pthread_self(); + Sleep (1500); + + printf (" 1-2: terminating\n"); + return (void*)TEST2_RETURNVALUE; +} + +BOOL Test2 (void) +{ + BOOL rc = TRUE; + printf ("Begin Test2:\n"); + + DWORD dwCommonParam = 0; + DWORD idThread; + + printf (" 1: creating win32 thread\n"); + HANDLE hThread1 = CreateThread (0, 0, Test2_Thread1, (LPVOID)&dwCommonParam, 0, &idThread); + Sleep(500); + + printf (" 1: creating pthread thread\n"); + pthread_t hThread2; + pthread_create (&hThread2, NULL, Test2_Thread2, (void *)&dwCommonParam); + Sleep(500); + + printf (" 1: blocking until win32 thread (thread1) terminates...\n"); + + WaitForSingleObject (hThread1, INFINITE); + GetExitCodeThread (hThread1, (ULONG*)&rc); + + printf (" 1: detected thread1 termination\n"); + + printf ("--> Test2 %s\n", (rc) ? TEXT("succeeded") : TEXT("FAILED")); + return rc; +} + + +/* + * Test3 - Makes sure the pthread library recognizes when native threads die + * + */ + +DWORD WINAPI Test3_Thread1 (LPVOID lp) +{ + LONG *pdw = (LONG*)lp; + + // We're awake. Do something pthready. + // + pthread_t pMe; + if ((pMe = pthread_self()) == NULL) + printf (" 3-1: could not get a pthread_self!\n"); + else + printf (" 3-1: ready\n"); + + InterlockedIncrement (pdw); + + // Now wait until we see the signal to die. + // + while (*(volatile LONG*)pdw != 5) + ; + + printf (" 3-1: terminating\n"); + InterlockedIncrement (pdw); + return 1; +} + + +DWORD WINAPI Test3_Thread2 (LPVOID lp) +{ + LONG *pdw = (LONG*)lp; + + // We're awake. Do something pthready. + // + pthread_t pMe; + if ((pMe = pthread_self()) == NULL) + printf (" 3-2: could not get a pthread_self!\n"); + else + printf (" 3-2: ready\n"); + + InterlockedIncrement (pdw); + + // Now wait until we see the signal to die. + // + while (*(volatile LONG*)pdw != 7) + ; + + printf (" 3-2: terminating\n"); + InterlockedIncrement (pdw); + return 1; +} + + +extern "C" void *Test3_Thread3 (void *pdwParam) +{ + LONG *pdw = (LONG*)pdwParam; + + // We're awake. + // + printf (" 3-3: ready\n"); + InterlockedIncrement (pdw); + + // Now wait until we see the signal to die. + // + while (*(volatile LONG*)pdw != 9) + ; + + printf (" 3-3: terminating\n"); + InterlockedIncrement (pdw); + return (void*)1; +} + + +extern "C" void *Test3_Thread4 (void *pdwParam) +{ + LONG *pdw = (LONG*)pdwParam; + + // We're awake. + // + printf (" 3-4: ready\n"); + InterlockedIncrement (pdw); + + // Now wait until we see the signal to die. + // + while (*(volatile LONG*)pdw != 11) + ; + + printf (" 3-4: terminating\n"); + InterlockedIncrement (pdw); + return (void*)1; +} + + +extern "C" void *Test3_ThreadCount (void *pdwParam) +{ + volatile LONG *pdw = (LONG*)pdwParam; + + pthread_t pMe; + if ((pMe = pthread_self()) == NULL) + return (void*)0; + + try { + struct rx_queue *pNow = (rx_queue*)pMe; + + for (struct rx_queue *pWalk = pNow->next; pWalk != pNow; pWalk = pWalk->next) + ++(*pdw); + + } catch(...) { + *pdw = 0; + } + + return (void*)*pdw; +} + +size_t Test3_CountActiveQueue (void) +{ + DWORD dwArg = 0; + pthread_t pThread; + pthread_create (&pThread, NULL, Test3_ThreadCount, (void *)&dwArg); + + DWORD status; + int rc; + if ((rc = pthread_join (pThread, (void**)&status)) != 0) + { + printf (" 3: counter: pthread_join failed; rc=%lu\n", rc); + return 0; + } + + return dwArg; +} + +BOOL Test3 (void) +{ + BOOL rc = TRUE; + printf ("Begin Test3:\n"); + + // Find the size of the active queue + // + size_t cInitialQueueSize; + if ((cInitialQueueSize = Test3_CountActiveQueue()) == 0) + { + printf (" 3: unable to determine active queue size\n"); + rc = FALSE; + } + else + { + // Start two Win32 threads and two pthreads. We'll use a single, common + // parameter for each thread: dwSignal. Each thread will increment the + // signal param when it's ready for us to go; once that's done, a + // thread will kill itself and inc the signal *again* each die we + // increment the signal: + // + // starts at 0 + // thread 1 wakes up and incs signal to 1 + // thread 2 wakes up and incs signal to 2 + // thread 3 wakes up and incs signal to 3 + // thread 4 wakes up and incs signal to 4 + // we notice signal is 4, and we increment signal to 5 + // thread 1 notices signal is 5, incs to 6 and dies + // we notice signal is 6, and we increment signal to 7 + // thread 1 notices signal is 7, incs to 8 and dies + // we notice signal is 8, and we increment signal to 9 + // thread 1 notices signal is 9, incs to 10 and dies + // we notice signal is 10, and we increment signal to 11 + // thread 1 notices signal is 11, incs to 12 and dies + // we notice signal is 12 and finish our tests + // + volatile LONG dwSignal = 0; + printf (" 3: creating test threads\n"); + + DWORD idThread; + CreateThread (0, 0, Test3_Thread1, (LPVOID)&dwSignal, 0, &idThread); + Sleep (500); + + CreateThread (0, 0, Test3_Thread2, (LPVOID)&dwSignal, 0, &idThread); + Sleep (500); + + pthread_attr_t attr; + attr.is_joinable = PTHREAD_CREATE_DETACHED; + + pthread_t hThread; + pthread_create (&hThread, &attr, Test3_Thread3, (void *)&dwSignal); + Sleep (500); + + pthread_create (&hThread, &attr, Test3_Thread4, (void *)&dwSignal); + Sleep (500); + + // Count the active queue again as soon as we're sure all the threads + // are ready for us to do so. + // + while (dwSignal != 4) + ; + + size_t cQueueSize; + if ((cQueueSize = Test3_CountActiveQueue()) == 0) + { + printf (" 3: unable to determine active queue size\n"); + rc = FALSE; + } + else if (cQueueSize != cInitialQueueSize+4) + { + printf (" 3: error: active queue wasn't increased by 4\n"); + rc = FALSE; + } + else while (rc && (dwSignal < 12)) + { + LONG dwTarget = dwSignal +2; + InterlockedIncrement ((LONG*)&dwSignal); + + // wait for a thread to notice the change and kill itself + while (dwSignal != dwTarget) + ; + Sleep (500); // give a little time for cleanup after thread incremented + + if ((cQueueSize = Test3_CountActiveQueue()) == 0) + { + printf (" 3: unable to determine active queue size (dwSignal=%ld)\n", dwSignal); + rc = FALSE; + } + else if (cQueueSize != (cInitialQueueSize + 4 - ((dwTarget -4) /2))) + { + printf (" 3: active queue size did not diminish (dwSignal=%ld)\n", dwSignal); + rc = FALSE; + } + } + } + + printf ("--> Test3 %s\n", (rc) ? TEXT("succeeded") : TEXT("FAILED")); + return rc; +} + + +/* + * main - Runs all tests (unless the command-line says otherwise) + * + */ +int main(int argc, char **argv) +{ + DWORD iRunTest[nPASSES_MAX]; + for (size_t ii = 0; ii < nPASSES_MAX; ++ii) + iRunTest[ii] = (ii < nTESTS) ? (ii+1) : 0; + + ii = 0; + for (--argc,++argv; argc; --argc,++argv) + { + DWORD iTest; + if ( ((iTest = (size_t)atol (*argv)) > 0) && (iTest <= nTESTS) ) + { + if (ii == 0) + memset (iRunTest, 0x00, sizeof(iRunTest)); + if (ii < nPASSES_MAX) + iRunTest[ ii++ ] = iTest; + } + } + + BOOL rc = TRUE; + + for (ii = 0; ii < nPASSES_MAX; ++ii) + { + if (iRunTest[ ii ] == 0) + break; + else switch (iRunTest[ ii ]) + { + case 1: if (!Test1()) rc = FALSE; break; + case 2: if (!Test2()) rc = FALSE; break; + case 3: if (!Test3()) rc = FALSE; break; + } + } + + return rc; +} + diff --git a/src/WINNT/talocale/NTMakefile b/src/WINNT/talocale/NTMakefile index 54aa81b23..2e08cc9c9 100644 --- a/src/WINNT/talocale/NTMakefile +++ b/src/WINNT/talocale/NTMakefile @@ -10,7 +10,7 @@ AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -WX # include the primary makefile - +RELDIR=WINNT\talocale !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) ############################################################################ @@ -18,10 +18,10 @@ AFSDEV_AUXCDEFINES = $(AFSDEV_AUXCDEFINES) -WX INCFILEDIR = $(DESTDIR)\include\WINNT LIBOBJS = \ - $(OJT)\tal_alloc.obj \ - $(OJT)\tal_main.obj \ - $(OJT)\tal_string.obj \ - $(OJT)\tal_dialog.obj + $(OUT)\tal_alloc.obj \ + $(OUT)\tal_main.obj \ + $(OUT)\tal_string.obj \ + $(OUT)\tal_dialog.obj LIBINCLUDES = \ $(INCFILEDIR)\talocale.h \ diff --git a/src/WINNT/win9xpanel/NTMakefile b/src/WINNT/win9xpanel/NTMakefile index 754ace6e1..a34b3e9ce 100644 --- a/src/WINNT/win9xpanel/NTMakefile +++ b/src/WINNT/win9xpanel/NTMakefile @@ -11,6 +11,7 @@ #AFSD_INC_SDK9X = /I $(HOMEDRIVE)\tol\sdk95\Include #AFSD_INC_MFC9X = /I $(HOMEDRIVE)\PROGRA~1\MICROS~2\VC98\INCLUDE /I $(HOMEDRIVE)\PROGRA~1\MICROS~2\VC98\MFC\INCLUDE /I $(HOMEDRIVE)\PROGRA~1\MICROS~2\VC98\ATL\INCLUDE +RELDIR=WINNT\win9xpanel !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) OUTDIR = $(DESTDIR)\WinInstall OUTDIRHLP = $(OUTDIR) @@ -53,12 +54,12 @@ prep : !IF "$(AFSDEV_BUILDTYPE)" == "FREE" -INTDIR=$(OJT)\ +INTDIR=$(OUT)\ HLP=hcrtf.exe HLP_PROJ = /x # Begin Custom Macros # End Custom Macros - + INSTALL : prep "$(OUTDIR)\WinAfsLoad.exe" "$(OUTDIRHLP)\afswin9x.HLP" "$(OUTDIR)\afswin9x.CNT" CLEAN :: @@ -74,7 +75,7 @@ CLEAN :: CPP_PROJ=/nologo /MD /W3 /GX /O2 \ $(CPP_INCLUDE) /P \ /I "$(DESTDIR)\include\\" /I "$(DESTDIR)\include\rx" /I "$(DESTDIR)\include\afs" \ - /D "NDEBUG" /D "_MFC" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_WINNT" /D "_AFXDLL" /D "ENCRIPT" /Fo"$(OJT)\\\" /Fd"$(INTDIR)\\" /FD /c + /D "NDEBUG" /D "_MFC" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_WINNT" /D "_AFXDLL" /D "ENCRIPT" /Fo"$(OUT)\\\" /Fd"$(INTDIR)\\" /FD /c MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 RSC_PROJ=/l 0x409 /fo"$(INTDIR)\WinAfsLoad.res" $(AFSD_INC_MFC) /d "AFSPRODUCT_VERSION=\"$(AFSPRODUCT_VERSION)\"" /d "NDEBUG" /d "_AFXDLL" @@ -112,7 +113,7 @@ LINK32_OBJS= \ !ELSEIF "$(AFSDEV_BUILDTYPE)" == "CHECKED" -INTDIR=$(OJT)\ +INTDIR=$(OUT)\ HLP=hcrtf.exe HLP_PROJ = /x # Begin Custom Macros @@ -186,7 +187,7 @@ $(DS_POSTBUILD_DEP) : "$(OUTDIR)\WinAfsLoad.exe" !ENDIF -.c.${$(OJT)\}obj:: +.c.${$(OUT)\}obj:: $(CPP) @<< $(CPP_PROJ) $< << @@ -196,17 +197,17 @@ $(DS_POSTBUILD_DEP) : "$(OUTDIR)\WinAfsLoad.exe" $(CPP_PROJ) $< << -.c.$(OJT)\sbr:: +.c.$(OUT)\sbr:: $(CPP) @<< $(CPP_PROJ) $< << -.cpp$.$(OJT)\sbr:: +.cpp$.$(OUT)\sbr:: $(CPP) @<< $(CPP_PROJ) $< << -.cxx.$(OJT)\sbr:: +.cxx.$(OUT)\sbr:: $(CPP) @<< $(CPP_PROJ) $< << diff --git a/src/afs/NTMakefile b/src/afs/NTMakefile index e998a8fd0..281707459 100644 --- a/src/afs/NTMakefile +++ b/src/afs/NTMakefile @@ -5,6 +5,8 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +!MESSAGE Processing afs\NTMakefile +RELDIR=afs !INCLUDE ..\config\NTMakefile.$(SYS_NAME) ################################################ @@ -15,5 +17,5 @@ $(DESTDIR)\include\afs\unified_afs.c $(DESTDIR)\include\afs\unified_afs.h: uni $(COMPILE_ET) unified_afs -h unified_afs $(COPY) unified_afs.h $(DESTDIR)\include\afs -install: $(DESTDIR)\include\afs\unified_afs.c +install: $(DESTDIR)\include\afs\unified_afs.c diff --git a/src/afsweb/afswsNetscape_config.sh b/src/afsweb/afswsNetscape_config.sh index 5f7b3348b..7f8fff725 100755 --- a/src/afsweb/afswsNetscape_config.sh +++ b/src/afsweb/afswsNetscape_config.sh @@ -1,406 +1,397 @@ -#!/bin/sh -# $Header$ -# -# Installation and Configuration script for AFS Web Security Pack -# -# History: -# -# 19-Mar-1998 Created. (wvh@transarc.com) -# -# 06-May-1998 Added tar file stuff and tweaked to add CellServDb -# edits, etc. -# -# The suggested procedure would be to install everything from the CD -# (maybe using tar?), and then run the this script. -# -# Suggested final installation heirarchy would look like: -# -# /usr//etc - conf files for AFSWebSecure -# /usr//lib - location of shared library -# /usr//cache - real cache or symlink elsewhere -# /usr//log - log files -# -########################################################################## -# -# Actual install script begins here. -# -########################################################################## - -PRODUCT="AFS Web Security Pack" - -# -# Handle various types of failures -# -trap 'echo "" ; \ - echo "$PRODUCT Installation cancelled." ; \ - echo "" ; \ - exit 1' 1 2 3 6 9 12 13 15 16 17 24 25 29 - -rm -f /tmp/newconf - -# -# Figure out what OS we're running on so that we try to -# exec the right binaries in the script. (The uname -# binary lives in the same place on AIX and SunOS -# (Solaris) systems, else we'd have to conditionalize -# that, too.) -# -OSTYPE=`/usr/bin/uname | sed -e 's;\([a-zA-Z]*\).*;\1;'` - -if [ x$OSTYPE = "xSunOS" ] ; then - HOSTNAME=/usr/ucb/hostname - NSLOOKUP=/usr/sbin/nslookup - EX=/usr/ucb/ex - ECHO=/bin/echo - ECHOFLAG="\c" - AFSWSLIB=nsafs.so -elif [ x$OSTYPE = "xAIX" ] ; then - HOSTNAME=/usr/bin/hostname - NSLOOKUP=/usr/bin/nslookup - EX=/usr/bin/ex - ECHO=echo - ECHOFLAG="" - AFSWSLIB=nsafs.a -else - $ECHO " ERROR: unsupported OSTYPE \"$OSTYPE\" returned by /usr/bin/uname." - exit 1 -fi - -# -# Check for the existence of the file to install from, and exit -# if not in pwd. -# - if [ ! -f ns_afswebsecure.tar ] ; then - $ECHO " File ns_afswebsecure.tar not found in working directory." - $ECHO "" - exit 1 - fi -# -# Find out where the server is installed -# - $ECHO "Enter the directory where the Web server's bin directory is located [/usr/netscape/suitespot]: " $ECHOFLAG - read ws_srvdir - if [ x$ws_srvdir = "x" ] ; then - ws_srvdir="/usr/netscape/suitespot" - fi - - $ECHO "" -# -# Find out the name of the Web server. Sets three variables for -# the hostname: lhn, which is the full host name; shn, which is -# the short (non-domain) host name; and dhn, which is the domain -# name. This uses nslookup, since we can't depend on the host -# actually being in /etc/hosts due to DNS and YP. -# - tmp=`$HOSTNAME` - lhn=`$NSLOOKUP $tmp | grep Name: | sed -e 's;Name:[ ]*;;'` - shn=`echo $lhn | sed -e 's;\([-_a-zA-Z0-9]*\).*;\1;'` - dhn=`echo $lhn | sed -e "s;$shn\.;;"` - -# echo "" -# echo "Long host name is $lhn." -# echo "Short host name is $shn." -# echo "Domain name is $dhn." -# echo "" - - $ECHO "Enter the Web server to use to access AFS data [$shn]: " $ECHOFLAG - read ws_wsname - case $ws_wsname in - '') ;; - *) shn=$ws_wsname;; - esac - - ws_conf=$ws_srvdir"/https-"$shn"/config/obj.conf" - - if [ ! -f $ws_conf ] ; then - $ECHO " ERROR: server config file \"$ws_conf\" not found." - exit 1 - else - $ECHO "" - fi -# -# Make sure we can actually modify the obj.conf file -# - - touch $ws_conf 1> /dev/null 2> /dev/null - if [ $? != 0 ] ; then - $ECHO " ERROR: No write permission to configuration file $ws_conf." - exit 1 - fi - -# -# Check if AFS WebSecure is already installed -# - grep nsafs $ws_conf 1> /dev/null 2> /dev/null - if [ $? = 0 ] ; then - $ECHO " ERROR: $PRODUCT entries already exist in $ws_conf." - exit 1 - fi - -# -# Find out where the AFSWebSecure stuff should be installed. -# - - $ECHO "Enter the $PRODUCT installation directory [/usr/afsweb]: " $ECHOFLAG - read ws_wsdir - if [ x$ws_wsdir = "x" ] ; then - ws_wsdir="/usr/afsweb" - fi - -# -# Install WebSecure from tar file in same directory from which the -# ws_config script was started. The convoluted directory creation -# loop lets people install in a directory tree that doesn't exist -# yet, which would not typically be the case, but... -# - if [ ! -d $ws_wsdir ] ; then - base="" - root="" - target=$ws_wsdir - while [ x$target != "x" ] ; do - base=`echo $target | sed -e 's;\(/[^/]*\)[-/a-zA-Z0-9_]*;\1;'` - target=`echo $target | sed -e 's;\(/[^/]*\)\([-/a-zA-Z0-9_]*\);\2;'` - if [ ! -d $root$base ] ; then - echo "Creating $root$base" - mkdir $root$base 1> /dev/null 2> /dev/null - if [ $? != 0 ] ; then - $ECHO "ERROR: Could not create $ws_wsdir. Check permissions and retry." - exit 1 - fi - fi - root=$root$base - done - fi - - $ECHO "" - wd=`pwd` - cd $ws_wsdir - tar xvf $wd"/ns_afswebsecure.tar" - -# -# Use this as a check that everything went OK. -# - if [ ! -f $ws_wsdir"/lib/${AFSWSLIB}" ] ; then - $ECHO " ERROR: $PRODUCT shared library \"$ws_wsdir/lib/${AFSWSLIB}\" not found." - exit 1 - else - $ECHO "" - fi - -# -# Ensure that the cache dir and log files are owned by the user -# specified in magnus.conf that this server runs as -# - ws_mconf=$ws_srvdir/https-$shn/config/magnus.conf - - if [ ! -f $ws_mconf ] ; then - $ECHO " ERROR: server config file \"$ws_mconf\" not found." - exit 1 - else - $ECHO "" - fi - - username=`grep -i User $ws_mconf | awk '{ print $2 }'` - chown $username $ws_wsdir/cache $ws_wsdir/log - -# -# Enter the size of the AFS cache in 1K blocks -# - - $ECHO "Enter the size of the $PRODUCT cache in 1K blocks [5000]: " $ECHOFLAG - read ws_csize - if [ x$ws_csize = "x" ] ; then - ws_csize="5000" - fi - $ECHO "" - - expr $ws_csize + 1 1> /dev/null 2> /dev/null - if [ $? != 0 ] ; then - $ECHO " ERROR: Cache size must be numeric. You entered \"$ws_csize\"." - exit 1 - fi - -# -# Set default value for advanced options - number of files in the cache -# and number of receiving threads. -# - ws_cfiles=`expr $ws_csize / 10` - ws_numt="2" - -# -# Enter the number of AFS daemon processes -# - - $ECHO "Enter the number of AFS daemons to run [3]: " $ECHOFLAG - read ws_numd - if [ x$ws_numd = "x" ] ; then - ws_numd="3" - fi - $ECHO "" - - expr $ws_numd + 1 1> /dev/null 2> /dev/null - if [ $? != 0 ] ; then - $ECHO " ERROR: The number of AFS daemons must be numeric. You entered \"$ws_numd\"." - exit 1 - fi - -# -# Enter the number of entries in the AFS Stat cache -# Default is the number of files in the cache. -# - - $ECHO "Enter the number of entries in the AFS stat cache [$ws_cfiles]: " $ECHOFLAG - read ws_nums - if [ x$ws_nums = "x" ] ; then - ws_nums=$ws_cfiles - fi - $ECHO "" - - expr $ws_nums + 1 1> /dev/null 2> /dev/null - if [ $? != 0 ] ; then - $ECHO " ERROR: The number of entries in the stat cache must be numeric. You entered \"$ws_nums\"." - exit 1 - fi - -# -# Find out which cells $PRODUCT should work with -# - - $ECHO "Enter the AFS cell to access using $PRODUCT [$dhn]: " $ECHOFLAG - read ws_cell - if [ x$ws_cell = "x" ] ; then - ws_cell=$dhn - fi - -# -# Create appropriate ThisCell file -# - echo $ws_cell > $ws_wsdir"/etc/ThisCell" - -# -# If necessary, add entries to generic cellServDB file -# - grep $ws_cell $ws_wsdir"/etc/CellServDB" 1> /dev/null 2> /dev/null - if [ $? != 0 ] ; then - $ECHO " Cell $ws_cell not found in default CellServDB file." - $ECHO "" - $ECHO "Enter a one-line text description for this cell: " $ECHOFLAG - read exp - $ECHO ">$ws_cell # $exp" >> $ws_wsdir"/etc/CellServDB" - $ECHO "" - $ECHO "Enter the IP address of a database server for this cell ('.' to exit): " $ECHOFLAG - read ws_dbsrv - while [ x$ws_dbsrv != "x." ] ; do - ws_dbname=`grep $ws_dbsrv /etc/hosts | sed -e 's;[0-9\.]*[ ]*\([a-z\.A-Z0-9]*\).*;\1;'` - if [ x$ws_dbname = "x" ] ; then - ws_dbname="Unknown" - fi - $ECHO " Appending $ws_dbname, IP address $ws_dbsrv." - $ECHO "$ws_dbsrv #$ws_dbname" >> $ws_wsdir"/etc/CellServDB" - $ECHO "Enter the IP address of a database server for this cell ('.' to exit): " $ECHOFLAG - read ws_dbsrv - done - else - $ECHO " Found cell $ws_cell in $ws_wsdir/etc/CellServDB." - fi - - $ECHO "" -# -# -# "Advanced" configuration items - optional. These are: -# -# - number of RX threads -# - number of files in the AFS WebSecure cache -# -# -# $ECHO "Do you want to configure advanced options? (y/n): " $ECHOFLAG -# read ans -# let=`echo $ans | sed -e 's;\(.\).*;\1;' | tr [A-Z] [a-z]` -# $ECHO "" -# if [ x$let = "xy" ] ; then -# -# -# Enter the number of files in the AFS cache - default is ws_csize/10 -# -# -# $ECHO "Enter the number of files in the Websecure cache [$ws_cfiles]: " $ECHOFLAG -# read ws_cfiles -# if [ x$ws_cfiles = "x" ] ; then -# ws_cfiles=`expr $ws_csize / 10` -# fi -# $ECHO "" -# -# expr $ws_cfiles + 1 1> /dev/null 2> /dev/null -# if [ $? != 0 ] ; then -# $ECHO " ERROR: Number of cache files must be numeric. You entered \"$ws_cfiles\"." -# exit 1 -# fi -# -# -# Enter the number of threads to process RX packets -# -# -# $ECHO "Enter the number of threads to process RX requests [2]: " $ECHOFLAG -# read ws_numt -# if [ x$ws_numt = "x" ] ; then -# ws_numt="2" -# fi -# $ECHO "" -# -# expr $ws_numt + 1 1> /dev/null 2> /dev/null -# if [ $? != 0 ] ; then -# $ECHO " ERROR: The number of RX threads must be numeric. You entered \"$ws_numt\"." -# exit 1 -# fi -# -# fi -# -# -# Now that we have all the info we need, time to actually edit the obj.conf file -# -# Back up the old one if no previous backup exists -# -if [ -f $ws_conf".pre_ws" ] ; then - $ECHO "NOTE: Backup file \"$ws_conf.pre_ws\" already exists." - $ECHO " Not backing up current obj.conf file." -else - cp $ws_conf $ws_conf".pre_ws" - $ECHO " Creating backup copy of obj.conf file..." -fi - -$EX $ws_conf << END_OF_FILE 1> /dev/null -1 -/mime-types -a -Init fn="load-modules" shlib="$ws_wsdir/lib/${AFSWSLIB}" funcs="nsafs-init,nsafs-basic,nsafs-mount,nsafs-public,nsafs-nolinks,nsafs-check,nsafs-nocheck,nsafs-find-index,nsafs-send,nsafs-force-type,nsafs-put,nsafs-delete,nsafs-move,nsafs-index,nsafs-mkdir,nsafs-rmdir" -Init fn="nsafs-init" cell="$ws_cell" blocks="$ws_csize" files="$ws_cfiles" stat="$ws_nums" daemons="$ws_numd" cachedir="$ws_wsdir/cache" confdir="$ws_wsdir/etc" logfile="$ws_wsdir/log/nsafs.log" exp-max="120" timeout="30" rcvthreads="$ws_numt" -. -/default -a -AuthTrans fn="nsafs-basic" -NameTrans fn="nsafs-mount" mount="/afs" -PathCheck fn="nsafs-public" public="/afs" -PathCheck fn="nsafs-nolinks" nolinks="/afs/$ws_cell/usr" -. -/Service -i -Service method="(GET|HEAD)" fn="nsafs-send" index="fancy" -. -w! /tmp/newconf -q -END_OF_FILE - -cp /tmp/newconf $ws_conf - -$ECHO "" - -$ECHO " Installation of $PRODUCT complete." - - - - - - - - - +#!/bin/sh +# $Header$ +# +# Installation and Configuration script for AFS Web Security Pack +# +# History: +# +# 19-Mar-1998 Created. (wvh@transarc.com) +# +# 06-May-1998 Added tar file stuff and tweaked to add CellServDb +# edits, etc. +# +# The suggested procedure would be to install everything from the CD +# (maybe using tar?), and then run the this script. +# +# Suggested final installation heirarchy would look like: +# +# /usr//etc - conf files for AFSWebSecure +# /usr//lib - location of shared library +# /usr//cache - real cache or symlink elsewhere +# /usr//log - log files +# +########################################################################## +# +# Actual install script begins here. +# +########################################################################## + +PRODUCT="AFS Web Security Pack" + +# +# Handle various types of failures +# +trap 'echo "" ; \ + echo "$PRODUCT Installation cancelled." ; \ + echo "" ; \ + exit 1' 1 2 3 6 9 12 13 15 16 17 24 25 29 + +rm -f /tmp/newconf + +# +# Figure out what OS we're running on so that we try to +# exec the right binaries in the script. (The uname +# binary lives in the same place on AIX and SunOS +# (Solaris) systems, else we'd have to conditionalize +# that, too.) +# +OSTYPE=`/usr/bin/uname | sed -e 's;\([a-zA-Z]*\).*;\1;'` + +if [ x$OSTYPE = "xSunOS" ] ; then + HOSTNAME=/usr/ucb/hostname + NSLOOKUP=/usr/sbin/nslookup + EX=/usr/ucb/ex + ECHO=/bin/echo + ECHOFLAG="\c" + AFSWSLIB=nsafs.so +elif [ x$OSTYPE = "xAIX" ] ; then + HOSTNAME=/usr/bin/hostname + NSLOOKUP=/usr/bin/nslookup + EX=/usr/bin/ex + ECHO=echo + ECHOFLAG="" + AFSWSLIB=nsafs.a +else + $ECHO " ERROR: unsupported OSTYPE \"$OSTYPE\" returned by /usr/bin/uname." + exit 1 +fi + +# +# Check for the existence of the file to install from, and exit +# if not in pwd. +# + if [ ! -f ns_afswebsecure.tar ] ; then + $ECHO " File ns_afswebsecure.tar not found in working directory." + $ECHO "" + exit 1 + fi +# +# Find out where the server is installed +# + $ECHO "Enter the directory where the Web server's bin directory is located [/usr/netscape/suitespot]: " $ECHOFLAG + read ws_srvdir + if [ x$ws_srvdir = "x" ] ; then + ws_srvdir="/usr/netscape/suitespot" + fi + + $ECHO "" +# +# Find out the name of the Web server. Sets three variables for +# the hostname: lhn, which is the full host name; shn, which is +# the short (non-domain) host name; and dhn, which is the domain +# name. This uses nslookup, since we can't depend on the host +# actually being in /etc/hosts due to DNS and YP. +# + tmp=`$HOSTNAME` + lhn=`$NSLOOKUP $tmp | grep Name: | sed -e 's;Name:[ ]*;;'` + shn=`echo $lhn | sed -e 's;\([-_a-zA-Z0-9]*\).*;\1;'` + dhn=`echo $lhn | sed -e "s;$shn\.;;"` + +# echo "" +# echo "Long host name is $lhn." +# echo "Short host name is $shn." +# echo "Domain name is $dhn." +# echo "" + + $ECHO "Enter the Web server to use to access AFS data [$shn]: " $ECHOFLAG + read ws_wsname + case $ws_wsname in + '') ;; + *) shn=$ws_wsname;; + esac + + ws_conf=$ws_srvdir"/https-"$shn"/config/obj.conf" + + if [ ! -f $ws_conf ] ; then + $ECHO " ERROR: server config file \"$ws_conf\" not found." + exit 1 + else + $ECHO "" + fi +# +# Make sure we can actually modify the obj.conf file +# + + touch $ws_conf 1> /dev/null 2> /dev/null + if [ $? != 0 ] ; then + $ECHO " ERROR: No write permission to configuration file $ws_conf." + exit 1 + fi + +# +# Check if AFS WebSecure is already installed +# + grep nsafs $ws_conf 1> /dev/null 2> /dev/null + if [ $? = 0 ] ; then + $ECHO " ERROR: $PRODUCT entries already exist in $ws_conf." + exit 1 + fi + +# +# Find out where the AFSWebSecure stuff should be installed. +# + + $ECHO "Enter the $PRODUCT installation directory [/usr/afsweb]: " $ECHOFLAG + read ws_wsdir + if [ x$ws_wsdir = "x" ] ; then + ws_wsdir="/usr/afsweb" + fi + +# +# Install WebSecure from tar file in same directory from which the +# ws_config script was started. The convoluted directory creation +# loop lets people install in a directory tree that doesn't exist +# yet, which would not typically be the case, but... +# + if [ ! -d $ws_wsdir ] ; then + base="" + root="" + target=$ws_wsdir + while [ x$target != "x" ] ; do + base=`echo $target | sed -e 's;\(/[^/]*\)[-/a-zA-Z0-9_]*;\1;'` + target=`echo $target | sed -e 's;\(/[^/]*\)\([-/a-zA-Z0-9_]*\);\2;'` + if [ ! -d $root$base ] ; then + echo "Creating $root$base" + mkdir $root$base 1> /dev/null 2> /dev/null + if [ $? != 0 ] ; then + $ECHO "ERROR: Could not create $ws_wsdir. Check permissions and retry." + exit 1 + fi + fi + root=$root$base + done + fi + + $ECHO "" + wd=`pwd` + cd $ws_wsdir + tar xvf $wd"/ns_afswebsecure.tar" + +# +# Use this as a check that everything went OK. +# + if [ ! -f $ws_wsdir"/lib/${AFSWSLIB}" ] ; then + $ECHO " ERROR: $PRODUCT shared library \"$ws_wsdir/lib/${AFSWSLIB}\" not found." + exit 1 + else + $ECHO "" + fi + +# +# Ensure that the cache dir and log files are owned by the user +# specified in magnus.conf that this server runs as +# + ws_mconf=$ws_srvdir/https-$shn/config/magnus.conf + + if [ ! -f $ws_mconf ] ; then + $ECHO " ERROR: server config file \"$ws_mconf\" not found." + exit 1 + else + $ECHO "" + fi + + username=`grep -i User $ws_mconf | awk '{ print $2 }'` + chown $username $ws_wsdir/cache $ws_wsdir/log + +# +# Enter the size of the AFS cache in 1K blocks +# + + $ECHO "Enter the size of the $PRODUCT cache in 1K blocks [5000]: " $ECHOFLAG + read ws_csize + if [ x$ws_csize = "x" ] ; then + ws_csize="5000" + fi + $ECHO "" + + expr $ws_csize + 1 1> /dev/null 2> /dev/null + if [ $? != 0 ] ; then + $ECHO " ERROR: Cache size must be numeric. You entered \"$ws_csize\"." + exit 1 + fi + +# +# Set default value for advanced options - number of files in the cache +# and number of receiving threads. +# + ws_cfiles=`expr $ws_csize / 10` + ws_numt="2" + +# +# Enter the number of AFS daemon processes +# + + $ECHO "Enter the number of AFS daemons to run [3]: " $ECHOFLAG + read ws_numd + if [ x$ws_numd = "x" ] ; then + ws_numd="3" + fi + $ECHO "" + + expr $ws_numd + 1 1> /dev/null 2> /dev/null + if [ $? != 0 ] ; then + $ECHO " ERROR: The number of AFS daemons must be numeric. You entered \"$ws_numd\"." + exit 1 + fi + +# +# Enter the number of entries in the AFS Stat cache +# Default is the number of files in the cache. +# + + $ECHO "Enter the number of entries in the AFS stat cache [$ws_cfiles]: " $ECHOFLAG + read ws_nums + if [ x$ws_nums = "x" ] ; then + ws_nums=$ws_cfiles + fi + $ECHO "" + + expr $ws_nums + 1 1> /dev/null 2> /dev/null + if [ $? != 0 ] ; then + $ECHO " ERROR: The number of entries in the stat cache must be numeric. You entered \"$ws_nums\"." + exit 1 + fi + +# +# Find out which cells $PRODUCT should work with +# + + $ECHO "Enter the AFS cell to access using $PRODUCT [$dhn]: " $ECHOFLAG + read ws_cell + if [ x$ws_cell = "x" ] ; then + ws_cell=$dhn + fi + +# +# Create appropriate ThisCell file +# + echo $ws_cell > $ws_wsdir"/etc/ThisCell" + +# +# If necessary, add entries to generic cellServDB file +# + grep $ws_cell $ws_wsdir"/etc/CellServDB" 1> /dev/null 2> /dev/null + if [ $? != 0 ] ; then + $ECHO " Cell $ws_cell not found in default CellServDB file." + $ECHO "" + $ECHO "Enter a one-line text description for this cell: " $ECHOFLAG + read exp + $ECHO ">$ws_cell # $exp" >> $ws_wsdir"/etc/CellServDB" + $ECHO "" + $ECHO "Enter the IP address of a database server for this cell ('.' to exit): " $ECHOFLAG + read ws_dbsrv + while [ x$ws_dbsrv != "x." ] ; do + ws_dbname=`grep $ws_dbsrv /etc/hosts | sed -e 's;[0-9\.]*[ ]*\([a-z\.A-Z0-9]*\).*;\1;'` + if [ x$ws_dbname = "x" ] ; then + ws_dbname="Unknown" + fi + $ECHO " Appending $ws_dbname, IP address $ws_dbsrv." + $ECHO "$ws_dbsrv #$ws_dbname" >> $ws_wsdir"/etc/CellServDB" + $ECHO "Enter the IP address of a database server for this cell ('.' to exit): " $ECHOFLAG + read ws_dbsrv + done + else + $ECHO " Found cell $ws_cell in $ws_wsdir/etc/CellServDB." + fi + + $ECHO "" +# +# +# "Advanced" configuration items - optional. These are: +# +# - number of RX threads +# - number of files in the AFS WebSecure cache +# +# +# $ECHO "Do you want to configure advanced options? (y/n): " $ECHOFLAG +# read ans +# let=`echo $ans | sed -e 's;\(.\).*;\1;' | tr [A-Z] [a-z]` +# $ECHO "" +# if [ x$let = "xy" ] ; then +# +# +# Enter the number of files in the AFS cache - default is ws_csize/10 +# +# +# $ECHO "Enter the number of files in the Websecure cache [$ws_cfiles]: " $ECHOFLAG +# read ws_cfiles +# if [ x$ws_cfiles = "x" ] ; then +# ws_cfiles=`expr $ws_csize / 10` +# fi +# $ECHO "" +# +# expr $ws_cfiles + 1 1> /dev/null 2> /dev/null +# if [ $? != 0 ] ; then +# $ECHO " ERROR: Number of cache files must be numeric. You entered \"$ws_cfiles\"." +# exit 1 +# fi +# +# +# Enter the number of threads to process RX packets +# +# +# $ECHO "Enter the number of threads to process RX requests [2]: " $ECHOFLAG +# read ws_numt +# if [ x$ws_numt = "x" ] ; then +# ws_numt="2" +# fi +# $ECHO "" +# +# expr $ws_numt + 1 1> /dev/null 2> /dev/null +# if [ $? != 0 ] ; then +# $ECHO " ERROR: The number of RX threads must be numeric. You entered \"$ws_numt\"." +# exit 1 +# fi +# +# fi +# +# +# Now that we have all the info we need, time to actually edit the obj.conf file +# +# Back up the old one if no previous backup exists +# +if [ -f $ws_conf".pre_ws" ] ; then + $ECHO "NOTE: Backup file \"$ws_conf.pre_ws\" already exists." + $ECHO " Not backing up current obj.conf file." +else + cp $ws_conf $ws_conf".pre_ws" + $ECHO " Creating backup copy of obj.conf file..." +fi + +$EX $ws_conf << END_OF_FILE 1> /dev/null +1 +/mime-types +a +Init fn="load-modules" shlib="$ws_wsdir/lib/${AFSWSLIB}" funcs="nsafs-init,nsafs-basic,nsafs-mount,nsafs-public,nsafs-nolinks,nsafs-check,nsafs-nocheck,nsafs-find-index,nsafs-send,nsafs-force-type,nsafs-put,nsafs-delete,nsafs-move,nsafs-index,nsafs-mkdir,nsafs-rmdir" +Init fn="nsafs-init" cell="$ws_cell" blocks="$ws_csize" files="$ws_cfiles" stat="$ws_nums" daemons="$ws_numd" cachedir="$ws_wsdir/cache" confdir="$ws_wsdir/etc" logfile="$ws_wsdir/log/nsafs.log" exp-max="120" timeout="30" rcvthreads="$ws_numt" +. +/default +a +AuthTrans fn="nsafs-basic" +NameTrans fn="nsafs-mount" mount="/afs" +PathCheck fn="nsafs-public" public="/afs" +PathCheck fn="nsafs-nolinks" nolinks="/afs/$ws_cell/usr" +. +/Service +i +Service method="(GET|HEAD)" fn="nsafs-send" index="fancy" +. +w! /tmp/newconf +q +END_OF_FILE + +cp /tmp/newconf $ws_conf + +$ECHO "" + +$ECHO " Installation of $PRODUCT complete." diff --git a/src/audit/NTMakefile b/src/audit/NTMakefile index e5117a47c..9855cfc2e 100644 --- a/src/audit/NTMakefile +++ b/src/audit/NTMakefile @@ -6,10 +6,10 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=audit !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version - INCFILEDIR = $(DESTDIR)\include\afs INCFILES =\ @@ -20,7 +20,7 @@ INCFILES =\ LIBFILE = $(DESTDIR)\lib\afs\afsaudit.lib LIBOBJS =\ - $(OJT)\audit.obj + $(OUT)\audit.obj $(LIBFILE): $(LIBOBJS) $(LIBARCH) diff --git a/src/auth/NTMakefile b/src/auth/NTMakefile index 437b7b75d..0a3d3a00f 100644 --- a/src/auth/NTMakefile +++ b/src/auth/NTMakefile @@ -5,10 +5,10 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=auth !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version - INCFILEDIR = $(DESTDIR)\include\afs # header file install directory INCFILES =\ @@ -25,17 +25,17 @@ AFSAUTH_LIBFILE = $(DESTDIR)\lib\afs\afsauth.lib AFSD = ..\WINNT\afsd AFSAUTH_LIBOBJS =\ - $(OJT)\cellconfig.obj \ - $(OJT)\userok.obj \ - $(OJT)\writeconfig.obj \ - $(OJT)\authcon.obj \ - $(OJT)\acfg_errors.obj \ - $(OJT)\ktc_errors.obj \ - $(OJT)\ktc_nt.obj \ - $(OJT)\AFS_component_version_number.obj + $(OUT)\cellconfig.obj \ + $(OUT)\userok.obj \ + $(OUT)\writeconfig.obj \ + $(OUT)\authcon.obj \ + $(OUT)\acfg_errors.obj \ + $(OUT)\ktc_errors.obj \ + $(OUT)\ktc_nt.obj \ + $(OUT)\AFS_component_version_number.obj AFSDOBJS =\ - $(OJT)\$(AFSD)\afsrpc_c.obj + $(OUT)\$(AFSD)\afsrpc_c.obj $(AFSDOBJS): $(AFSD)\$$(@B).c $(C2OBJ) -I$*(*D) $** @@ -49,14 +49,14 @@ $(AFSAUTH_LIBFILE): $(AFSAUTH_LIBOBJS) $(AFSDOBJS) AFSAUTH_KRB_LIBFILE = $(DESTDIR)\lib\afs\afsauth.krb.lib AFSAUTH_KRB_LIBOBJS =\ - $(OJT)\cellconfig.obj \ - $(OJT)\userok.obj \ - $(OJT)\writeconfig.obj \ - $(OJT)\authcon.obj \ - $(OJT)\acfg_errors.obj \ - $(OJT)\ktc_errors.obj \ - $(OJT)\ktc_nt.obj \ - $(OJT)\AFS_component_version_number.obj + $(OUT)\cellconfig.obj \ + $(OUT)\userok.obj \ + $(OUT)\writeconfig.obj \ + $(OUT)\authcon.obj \ + $(OUT)\acfg_errors.obj \ + $(OUT)\ktc_errors.obj \ + $(OUT)\ktc_nt.obj \ + $(OUT)\AFS_component_version_number.obj $(AFSAUTH_KRB_LIBFILE): $(AFSAUTH_KRB_LIBOBJS) $(LIBARCH) rpcrt4.lib @@ -64,23 +64,23 @@ $(AFSAUTH_KRB_LIBFILE): $(AFSAUTH_KRB_LIBOBJS) ############################################################################ # build setkey -SETKEY_EXEFILE = $(OJT)\setkey.exe +SETKEY_EXEFILE = $(OUT)\setkey.exe SETKEY_EXEOBJS =\ - $(OJT)\setkey.obj + $(OUT)\setkey.obj EXELIBDIR = $(DESTDIR)\lib EXELIBS =\ $(EXELIBDIR)\afs\afsauth.lib \ - $(DESTDIR)\lib\afsrxkad.lib \ - $(DESTDIR)\lib\afsdes.lib \ + $(EXELIBDIR)\afsrxkad.lib \ + $(EXELIBDIR)\afsdes.lib \ $(EXELIBDIR)\afsrx.lib \ $(EXELIBDIR)\afslwp.lib \ $(EXELIBDIR)\afs\afsutil.lib \ - $(DESTDIR)\lib\afs\afseventlog.lib \ + $(EXELIBDIR)\afs\afseventlog.lib \ $(EXELIBDIR)\afs\afsreg.lib \ - $(DESTDIR)\lib\cm_dns.obj + $(EXELIBDIR)\cm_dns.obj $(SETKEY_EXEFILE): $(SETKEY_EXEOBJS) $(EXELIBS) @@ -91,7 +91,7 @@ $(SETKEY_EXEFILE): $(SETKEY_EXEOBJS) $(EXELIBS) COPYAUTH_EXEFILE = $(DESTDIR)\etc\copyauth.exe COPYAUTH_EXEOBJS =\ - $(OJT)\copyauth.obj + $(OUT)\copyauth.obj $(COPYAUTH_EXEFILE): $(COPYAUTH_EXEOBJS) $(EXELIBS) $(EXECONLINK) @@ -108,7 +108,7 @@ ktc_errors.c auth.h: ktc_errors.et auth.p.h $(DEL) auth.h ktc_errors.c $(COMPILE_ET) ktc_errors.et -h auth -install: $(INCFILES) $(AFSAUTH_LIBFILE) $(OJT)\setkey.exe # $(COPYAUTH_EXEFILE) $(AFSAUTH_KRB_LIBFILE) +install: $(INCFILES) $(AFSAUTH_LIBFILE) $(OUT)\setkey.exe # $(COPYAUTH_EXEFILE) $(AFSAUTH_KRB_LIBFILE) install9x: install diff --git a/src/auth/test/NTMakefile b/src/auth/test/NTMakefile index 485e20c73..da9938b82 100644 --- a/src/auth/test/NTMakefile +++ b/src/auth/test/NTMakefile @@ -5,14 +5,15 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=auth\test !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version ############################################################################ -CELL_EXEFILE = $(OJT)\testcellconf.exe +CELL_EXEFILE = $(OUT)\testcellconf.exe CELL_EXEOBJS =\ - $(OJT)\testcellconf.obj + $(OUT)\testcellconf.obj CELL_EXELIBS =\ $(DESTDIR)\lib\afs\afsauth.lib \ @@ -26,10 +27,10 @@ $(CELL_EXEFILE): $(CELL_EXEOBJS) $(CELL_EXELIBS) $(EXEPREP) ############################################################################ -KTC_EXEFILE = $(OJT)\ktctest.exe +KTC_EXEFILE = $(OUT)\ktctest.exe KTC_EXEOBJS =\ - $(OJT)\ktctest.obj + $(OUT)\ktctest.obj KTC_EXELIBS =\ $(DESTDIR)\lib\afs\afsutil.lib \ diff --git a/src/bozo/NTMakefile b/src/bozo/NTMakefile index ccf8f8abb..e59bcd29e 100644 --- a/src/bozo/NTMakefile +++ b/src/bozo/NTMakefile @@ -5,10 +5,10 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=bozo !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version - ############################################################################ # Header files to install @@ -22,10 +22,10 @@ INCFILES =\ BOS_LIBFILE = $(DESTDIR)\lib\afs\afsbos.lib BOS_LIBOBJS =\ - $(OJT)\bosint.cs.obj \ - $(OJT)\bosint.xdr.obj \ - $(OJT)\boserr.obj \ - $(OJT)\AFS_component_version_number.obj + $(OUT)\bosint.cs.obj \ + $(OUT)\bosint.xdr.obj \ + $(OUT)\boserr.obj \ + $(OUT)\AFS_component_version_number.obj $(BOS_LIBFILE): $(BOS_LIBOBJS) $(LIBARCH) @@ -37,14 +37,14 @@ $(BOS_LIBFILE): $(BOS_LIBOBJS) BOSSERVER_EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\bosserver.exe BOSSERVER_EXEOBJS =\ - $(OJT)\bosserver.obj \ - $(OJT)\bnode.obj \ - $(OJT)\cronbnodeops.obj \ - $(OJT)\ezbnodeops.obj \ - $(OJT)\fsbnodeops.obj \ - $(OJT)\bosint.ss.obj \ - $(OJT)\bosoprocs.obj \ - $(OJT)\bosserver.res + $(OUT)\bosserver.obj \ + $(OUT)\bnode.obj \ + $(OUT)\cronbnodeops.obj \ + $(OUT)\ezbnodeops.obj \ + $(OUT)\fsbnodeops.obj \ + $(OUT)\bosint.ss.obj \ + $(OUT)\bosoprocs.obj \ + $(OUT)\bosserver.res BOSSERVER_EXELIBS =\ @@ -81,8 +81,8 @@ RS_BOS_EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\bos.exe CL_BOS_EXEFILE = $(DESTDIR)\bin\bos.exe BOS_EXEOBJS =\ - $(OJT)\bos.obj \ - $(OJT)\bos.res + $(OUT)\bos.obj \ + $(OUT)\bos.res BOS_EXELIBS =\ $(DESTDIR)\lib\afsrx.lib \ @@ -130,9 +130,9 @@ bnode.h boserr.c: boserr.et bnode.p.h ############################################################################ # Definitions for generating versioninfo resources -$(OJT)\bosserver.res: AFS_component_version_number.h +$(OUT)\bosserver.res: AFS_component_version_number.h -$(OJT)\bos.res: AFS_component_version_number.h +$(OUT)\bos.res: AFS_component_version_number.h ############################################################################ # Install target; primary makefile target diff --git a/src/bu_utils/NTMakefile b/src/bu_utils/NTMakefile index 309de5a22..51f23b7ae 100644 --- a/src/bu_utils/NTMakefile +++ b/src/bu_utils/NTMakefile @@ -5,18 +5,18 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=bu_utils !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version - ############################################################################ # build fms.exe EXEFILE = $(DESTDIR)\etc\fms.exe EXEOBJS =\ - $(OJT)\fms.obj \ - $(OJT)\fms.res + $(OUT)\fms.obj \ + $(OUT)\fms.res EXELIBS =\ $(DESTDIR)\lib\afs\afscmd.lib \ @@ -32,7 +32,7 @@ $(EXEFILE): $(EXEOBJS) $(EXELIBS) ############################################################################ # Definitions for generating versioninfo resources -$(OJT)\fms.res: AFS_component_version_number.h +$(OUT)\fms.res: AFS_component_version_number.h ############################################################################ # Install target; primary makefile target diff --git a/src/bubasics/NTMakefile b/src/bubasics/NTMakefile index 4aa1df7fc..a296ad0a9 100644 --- a/src/bubasics/NTMakefile +++ b/src/bubasics/NTMakefile @@ -5,10 +5,10 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=bubasics !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version - ############################################################################ # Install headers @@ -29,16 +29,16 @@ INCFILES =\ LIBFILE = $(DESTDIR)\lib\afs\afsbubasics.lib LIBOBJS =\ - $(OJT)\butc.ss.obj \ - $(OJT)\butc.cs.obj \ - $(OJT)\butc.xdr.obj \ - $(OJT)\bumon.ss.obj \ - $(OJT)\bumon.cs.obj \ - $(OJT)\bumon.xdr.obj \ - $(OJT)\butc_errs.obj \ - $(OJT)\butm_errs.obj \ - $(OJT)\butx_errs.obj \ - $(OJT)\AFS_component_version_number.obj + $(OUT)\butc.ss.obj \ + $(OUT)\butc.cs.obj \ + $(OUT)\butc.xdr.obj \ + $(OUT)\bumon.ss.obj \ + $(OUT)\bumon.cs.obj \ + $(OUT)\bumon.xdr.obj \ + $(OUT)\butc_errs.obj \ + $(OUT)\butm_errs.obj \ + $(OUT)\butx_errs.obj \ + $(OUT)\AFS_component_version_number.obj $(LIBFILE): $(LIBOBJS) $(LIBARCH) diff --git a/src/bucoord/NTMakefile b/src/bucoord/NTMakefile index e13dcb54f..a055a7cb6 100644 --- a/src/bucoord/NTMakefile +++ b/src/bucoord/NTMakefile @@ -5,10 +5,10 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=bucoord !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version - ######################################################################### # install local include file INCFILES = bc.h @@ -19,13 +19,13 @@ INCFILES = bc.h LIBFILE = $(DESTDIR)\lib\afs\afsbxdb.lib LIBOBJS =\ - $(OJT)/dsstub.obj \ - $(OJT)/ubik_db_if.obj \ - $(OJT)/status.obj \ - $(OJT)/dlq.obj \ - $(OJT)/bucoord_errs.obj \ - $(OJT)/volstub.obj \ - $(OJT)/AFS_component_version_number.obj + $(OUT)/dsstub.obj \ + $(OUT)/ubik_db_if.obj \ + $(OUT)/status.obj \ + $(OUT)/dlq.obj \ + $(OUT)/bucoord_errs.obj \ + $(OUT)/volstub.obj \ + $(OUT)/AFS_component_version_number.obj $(LIBFILE): $(LIBOBJS) $(LIBARCH) @@ -37,27 +37,27 @@ $(LIBFILE): $(LIBOBJS) EXEFILE = $(DESTDIR)\etc\backup.exe EXEOBJS =\ - $(OJT)\main.obj \ - $(OJT)\config.obj \ - $(OJT)\dsstub.obj \ - $(OJT)\volstub.obj \ - $(OJT)\commands.obj \ - $(OJT)\regex.obj \ - $(OJT)\server.obj \ - $(OJT)\dsvs.obj \ - $(OJT)\dump.obj \ - $(OJT)\restore.obj \ - $(OJT)\ubik_db_if.obj \ - $(OJT)\dump_sched.obj \ - $(OJT)\vol_sets.obj \ - $(OJT)\tape_hosts.obj \ - $(OJT)\bucoord_errs.obj \ - $(OJT)\bc_status.obj \ - $(OJT)\status.obj \ - $(OJT)\dlq.obj \ - - -$(OJT)/backup.res:AFS_component_version_number.h + $(OUT)\main.obj \ + $(OUT)\config.obj \ + $(OUT)\dsstub.obj \ + $(OUT)\volstub.obj \ + $(OUT)\commands.obj \ + $(OUT)\regex.obj \ + $(OUT)\server.obj \ + $(OUT)\dsvs.obj \ + $(OUT)\dump.obj \ + $(OUT)\restore.obj \ + $(OUT)\ubik_db_if.obj \ + $(OUT)\dump_sched.obj \ + $(OUT)\vol_sets.obj \ + $(OUT)\tape_hosts.obj \ + $(OUT)\bucoord_errs.obj \ + $(OUT)\bc_status.obj \ + $(OUT)\status.obj \ + $(OUT)\dlq.obj \ + + +$(OUT)/backup.res:AFS_component_version_number.h $(RC) backup.rc $(EXEOBJS):$$(@B).c @@ -104,7 +104,7 @@ bucoord_errs.c bc.h: bucoord_errs.et bc.p.h ############################################################################ # Definitions for generating versioninfo resources -$(OJT)/backup.res: AFS_component_version_number.h +$(OUT)/backup.res: AFS_component_version_number.h ############################################################################ # Install diff --git a/src/budb/NTMakefile b/src/budb/NTMakefile index c0c488ac3..96a3c4f9f 100644 --- a/src/budb/NTMakefile +++ b/src/budb/NTMakefile @@ -5,10 +5,10 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=budb !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version - ############################################################################ # install headers INCFILEDIR = $(DESTDIR)\include\afs # header file install directory @@ -26,11 +26,11 @@ INCFILES =\ LIBFILE = $(DESTDIR)\lib\afs\afsbudb.lib LIBOBJS =\ - $(OJT)\budb_errs.obj \ - $(OJT)\budb.cs.obj \ - $(OJT)\budb.xdr.obj \ - $(OJT)\struct_ops.obj \ - $(OJT)\AFS_component_version_number.obj + $(OUT)\budb_errs.obj \ + $(OUT)\budb.cs.obj \ + $(OUT)\budb.xdr.obj \ + $(OUT)\struct_ops.obj \ + $(OUT)\AFS_component_version_number.obj $(LIBFILE): $(LIBOBJS) $(LIBARCH) @@ -42,21 +42,21 @@ $(LIBFILE): $(LIBOBJS) EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\buserver.exe EXEOBJS =\ - $(OJT)\database.obj \ - $(OJT)\db_alloc.obj \ - $(OJT)\db_dump.obj \ - $(OJT)\db_hash.obj \ - $(OJT)\struct_ops.obj \ - $(OJT)\ol_verify.obj \ - $(OJT)\budb.ss.obj \ - $(OJT)\budb.xdr.obj \ - $(OJT)\dbs_dump.obj \ - $(OJT)\db_lock.obj \ - $(OJT)\db_text.obj \ - $(OJT)\procs.obj \ - $(OJT)\budb_errs.obj \ - $(OJT)\server.obj \ - $(OJT)\buserver.res + $(OUT)\database.obj \ + $(OUT)\db_alloc.obj \ + $(OUT)\db_dump.obj \ + $(OUT)\db_hash.obj \ + $(OUT)\struct_ops.obj \ + $(OUT)\ol_verify.obj \ + $(OUT)\budb.ss.obj \ + $(OUT)\budb.xdr.obj \ + $(OUT)\dbs_dump.obj \ + $(OUT)\db_lock.obj \ + $(OUT)\db_text.obj \ + $(OUT)\procs.obj \ + $(OUT)\budb_errs.obj \ + $(OUT)\server.obj \ + $(OUT)\buserver.res EXELIBS =\ @@ -86,7 +86,7 @@ $(EXEFILE): $(EXEOBJS) $(EXELIBS) ############################################################################ # Definitions for generating versioninfo resources -$(OJT)\buserver.res: AFS_component_version_number.h +$(OUT)\buserver.res: AFS_component_version_number.h ############################################################################ # rxgen budb.rg diff --git a/src/butc/NTMakefile b/src/butc/NTMakefile index 8200bc08c..5f466a25f 100644 --- a/src/butc/NTMakefile +++ b/src/butc/NTMakefile @@ -5,26 +5,26 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=butc !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version - ############################################################################ # build butc EXEFILE = $(DESTDIR)\etc\butc.exe EXEOBJS =\ - $(OJT)\dbentries.obj \ - $(OJT)\tcprocs.obj \ - $(OJT)\lwps.obj \ - $(OJT)\list.obj \ - $(OJT)\recoverDb.obj \ - $(OJT)\tcudbprocs.obj \ - $(OJT)\dump.obj \ - $(OJT)\tcstatus.obj \ - $(OJT)\tcmain.obj \ - $(OJT)\butc.res + $(OUT)\dbentries.obj \ + $(OUT)\tcprocs.obj \ + $(OUT)\lwps.obj \ + $(OUT)\list.obj \ + $(OUT)\recoverDb.obj \ + $(OUT)\tcudbprocs.obj \ + $(OUT)\dump.obj \ + $(OUT)\tcstatus.obj \ + $(OUT)\tcmain.obj \ + $(OUT)\butc.res EXELIBS =\ $(DESTDIR)\lib\afs\afsbudb.lib \ @@ -59,7 +59,7 @@ $(EXEFILE): $(EXEOBJS) $(EXELIBS) ############################################################################ # Definitions for generating versioninfo resources -$(OJT)\butc.res: AFS_component_version_number.h +$(OUT)\butc.res: AFS_component_version_number.h ############################################################################ # Install target; primary makefile target @@ -75,7 +75,7 @@ clean:: ############################################################################ # Auxiliary build targets not built by default; e.g. test programs -$(OJT)\butc_test.exe: $(OJT)\test.obj +$(OUT)\butc_test.exe: $(OUT)\test.obj $(EXECONLINK) mkdir: diff --git a/src/butm/NTMakefile b/src/butm/NTMakefile index d48c52654..b685ada83 100644 --- a/src/butm/NTMakefile +++ b/src/butm/NTMakefile @@ -5,18 +5,18 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=butm !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version - ############################################################################ # Definitions for building a static library LIBFILE = $(DESTDIR)\lib\afs\afsbutm.lib LIBOBJS =\ - $(OJT)\file_tm.obj \ - $(OJT)\AFS_component_version_number.obj + $(OUT)\file_tm.obj \ + $(OUT)\AFS_component_version_number.obj $(LIBFILE): $(LIBOBJS) $(LIBARCH) @@ -25,7 +25,7 @@ $(LIBFILE): $(LIBOBJS) ############################################################################ # Install target; primary makefile target -install: $(LIBFILE) $(OJT)\test_ftm.exe +install: $(LIBFILE) $(OUT)\test_ftm.exe ############################################################################ @@ -43,7 +43,7 @@ TESTLIBS = $(DESTDIR)\lib\afslwp.lib \ $(DESTDIR)\lib\afs\afsutil.lib \ $(DESTDIR)\lib\afs\afsbubasics.lib -$(OJT)\test_ftm.exe: $(OJT)\test_ftm.obj $(LIBFILE) $(TESTLIBS) +$(OUT)\test_ftm.exe: $(OUT)\test_ftm.obj $(LIBFILE) $(TESTLIBS) $(EXECONLINK) mkdir: diff --git a/src/cmd/NTMakefile b/src/cmd/NTMakefile index b1e798f03..940dfd7ae 100644 --- a/src/cmd/NTMakefile +++ b/src/cmd/NTMakefile @@ -5,10 +5,10 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=cmd !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version - # install include files INCFILEDIR = $(DESTDIR)\include\afs @@ -20,10 +20,13 @@ INCFILES =\ LIBFILE = $(DESTDIR)\lib\afs\afscmd.lib LIBOBJS =\ - $(OJT)\cmd_errors.obj \ - $(OJT)\cmd.obj \ - $(OJT)\AFS_component_version_number.obj + $(OUT)\cmd_errors.obj \ + $(OUT)\cmd.obj \ + $(OUT)\AFS_component_version_number.obj +$(LIBOBJS): $$(@B).c + $(C2OBJ) $** + $(LIBFILE): $(LIBOBJS) $(LIBARCH) diff --git a/src/cmd/test/NTMakefile b/src/cmd/test/NTMakefile index 50125e14a..a54d581c5 100644 --- a/src/cmd/test/NTMakefile +++ b/src/cmd/test/NTMakefile @@ -5,10 +5,10 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=cmd\test !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version - # test exe's EXELIBS =\ $(DESTDIR)\lib\afs\afscmd.lib \ @@ -17,9 +17,9 @@ EXELIBS =\ # build itest.exe ITEST_EXEOBJS =\ - $(OJT)\itest.obj + $(OUT)\itest.obj -ITEST_EXEFILE = $(OJT)\itest.exe +ITEST_EXEFILE = $(OUT)\itest.exe $(ITEST_EXEFILE): $(ITEST_EXEOBJS) $(EXECONLINK) $(EXELIBS) @@ -27,9 +27,9 @@ $(ITEST_EXEFILE): $(ITEST_EXEOBJS) #build ctest.exe CTEST_EXEOBJS =\ - $(OJT)\ctest.obj + $(OUT)\ctest.obj -CTEST_EXEFILE = $(OJT)\ctest.exe +CTEST_EXEFILE = $(OUT)\ctest.exe $(CTEST_EXEFILE): $(CTEST_EXEOBJS) $(EXECONLINK) $(EXELIBS) @@ -37,9 +37,9 @@ $(CTEST_EXEFILE): $(CTEST_EXEOBJS) # build dtest.exe DTEST_EXEOBJS =\ - $(OJT)\dtest.obj + $(OUT)\dtest.obj -DTEST_EXEFILE = $(OJT)\dtest.exe +DTEST_EXEFILE = $(OUT)\dtest.exe $(DTEST_EXEFILE): $(DTEST_EXEOBJS) $(EXECONLINK) $(EXELIBS) @@ -50,7 +50,7 @@ all: test test tests: $(CTEST_EXEFILE) $(ITEST_EXEFILE) $(DTEST_EXEFILE) clean:: - $(DEL) $(OJT)\ctest.exe $(OJT)\dtest.exe $(OJT)\itest.exe + $(DEL) $(OUT)\ctest.exe $(OUT)\dtest.exe $(OUT)\itest.exe mkdir: diff --git a/src/comerr/NTMakefile b/src/comerr/NTMakefile index 4763dcd21..27b65a810 100644 --- a/src/comerr/NTMakefile +++ b/src/comerr/NTMakefile @@ -4,7 +4,8 @@ # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html -!message + +RELDIR=comerr !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version @@ -21,11 +22,14 @@ INCFILES =\ COMERR_LIBFILE = $(DESTDIR)\lib\afs\afscom_err.lib COMERR_LIBOBJS =\ - $(OJT)\error_msg.obj \ - $(OJT)\et_name.obj \ - $(OJT)\com_err.obj \ - $(OJT)\AFS_component_version_number.obj + $(OUT)\error_msg.obj \ + $(OUT)\et_name.obj \ + $(OUT)\com_err.obj \ + $(OUT)\AFS_component_version_number.obj +$(COMERR_LIBOBJS): $$(@B).c + $(C2OBJ) $** + $(COMERR_LIBFILE): $(COMERR_LIBOBJS) $(LIBARCH) @@ -45,8 +49,11 @@ error_table_nt.c: et_lex.lex_nt.c error_table.y $(YACC) -d -o $@ error_table.y COMPILE_ET_EXEOBJS =\ - $(OJT)\compile_et.obj \ - $(OJT)\error_table_nt.obj + $(OUT)\compile_et.obj \ + $(OUT)\error_table_nt.obj + +$(COMPILE_ET_EXEOBJS): $$(@B).c + $(C2OBJ) $** COMPILE_ET_EXELIBS =\ $(DESTDIR)\lib\afs\afsutil.lib @@ -61,7 +68,7 @@ install: prep $(INCFILES) $(COMERR_LIBFILE) $(COMPILE_ET_EXEFILE) install9x: install clean:: - $(DEL) $(COMERR_LIBFILE) $(OJT)\AFS_component_version_number.obj + $(DEL) $(COMERR_LIBFILE) $(OUT)\AFS_component_version_number.obj $(DEL) $(COMPILE_ET_EXEFILE) $(DEL) *~ *.bak \ *.otl *.aux *.toc *.PS *.dvi *.x9700 *.ps \ diff --git a/src/comerr/error_table_nt.h b/src/comerr/error_table_nt.h index 3b808d9aa..7a52d365d 100755 --- a/src/comerr/error_table_nt.h +++ b/src/comerr/error_table_nt.h @@ -1,11 +1,15 @@ typedef union { - char *dynstr; - } YYSTYPE; - -#define ERROR_TABLE 258 -#define ERROR_CODE_ENTRY 259 -#define END 260 -#define STRING 261 -#define QUOTED_STRING 262 - extern YYSTYPE yylval; - + +char *dynstr; + +} YYSTYPE; + +#define ERROR_TABLE 258 +#define ERROR_CODE_ENTRY 259 +#define END 260 +#define STRING 261 +#define QUOTED_STRING 262 + + +extern YYSTYPE yylval; + diff --git a/src/comerr/et_lex.lex_nt.c b/src/comerr/et_lex.lex_nt.c index e07a267b0..028581d1c 100644 --- a/src/comerr/et_lex.lex_nt.c +++ b/src/comerr/et_lex.lex_nt.c @@ -1,1573 +1,1573 @@ -/* A lexical scanner generated by flex */ - -/* Scanner skeleton version: - * $Header$ - */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 - -#include - - -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus -#endif -#endif - - -#ifdef __cplusplus - -#include -#include - -/* Use prototypes in function declarations. */ -#define YY_USE_PROTOS - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -#if __STDC__ - -#define YY_USE_PROTOS -#define YY_USE_CONST - -#endif /* __STDC__ */ -#endif /* ! __cplusplus */ - -#ifdef __TURBOC__ - #pragma warn -rch - #pragma warn -use -#include -#include -#define YY_USE_CONST -#define YY_USE_PROTOS -#endif - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - - -#ifdef YY_USE_PROTOS -#define YY_PROTO(proto) proto -#else -#define YY_PROTO(proto) () -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#define YY_BUF_SIZE 16384 - -typedef struct yy_buffer_state *YY_BUFFER_STATE; - -extern int yyleng; -extern FILE *yyin, *yyout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - -/* The funky do-while in the following #define is used to turn the definition - * int a single C statement (which needs a semi-colon terminator). This - * avoids problems with code like: - * - * if ( condition_holds ) - * yyless( 5 ); - * else - * do_something_else(); - * - * Prior to using the do-while the compiler would get upset at the - * "else" because it interpreted the "if" statement as being all - * done when it reached the ';' after the yyless() call. - */ - -/* Return all but the first 'n' matched characters back to the input stream. */ - -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - *yy_cp = yy_hold_char; \ - yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yytext_ptr ) - -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ -typedef unsigned int yy_size_t; - - -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - }; - -static YY_BUFFER_STATE yy_current_buffer = 0; - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - */ -#define YY_CURRENT_BUFFER yy_current_buffer - - -/* yy_hold_char holds the character lost when yytext is formed. */ -static char yy_hold_char; - -static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - -int yyleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = NULL; -static int yy_init = 1; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void yyrestart YY_PROTO(( FILE *input_file )); - -void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); -void yy_load_buffer_state YY_PROTO(( void )); -YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); -void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); -void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); -void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); -#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) - -YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); -YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str )); -YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); - -static void *yy_flex_alloc YY_PROTO(( yy_size_t )); -static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); -static void yy_flex_free YY_PROTO(( void * )); - -#define yy_new_buffer yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) - - -#define YY_USES_REJECT -typedef unsigned char YY_CHAR; -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; -typedef int yy_state_type; -#define YY_FLEX_LEX_COMPAT -extern int yylineno; -int yylineno = 1; -extern char yytext[]; - - -static yy_state_type yy_get_previous_state YY_PROTO(( void )); -static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); -static int yy_get_next_buffer YY_PROTO(( void )); -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yytext_ptr -= yy_more_len; \ - yyleng = (int) (yy_cp - yytext_ptr); \ - yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - if ( yyleng >= YYLMAX ) \ - YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \ - yy_flex_strncpy( yytext, yytext_ptr, yyleng + 1 ); \ - yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 11 -#define YY_END_OF_BUFFER 12 -static yyconst short int yy_acclist[47] = - { 0, - 8, 8, 12, 10, 11, 6, 10, 11, 6, 11, - 10, 11, 10, 11, 8, 10, 11, 8, 10, 11, - 7, 9, 8, 4, 8, 8, 8, 2, 8, 5, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 3, 8, 8, 1, 8 - } ; - -static yyconst short int yy_accept[36] = - { 0, - 1, 2, 3, 4, 6, 9, 11, 13, 15, 18, - 21, 21, 22, 22, 23, 24, 26, 27, 28, 30, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 44, 45, 47, 47 - } ; - -static yyconst int yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 4, 5, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, - 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 1, 1, 1, 1, 7, 1, 8, 9, 10, 11, - - 12, 6, 6, 6, 6, 6, 6, 13, 6, 14, - 15, 6, 6, 16, 6, 17, 6, 6, 6, 6, - 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst int yy_meta[18] = - { 0, - 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2 - } ; - -static yyconst short int yy_base[39] = - { 0, - 0, 12, 46, 47, 47, 47, 41, 41, 0, 15, - 39, 47, 39, 47, 0, 0, 30, 24, 0, 0, - 24, 14, 21, 1, 12, 18, 12, 13, 9, 7, - 0, 7, 0, 47, 32, 34, 36, 4 - } ; - -static yyconst short int yy_def[39] = - { 0, - 35, 35, 34, 34, 34, 34, 36, 37, 38, 38, - 36, 34, 37, 34, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, - 38, 38, 38, 0, 34, 34, 34, 34 - } ; - -static yyconst short int yy_nxt[65] = - { 0, - 4, 5, 6, 7, 8, 15, 34, 34, 34, 34, - 25, 10, 4, 5, 6, 7, 8, 26, 33, 32, - 31, 30, 29, 10, 16, 28, 27, 24, 17, 23, - 18, 19, 9, 9, 11, 11, 13, 13, 22, 21, - 20, 14, 12, 14, 12, 34, 3, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34 - } ; - -static yyconst short int yy_chk[65] = - { 0, - 1, 1, 1, 1, 1, 38, 0, 0, 0, 0, - 24, 1, 2, 2, 2, 2, 2, 24, 32, 30, - 29, 28, 27, 2, 10, 26, 25, 23, 10, 22, - 10, 10, 35, 35, 36, 36, 37, 37, 21, 18, - 17, 13, 11, 8, 7, 3, 34, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, - 34, 34, 34, 34 - } ; - -static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; -static char *yy_full_match; -static int yy_lp; -static int yy_more_flag = 0; -static int yy_more_len = 0; -#define yymore() (yy_more_flag = 1) -#define YY_MORE_ADJ yy_more_len -#ifndef YYLMAX -#define YYLMAX 8192 -#endif - -char yytext[YYLMAX]; -char *yytext_ptr; -#line 1 "et_lex.lex.l" -#define INITIAL 0 - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); -#else -extern int yywrap YY_PROTO(( void )); -#endif -#endif - -#ifndef YY_NO_UNPUT -static void yyunput YY_PROTO(( int c, char *buf_ptr )); -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput YY_PROTO(( void )); -#else -static int input YY_PROTO(( void )); -#endif -#endif - -#if YY_STACK_USED -static int yy_start_stack_ptr = 0; -static int yy_start_stack_depth = 0; -static int *yy_start_stack = 0; -#ifndef YY_NO_PUSH_STATE -static void yy_push_state YY_PROTO(( int new_state )); -#endif -#ifndef YY_NO_POP_STATE -static void yy_pop_state YY_PROTO(( void )); -#endif -#ifndef YY_NO_TOP_STATE -static int yy_top_state YY_PROTO(( void )); -#endif - -#else -#define YY_NO_PUSH_STATE 1 -#define YY_NO_POP_STATE 1 -#define YY_NO_TOP_STATE 1 -#endif - -#ifdef YY_MALLOC_DECL -YY_MALLOC_DECL -#else -#if __STDC__ -#ifndef __cplusplus -#include -#endif -#else -/* Just try to get by without declaring the routines. This will fail - * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) - * or sizeof(void*) != sizeof(int). - */ -#endif -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ - -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( yy_current_buffer->yy_is_interactive ) \ - { \ - int c = '*', n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ - && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL int yylex YY_PROTO(( void )) -#endif - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -YY_DECL - { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - -#line 3 "et_lex.lex.l" - - - - if ( yy_init ) - { - yy_init = 0; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yy_start ) - yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_load_buffer_state(); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_more_len = 0; - if ( yy_more_flag ) - { - yy_more_len = yyleng; - yy_more_flag = 0; - } - yy_cp = yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yy_start; - yy_state_ptr = yy_state_buf; - *yy_state_ptr++ = yy_current_state; -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 35 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - *yy_state_ptr++ = yy_current_state; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 47 ); - -yy_find_action: - yy_current_state = *--yy_state_ptr; - yy_lp = yy_accept[yy_current_state]; - for ( ; ; ) /* until we find what rule we matched */ - { - if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) - { - yy_act = yy_acclist[yy_lp]; - { - yy_full_match = yy_cp; - break; - } - } - --yy_cp; - yy_current_state = *--yy_state_ptr; - yy_lp = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - if ( yy_act != YY_END_OF_BUFFER ) - { - int yyl; - for ( yyl = 0; yyl < yyleng; ++yyl ) - if ( yytext[yyl] == '\n' ) - ++yylineno; - } - -do_action: /* This label is used only to access EOF actions. */ - - - switch ( yy_act ) - { /* beginning of action switch */ -case 1: -YY_RULE_SETUP -#line 5 "et_lex.lex.l" -return ERROR_TABLE; - YY_BREAK -case 2: -YY_RULE_SETUP -#line 6 "et_lex.lex.l" -return ERROR_TABLE; - YY_BREAK -case 3: -YY_RULE_SETUP -#line 7 "et_lex.lex.l" -return ERROR_CODE_ENTRY; - YY_BREAK -case 4: -YY_RULE_SETUP -#line 8 "et_lex.lex.l" -return ERROR_CODE_ENTRY; - YY_BREAK -case 5: -YY_RULE_SETUP -#line 9 "et_lex.lex.l" -return END; - YY_BREAK -case 6: -YY_RULE_SETUP -#line 11 "et_lex.lex.l" -; - YY_BREAK -case 7: -YY_RULE_SETUP -#line 13 "et_lex.lex.l" -{ register char *p; yylval.dynstr = ds((char *)yytext+1); - if (p=strrchr(yylval.dynstr, '"')) *p='\0'; - return QUOTED_STRING; - } - YY_BREAK -case 8: -YY_RULE_SETUP -#line 18 "et_lex.lex.l" -{ yylval.dynstr = ds((char *)yytext); return STRING; } - YY_BREAK -case 9: -YY_RULE_SETUP -#line 20 "et_lex.lex.l" -; - YY_BREAK -case 10: -YY_RULE_SETUP -#line 22 "et_lex.lex.l" -{ return (*yytext); } - YY_BREAK -case 11: -YY_RULE_SETUP -#line 23 "et_lex.lex.l" -ECHO; - YY_BREAK - case YY_STATE_EOF(INITIAL): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yy_hold_char; - - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between yy_current_buffer and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yy_n_chars = yy_current_buffer->yy_n_chars; - yy_current_buffer->yy_input_file = yyin; - yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - yy_did_buffer_switch_on_eof = 0; - - if ( yywrap() ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = - yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yy_c_buf_p = - &yy_current_buffer->yy_ch_buf[yy_n_chars]; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of yylex */ - - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ - -static int yy_get_next_buffer() - { - register char *dest = yy_current_buffer->yy_ch_buf; - register char *source = yytext_ptr; - register int number_to_move, i; - int ret_val; - - if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( yy_current_buffer->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a singled characater, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - yy_n_chars = 0; - - else - { - int num_to_read = - yy_current_buffer->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ -#ifdef YY_USES_REJECT - YY_FATAL_ERROR( -"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); -#else - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = yy_current_buffer; - - int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yy_flex_realloc( (void *) b->yy_ch_buf, - b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = yy_current_buffer->yy_buf_size - - number_to_move - 1; -#endif - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), - yy_n_chars, num_to_read ); - } - - if ( yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - yy_n_chars += number_to_move; - yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; - yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; - - return ret_val; - } - - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - -static yy_state_type yy_get_previous_state() - { - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = yy_start; - yy_state_ptr = yy_state_buf; - *yy_state_ptr++ = yy_current_state; - - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 35 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - *yy_state_ptr++ = yy_current_state; - } - - return yy_current_state; - } - - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - -#ifdef YY_USE_PROTOS -static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) -#else -static yy_state_type yy_try_NUL_trans( yy_current_state ) -yy_state_type yy_current_state; -#endif - { - register int yy_is_jam; - - register YY_CHAR yy_c = 1; - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 35 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - *yy_state_ptr++ = yy_current_state; - yy_is_jam = (yy_current_state == 34); - - return yy_is_jam ? 0 : yy_current_state; - } - - -#ifndef YY_NO_UNPUT -#ifdef YY_USE_PROTOS -static void yyunput( int c, register char *yy_bp ) -#else -static void yyunput( c, yy_bp ) -int c; -register char *yy_bp; -#endif - { - register char *yy_cp = yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yy_hold_char; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = yy_n_chars + 2; - register char *dest = &yy_current_buffer->yy_ch_buf[ - yy_current_buffer->yy_buf_size + 2]; - register char *source = - &yy_current_buffer->yy_ch_buf[number_to_move]; - - while ( source > yy_current_buffer->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - yy_n_chars = yy_current_buffer->yy_buf_size; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - if ( c == '\n' ) - --yylineno; - - yytext_ptr = yy_bp; - yy_hold_char = *yy_cp; - yy_c_buf_p = yy_cp; - } -#endif /* ifndef YY_NO_UNPUT */ - - -#ifdef __cplusplus -static int yyinput() -#else -static int input() -#endif - { - int c; - - *yy_c_buf_p = yy_hold_char; - - if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - /* This was really a NUL. */ - *yy_c_buf_p = '\0'; - - else - { /* need more input */ - yytext_ptr = yy_c_buf_p; - ++yy_c_buf_p; - - switch ( yy_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - if ( yywrap() ) - { - yy_c_buf_p = - yytext_ptr + YY_MORE_ADJ; - return EOF; - } - - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; - break; - - case EOB_ACT_LAST_MATCH: -#ifdef __cplusplus - YY_FATAL_ERROR( - "unexpected last match in yyinput()" ); -#else - YY_FATAL_ERROR( - "unexpected last match in input()" ); -#endif - } - } - } - - c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ - *yy_c_buf_p = '\0'; /* preserve yytext */ - yy_hold_char = *++yy_c_buf_p; - - if ( c == '\n' ) - ++yylineno; - - return c; - } - - -#ifdef YY_USE_PROTOS -void yyrestart( FILE *input_file ) -#else -void yyrestart( input_file ) -FILE *input_file; -#endif - { - if ( ! yy_current_buffer ) - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_init_buffer( yy_current_buffer, input_file ); - yy_load_buffer_state(); - } - - -#ifdef YY_USE_PROTOS -void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) -#else -void yy_switch_to_buffer( new_buffer ) -YY_BUFFER_STATE new_buffer; -#endif - { - if ( yy_current_buffer == new_buffer ) - return; - - if ( yy_current_buffer ) - { - /* Flush out information for old buffer. */ - *yy_c_buf_p = yy_hold_char; - yy_current_buffer->yy_buf_pos = yy_c_buf_p; - yy_current_buffer->yy_n_chars = yy_n_chars; - } - - yy_current_buffer = new_buffer; - yy_load_buffer_state(); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yy_did_buffer_switch_on_eof = 1; - } - - -#ifdef YY_USE_PROTOS -void yy_load_buffer_state( void ) -#else -void yy_load_buffer_state() -#endif - { - yy_n_chars = yy_current_buffer->yy_n_chars; - yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; - yyin = yy_current_buffer->yy_input_file; - yy_hold_char = *yy_c_buf_p; - } - - -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) -#else -YY_BUFFER_STATE yy_create_buffer( file, size ) -FILE *file; -int size; -#endif - { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer( b, file ); - - return b; - } - - -#ifdef YY_USE_PROTOS -void yy_delete_buffer( YY_BUFFER_STATE b ) -#else -void yy_delete_buffer( b ) -YY_BUFFER_STATE b; -#endif - { - if ( ! b ) - return; - - if ( b == yy_current_buffer ) - yy_current_buffer = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yy_flex_free( (void *) b->yy_ch_buf ); - - yy_flex_free( (void *) b ); - } - - -#ifndef YY_ALWAYS_INTERACTIVE -#ifndef YY_NEVER_INTERACTIVE -extern int isatty YY_PROTO(( int )); -#endif -#endif - -#ifdef YY_USE_PROTOS -void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -#else -void yy_init_buffer( b, file ) -YY_BUFFER_STATE b; -FILE *file; -#endif - - - { - yy_flush_buffer( b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - -#if YY_ALWAYS_INTERACTIVE - b->yy_is_interactive = 1; -#else -#if YY_NEVER_INTERACTIVE - b->yy_is_interactive = 0; -#else - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; -#endif -#endif - } - - -#ifdef YY_USE_PROTOS -void yy_flush_buffer( YY_BUFFER_STATE b ) -#else -void yy_flush_buffer( b ) -YY_BUFFER_STATE b; -#endif - - { - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == yy_current_buffer ) - yy_load_buffer_state(); - } - - -#ifndef YY_NO_SCAN_BUFFER -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) -#else -YY_BUFFER_STATE yy_scan_buffer( base, size ) -char *base; -yy_size_t size; -#endif - { - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b ); - - return b; - } -#endif - - -#ifndef YY_NO_SCAN_STRING -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_string( yyconst char *str ) -#else -YY_BUFFER_STATE yy_scan_string( str ) -yyconst char *str; -#endif - { - int len; - for ( len = 0; str[len]; ++len ) - ; - - return yy_scan_bytes( str, len ); - } -#endif - - -#ifndef YY_NO_SCAN_BYTES -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) -#else -YY_BUFFER_STATE yy_scan_bytes( bytes, len ) -yyconst char *bytes; -int len; -#endif - { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = len + 2; - buf = (char *) yy_flex_alloc( n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; - - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; - } -#endif - - -#ifndef YY_NO_PUSH_STATE -#ifdef YY_USE_PROTOS -static void yy_push_state( int new_state ) -#else -static void yy_push_state( new_state ) -int new_state; -#endif - { - if ( yy_start_stack_ptr >= yy_start_stack_depth ) - { - yy_size_t new_size; - - yy_start_stack_depth += YY_START_STACK_INCR; - new_size = yy_start_stack_depth * sizeof( int ); - - if ( ! yy_start_stack ) - yy_start_stack = (int *) yy_flex_alloc( new_size ); - - else - yy_start_stack = (int *) yy_flex_realloc( - (void *) yy_start_stack, new_size ); - - if ( ! yy_start_stack ) - YY_FATAL_ERROR( - "out of memory expanding start-condition stack" ); - } - - yy_start_stack[yy_start_stack_ptr++] = YY_START; - - BEGIN(new_state); - } -#endif - - -#ifndef YY_NO_POP_STATE -static void yy_pop_state() - { - if ( --yy_start_stack_ptr < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); - - BEGIN(yy_start_stack[yy_start_stack_ptr]); - } -#endif - - -#ifndef YY_NO_TOP_STATE -static int yy_top_state() - { - return yy_start_stack[yy_start_stack_ptr - 1]; - } -#endif - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -#ifdef YY_USE_PROTOS -static void yy_fatal_error( yyconst char msg[] ) -#else -static void yy_fatal_error( msg ) -char msg[]; -#endif - { - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); - } - - - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yytext[yyleng] = yy_hold_char; \ - yy_c_buf_p = yytext + n - YY_MORE_ADJ; \ - yy_hold_char = *yy_c_buf_p; \ - *yy_c_buf_p = '\0'; \ - yyleng = n; \ - } \ - while ( 0 ) - - -/* Internal utility routines. */ - -#ifndef yytext_ptr -#ifdef YY_USE_PROTOS -static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) -#else -static void yy_flex_strncpy( s1, s2, n ) -char *s1; -yyconst char *s2; -int n; -#endif - { - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; - } -#endif - - -#ifdef YY_USE_PROTOS -static void *yy_flex_alloc( yy_size_t size ) -#else -static void *yy_flex_alloc( size ) -yy_size_t size; -#endif - { - return (void *) malloc( size ); - } - -#ifdef YY_USE_PROTOS -static void *yy_flex_realloc( void *ptr, yy_size_t size ) -#else -static void *yy_flex_realloc( ptr, size ) -void *ptr; -yy_size_t size; -#endif - { - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); - } - -#ifdef YY_USE_PROTOS -static void yy_flex_free( void *ptr ) -#else -static void yy_flex_free( ptr ) -void *ptr; -#endif - { - free( ptr ); - } - -#if YY_MAIN -int main() - { - yylex(); - return 0; - } -#endif -#line 23 "et_lex.lex.l" - -/* - * Copyright 2000, International Business Machines Corporation and others. - * All Rights Reserved. - * - * This software has been released under the terms of the IBM Public - * License. For details, see the LICENSE file in the top-level source - * directory or online at http://www.openafs.org/dl/license10.html - */ -int yywrap(void) { - return 1; -} +/* A lexical scanner generated by flex */ + +/* Scanner skeleton version: + * $Header$ + */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 + +#include + + +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus +#endif +#endif + + +#ifdef __cplusplus + +#include +#include + +/* Use prototypes in function declarations. */ +#define YY_USE_PROTOS + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_PROTOS +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use +#include +#include +#define YY_USE_CONST +#define YY_USE_PROTOS +#endif + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + + +#ifdef YY_USE_PROTOS +#define YY_PROTO(proto) proto +#else +#define YY_PROTO(proto) () +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart( yyin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#define YY_BUF_SIZE 16384 + +typedef struct yy_buffer_state *YY_BUFFER_STATE; + +extern int yyleng; +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + +/* The funky do-while in the following #define is used to turn the definition + * int a single C statement (which needs a semi-colon terminator). This + * avoids problems with code like: + * + * if ( condition_holds ) + * yyless( 5 ); + * else + * do_something_else(); + * + * Prior to using the do-while the compiler would get upset at the + * "else" because it interpreted the "if" statement as being all + * done when it reached the ';' after the yyless() call. + */ + +/* Return all but the first 'n' matched characters back to the input stream. */ + +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + *yy_cp = yy_hold_char; \ + yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yytext_ptr ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ +typedef unsigned int yy_size_t; + + +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + }; + +static YY_BUFFER_STATE yy_current_buffer = 0; + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + */ +#define YY_CURRENT_BUFFER yy_current_buffer + + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; + +static int yy_n_chars; /* number of characters read into yy_ch_buf */ + + +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = NULL; +static int yy_init = 1; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart YY_PROTO(( FILE *input_file )); + +void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); +void yy_load_buffer_state YY_PROTO(( void )); +YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); +void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); +void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); +void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); +#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) + +YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); +YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str )); +YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); + +static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +static void yy_flex_free YY_PROTO(( void * )); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! yy_current_buffer ) \ + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) + + +#define YY_USES_REJECT +typedef unsigned char YY_CHAR; +FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +typedef int yy_state_type; +#define YY_FLEX_LEX_COMPAT +extern int yylineno; +int yylineno = 1; +extern char yytext[]; + + +static yy_state_type yy_get_previous_state YY_PROTO(( void )); +static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); +static int yy_get_next_buffer YY_PROTO(( void )); +static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yytext_ptr = yy_bp; \ + yytext_ptr -= yy_more_len; \ + yyleng = (int) (yy_cp - yytext_ptr); \ + yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + if ( yyleng >= YYLMAX ) \ + YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \ + yy_flex_strncpy( yytext, yytext_ptr, yyleng + 1 ); \ + yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 11 +#define YY_END_OF_BUFFER 12 +static yyconst short int yy_acclist[47] = + { 0, + 8, 8, 12, 10, 11, 6, 10, 11, 6, 11, + 10, 11, 10, 11, 8, 10, 11, 8, 10, 11, + 7, 9, 8, 4, 8, 8, 8, 2, 8, 5, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 3, 8, 8, 1, 8 + } ; + +static yyconst short int yy_accept[36] = + { 0, + 1, 2, 3, 4, 6, 9, 11, 13, 15, 18, + 21, 21, 22, 22, 23, 24, 26, 27, 28, 30, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 44, 45, 47, 47 + } ; + +static yyconst int yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 4, 5, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, + 1, 1, 1, 1, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 1, 1, 1, 1, 7, 1, 8, 9, 10, 11, + + 12, 6, 6, 6, 6, 6, 6, 13, 6, 14, + 15, 6, 6, 16, 6, 17, 6, 6, 6, 6, + 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst int yy_meta[18] = + { 0, + 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2 + } ; + +static yyconst short int yy_base[39] = + { 0, + 0, 12, 46, 47, 47, 47, 41, 41, 0, 15, + 39, 47, 39, 47, 0, 0, 30, 24, 0, 0, + 24, 14, 21, 1, 12, 18, 12, 13, 9, 7, + 0, 7, 0, 47, 32, 34, 36, 4 + } ; + +static yyconst short int yy_def[39] = + { 0, + 35, 35, 34, 34, 34, 34, 36, 37, 38, 38, + 36, 34, 37, 34, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 38, 0, 34, 34, 34, 34 + } ; + +static yyconst short int yy_nxt[65] = + { 0, + 4, 5, 6, 7, 8, 15, 34, 34, 34, 34, + 25, 10, 4, 5, 6, 7, 8, 26, 33, 32, + 31, 30, 29, 10, 16, 28, 27, 24, 17, 23, + 18, 19, 9, 9, 11, 11, 13, 13, 22, 21, + 20, 14, 12, 14, 12, 34, 3, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34 + } ; + +static yyconst short int yy_chk[65] = + { 0, + 1, 1, 1, 1, 1, 38, 0, 0, 0, 0, + 24, 1, 2, 2, 2, 2, 2, 24, 32, 30, + 29, 28, 27, 2, 10, 26, 25, 23, 10, 22, + 10, 10, 35, 35, 36, 36, 37, 37, 21, 18, + 17, 13, 11, 8, 7, 3, 34, 34, 34, 34, + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, + 34, 34, 34, 34 + } ; + +static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; +static char *yy_full_match; +static int yy_lp; +static int yy_more_flag = 0; +static int yy_more_len = 0; +#define yymore() (yy_more_flag = 1) +#define YY_MORE_ADJ yy_more_len +#ifndef YYLMAX +#define YYLMAX 8192 +#endif + +char yytext[YYLMAX]; +char *yytext_ptr; +#line 1 "et_lex.lex.l" +#define INITIAL 0 + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap YY_PROTO(( void )); +#else +extern int yywrap YY_PROTO(( void )); +#endif +#endif + +#ifndef YY_NO_UNPUT +static void yyunput YY_PROTO(( int c, char *buf_ptr )); +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int yyinput YY_PROTO(( void )); +#else +static int input YY_PROTO(( void )); +#endif +#endif + +#if YY_STACK_USED +static int yy_start_stack_ptr = 0; +static int yy_start_stack_depth = 0; +static int *yy_start_stack = 0; +#ifndef YY_NO_PUSH_STATE +static void yy_push_state YY_PROTO(( int new_state )); +#endif +#ifndef YY_NO_POP_STATE +static void yy_pop_state YY_PROTO(( void )); +#endif +#ifndef YY_NO_TOP_STATE +static int yy_top_state YY_PROTO(( void )); +#endif + +#else +#define YY_NO_PUSH_STATE 1 +#define YY_NO_POP_STATE 1 +#define YY_NO_TOP_STATE 1 +#endif + +#ifdef YY_MALLOC_DECL +YY_MALLOC_DECL +#else +#if __STDC__ +#ifndef __cplusplus +#include +#endif +#else +/* Just try to get by without declaring the routines. This will fail + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) + * or sizeof(void*) != sizeof(int). + */ +#endif +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ + +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( yy_current_buffer->yy_is_interactive ) \ + { \ + int c = '*', n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ + && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL int yylex YY_PROTO(( void )) +#endif + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +YY_DECL + { + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + +#line 3 "et_lex.lex.l" + + + + if ( yy_init ) + { + yy_init = 0; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yy_start ) + yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! yy_current_buffer ) + yy_current_buffer = + yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_load_buffer_state(); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_more_len = 0; + if ( yy_more_flag ) + { + yy_more_len = yyleng; + yy_more_flag = 0; + } + yy_cp = yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yy_start; + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 35 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 47 ); + +yy_find_action: + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; + for ( ; ; ) /* until we find what rule we matched */ + { + if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) + { + yy_act = yy_acclist[yy_lp]; + { + yy_full_match = yy_cp; + break; + } + } + --yy_cp; + yy_current_state = *--yy_state_ptr; + yy_lp = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + if ( yy_act != YY_END_OF_BUFFER ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + ++yylineno; + } + +do_action: /* This label is used only to access EOF actions. */ + + + switch ( yy_act ) + { /* beginning of action switch */ +case 1: +YY_RULE_SETUP +#line 5 "et_lex.lex.l" +return ERROR_TABLE; + YY_BREAK +case 2: +YY_RULE_SETUP +#line 6 "et_lex.lex.l" +return ERROR_TABLE; + YY_BREAK +case 3: +YY_RULE_SETUP +#line 7 "et_lex.lex.l" +return ERROR_CODE_ENTRY; + YY_BREAK +case 4: +YY_RULE_SETUP +#line 8 "et_lex.lex.l" +return ERROR_CODE_ENTRY; + YY_BREAK +case 5: +YY_RULE_SETUP +#line 9 "et_lex.lex.l" +return END; + YY_BREAK +case 6: +YY_RULE_SETUP +#line 11 "et_lex.lex.l" +; + YY_BREAK +case 7: +YY_RULE_SETUP +#line 13 "et_lex.lex.l" +{ register char *p; yylval.dynstr = ds((char *)yytext+1); + if (p=strrchr(yylval.dynstr, '"')) *p='\0'; + return QUOTED_STRING; + } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 18 "et_lex.lex.l" +{ yylval.dynstr = ds((char *)yytext); return STRING; } + YY_BREAK +case 9: +YY_RULE_SETUP +#line 20 "et_lex.lex.l" +; + YY_BREAK +case 10: +YY_RULE_SETUP +#line 22 "et_lex.lex.l" +{ return (*yytext); } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 23 "et_lex.lex.l" +ECHO; + YY_BREAK + case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yy_hold_char; + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between yy_current_buffer and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yy_n_chars = yy_current_buffer->yy_n_chars; + yy_current_buffer->yy_input_file = yyin; + yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer() ) + { + case EOB_ACT_END_OF_FILE: + { + yy_did_buffer_switch_on_eof = 0; + + if ( yywrap() ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = + yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yy_c_buf_p = + &yy_current_buffer->yy_ch_buf[yy_n_chars]; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ + } /* end of yylex */ + + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ + +static int yy_get_next_buffer() + { + register char *dest = yy_current_buffer->yy_ch_buf; + register char *source = yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( yy_current_buffer->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a singled characater, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + yy_n_chars = 0; + + else + { + int num_to_read = + yy_current_buffer->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ +#ifdef YY_USES_REJECT + YY_FATAL_ERROR( +"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); +#else + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = yy_current_buffer; + + int yy_c_buf_p_offset = + (int) (yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yy_flex_realloc( (void *) b->yy_ch_buf, + b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = yy_current_buffer->yy_buf_size - + number_to_move - 1; +#endif + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read ); + } + + if ( yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart( yyin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + yy_current_buffer->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + yy_n_chars += number_to_move; + yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; + yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + + return ret_val; + } + + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +static yy_state_type yy_get_previous_state() + { + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = yy_start; + yy_state_ptr = yy_state_buf; + *yy_state_ptr++ = yy_current_state; + + for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 35 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + } + + return yy_current_state; + } + + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + +#ifdef YY_USE_PROTOS +static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) +#else +static yy_state_type yy_try_NUL_trans( yy_current_state ) +yy_state_type yy_current_state; +#endif + { + register int yy_is_jam; + + register YY_CHAR yy_c = 1; + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 35 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + *yy_state_ptr++ = yy_current_state; + yy_is_jam = (yy_current_state == 34); + + return yy_is_jam ? 0 : yy_current_state; + } + + +#ifndef YY_NO_UNPUT +#ifdef YY_USE_PROTOS +static void yyunput( int c, register char *yy_bp ) +#else +static void yyunput( c, yy_bp ) +int c; +register char *yy_bp; +#endif + { + register char *yy_cp = yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yy_hold_char; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = yy_n_chars + 2; + register char *dest = &yy_current_buffer->yy_ch_buf[ + yy_current_buffer->yy_buf_size + 2]; + register char *source = + &yy_current_buffer->yy_ch_buf[number_to_move]; + + while ( source > yy_current_buffer->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + yy_n_chars = yy_current_buffer->yy_buf_size; + + if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + if ( c == '\n' ) + --yylineno; + + yytext_ptr = yy_bp; + yy_hold_char = *yy_cp; + yy_c_buf_p = yy_cp; + } +#endif /* ifndef YY_NO_UNPUT */ + + +#ifdef __cplusplus +static int yyinput() +#else +static int input() +#endif + { + int c; + + *yy_c_buf_p = yy_hold_char; + + if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + /* This was really a NUL. */ + *yy_c_buf_p = '\0'; + + else + { /* need more input */ + yytext_ptr = yy_c_buf_p; + ++yy_c_buf_p; + + switch ( yy_get_next_buffer() ) + { + case EOB_ACT_END_OF_FILE: + { + if ( yywrap() ) + { + yy_c_buf_p = + yytext_ptr + YY_MORE_ADJ; + return EOF; + } + + if ( ! yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + break; + + case EOB_ACT_LAST_MATCH: +#ifdef __cplusplus + YY_FATAL_ERROR( + "unexpected last match in yyinput()" ); +#else + YY_FATAL_ERROR( + "unexpected last match in input()" ); +#endif + } + } + } + + c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ + *yy_c_buf_p = '\0'; /* preserve yytext */ + yy_hold_char = *++yy_c_buf_p; + + if ( c == '\n' ) + ++yylineno; + + return c; + } + + +#ifdef YY_USE_PROTOS +void yyrestart( FILE *input_file ) +#else +void yyrestart( input_file ) +FILE *input_file; +#endif + { + if ( ! yy_current_buffer ) + yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); + + yy_init_buffer( yy_current_buffer, input_file ); + yy_load_buffer_state(); + } + + +#ifdef YY_USE_PROTOS +void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) +#else +void yy_switch_to_buffer( new_buffer ) +YY_BUFFER_STATE new_buffer; +#endif + { + if ( yy_current_buffer == new_buffer ) + return; + + if ( yy_current_buffer ) + { + /* Flush out information for old buffer. */ + *yy_c_buf_p = yy_hold_char; + yy_current_buffer->yy_buf_pos = yy_c_buf_p; + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + yy_current_buffer = new_buffer; + yy_load_buffer_state(); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yy_did_buffer_switch_on_eof = 1; + } + + +#ifdef YY_USE_PROTOS +void yy_load_buffer_state( void ) +#else +void yy_load_buffer_state() +#endif + { + yy_n_chars = yy_current_buffer->yy_n_chars; + yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; + yyin = yy_current_buffer->yy_input_file; + yy_hold_char = *yy_c_buf_p; + } + + +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) +#else +YY_BUFFER_STATE yy_create_buffer( file, size ) +FILE *file; +int size; +#endif + { + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + yy_init_buffer( b, file ); + + return b; + } + + +#ifdef YY_USE_PROTOS +void yy_delete_buffer( YY_BUFFER_STATE b ) +#else +void yy_delete_buffer( b ) +YY_BUFFER_STATE b; +#endif + { + if ( ! b ) + return; + + if ( b == yy_current_buffer ) + yy_current_buffer = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + yy_flex_free( (void *) b->yy_ch_buf ); + + yy_flex_free( (void *) b ); + } + + +#ifndef YY_ALWAYS_INTERACTIVE +#ifndef YY_NEVER_INTERACTIVE +extern int isatty YY_PROTO(( int )); +#endif +#endif + +#ifdef YY_USE_PROTOS +void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) +#else +void yy_init_buffer( b, file ) +YY_BUFFER_STATE b; +FILE *file; +#endif + + + { + yy_flush_buffer( b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + +#if YY_ALWAYS_INTERACTIVE + b->yy_is_interactive = 1; +#else +#if YY_NEVER_INTERACTIVE + b->yy_is_interactive = 0; +#else + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#endif +#endif + } + + +#ifdef YY_USE_PROTOS +void yy_flush_buffer( YY_BUFFER_STATE b ) +#else +void yy_flush_buffer( b ) +YY_BUFFER_STATE b; +#endif + + { + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == yy_current_buffer ) + yy_load_buffer_state(); + } + + +#ifndef YY_NO_SCAN_BUFFER +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) +#else +YY_BUFFER_STATE yy_scan_buffer( base, size ) +char *base; +yy_size_t size; +#endif + { + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer( b ); + + return b; + } +#endif + + +#ifndef YY_NO_SCAN_STRING +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_string( yyconst char *str ) +#else +YY_BUFFER_STATE yy_scan_string( str ) +yyconst char *str; +#endif + { + int len; + for ( len = 0; str[len]; ++len ) + ; + + return yy_scan_bytes( str, len ); + } +#endif + + +#ifndef YY_NO_SCAN_BYTES +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) +#else +YY_BUFFER_STATE yy_scan_bytes( bytes, len ) +yyconst char *bytes; +int len; +#endif + { + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) yy_flex_alloc( n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer( buf, n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; + } +#endif + + +#ifndef YY_NO_PUSH_STATE +#ifdef YY_USE_PROTOS +static void yy_push_state( int new_state ) +#else +static void yy_push_state( new_state ) +int new_state; +#endif + { + if ( yy_start_stack_ptr >= yy_start_stack_depth ) + { + yy_size_t new_size; + + yy_start_stack_depth += YY_START_STACK_INCR; + new_size = yy_start_stack_depth * sizeof( int ); + + if ( ! yy_start_stack ) + yy_start_stack = (int *) yy_flex_alloc( new_size ); + + else + yy_start_stack = (int *) yy_flex_realloc( + (void *) yy_start_stack, new_size ); + + if ( ! yy_start_stack ) + YY_FATAL_ERROR( + "out of memory expanding start-condition stack" ); + } + + yy_start_stack[yy_start_stack_ptr++] = YY_START; + + BEGIN(new_state); + } +#endif + + +#ifndef YY_NO_POP_STATE +static void yy_pop_state() + { + if ( --yy_start_stack_ptr < 0 ) + YY_FATAL_ERROR( "start-condition stack underflow" ); + + BEGIN(yy_start_stack[yy_start_stack_ptr]); + } +#endif + + +#ifndef YY_NO_TOP_STATE +static int yy_top_state() + { + return yy_start_stack[yy_start_stack_ptr - 1]; + } +#endif + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +#ifdef YY_USE_PROTOS +static void yy_fatal_error( yyconst char msg[] ) +#else +static void yy_fatal_error( msg ) +char msg[]; +#endif + { + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); + } + + + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + yytext[yyleng] = yy_hold_char; \ + yy_c_buf_p = yytext + n - YY_MORE_ADJ; \ + yy_hold_char = *yy_c_buf_p; \ + *yy_c_buf_p = '\0'; \ + yyleng = n; \ + } \ + while ( 0 ) + + +/* Internal utility routines. */ + +#ifndef yytext_ptr +#ifdef YY_USE_PROTOS +static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) +#else +static void yy_flex_strncpy( s1, s2, n ) +char *s1; +yyconst char *s2; +int n; +#endif + { + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; + } +#endif + + +#ifdef YY_USE_PROTOS +static void *yy_flex_alloc( yy_size_t size ) +#else +static void *yy_flex_alloc( size ) +yy_size_t size; +#endif + { + return (void *) malloc( size ); + } + +#ifdef YY_USE_PROTOS +static void *yy_flex_realloc( void *ptr, yy_size_t size ) +#else +static void *yy_flex_realloc( ptr, size ) +void *ptr; +yy_size_t size; +#endif + { + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); + } + +#ifdef YY_USE_PROTOS +static void yy_flex_free( void *ptr ) +#else +static void yy_flex_free( ptr ) +void *ptr; +#endif + { + free( ptr ); + } + +#if YY_MAIN +int main() + { + yylex(); + return 0; + } +#endif +#line 23 "et_lex.lex.l" + +/* + * Copyright 2000, International Business Machines Corporation and others. + * All Rights Reserved. + * + * This software has been released under the terms of the IBM Public + * License. For details, see the LICENSE file in the top-level source + * directory or online at http://www.openafs.org/dl/license10.html + */ +int yywrap(void) { + return 1; +} diff --git a/src/comerr/test/NTMakefile b/src/comerr/test/NTMakefile index d074f1da0..2a1aa9e99 100644 --- a/src/comerr/test/NTMakefile +++ b/src/comerr/test/NTMakefile @@ -1,17 +1,16 @@ # Copyright (C) 1998 Transarc Corporation. All rights reserved. # - +RELDIR=comerr\test !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version - -EXEFILE = $(OJT)\comerr_test.exe +EXEFILE = $(OUT)\comerr_test.exe EXEOBJS =\ - $(OJT)\test1.obj \ - $(OJT)\test2.obj \ - $(OJT)\test.obj + $(OUT)\test1.obj \ + $(OUT)\test2.obj \ + $(OUT)\test.obj EXELIBS =\ $(DESTDIR)\lib\afs\afsutil.lib \ diff --git a/src/config/NTMakefile b/src/config/NTMakefile index 886851ec0..e6acbd4d2 100644 --- a/src/config/NTMakefile +++ b/src/config/NTMakefile @@ -5,6 +5,7 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=config !INCLUDE NTMakefile.$(SYS_NAME) # Relative path to src directory depends on how we got to current directory. @@ -34,6 +35,339 @@ $(INCFILEDIR)\afsconfig.h: afsconfig-windows.h $(COPY) $? $@ idirs: doclink +! IF (!EXIST($(OJT))) + $(MKDIR) $(OJT) +! ENDIF +! IF (!EXIST($(OJT)\afs)) + $(MKDIR) $(OJT)\afs +! ENDIF +! IF (!EXIST($(OJT)\audit)) + $(MKDIR) $(OJT)\audit +! ENDIF +! IF (!EXIST($(OJT)\auth)) + $(MKDIR) $(OJT)\auth +! ENDIF +! IF (!EXIST($(OJT)\auth\test)) + $(MKDIR) $(OJT)\auth\test +! ENDIF +! IF (!EXIST($(OJT)\bozo)) + $(MKDIR) $(OJT)\bozo +! ENDIF +! IF (!EXIST($(OJT)\bubasics)) + $(MKDIR) $(OJT)\bubasics +! ENDIF +! IF (!EXIST($(OJT)\bucoord)) + $(MKDIR) $(OJT)\bucoord +! ENDIF +! IF (!EXIST($(OJT)\budb)) + $(MKDIR) $(OJT)\budb +! ENDIF +! IF (!EXIST($(OJT)\butc)) + $(MKDIR) $(OJT)\butc +! ENDIF +! IF (!EXIST($(OJT)\butm)) + $(MKDIR) $(OJT)\butm +! ENDIF +! IF (!EXIST($(OJT)\bu_utils)) + $(MKDIR) $(OJT)\bu_utils +! ENDIF +! IF (!EXIST($(OJT)\cmd)) + $(MKDIR) $(OJT)\cmd +! ENDIF +! IF (!EXIST($(OJT)\cmd\test)) + $(MKDIR) $(OJT)\cmd\test +! ENDIF +! IF (!EXIST($(OJT)\comerr)) + $(MKDIR) $(OJT)\comerr +! ENDIF +! IF (!EXIST($(OJT)\comerr\test)) + $(MKDIR) $(OJT)\comerr\test +! ENDIF +! IF (!EXIST($(OJT)\config)) + $(MKDIR) $(OJT)\config +! ENDIF +! IF (!EXIST($(OJT)\des)) + $(MKDIR) $(OJT)\des +! ENDIF +! IF (!EXIST($(OJT)\des\test)) + $(MKDIR) $(OJT)\des\test +! ENDIF +! IF (!EXIST($(OJT)\des_stub)) + $(MKDIR) $(OJT)\des_stub +! ENDIF +! IF (!EXIST($(OJT)\dir)) + $(MKDIR) $(OJT)\dir +! ENDIF +! IF (!EXIST($(OJT)\dir\test)) + $(MKDIR) $(OJT)\dir\test +! ENDIF +! IF (!EXIST($(OJT)\finale)) + $(MKDIR) $(OJT)\finale +! ENDIF +! IF (!EXIST($(OJT)\fsint)) + $(MKDIR) $(OJT)\fsint +! ENDIF +! IF (!EXIST($(OJT)\kauth)) + $(MKDIR) $(OJT)\kauth +! ENDIF +! IF (!EXIST($(OJT)\kauth\test)) + $(MKDIR) $(OJT)\kauth\test +! ENDIF +! IF (!EXIST($(OJT)\libacl)) + $(MKDIR) $(OJT)\libacl +! ENDIF +! IF (!EXIST($(OJT)\libadmin)) + $(MKDIR) $(OJT)\libadmin +! ENDIF +! IF (!EXIST($(OJT)\libadmin\adminutil)) + $(MKDIR) $(OJT)\libadmin\adminutil +! ENDIF +! IF (!EXIST($(OJT)\libadmin\bos)) + $(MKDIR) $(OJT)\libadmin\bos +! ENDIF +! IF (!EXIST($(OJT)\libadmin\cfg)) + $(MKDIR) $(OJT)\libadmin\cfg +! ENDIF +! IF (!EXIST($(OJT)\libadmin\cfg\test)) + $(MKDIR) $(OJT)\libadmin\cfg\test +! ENDIF +! IF (!EXIST($(OJT)\libadmin\client)) + $(MKDIR) $(OJT)\libadmin\client +! ENDIF +! IF (!EXIST($(OJT)\libadmin\kas)) + $(MKDIR) $(OJT)\libadmin\kas +! ENDIF +! IF (!EXIST($(OJT)\libadmin\pts)) + $(MKDIR) $(OJT)\libadmin\pts +! ENDIF +! IF (!EXIST($(OJT)\libadmin\test)) + $(MKDIR) $(OJT)\libadmin\test +! ENDIF +! IF (!EXIST($(OJT)\libadmin\vos)) + $(MKDIR) $(OJT)\libadmin\vos +! ENDIF +! IF (!EXIST($(OJT)\libafsauthent)) + $(MKDIR) $(OJT)\libafsauthent +! ENDIF +! IF (!EXIST($(OJT)\libafsrpc)) + $(MKDIR) $(OJT)\libafsrpc +! ENDIF +! IF (!EXIST($(OJT)\lwp)) + $(MKDIR) $(OJT)\lwp +! ENDIF +! IF (!EXIST($(OJT)\lwp\test)) + $(MKDIR) $(OJT)\lwp\test +! ENDIF +! IF (!EXIST($(OJT)\procmgmt)) + $(MKDIR) $(OJT)\procmgmt +! ENDIF +! IF (!EXIST($(OJT)\procmgmt\test)) + $(MKDIR) $(OJT)\procmgmt\test +! ENDIF +! IF (!EXIST($(OJT)\ptserver)) + $(MKDIR) $(OJT)\ptserver +! ENDIF +! IF (!EXIST($(OJT)\rx)) + $(MKDIR) $(OJT)\rx +! ENDIF +! IF (!EXIST($(OJT)\rx\test)) + $(MKDIR) $(OJT)\rx\test +! ENDIF +! IF (!EXIST($(OJT)\rxgen)) + $(MKDIR) $(OJT)\rxgen +! ENDIF +! IF (!EXIST($(OJT)\rxkad)) + $(MKDIR) $(OJT)\rxkad +! ENDIF +! IF (!EXIST($(OJT)\rxstat)) + $(MKDIR) $(OJT)\rxstat +! ENDIF +! IF (!EXIST($(OJT)\shlibafsauthent)) + $(MKDIR) $(OJT)\shlibafsauthent +! ENDIF +! IF (!EXIST($(OJT)\shlibafsrpc)) + $(MKDIR) $(OJT)\shlibafsrpc +! ENDIF +! IF (!EXIST($(OJT)\sys)) + $(MKDIR) $(OJT)\sys +! ENDIF +! IF (!EXIST($(OJT)\tbutc)) + $(MKDIR) $(OJT)\tbutc +! ENDIF +! IF (!EXIST($(OJT)\tviced)) + $(MKDIR) $(OJT)\tviced +! ENDIF +! IF (!EXIST($(OJT)\ubik)) + $(MKDIR) $(OJT)\ubik +! ENDIF +! IF (!EXIST($(OJT)\update)) + $(MKDIR) $(OJT)\update +! ENDIF +! IF (!EXIST($(OJT)\usd)) + $(MKDIR) $(OJT)\usd +! ENDIF +! IF (!EXIST($(OJT)\usd\test)) + $(MKDIR) $(OJT)\usd\test +! ENDIF +! IF (!EXIST($(OJT)\util)) + $(MKDIR) $(OJT)\util +! ENDIF +! IF (!EXIST($(OJT)\util\test)) + $(MKDIR) $(OJT)\util\test +! ENDIF +! IF (!EXIST($(OJT)\viced)) + $(MKDIR) $(OJT)\viced +! ENDIF +! IF (!EXIST($(OJT)\vlserver)) + $(MKDIR) $(OJT)\vlserver +! ENDIF +! IF (!EXIST($(OJT)\vol)) + $(MKDIR) $(OJT)\vol +! ENDIF +! IF (!EXIST($(OJT)\vol\test)) + $(MKDIR) $(OJT)\vol\test +! ENDIF +! IF (!EXIST($(OJT)\volser)) + $(MKDIR) $(OJT)\volser +! ENDIF +! IF (!EXIST($(OJT)\WINNT)) + $(MKDIR) $(OJT)\WINNT +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afsadmsvr)) + $(MKDIR) $(OJT)\WINNT\afsadmsvr +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afsapplib)) + $(MKDIR) $(OJT)\WINNT\afsapplib +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afsapplib\lang)) + $(MKDIR) $(OJT)\WINNT\afsapplib\lang +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afsapplib\test)) + $(MKDIR) $(OJT)\WINNT\afsapplib\test +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afsclass)) + $(MKDIR) $(OJT)\WINNT\afsclass +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afsd)) + $(MKDIR) $(OJT)\WINNT\afsd +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afslegal)) + $(MKDIR) $(OJT)\WINNT\afslegal +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afslegal\lang)) + $(MKDIR) $(OJT)\WINNT\afslegal\lang +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afsreg)) + $(MKDIR) $(OJT)\WINNT\afsreg +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afsreg\test)) + $(MKDIR) $(OJT)\WINNT\afsreg\test +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afssvrcfg)) + $(MKDIR) $(OJT)\WINNT\afssvrcfg +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afssvrcfg\lang)) + $(MKDIR) $(OJT)\WINNT\afssvrcfg\lang +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afssvrcpa)) + $(MKDIR) $(OJT)\WINNT\afssvrcpa +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afssvrcpa\lang)) + $(MKDIR) $(OJT)\WINNT\afssvrcpa\lang +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afssvrmgr)) + $(MKDIR) $(OJT)\WINNT\afssvrmgr +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afssvrmgr\lang)) + $(MKDIR) $(OJT)\WINNT\afssvrmgr\lang +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afsusrmgr)) + $(MKDIR) $(OJT)\WINNT\afsusrmgr +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afsusrmgr\lang)) + $(MKDIR) $(OJT)\WINNT\afsusrmgr\lang +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afs_setup_utils)) + $(MKDIR) $(OJT)\WINNT\afs_setup_utils +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afs_setup_utils\lang)) + $(MKDIR) $(OJT)\WINNT\afs_setup_utils\lang +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afs_setup_utils\_isuser)) + $(MKDIR) $(OJT)\WINNT\afs_setup_utils\_isuser +! ENDIF +! IF (!EXIST($(OJT)\WINNT\afs_setup_utils\GetWebDll)) + $(MKDIR) $(OJT)\WINNT\afs_setup_utils\GetWebDll +! ENDIF +! IF (!EXIST($(OJT)\WINNT\bosctlsvc)) + $(MKDIR) $(OJT)\WINNT\bosctlsvc +! ENDIF +! IF (!EXIST($(OJT)\WINNT\client_config)) + $(MKDIR) $(OJT)\WINNT\client_config +! ENDIF +! IF (!EXIST($(OJT)\WINNT\client_config\lang)) + $(MKDIR) $(OJT)\WINNT\client_config\lang +! ENDIF +! IF (!EXIST($(OJT)\WINNT\client_cpa)) + $(MKDIR) $(OJT)\WINNT\client_cpa +! ENDIF +! IF (!EXIST($(OJT)\WINNT\client_cpa\lang)) + $(MKDIR) $(OJT)\WINNT\client_cpa\lang +! ENDIF +! IF (!EXIST($(OJT)\WINNT\client_creds)) + $(MKDIR) $(OJT)\WINNT\client_creds +! ENDIF +! IF (!EXIST($(OJT)\WINNT\client_creds\lang)) + $(MKDIR) $(OJT)\WINNT\client_creds\lang +! ENDIF +! IF (!EXIST($(OJT)\WINNT\client_exp)) + $(MKDIR) $(OJT)\WINNT\client_exp +! ENDIF +! IF (!EXIST($(OJT)\WINNT\client_exp\lang)) + $(MKDIR) $(OJT)\WINNT\client_exp\lang +! ENDIF +! IF (!EXIST($(OJT)\WINNT\client_osi)) + $(MKDIR) $(OJT)\WINNT\client_osi +! ENDIF +! IF (!EXIST($(OJT)\WINNT\eventlog)) + $(MKDIR) $(OJT)\WINNT\eventlog +! ENDIF +! IF (!EXIST($(OJT)\WINNT\eventlog\lang)) + $(MKDIR) $(OJT)\WINNT\eventlog\lang +! ENDIF +! IF (!EXIST($(OJT)\WINNT\eventlog\test)) + $(MKDIR) $(OJT)\WINNT\eventlog\test +! ENDIF +! IF (!EXIST($(OJT)\WINNT\install)) + $(MKDIR) $(OJT)\WINNT\install +! ENDIF +! IF (!EXIST($(OJT)\WINNT\install\InstallShield5)) + $(MKDIR) $(OJT)\WINNT\install\InstallShield5 +! ENDIF +! IF (!EXIST($(OJT)\WINNT\install\NSIS)) + $(MKDIR) $(OJT)\WINNT\install\NSIS +! ENDIF +! IF (!EXIST($(OJT)\WINNT\install\Win9x)) + $(MKDIR) $(OJT)\WINNT\install\Win9x +! ENDIF +! IF (!EXIST($(OJT)\WINNT\license)) + $(MKDIR) $(OJT)\WINNT\license +! ENDIF +! IF (!EXIST($(OJT)\WINNT\license\lang)) + $(MKDIR) $(OJT)\WINNT\license\lang +! ENDIF +! IF (!EXIST($(OJT)\WINNT\pthread)) + $(MKDIR) $(OJT)\WINNT\pthread +! ENDIF +! IF (!EXIST($(OJT)\WINNT\pthread\test)) + $(MKDIR) $(OJT)\WINNT\pthread\test +! ENDIF +! IF (!EXIST($(OJT)\WINNT\talocale)) + $(MKDIR) $(OJT)\WINNT\talocale +! ENDIF +! IF (!EXIST($(OJT)\WINNT\win9xpanel)) + $(MKDIR) $(OJT)\WINNT\win9xpanel +! ENDIF ! IF (!EXIST($(DESTDIR))) $(MKDIR) $(DESTDIR) ! ENDIF @@ -106,7 +440,7 @@ $(DESTDIR)\bin\NTBUILD.bat:..\NTBUILD.bat $(COPY) $? $@ $(UTIL_CR) + $@ -$(DESTDIR)\bin\NTLang.bat: NTLang.bat $(OJT)\util_cr.exe +$(DESTDIR)\bin\NTLang.bat: NTLang.bat $(DESTDIR)\bin\util_cr.exe $(COPY) NTLang.bat $(DESTDIR)\bin $(UTIL_CR) + $(DESTDIR)\bin\NTLang.bat @@ -138,16 +472,16 @@ INCTOOLS = \ $(DESTDIR)\bin\util_cr.exe \ $(DESTDIR)\bin\touch.exe -$(INCTOOLS):$(OJT)\$$(@F) +$(INCTOOLS):$(OUT)\$$(@F) $(COPY) $** $(DESTDIR)\bin\. -$(OJT)\mkvers.exe : $(OJT)\mkvers.obj +$(OUT)\mkvers.exe : $(OUT)\mkvers.obj $(EXECONLINK) -$(OJT)\touch.exe : $(OJT)\touch.obj +$(OUT)\touch.exe : $(OUT)\touch.obj $(EXECONLINK) -$(OJT)\util_cr.exe : $(OJT)\util_cr.obj +$(OUT)\util_cr.exe : $(OUT)\util_cr.obj $(EXECONLINK) langsetup: $(DESTDIR)\bin\NTLang.bat @@ -165,6 +499,6 @@ clean:: $(DEL) $(DESTDIR)\LIB\*.DLL $(DEL) $(DESTDIR)\bin\mkver.exe $(DEL) $(DESTDIR)\bin\touch.exe - $(DEL) util_cr.exe - $(DEL) mkver.exe - $(DEL) touch.exe + $(DEL) $(OUT)\util_cr.exe + $(DEL) $(OUT)\mkver.exe + $(DEL) $(OUT)\touch.exe diff --git a/src/config/NTMakefile.i386_nt40 b/src/config/NTMakefile.i386_nt40 index c1862b614..d22d3cb14 100644 --- a/src/config/NTMakefile.i386_nt40 +++ b/src/config/NTMakefile.i386_nt40 @@ -69,11 +69,11 @@ OBJ=obj !IF ("$(AFS_OBJDIR)"=="") ######### AFS_OBJDIR is NOT used use default locations ! IF ("$(AFSDEV_BUILDTYPE)" == "CHECKED") -DESTDIR=$(AFSROOT)\$(OBJ)\$(DEST)\checked -OJT=$(MAKEDIR:src=obj\checked) +DESTDIR=$(AFSROOT)\$(DEST)\checked +OJT=$(AFSROOT)\$(OBJ)\checked ! ELSE -DESTDIR=$(AFSROOT)\$(OBJ)\$(DEST)\free -OJT=$(MAKEDIR:src=obj\free) +DESTDIR=$(AFSROOT)\$(DEST)\free +OJT=$(AFSROOT)\$(OBJ)\free ! ENDIF UTIL_CR = $(DESTDIR)\bin\util_cr.exe !ELSE @@ -118,14 +118,23 @@ UTIL_CR = $(DESTDIR)\bin\util_cr.exe ! ENDIF !ENDIF #AFS_OBJDIR -!MESSAGE Directory assignments: OJT=[$(OJT)] DESTDIR=[$(DESTDIR)] +!IF ("$(RELDIR)"=="") +OUT=$(OJT) +!ELSE +OUT=$(OJT)\$(RELDIR) +!ENDIF + +!MESSAGE Directory assignments: +!MESSAGE OJT=[$(OJT)] +!MESSAGE OUT=[$(OUT)] +!MESSAGE DESTDIR=[$(DESTDIR)] # Definitions provided here are based on WIN32.MAK, a common nmake # file included with the MS SDK and MS VC distributions. # WIN32.MAK, and this nmake file, are targeted to the MSVC compiler; # port this nmake file if additional compiler support is required. -!IF ("$(AFSVER)"=="1300") +!IF ("$(AFSVER_CL)"=="1300") afslflags = $(afslflags) /DEBUG !ENDIF @@ -133,7 +142,7 @@ afslflags = $(afslflags) /DEBUG APPVER=4.0 !ENDIF -!UNDEF NODEBUG + !INCLUDE @@ -155,8 +164,8 @@ MIDL = midl # Common clean target. clean:: - $(DEL) /q $(OJT)\*.obj $(OJT)\*.lib $(OJT)\*.dll $(OJT)\*.exe $(OJT)\*.pdb - $(DEL) /q $(OJT)\*_component_version_number.* *_component_version_number.* + $(DEL) /q $(OUT)\*.obj $(OUT)\*.lib $(OUT)\*.dll $(OUT)\*.exe $(OUT)\*.pdb + $(DEL) /q $(OUT)\*_component_version_number.* *_component_version_number.* # Common lang target. lang:: @@ -208,6 +217,7 @@ cdebug = $(cdebug) -Zi afscflags = $(afscflags) /Ox cdebug = $(cdebug:-Od=) # avoid annoying override warning (D4025) cvarsdll = $(cvarsdll:-MDd=-MD) +NODEBUG=1 !ELSE # CHECKED BUILD @@ -219,6 +229,7 @@ afscdefs = $(afscdefs) -DDEBUG afscflags = $(afscflags) -D_DEBUG -D_CRTDBG_MAP_ALLOC !ENDIF +!UNDEF NODEBUG !ENDIF # Set compiler warning level @@ -241,21 +252,21 @@ afscflags = $(afscflags) /W$(AFSDEV_WARNLEVEL) C2OBJ = $(cc) /Fo$@ /Fd$*.pdb $(cflags) $(cdebug) $(cvarsdll) $(afscflags) $(afscdefs) /c CPP2OBJ = $(C2OBJ) # Inference rules for building and installing targets -# Compile .c files, from current directory to defined by OJT +# Compile .c files, from current directory to defined by OUT .SUFFIXES: .c .rc -.c{$(OJT)\}.obj: +.c{$(OUT)\}.obj: $(C2OBJ) $< .c.obj: $(C2OBJ) $< -.cpp{$(OJT)\}.obj: +.cpp{$(OUT)\}.obj: $(CPP2OBJ) $< -.rc{$(OJT)\}.res: - $(RC) /fo$(OJT)\$( #include #include - + #include #include static char AFSConfigKeyName[] = @@ -101,6 +101,7 @@ GetIoctlHandle(char *fileNamep, HANDLE * handlep) char *drivep; char hostName[256]; char tbuffer[100]; + char explicitNetbiosName[32]; char *ctemp; HANDLE fh; HKEY parmKey; @@ -123,7 +124,14 @@ GetIoctlHandle(char *fileNamep, HANDLE * handlep) KEY_QUERY_VALUE, &parmKey); if (code != ERROR_SUCCESS) goto nogateway; - dummyLen = sizeof(hostName); + dummyLen = sizeof(explicitNetbiosName); + code = RegQueryValueEx(parmKey, "NetbiosName", NULL, NULL, + (BYTE *) &explicitNetbiosName, &dummyLen); + if (!code == ERROR_SUCCESS) + { + explicitNetbiosName[0] = 0; + } + dummyLen = sizeof(hostName); code = RegQueryValueEx(parmKey, "Gateway", NULL, NULL, hostName, &dummyLen); @@ -146,13 +154,23 @@ GetIoctlHandle(char *fileNamep, HANDLE * handlep) #endif /* AFS_WIN95_ENV */ havehost: - ctemp = strchr(hostName, '.'); /* turn ntafs.* into ntafs */ - if (ctemp) - *ctemp = 0; - hostName[11] = 0; - - _strupr(hostName); - sprintf(tbuffer, "\\\\%s-AFS\\all%s", hostName, SMB_IOCTL_FILENAME); + ctemp = strchr(hostName, '.'); /* turn ntafs.* into ntafs */ + if (ctemp) + *ctemp = 0; + hostName[11] = 0; + + if (explicitNetbiosName[0]) + { + _strupr(explicitNetbiosName); + sprintf(tbuffer, "\\\\%s\\all%s", + explicitNetbiosName, SMB_IOCTL_FILENAME); + } + else + { + _strupr(hostName); + sprintf(tbuffer, "\\\\%s-AFS\\all%s", + hostName, SMB_IOCTL_FILENAME); + } } fflush(stdout); diff --git a/src/tbutc/NTMakefile b/src/tbutc/NTMakefile index ea29c9514..6efbdbe80 100644 --- a/src/tbutc/NTMakefile +++ b/src/tbutc/NTMakefile @@ -7,6 +7,7 @@ AFSDEV_AUXCDEFINES = -DAFS_PTHREAD_ENV -DRXDEBUG +RELDIR=tbutc !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version @@ -30,23 +31,41 @@ BUTC =..\butc BUCOORD = ..\bucoord VOLSER = ..\volser -BUCOORDOBJS = $(OJT)\ubik_db_if.obj $(OJT)\$(BUCOORD)\volstub.obj $(OJT)\$(BUCOORD)\dlq.obj \ - $(OJT)\$(BUCOORD)\status.obj $(OJT)\$(BUCOORD)\bucoord_errs.obj - -VOLSERLIBOBJ = $(OJT)\$(VOLSER)\volint.cs.obj $(OJT)\vsprocs.obj $(OJT)\$(VOLSER)\vsutils.obj \ - $(OJT)\$(VOLSER)\lockprocs.obj $(OJT)\$(VOLSER)\volint.xdr.obj $(OJT)\$(VOLSER)\volerr.obj \ - $(OJT)\$(VOLSER)\volint.ss.obj $(OJT)\AFS_component_version_number.obj -VOLSERLIBS = $(OJT)\afstvolser.lib - -LWPOBJS = $(OJT)\lock.obj - -BUTMOBJS = $(OJT)\file_tm.obj $(OJT)\AFS_component_version_number.obj -BUTMLIBS = $(OJT)\afstbutm.lib +BUCOORDOBJS = $(OUT)\ubik_db_if.obj \ + $(OUT)\$(BUCOORD)\volstub.obj \ + $(OUT)\$(BUCOORD)\dlq.obj \ + $(OUT)\$(BUCOORD)\status.obj \ + $(OUT)\$(BUCOORD)\bucoord_errs.obj + +VOLSERLIBOBJ = $(OUT)\$(VOLSER)\volint.cs.obj \ + $(OUT)\vsprocs.obj \ + $(OUT)\$(VOLSER)\vsutils.obj \ + $(OUT)\$(VOLSER)\lockprocs.obj \ + $(OUT)\$(VOLSER)\volint.xdr.obj \ + $(OUT)\$(VOLSER)\volerr.obj \ + $(OUT)\$(VOLSER)\volint.ss.obj \ + $(OUT)\AFS_component_version_number.obj +VOLSERLIBS = $(OUT)\afstvolser.lib + +LWPOBJS = $(OUT)\lock.obj + +BUTMOBJS = $(OUT)\file_tm.obj \ + $(OUT)\AFS_component_version_number.obj +BUTMLIBS = $(OUT)\afstbutm.lib BUTMINCLUDE = -I$(DESTDIR)\include -BUTCOBJS = $(OJT)\dbentries.obj $(OJT)\tcprocs.obj $(OJT)\lwps.obj $(OJT)\tcmain.obj $(OJT)\list.obj $(OJT)\recoverDb.obj \ - $(OJT)\tcudbprocs.obj $(OJT)\dump.obj $(OJT)\tcstatus.obj $(OJT)\butc_xbsa.obj \ - $(LWPOBJS) $(BUCOORDOBJS) +BUTCOBJS = $(OUT)\dbentries.obj \ + $(OUT)\tcprocs.obj \ + $(OUT)\lwps.obj \ + $(OUT)\tcmain.obj \ + $(OUT)\list.obj \ + $(OUT)\recoverDb.obj \ + $(OUT)\tcudbprocs.obj \ + $(OUT)\dump.obj \ + $(OUT)\tcstatus.obj \ + $(OUT)\butc_xbsa.obj \ + $(LWPOBJS) \ + $(BUCOORDOBJS) BUTCINCLUDE= -I. -I$(DESTDIR)\include -I$(XBSADIR) BUTCLIBS=$(DESTDIR)\lib\afs\afsbudb.lib \ $(DESTDIR)\lib\afs\afsbubasics.lib \ @@ -89,7 +108,7 @@ BUTCLIBS=$(DESTDIR)\lib\afs\afsbudb.lib \ include ..\config\NTMakefile.version -# rm $(OJT)\tcstatus.obj +# rm $(OUT)\tcstatus.obj # nmake /nologo /f ntmakefile install #----------------------------------------------- BUTC @@ -97,65 +116,65 @@ $(BUTCEXE): $(BUTCOBJS) $(BUTCLIBS) $(EXECONLINK) $(EXEPREP) -.c.$(OJT)\obj: +.c.$(OUT)\obj: $(C2OBJ) -I$(BUCOORD) $< -$(OJT)\dbentries.obj: $(BUTC)/dbentries.c +$(OUT)\dbentries.obj: $(BUTC)/dbentries.c $(C2OBJ) $** -$(OJT)\tcprocs.obj: $(BUTC)/tcprocs.c +$(OUT)\tcprocs.obj: $(BUTC)/tcprocs.c $(C2OBJ) $** -$(OJT)\lwps.obj: $(BUTC)/lwps.c +$(OUT)\lwps.obj: $(BUTC)/lwps.c $(C2OBJ) $** -$(OJT)\tcmain.obj: $(BUTC)/tcmain.c +$(OUT)\tcmain.obj: $(BUTC)/tcmain.c $(C2OBJ) $** -$(OJT)\list.obj: $(BUTC)/list.c +$(OUT)\list.obj: $(BUTC)/list.c $(C2OBJ) $** -$(OJT)\recoverDb.obj: $(BUTC)/recoverDb.c +$(OUT)\recoverDb.obj: $(BUTC)/recoverDb.c $(C2OBJ) $** -$(OJT)\tcudbprocs.obj: $(BUTC)/tcudbprocs.c +$(OUT)\tcudbprocs.obj: $(BUTC)/tcudbprocs.c $(C2OBJ) $** -$(OJT)\dump.obj: $(BUTC)/dump.c +$(OUT)\dump.obj: $(BUTC)/dump.c $(C2OBJ) $** -$(OJT)\tcstatus.obj: $(BUTC)/tcstatus.c +$(OUT)\tcstatus.obj: $(BUTC)/tcstatus.c $(C2OBJ) $** -$(OJT)\butc_xbsa.obj: $(BUTC)/butc_xbsa.c +$(OUT)\butc_xbsa.obj: $(BUTC)/butc_xbsa.c $(C2OBJ) $** #----------------------------------------------- BUCOORD -$(OJT)\ubik_db_if.obj: $(BUCOORD)/ubik_db_if.c +$(OUT)\ubik_db_if.obj: $(BUCOORD)/ubik_db_if.c $(C2OBJ) -I$(BUCOORD) $** #----------------------------------------------- VOLSER # Build the afstvolser.lib library here. The file compiled # for is is vsprocs.c. The rest are from the VOLSER dir. -$(OJT)\afstvolser.lib: $(VOLSERLIBOBJ) +$(OUT)\afstvolser.lib: $(VOLSERLIBOBJ) $(LIBARCH) -$(OJT)\vsprocs.obj: $(VOLSER)/vsprocs.c +$(OUT)\vsprocs.obj: $(VOLSER)/vsprocs.c $(C2OBJ) $** #----------------------------------------------- LWP -$(OJT)\lock.obj: $(LWP)/lock.c +$(OUT)\lock.obj: $(LWP)/lock.c $(C2OBJ) $** #----------------------------------------------- BUTC -$(OJT)\file_tm.obj: $(BUTM)/file_tm.c +$(OUT)\file_tm.obj: $(BUTM)/file_tm.c $(C2OBJ) $** -$(OJT)\afstbutm.lib: $(BUTMOBJS) +$(OUT)\afstbutm.lib: $(BUTMOBJS) $(LIBARCH) #----------------------------------------------- diff --git a/src/tviced/NTMakefile b/src/tviced/NTMakefile index 3068e67b7..6f2d1e952 100644 --- a/src/tviced/NTMakefile +++ b/src/tviced/NTMakefile @@ -7,6 +7,7 @@ AFSDEV_AUXCDEFINES = -DAFS_PTHREAD_ENV -DRXDEBUG +RELDIR=tviced !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version @@ -17,7 +18,6 @@ SRC_DIR = ..\viced EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\fileserver.exe - VICED = ..\viced VLSERVER = ..\vlserver LWP = ..\lwp @@ -28,25 +28,26 @@ VOL = ..\vol FSINT = ..\fsint RX = ..\rx -RXOBJS = $(OJT)\xdr_int64.obj $(OJT)\xdr_int32.obj +RXOBJS = $(OUT)\xdr_int64.obj \ + $(OUT)\xdr_int32.obj -VICEDOBJS = $(OJT)\viced.obj $(OJT)\afsfileprocs.obj $(OJT)\host.obj $(OJT)\physio.obj $(OJT)\callback.obj -VICEDRES = $(OJT)\$(VICED)\fileserver.res +VICEDOBJS = $(OUT)\viced.obj $(OUT)\afsfileprocs.obj $(OUT)\host.obj $(OUT)\physio.obj $(OUT)\callback.obj +VICEDRES = $(OUT)\$(VICED)\fileserver.res -VLSERVEROBJS = $(OJT)\vldbint.cs.obj $(OJT)\vldbint.xdr.obj +VLSERVEROBJS = $(OUT)\vldbint.cs.obj $(OUT)\vldbint.xdr.obj -LWPOBJS = $(OJT)\lock.obj $(OJT)\fasttime.obj $(OJT)\threadname.obj +LWPOBJS = $(OUT)\lock.obj $(OUT)\fasttime.obj $(OUT)\threadname.obj -LIBACLOBJS = $(OJT)\aclprocs.obj $(OJT)\netprocs.obj +LIBACLOBJS = $(OUT)\aclprocs.obj $(OUT)\netprocs.obj -UTILOBJS = $(OJT)\assert.obj $(OJT)\uuid.obj $(OJT)\serverLog.obj $(OJT)\fileutil.obj +UTILOBJS = $(OUT)\assert.obj $(OUT)\uuid.obj $(OUT)\serverLog.obj $(OUT)\fileutil.obj -DIROBJS = $(OJT)\buffer.obj $(OJT)\dir.obj $(OJT)\salvage.obj +DIROBJS = $(OUT)\buffer.obj $(OUT)\dir.obj $(OUT)\salvage.obj -VOLOBJS = $(OJT)\vnode.obj $(OJT)\volume.obj $(OJT)\vutil.obj $(OJT)\partition.obj $(OJT)\fssync.obj $(OJT)\purge.obj \ - $(OJT)\clone.obj $(OJT)\common.obj $(OJT)\ihandle.obj $(OJT)\ntops.obj +VOLOBJS = $(OUT)\vnode.obj $(OUT)\volume.obj $(OUT)\vutil.obj $(OUT)\partition.obj $(OUT)\fssync.obj $(OUT)\purge.obj \ + $(OUT)\clone.obj $(OUT)\common.obj $(OUT)\ihandle.obj $(OUT)\ntops.obj -FSINTOBJS = $(OJT)\afsaux.obj $(OJT)\afscbint.cs.obj $(OJT)\afsint.ss.obj $(OJT)\afsint.xdr.obj +FSINTOBJS = $(OUT)\afsaux.obj $(OUT)\afscbint.cs.obj $(OUT)\afsint.ss.obj $(OUT)\afsint.xdr.obj EXEOBJS = $(VICEDOBJS) $(VICEDRES) $(VLSERVEROBJS) $(LWPOBJS) $(LIBACLOBJS) \ $(UTILOBJS) $(DIROBJS) $(VOLOBJS) $(FSINTOBJS) $(RXOBJS) diff --git a/src/ubik/NTMakefile b/src/ubik/NTMakefile index 848ff92c3..f3cfd550a 100644 --- a/src/ubik/NTMakefile +++ b/src/ubik/NTMakefile @@ -5,10 +5,10 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=ubik !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version - ############################################################################ # Install header files @@ -26,21 +26,21 @@ INCFILES =\ LIBFILE = $(DESTDIR)\lib\afsubik.lib LIBOBJS =\ - $(OJT)\disk.obj \ - $(OJT)\remote.obj \ - $(OJT)\beacon.obj \ - $(OJT)\recovery.obj \ - $(OJT)\ubik.obj \ - $(OJT)\vote.obj \ - $(OJT)\lock.obj \ - $(OJT)\phys.obj \ - $(OJT)\ubik_int.cs.obj \ - $(OJT)\ubik_int.ss.obj \ - $(OJT)\ubik_int.xdr.obj \ - $(OJT)\ubikcmd.obj \ - $(OJT)\ubikclient.obj \ - $(OJT)\uerrors.obj \ - $(OJT)\AFS_component_version_number.obj + $(OUT)\disk.obj \ + $(OUT)\remote.obj \ + $(OUT)\beacon.obj \ + $(OUT)\recovery.obj \ + $(OUT)\ubik.obj \ + $(OUT)\vote.obj \ + $(OUT)\lock.obj \ + $(OUT)\phys.obj \ + $(OUT)\ubik_int.cs.obj \ + $(OUT)\ubik_int.ss.obj \ + $(OUT)\ubik_int.xdr.obj \ + $(OUT)\ubikcmd.obj \ + $(OUT)\ubikclient.obj \ + $(OUT)\uerrors.obj \ + $(OUT)\AFS_component_version_number.obj $(LIBFILE): $(LIBOBJS) @@ -53,8 +53,8 @@ RS_UDBG_EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\udebug.exe CL_UDBG_EXEFILE = $(DESTDIR)\bin\udebug.exe UDBG_EXEOBJS =\ - $(OJT)\udebug.obj \ - $(OJT)\udebug.res + $(OUT)\udebug.obj \ + $(OUT)\udebug.res UDBG_EXELIBS =\ $(DESTDIR)\lib\afsubik.lib \ @@ -76,7 +76,7 @@ $(CL_UDBG_EXEFILE): $(RS_UDBG_EXEFILE) ############################################################################ # generate versioninfo resources -$(OJT)\udebug.res: AFS_component_version_number.h +$(OUT)\udebug.res: AFS_component_version_number.h # $(RC) $*.rc ############################################################################ @@ -113,17 +113,17 @@ clean:: test tests: utst_server utst_client $(EXEFILE) -utst_server: $(OJT)\utst_server.obj $(OJT)\utst_int.ss.obj $(OJT)\utst_int.xdr.obj $(EXELIBS) +utst_server: $(OUT)\utst_server.obj $(OUT)\utst_int.ss.obj $(OUT)\utst_int.xdr.obj $(EXELIBS) $(EXECONLINK) -utst_client: $(OJT)\utst_client.obj $(OJT)\utst_int.cs.obj $(OJT)\utst_int.xdr.obj $(EXELIBS) +utst_client: $(OUT)\utst_client.obj $(OUT)\utst_int.cs.obj $(OUT)\utst_int.xdr.obj $(EXELIBS) $(EXECONLINK) # rxgen on utst_int.xg utst_int.ss.c utst_int.cs.c utst_int.xdr.c utst_int.h: utst_int.xg $(RXGEN) utst_int.xg -$(OJT)\utst_server.obj $(OJT)\utst_client.obj : utst_int.h +$(OUT)\utst_server.obj $(OUT)\utst_client.obj : utst_int.h mkdir: diff --git a/src/update/NTMakefile b/src/update/NTMakefile index dd7dc6525..9d92ca209 100644 --- a/src/update/NTMakefile +++ b/src/update/NTMakefile @@ -5,10 +5,10 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=update !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version - LIBS = \ $(DESTDIR)\lib\afs\afsauth.lib \ $(DESTDIR)\lib\afs\afsauth.lib \ @@ -35,11 +35,11 @@ update.cs.c update.ss.c update.er.c update.h: update.xg UPSERVER = $(DESTDIR)\root.server\usr\afs\bin\upserver.exe USVR_OBJS = \ - $(OJT)\AFS_component_version_number.obj \ - $(OJT)\server.obj \ - $(OJT)\utils.obj \ - $(OJT)\update.ss.obj \ - $(OJT)\upserver.res + $(OUT)\AFS_component_version_number.obj \ + $(OUT)\server.obj \ + $(OUT)\utils.obj \ + $(OUT)\update.ss.obj \ + $(OUT)\upserver.res $(UPSERVER): $(USVR_OBJS) $(LIBS) $(EXECONLINK) @@ -50,11 +50,11 @@ $(UPSERVER): $(USVR_OBJS) $(LIBS) UPCLIENT = $(DESTDIR)\root.server\usr\afs\bin\upclient.exe UCLNT_OBJS = \ - $(OJT)\AFS_component_version_number.obj \ - $(OJT)\client.obj \ - $(OJT)\utils.obj \ - $(OJT)\update.cs.obj \ - $(OJT)\upclient.res + $(OUT)\AFS_component_version_number.obj \ + $(OUT)\client.obj \ + $(OUT)\utils.obj \ + $(OUT)\update.cs.obj \ + $(OUT)\upclient.res $(UPCLIENT): $(UCLNT_OBJS) $(LIBS) $(EXECONLINK) @@ -63,9 +63,9 @@ $(UPCLIENT): $(UCLNT_OBJS) $(LIBS) ############################################################################ # generate versioninfo resources -$(OJT)\upserver.res: AFS_component_version_number.h +$(OUT)\upserver.res: AFS_component_version_number.h -$(OJT)\upclient.res: AFS_component_version_number.h +$(OUT)\upclient.res: AFS_component_version_number.h ############################################################################ # Install update executables. @@ -80,5 +80,5 @@ clean:: $(DEL) update.cs.c update.ss.c update.xdr.c update.h mkdir: - copy home $(OJT)\. + copy home $(OUT)\. diff --git a/src/usd/NTMakefile b/src/usd/NTMakefile index 390789294..fe02bb298 100644 --- a/src/usd/NTMakefile +++ b/src/usd/NTMakefile @@ -5,12 +5,12 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=usd !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !IF (EXIST(..\config\NTMakefile.version)) !include ..\config\NTMakefile.version !ENDIF - ############################################################################ # Definitions for installing header files @@ -26,8 +26,8 @@ INCFILES = \ LIBFILE = $(DESTDIR)\lib\afs\afsusd.lib LIBOBJS =\ - $(OJT)\usd_nt.obj \ - $(OJT)\AFS_component_version_number.obj + $(OUT)\usd_nt.obj \ + $(OUT)\AFS_component_version_number.obj $(LIBFILE): $(LIBOBJS) $(LIBARCH) diff --git a/src/usd/test/NTMakefile b/src/usd/test/NTMakefile index e44a10a90..217a064f8 100644 --- a/src/usd/test/NTMakefile +++ b/src/usd/test/NTMakefile @@ -5,6 +5,7 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=usd\test !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version @@ -16,7 +17,7 @@ clean:: test tests: usd_test.exe # make usd_test.exe -$(OJT)\usd_test.exe: $(OJT)\usd_test.obj $(LIBFILE) $(LIBUTIL) +$(OUT)\usd_test.exe: $(OUT)\usd_test.obj $(LIBFILE) $(LIBUTIL) $(EXECONLINK) mkdir: diff --git a/src/util/NTMakefile b/src/util/NTMakefile index 94bb46f3e..56d1a1fa6 100644 --- a/src/util/NTMakefile +++ b/src/util/NTMakefile @@ -7,6 +7,7 @@ # General AFS utilities. +RELDIR=util !INCLUDE ..\config\NTMakefile.$(SYS_NAME) INCFILEDIR = $(DESTDIR)\include\afs # header file install directory @@ -36,25 +37,28 @@ $(DESTDIR)\include\afs\dirpath.h: dirpath_nt.h LIBFILE = $(DESTDIR)\lib\afs\afsutil.lib LIBOBJS = \ - $(OJT)\assert.obj \ - $(OJT)\base32.obj \ - $(OJT)\casestrcpy.obj \ - $(OJT)\get_krbrlm.obj \ - $(OJT)\hostparse.obj \ - $(OJT)\isathing.obj \ - $(OJT)\kreltime.obj \ - $(OJT)\ktime.obj \ - $(OJT)\regex.obj \ - $(OJT)\readdir_nt.obj \ - $(OJT)\serverLog.obj \ - $(OJT)\snprintf.obj \ - $(OJT)\uuid.obj \ - $(OJT)\volparse.obj \ - $(OJT)\winsock_nt.obj \ - $(OJT)\errmap_nt.obj \ - $(OJT)\dirpath.obj \ - $(OJT)\fileutil.obj \ - $(OJT)\secutil_nt.obj + $(OUT)\assert.obj \ + $(OUT)\base32.obj \ + $(OUT)\casestrcpy.obj \ + $(OUT)\get_krbrlm.obj \ + $(OUT)\hostparse.obj \ + $(OUT)\isathing.obj \ + $(OUT)\kreltime.obj \ + $(OUT)\ktime.obj \ + $(OUT)\regex.obj \ + $(OUT)\readdir_nt.obj \ + $(OUT)\serverLog.obj \ + $(OUT)\snprintf.obj \ + $(OUT)\uuid.obj \ + $(OUT)\volparse.obj \ + $(OUT)\winsock_nt.obj \ + $(OUT)\errmap_nt.obj \ + $(OUT)\dirpath.obj \ + $(OUT)\fileutil.obj \ + $(OUT)\secutil_nt.obj + +$(LIBOBJS): $$(@B).c + $(C2OBJ) $** $(LIBFILE): $(LIBOBJS) $(LIBARCH) diff --git a/src/util/test/NTMakefile b/src/util/test/NTMakefile index 29e19f0da..1761b2720 100644 --- a/src/util/test/NTMakefile +++ b/src/util/test/NTMakefile @@ -5,6 +5,7 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=util\test !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version @@ -12,13 +13,13 @@ LIBS =\ $(DESTDIR)\lib\afs\afsutil.lib \ $(DESTDIR)\lib\afs\afsreg.lib -$(OJT)\dirpath_test.exe: $(OJT)\dirpath_test.obj $(LIBS) +$(OUT)\dirpath_test.exe: $(OUT)\dirpath_test.obj $(LIBS) $(EXECONLINK) -test tests: $(OJT)\dirpath_test.exe +test tests: $(OUT)\dirpath_test.exe clean:: - $(DEL) $(OJT)\dirpath_test.exe + $(DEL) $(OUT)\dirpath_test.exe mkdir: diff --git a/src/viced/NTMakefile b/src/viced/NTMakefile index 3c7fd93de..e42ff26ce 100644 --- a/src/viced/NTMakefile +++ b/src/viced/NTMakefile @@ -5,10 +5,10 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=viced !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version - ############################################################################ # Definitions for installing header files @@ -26,13 +26,13 @@ INCFILES =\ EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\fileserver.exe EXEOBJS =\ - $(OJT)\afsfileprocs.obj \ - $(OJT)\callback.obj \ - $(OJT)\host.obj \ - $(OJT)\physio.obj \ - $(OJT)\viced.obj \ - $(OJT)\AFS_component_version_number.obj \ - $(OJT)\fileserver.res + $(OUT)\afsfileprocs.obj \ + $(OUT)\callback.obj \ + $(OUT)\host.obj \ + $(OUT)\physio.obj \ + $(OUT)\viced.obj \ + $(OUT)\AFS_component_version_number.obj \ + $(OUT)\fileserver.res EXELIBS = \ $(DESTDIR)\lib\afs\afscmd.lib \ @@ -63,18 +63,18 @@ $(EXEFILE): $(EXEOBJS) $(EXELIBS) ############################################################################ # generate versioninfo resources -$(OJT)\fileserver.res: AFS_component_version_number.h +$(OUT)\fileserver.res: AFS_component_version_number.h -install: $(INCFILES) $(OJT)\fileserver.res +install: $(INCFILES) $(OUT)\fileserver.res ############################################################################ # Build cbd - not generally distributed debugging program -CBD = $(OJT)\cbd.exe +CBD = $(OUT)\cbd.exe -$(OJT)\cbd.obj: callback.c +$(OUT)\cbd.obj: callback.c $(C2OBJ) $** -DINTERPRET_DUMP -$(CBD): $(OJT)\cbd.obj +$(CBD): $(OUT)\cbd.obj $(EXECONLINK) mkdir: diff --git a/src/viced/callback.c b/src/viced/callback.c index ef275898f..83be9eb14 100644 --- a/src/viced/callback.c +++ b/src/viced/callback.c @@ -1434,7 +1434,7 @@ BreakLaterCallBacks(void) FSYNC_UNLOCK; if (!myfe) { - H_UNLOCK + H_UNLOCK; return 0; } diff --git a/src/vlserver/NTMakefile b/src/vlserver/NTMakefile index 4647536fe..b0dfcb109 100644 --- a/src/vlserver/NTMakefile +++ b/src/vlserver/NTMakefile @@ -7,10 +7,10 @@ # Override default definitions in NTMakefile.$(SYS_NAME) before including. +RELDIR=vlserver !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !include ..\config\NTMakefile.version - ############################################################################ # Definitions for installing header files @@ -27,10 +27,10 @@ INCFILES = \ LIBFILE = $(DESTDIR)\lib\afs\afsvldb.lib LIBOBJS =\ - $(OJT)\vl_errors.obj \ - $(OJT)\vldbint.cs.obj \ - $(OJT)\vldbint.xdr.obj \ - $(OJT)\AFS_component_version_number.obj + $(OUT)\vl_errors.obj \ + $(OUT)\vldbint.cs.obj \ + $(OUT)\vldbint.xdr.obj \ + $(OUT)\AFS_component_version_number.obj $(LIBFILE): $(LIBOBJS) $(LIBARCH) @@ -41,18 +41,18 @@ $(LIBFILE): $(LIBOBJS) MT_LIBFILE = $(DESTDIR)\lib\afs\mtafsvldb.lib MT_LIBOBJS =\ - $(OJT)\vl_errors_mt.obj \ - $(OJT)\vldbint.cs_mt.obj \ - $(OJT)\vldbint.xdr_mt.obj \ - $(OJT)\AFS_component_version_number.obj + $(OUT)\vl_errors_mt.obj \ + $(OUT)\vldbint.cs_mt.obj \ + $(OUT)\vldbint.xdr_mt.obj \ + $(OUT)\AFS_component_version_number.obj -$(OJT)\vl_errors_mt.obj:vl_errors.c +$(OUT)\vl_errors_mt.obj:vl_errors.c $(C2OBJ) $** -DAFS_PTHREAD_ENV -$(OJT)\vldbint.cs_mt.obj:vldbint.cs.c +$(OUT)\vldbint.cs_mt.obj:vldbint.cs.c $(C2OBJ) $** -DAFS_PTHREAD_ENV -$(OJT)\vldbint.xdr_mt.obj:vldbint.xdr.c +$(OUT)\vldbint.xdr_mt.obj:vldbint.xdr.c $(C2OBJ) $** -DAFS_PTHREAD_ENV $(MT_LIBFILE): $(MT_LIBOBJS) @@ -64,12 +64,12 @@ $(MT_LIBFILE): $(MT_LIBOBJS) VLSERVER = $(DESTDIR)\root.server\usr\afs\bin\vlserver.exe VLSERVER_EXEOBJS =\ - $(OJT)\vldbint.ss.obj \ - $(OJT)\vldbint.xdr.obj \ - $(OJT)\vlprocs.obj \ - $(OJT)\vlserver.obj \ - $(OJT)\vlutils.obj \ - $(OJT)\vlserver.res + $(OUT)\vldbint.ss.obj \ + $(OUT)\vldbint.xdr.obj \ + $(OUT)\vlprocs.obj \ + $(OUT)\vlserver.obj \ + $(OUT)\vlutils.obj \ + $(OUT)\vlserver.res VLSERVER_EXECLIBS = \ $(DESTDIR)\lib\afsubik.lib \ @@ -94,7 +94,7 @@ $(VLSERVER): $(VLSERVER_EXEOBJS) $(LIBFILE) $(VLSERVER_EXECLIBS) ############################################################################ # generate versioninfo resources -$(OJT)\vlserver.res: AFS_component_version_number.h +$(OUT)\vlserver.res: AFS_component_version_number.h # $(RC) $*.rc ############################################################################ @@ -125,7 +125,7 @@ VLDB_CHECK_LIBS =\ $(DESTDIR)\lib\afs\afseventlog.lib \ $(DESTDIR)\lib\afs\afscmd.lib -$(OJT)\vldb_check.exe: $(OJT)\vldb_check.obj $(VLDB_CHECK_LIBS) +$(OUT)\vldb_check.exe: $(OUT)\vldb_check.obj $(VLDB_CHECK_LIBS) $(EXECONLINK) ############################################################################ @@ -134,14 +134,14 @@ VLCLIENT_LIBS = \ $(DESTDIR)\lib\afs\afscmd.lib \ $(DESTDIR)\lib\afs\afspioctl.lib -$(OJT)\vlclient.exe: $(OJT)\vlclient.obj $(LIBFILE) $(VLSERVER_EXECLIBS) $(VLCLIENT_LIBS) +$(OUT)\vlclient.exe: $(OUT)\vlclient.obj $(LIBFILE) $(VLSERVER_EXECLIBS) $(VLCLIENT_LIBS) $(EXECONLINK) ############################################################################ # install vlserver components -install: $(INCFILES) $(LIBFILE) $(VLSERVER) $(OJT)\vldb_check.exe $(OJT)\vlclient.exe \ +install: $(INCFILES) $(LIBFILE) $(VLSERVER) $(OUT)\vldb_check.exe $(OUT)\vlclient.exe \ $(MT_LIBFILE) install9x: install diff --git a/src/vol/NTMakefile b/src/vol/NTMakefile index 5b6f38225..0b966f23f 100644 --- a/src/vol/NTMakefile +++ b/src/vol/NTMakefile @@ -5,6 +5,7 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=vol !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version @@ -32,18 +33,18 @@ INCFILES =\ LIBFILE = $(DESTDIR)\lib\afs\afsvol.lib LIBOBJS =\ - $(OJT)\common.obj \ - $(OJT)\clone.obj \ - $(OJT)\fssync.obj \ - $(OJT)\ntops.obj \ - $(OJT)\nuke.obj \ - $(OJT)\partition.obj \ - $(OJT)\purge.obj \ - $(OJT)\vnode.obj \ - $(OJT)\volume.obj \ - $(OJT)\vutil.obj \ - $(OJT)\ihandle.obj \ - $(OJT)\AFS_component_version_number.obj + $(OUT)\common.obj \ + $(OUT)\clone.obj \ + $(OUT)\fssync.obj \ + $(OUT)\ntops.obj \ + $(OUT)\nuke.obj \ + $(OUT)\partition.obj \ + $(OUT)\purge.obj \ + $(OUT)\vnode.obj \ + $(OUT)\volume.obj \ + $(OUT)\vutil.obj \ + $(OUT)\ihandle.obj \ + $(OUT)\AFS_component_version_number.obj $(LIBFILE): $(LIBOBJS) $(LIBARCH) @@ -70,10 +71,10 @@ EXEC_LIBS = \ SALVAGER = $(DESTDIR)\root.server\usr\afs\bin\salvager.exe SALVAGER_EXEOBJS =\ - $(OJT)\vol-salvage.obj \ - $(OJT)\physio.obj \ - $(OJT)\AFS_component_version_number.obj \ - $(OJT)\salvager.res + $(OUT)\vol-salvage.obj \ + $(OUT)\physio.obj \ + $(OUT)\AFS_component_version_number.obj \ + $(OUT)\salvager.res $(SALVAGER): $(SALVAGER_EXEOBJS) $(EXEC_LIBS) $(EXECONLINK) @@ -84,15 +85,15 @@ $(SALVAGER): $(SALVAGER_EXEOBJS) $(EXEC_LIBS) # build volinfo VOLINFO = $(DESTDIR)\root.server\usr\afs\bin\volinfo.exe -$(VOLINFO): $(OJT)\vol-info.obj $(OJT)\physio.obj $(OJT)\volinfo.res $(EXEC_LIBS) +$(VOLINFO): $(OUT)\vol-info.obj $(OUT)\physio.obj $(OUT)\volinfo.res $(EXEC_LIBS) $(EXECONLINK) $(EXEPREP) ############################################################################ # generate versioninfo resources -$(OJT)\salvager.res: salvager.rc AFS_component_version_number.h +$(OUT)\salvager.res: salvager.rc AFS_component_version_number.h -$(OJT)\volinfo.res: AFS_component_version_number.h +$(OUT)\volinfo.res: AFS_component_version_number.h ############################################################################ # Install targets diff --git a/src/vol/test/NTMakefile b/src/vol/test/NTMakefile index 28e4937a4..8d8da685b 100644 --- a/src/vol/test/NTMakefile +++ b/src/vol/test/NTMakefile @@ -5,10 +5,10 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=vol\test !INCLUDE ..\..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\..\config\NTMakefile.version - ############################################################################ # External libraries @@ -24,17 +24,17 @@ EXEC_LIBS = \ ############################################################################ # build inode lister -ILIST = $(OJT)\ilist.exe +ILIST = $(OUT)\ilist.exe -$(ILIST): $(OJT)\ilist_nt.obj $(EXEC_LIBS) +$(ILIST): $(OUT)\ilist_nt.obj $(EXEC_LIBS) $(EXECONLINK) ############################################################################ # build link table lister -LTLIST = $(OJT)\ltlist.exe +LTLIST = $(OUT)\ltlist.exe -$(LTLIST): $(OJT)\ltlist.obj $(EXEC_LIBS) +$(LTLIST): $(OUT)\ltlist.obj $(EXEC_LIBS) $(EXECONLINK) mkdir: diff --git a/src/volser/NTMakefile b/src/volser/NTMakefile index 4be2bf11e..ff0e91446 100644 --- a/src/volser/NTMakefile +++ b/src/volser/NTMakefile @@ -5,10 +5,10 @@ # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html +RELDIR=volser !INCLUDE ..\config\NTMakefile.$(SYS_NAME) !INCLUDE ..\config\NTMakefile.version - ############################################################################ # Definitions for installing header files @@ -30,14 +30,14 @@ LOCAL_INCFILES = \ LIBFILE = $(DESTDIR)\lib\afs\afsvolser.lib LIBOBJS =\ - $(OJT)\lockprocs.obj \ - $(OJT)\volerr.obj \ - $(OJT)\volint.cs.obj \ - $(OJT)\volint.ss.obj \ - $(OJT)\volint.xdr.obj \ - $(OJT)\vsprocs.obj \ - $(OJT)\vsutils.obj \ - $(OJT)\AFS_component_version_number.obj + $(OUT)\lockprocs.obj \ + $(OUT)\volerr.obj \ + $(OUT)\volint.cs.obj \ + $(OUT)\volint.ss.obj \ + $(OUT)\volint.xdr.obj \ + $(OUT)\vsprocs.obj \ + $(OUT)\vsutils.obj \ + $(OUT)\AFS_component_version_number.obj $(LIBFILE): $(LIBOBJS) $(LIBARCH) @@ -75,17 +75,17 @@ EXEC_LIBS = \ VOLSERVER_EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\volserver.exe VOLSERVER_EXEOBJS = \ - $(OJT)\common.obj \ - $(OJT)\dumpstuff.obj \ - $(OJT)\physio.obj \ - $(OJT)\volerr.obj \ - $(OJT)\volint.cs.obj \ - $(OJT)\volint.ss.obj \ - $(OJT)\volint.xdr.obj \ - $(OJT)\volmain.obj \ - $(OJT)\volprocs.obj \ - $(OJT)\voltrans.obj \ - $(OJT)\volserver.res + $(OUT)\common.obj \ + $(OUT)\dumpstuff.obj \ + $(OUT)\physio.obj \ + $(OUT)\volerr.obj \ + $(OUT)\volint.cs.obj \ + $(OUT)\volint.ss.obj \ + $(OUT)\volint.xdr.obj \ + $(OUT)\volmain.obj \ + $(OUT)\volprocs.obj \ + $(OUT)\voltrans.obj \ + $(OUT)\volserver.res VOLSERVER_EXELIBS = \ @@ -103,13 +103,13 @@ RS_VOS_EXEFILE = $(DESTDIR)\root.server\usr\afs\bin\vos.exe CL_VOS_EXEFILE = $(DESTDIR)\etc\vos.exe VOS_EXEOBJS = \ - $(OJT)\vos.obj \ - $(OJT)\vsprocs.obj \ - $(OJT)\vsutils.obj \ - $(OJT)\lockprocs.obj \ - $(OJT)\volint.xdr.obj \ - $(OJT)\volerr.obj \ - $(OJT)\vos.res + $(OUT)\vos.obj \ + $(OUT)\vsprocs.obj \ + $(OUT)\vsutils.obj \ + $(OUT)\lockprocs.obj \ + $(OUT)\volint.xdr.obj \ + $(OUT)\volerr.obj \ + $(OUT)\vos.res VOS_EXELIBS = \ $(DESTDIR)\lib\afsubik.lib \ @@ -126,9 +126,9 @@ $(CL_VOS_EXEFILE): $(RS_VOS_EXEFILE) ############################################################################ # Generate versioninfo resources -$(OJT)\volserver.res: AFS_component_version_number.h +$(OUT)\volserver.res: AFS_component_version_number.h -$(OJT)\vos.res: AFS_component_version_number.h +$(OUT)\vos.res: AFS_component_version_number.h ############################################################################ # Definitions for generating files via RXGEN -- 2.39.5