patch-from-shadow-to-jaltman-bkbox-20031120
authorJeffrey Altman <jaltman@grand.central.org>
Fri, 21 Nov 2003 07:59:35 +0000 (07:59 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 21 Nov 2003 07:59:35 +0000 (07:59 +0000)
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

173 files changed:
src/GoLast.bat [new file with mode: 0644]
src/NTLang.bat [new file with mode: 0644]
src/NTMakefile
src/WINNT/afs_setup_utils/GetWebDll/ntmakefile
src/WINNT/afs_setup_utils/NTMakefile
src/WINNT/afs_setup_utils/_isuser/ntmakefile
src/WINNT/afs_setup_utils/lang/NTMakefile
src/WINNT/afsadmsvr/NTMakefile
src/WINNT/afsapplib/NTMakefile
src/WINNT/afsapplib/al_creds.cpp
src/WINNT/afsapplib/lang/NTMakefile
src/WINNT/afsapplib/test/NTMakefile
src/WINNT/afsclass/NTMakefile
src/WINNT/afsclass/c_set.cpp
src/WINNT/afsd/NTMakefile
src/WINNT/afsd/afsd.c
src/WINNT/afsd/afsd_init.c
src/WINNT/afsd/afsd_init.h
src/WINNT/afsd/afsd_service.c
src/WINNT/afsd/afslogon.c
src/WINNT/afsd/cm_buf.c
src/WINNT/afsd/cm_cell.c
src/WINNT/afsd/cm_config.c
src/WINNT/afsd/cm_conn.c
src/WINNT/afsd/cm_ioctl.c
src/WINNT/afsd/cm_ioctl.h
src/WINNT/afsd/cm_scache.c
src/WINNT/afsd/cm_server.c
src/WINNT/afsd/fs.c
src/WINNT/afsd/fs_utils.c
src/WINNT/afsd/fs_utils.h
src/WINNT/afsd/sample/token.c
src/WINNT/afsd/smb.c
src/WINNT/afsd/smb3.c
src/WINNT/afsd/smb_iocons.h
src/WINNT/afsd/smb_ioctl.c
src/WINNT/afslegal/NTMakefile
src/WINNT/afslegal/lang/NTMakefile
src/WINNT/afsreg/NTMakefile
src/WINNT/afsreg/test/NTMakefile
src/WINNT/afssvrcfg/NTMakefile
src/WINNT/afssvrcfg/hourglass.h
src/WINNT/afssvrcfg/lang/NTMakefile
src/WINNT/afssvrcfg/validation.cpp
src/WINNT/afssvrcfg/validation.h
src/WINNT/afssvrcpa/NTMakefile
src/WINNT/afssvrcpa/lang/NTMakefile
src/WINNT/afssvrmgr/NTMakefile
src/WINNT/afssvrmgr/lang/NTMakefile
src/WINNT/afssvrmgr/svr_col.cpp
src/WINNT/afsusrmgr/NTMakefile
src/WINNT/afsusrmgr/lang/NTMakefile
src/WINNT/bosctlsvc/NTMakefile
src/WINNT/client_config/NTMakefile
src/WINNT/client_config/dlg_automap.cpp
src/WINNT/client_config/drivemap.cpp
src/WINNT/client_config/lang/NTMakefile
src/WINNT/client_config/main.cpp
src/WINNT/client_config/resource.h
src/WINNT/client_config/tab_drives.cpp
src/WINNT/client_cpa/NTMakefile
src/WINNT/client_cpa/lang/NTMakefile
src/WINNT/client_creds/NTMakefile
src/WINNT/client_creds/afswiz.cpp
src/WINNT/client_creds/lang/NTMakefile
src/WINNT/client_creds/main.cpp
src/WINNT/client_creds/mounttab.cpp
src/WINNT/client_creds/resource.h
src/WINNT/client_exp/NTMakefile
src/WINNT/client_exp/afs_shl_ext.cpp
src/WINNT/client_exp/gui2fs.cpp
src/WINNT/client_exp/gui2fs.h
src/WINNT/client_exp/hourglass.h
src/WINNT/client_exp/lang/NTMakefile
src/WINNT/client_exp/make_symbolic_link_dlg.cpp [new file with mode: 0644]
src/WINNT/client_exp/make_symbolic_link_dlg.h [new file with mode: 0644]
src/WINNT/client_exp/resource.h
src/WINNT/client_exp/shell_ext.cpp
src/WINNT/client_exp/shell_ext.h
src/WINNT/client_exp/stdafx.h
src/WINNT/client_osi/NTMakefile
src/WINNT/client_osi/libosi.hpj
src/WINNT/client_osi/osidebug.hpj
src/WINNT/client_osi/osilog.c
src/WINNT/eventlog/NTMakefile
src/WINNT/eventlog/lang/NTMakefile
src/WINNT/eventlog/test/NTMakefile
src/WINNT/install/InstallShield5/CreateISDirTree.bat
src/WINNT/install/InstallShield5/NTMakefile
src/WINNT/install/NSIS/MakeCommon.bat
src/WINNT/install/NSIS/NTMakefile
src/WINNT/install/NSIS/OpenAFS.nsi
src/WINNT/install/NSIS/killer.cpp [new file with mode: 0644]
src/WINNT/install/Win9x/NTMakeFile
src/WINNT/license/NTMakefile
src/WINNT/license/lang/NTMakefile
src/WINNT/pthread/NTMakefile
src/WINNT/pthread/test/NTMakefile
src/WINNT/pthread/test/native.cpp
src/WINNT/talocale/NTMakefile
src/WINNT/win9xpanel/NTMakefile
src/afs/NTMakefile
src/afsweb/afswsNetscape_config.sh
src/audit/NTMakefile
src/auth/NTMakefile
src/auth/test/NTMakefile
src/bozo/NTMakefile
src/bu_utils/NTMakefile
src/bubasics/NTMakefile
src/bucoord/NTMakefile
src/budb/NTMakefile
src/butc/NTMakefile
src/butm/NTMakefile
src/cmd/NTMakefile
src/cmd/test/NTMakefile
src/comerr/NTMakefile
src/comerr/error_table_nt.h
src/comerr/et_lex.lex_nt.c
src/comerr/test/NTMakefile
src/config/NTMakefile
src/config/NTMakefile.i386_nt40
src/des/NTMakefile
src/des/test/NTMakefile
src/des_stub/NTMakefile
src/dir/NTMakefile
src/dir/test/NTMakefile
src/finale/NTMakefile
src/fsint/NTMakefile
src/kauth/NTMakefile
src/kauth/test/NTMakefile
src/libacl/NTMakefile
src/libadmin/NTMakefile
src/libadmin/adminutil/NTMakefile
src/libadmin/bos/NTMakefile
src/libadmin/cfg/NTMakefile
src/libadmin/cfg/test/NTMakefile
src/libadmin/client/NTMakefile
src/libadmin/kas/NTMakefile
src/libadmin/pts/NTMakefile
src/libadmin/test/NTMakefile
src/libadmin/vos/NTMakefile
src/libafsauthent/NTMakefile
src/libafsrpc/NTMakefile
src/lwp/NTMakefile
src/lwp/test/NTMakefile
src/ntbuild.bat
src/procmgmt/NTMakefile
src/procmgmt/test/NTMakefile
src/ptserver/NTMakefile
src/rx/NTMakefile
src/rx/test/NTMakefile
src/rxgen/NTMakefile
src/rxkad/NTMakefile
src/rxkad/test/NTMakefile
src/rxstat/NTMakefile
src/shlibafsauthent/NTMakefile
src/shlibafsrpc/NTMakefile
src/sys/NTMakefile
src/sys/pioctl_nt.c
src/tbutc/NTMakefile
src/tviced/NTMakefile
src/ubik/NTMakefile
src/update/NTMakefile
src/usd/NTMakefile
src/usd/test/NTMakefile
src/util/NTMakefile
src/util/test/NTMakefile
src/viced/NTMakefile
src/viced/callback.c
src/vlserver/NTMakefile
src/vol/NTMakefile
src/vol/test/NTMakefile
src/volser/NTMakefile

diff --git a/src/GoLast.bat b/src/GoLast.bat
new file mode 100644 (file)
index 0000000..cc10c57
--- /dev/null
@@ -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 (file)
index 0000000..d177ba5
--- /dev/null
@@ -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.
index 997ca65..9315e20 100644 (file)
 # 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 ***** $@
index 35e5be3..abd0d72 100644 (file)
@@ -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
index 6c5d1bd..c5320f6 100644 (file)
 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 ..
index 3f60bf8..0e73bbe 100644 (file)
@@ -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) $< 
 <<
index 46267d9..89b5de4 100644 (file)
@@ -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)
 
index c2b7c1a..39481c7 100644 (file)
@@ -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
index 2e62b6a..e450383 100644 (file)
@@ -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 ..
index 34b3055..43acc55 100644 (file)
@@ -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);\r
+         CopyAnsiToString (pszUser, szUserA);
          CopyAnsiToString (pszCell, szCellA);
          AfsAppLib_UnixTimeToSystemTime (pst, dateExpire);
          }
index a555760..597ab0b 100644 (file)
@@ -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*.
 
index be5bfce..81be847 100644 (file)
@@ -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 \
index e4c0828..ea60db2 100644 (file)
@@ -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 \
index c4cb5d7..79520b9 100644 (file)
@@ -408,21 +408,21 @@ void FILESET::SetStatusFromVOS (PVOID lp)
    m_fs.nFiles = pEntry->fileCount;
    m_fs.ckQuota = pEntry->maxQuota;
    m_fs.ckUsed = pEntry->currentSize;
-\r
-   switch (pEntry->type)\r
-      {\r
-      case VOS_BACKUP_VOLUME:\r
-         m_fs.Type = ftCLONE;\r
-         m_fs.idClone = pEntry->id;\r
-         break;\r
-      case VOS_READ_ONLY_VOLUME:\r
-         m_fs.Type = ftREPLICA;\r
-         m_fs.idReplica = pEntry->id;\r
-         break;\r
-      case VOS_READ_WRITE_VOLUME:\r
-         m_fs.Type = ftREADWRITE;\r
-         m_fs.idReadWrite = pEntry->id;\r
-         break;\r
+
+   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;
index 86af3a5..0a3f5ec 100644 (file)
@@ -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)
index a481f2e..85c1200 100644 (file)
@@ -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))
index 2c91d1d..95e04e8 100644 (file)
@@ -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 <imagehlp.h>
+#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
index 803facc..0f09fd6 100644 (file)
@@ -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[];
 
index 3a4e0ca..1bcf2bc 100644 (file)
@@ -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 <Enter> to terminate OpenAFS Client Service\n");
+            getchar();              
+            SetEvent(WaitToTerminate);
+        }
+    }
 }
-#endif
index ff671c1..7b30931 100644 (file)
@@ -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;
 
index b4790d9..69c928d 100644 (file)
@@ -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);
+}
+
index e2ba9e4..8752cb2 100644 (file)
@@ -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;
index ed5b789..1d52d4e 100644 (file)
@@ -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,
index c597c79..4d35c06 100644 (file)
@@ -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 */
index d17d5dc..70b7d11 100644 (file)
@@ -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 "<cell>/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;
+}
index 57b3ddf..4e9089e 100644 (file)
@@ -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__ */
index e8371b7..a72545e 100644 (file)
@@ -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);     
+}
+
index 16672eb..b630b61 100644 (file)
@@ -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);
 }
+
index a981f23..5c4c384 100644 (file)
@@ -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;
+}
+
index 7f6d0d4..4979eaf 100644 (file)
@@ -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]='\\';
+}
+
index a7e1c77..cdac4fc 100644 (file)
@@ -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 */
index d11b86d..f3f1810 100644 (file)
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
-#include <windows.h>\r
-#include "krb_auth.h"\r
-#include "afs_tokens.h"\r
-#include "cm_config.h"\r
-#include "cmd.h"\r
-\r
-#define AFS_KERBEROS_ENV\r
-\r
-#define KABADARGUMENT 1\r
-#define KLOGEXIT(code) exit(code)\r
-\r
-int CommandProc();\r
-\r
-static int zero_argc;\r
-static char **zero_argv;\r
-\r
-void main (argc, argv)\r
-  int   argc;\r
-  char *argv[];\r
-{   struct cmd_syndesc *ts;\r
-    int code;\r
-    WSADATA WSAjunk;\r
-\r
-    zero_argc = argc;\r
-    zero_argv = argv;\r
-\r
-    /* Start up sockets */\r
-    WSAStartup(0x0101, &WSAjunk);\r
-\r
-    ts = cmd_CreateSyntax((char *) 0, CommandProc, 0, "obtain Kerberos authentication");\r
-\r
-#define aXFLAG 0\r
-#define aPRINCIPAL 1\r
-#define aPASSWORD 2\r
-#define aCELL 3\r
-#define aSERVERS 4\r
-#define aPIPE 5\r
-#define aSILENT 6\r
-#define aLIFETIME 7\r
-#define aSETPAG 8\r
-#define aTMP 9\r
-\r
-\r
-    cmd_AddParm(ts, "-x", CMD_FLAG, CMD_OPTIONAL, "(obsolete, noop)");\r
-    cmd_Seek(ts, aPRINCIPAL);\r
-    cmd_AddParm(ts, "-principal", CMD_SINGLE, CMD_OPTIONAL, "user name");\r
-    cmd_AddParm(ts, "-password", CMD_SINGLE, CMD_OPTIONAL, "user's password");\r
-    cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name");\r
-    cmd_AddParm(ts, "-servers", CMD_LIST, CMD_OPTIONAL, "explicit list of servers");\r
-    cmd_AddParm(ts, "-pipe", CMD_FLAG, CMD_OPTIONAL, "read password from stdin");\r
-    cmd_AddParm(ts, "-silent", CMD_FLAG, CMD_OPTIONAL, "silent operation");\r
-    cmd_AddParm(ts, "-lifetime", CMD_SINGLE, CMD_OPTIONAL, "ticket lifetime in hh[:mm[:ss]]");\r
-    cmd_AddParm(ts, "-setpag", CMD_FLAG, CMD_OPTIONAL, "Create a new setpag before authenticating");\r
-    cmd_AddParm(ts, "-tmp", CMD_FLAG, CMD_OPTIONAL, "write Kerberos-style ticket file in /tmp");\r
-\r
-    code = cmd_Dispatch(argc, argv);\r
-    KLOGEXIT(code);\r
-}\r
-\r
-static char *getpipepass() {\r
-    static char gpbuf[BUFSIZ];\r
-    /* read a password from stdin, stop on \n or eof */\r
-    register int i, tc;\r
-    memset(gpbuf, 0, sizeof(gpbuf));\r
-    for(i=0; i<(sizeof(gpbuf)-1); i++) {\r
-       tc = fgetc(stdin);\r
-       if (tc == '\n' || tc == EOF) break;\r
-       gpbuf[i] = tc;\r
-    }\r
-    return gpbuf;\r
-}\r
-\r
-/* good_gets is like gets except that it take a max string length and won't\r
- * write past the end of its input buffer.  It returns a variety of negative\r
- * numbers in case of errors and zero if there was no characters read (a blank\r
- * line for instance).  Otherwise it returns the length of the string read in.\r
- */\r
-\r
-static int good_gets (s, max)\r
-  char *s;\r
-  int   max;\r
-{   int l;                             /* length of string read */\r
-    if (!fgets (s, max, stdin)) {\r
-       if (feof(stdin)) return EOF;    /* EOF on input, nothing read */\r
-       else return -2;                 /* I don't think this can happen */\r
-    }\r
-    l = strlen (s);\r
-    if (l && (s[l-1] == '\n')) s[--l] = 0;\r
-    return l;\r
-}\r
-\r
-static int read_pw_string(char *s, int max)\r
-{\r
-    int ok = 0;\r
-    HANDLE h;\r
-    int md;\r
-\r
-    /* set no echo */\r
-    h = GetStdHandle (STD_INPUT_HANDLE);\r
-    GetConsoleMode (h, &md);\r
-    SetConsoleMode (h, md & ~ENABLE_ECHO_INPUT);\r
-\r
-    while (!ok) {\r
-       printf("Password:");\r
-       fflush(stdout);\r
-       if (good_gets(s, max) <= 0) {\r
-           printf("\n"); fflush(stdout);\r
-           if (feof (stdin)) break;    /* just give up */\r
-           else continue;              /* try again: blank line */\r
-       }\r
-       ok = 1;\r
-    }\r
-\r
-    if (!ok)\r
-       memset(s, 0, max);\r
-\r
-    /* reset echo */\r
-    SetConsoleMode (h, md);\r
-    printf("\n"); fflush(stdout);\r
-\r
-    s[max-1] = 0;                      /* force termination */\r
-    return !ok;\r
-}\r
-\r
-CommandProc (as, arock)\r
-  char *arock;\r
-  struct cmd_syndesc *as;\r
-{\r
-    char  name[MAXKTCNAMELEN];\r
-    char  defaultCell[256];\r
-    char  realm[MAXKTCREALMLEN];\r
-    int          code;\r
-    int   i, dosetpag;\r
-    int   lifetime;                    /* requested ticket lifetime */\r
-\r
-    char passwd[BUFSIZ];\r
-\r
-    static char        rn[] = "klog";          /*Routine name*/\r
-    static int Pipe = 0;               /* reading from a pipe */\r
-    static int Silent = 0;             /* Don't want error messages */\r
-\r
-    int        foundPassword = 0;              /*Not yet, anyway*/\r
-    int        foundExplicitCell = 0;          /*Not yet, anyway*/\r
-    int writeTicketFile = 0;          /* write ticket file to /tmp */\r
-    int password_expires = -1;\r
-\r
-    char *reason;                      /* string describing errors */\r
-\r
-    /* blow away command line arguments */\r
-    for (i=1; i<zero_argc; i++) memset (zero_argv[i], 0, strlen(zero_argv[i]));\r
-    zero_argc = 0;\r
-\r
-    /* first determine quiet flag based on -silent switch */\r
-    Silent = (as->parms[aSILENT].itemsp ? 1 : 0);\r
-    Pipe = (as->parms[aPIPE].itemsp ? 1 : 0);\r
-\r
-    /* Determine if we should also do a setpag based on -setpag switch */\r
-    dosetpag = (as->parms[aSETPAG].itemsp ? 1 : 0);\r
-\r
-    if (as->parms[aTMP].itemsp) {\r
-       writeTicketFile = 1;\r
-    }\r
-\r
-    cm_GetRootCellName(defaultCell);\r
-\r
-    /* Parse our arguments. */\r
-\r
-    if (as->parms[aCELL].itemsp) {\r
-       /*\r
-        * cell name explicitly mentioned; take it in if no other cell name\r
-        * has already been specified and if the name actually appears.  If\r
-        * the given cell name differs from our own, we don't do a lookup.\r
-        */\r
-       foundExplicitCell = 1;\r
-       strncpy (realm, as->parms[aCELL].itemsp->data, sizeof(realm));\r
-    }\r
-\r
-    if (as->parms[aSERVERS].itemsp) {\r
-       fprintf (stderr, "SERVERS option not available.\n");\r
-    }\r
-\r
-    if (as->parms[aPRINCIPAL].itemsp) {\r
-       strcpy(name, as->parms[aPRINCIPAL].itemsp->data);\r
-    } else {\r
-       /* No explicit name provided. */\r
-       DWORD size = GetEnvironmentVariable("USERNAME", name, sizeof(name) - 1);\r
-       if (size <= 0 || size >= sizeof(name))\r
-           KLOGEXIT( KABADARGUMENT );\r
-    }\r
-\r
-    if (as->parms[aPASSWORD].itemsp) {\r
-       /*\r
-        * Current argument is the desired password string.  Remember it in\r
-        * our local buffer, and zero out the argument string - anyone can\r
-        * see it there with ps!\r
-        */\r
-       foundPassword = 1;\r
-       strncpy (passwd, as->parms[aPASSWORD].itemsp->data, sizeof(passwd));\r
-       memset (as->parms[aPASSWORD].itemsp->data, 0,\r
-              strlen(as->parms[aPASSWORD].itemsp->data));\r
-    }\r
-\r
-    if (as->parms[aLIFETIME].itemsp) {\r
-       char *life = as->parms[aLIFETIME].itemsp->data;\r
-       char *sp;                       /* string ptr to rest of life */\r
-       lifetime = 3600*strtol (life, &sp, 0); /* hours */\r
-       if (sp == life) {\r
-bad_lifetime:\r
-           if (!Silent) fprintf (stderr, "%s: translating '%s' to lifetime failed\n",\r
-                              rn, life);\r
-           return KABADARGUMENT;\r
-       }\r
-       if (*sp == ':') {\r
-           life = sp+1;                /* skip the colon */\r
-           lifetime += 60*strtol (life, &sp, 0); /* minutes */\r
-           if (sp == life) goto bad_lifetime;\r
-           if (*sp == ':') {\r
-               life = sp+1;\r
-               lifetime += strtol (life, &sp, 0); /* seconds */\r
-               if (sp == life) goto bad_lifetime;\r
-               if (*sp) goto bad_lifetime;\r
-           } else if (*sp) goto bad_lifetime;\r
-       } else if (*sp) goto bad_lifetime;\r
-       if (lifetime > MAXKTCTICKETLIFETIME) {\r
-           if (!Silent)\r
-               fprintf (stderr,\r
-               "%s: a lifetime of %.2f hours is too long, must be less than %d.\n",\r
-               rn, (double)lifetime/3600.0, MAXKTCTICKETLIFETIME/3600);\r
-           KLOGEXIT( KABADARGUMENT );\r
-       }\r
-    } else lifetime = 0;\r
-\r
-    if (!foundExplicitCell) strcpy (realm, defaultCell);\r
-\r
-    /* Get the password if it wasn't provided. */\r
-    if (!foundPassword) {\r
-       if (Pipe) {\r
-           strncpy(passwd, getpipepass(), sizeof(passwd));\r
-       }\r
-       else {\r
-           if (read_pw_string(passwd, sizeof(passwd)))\r
-               reason = "can't read password from terminal";\r
-           else if (strlen(passwd) == 0)\r
-               reason = "zero length password is illegal";\r
-           else\r
-               reason = NULL;\r
-           if (reason) {\r
-               fprintf (stderr, "Unable to login because %s.\n", reason);\r
-               KLOGEXIT( KABADARGUMENT );\r
-           }\r
-       }\r
-    }\r
-\r
-    code = ka_UserAuthenticateGeneral (0, name, "", realm, passwd, lifetime,\r
-               &password_expires, 0, &reason);\r
-    memset (passwd, 0, sizeof(passwd));\r
-    if (code) {\r
-       if (!Silent) {\r
-           fprintf (stderr,\r
-                    "Unable to authenticate to AFS because %s.\n", reason);\r
-         }\r
-       KLOGEXIT( code );\r
-      }\r
-\r
-#ifndef AFS_KERBEROS_ENV\r
-    if (writeTicketFile) {\r
-       code = krb_write_ticket_file (realm);\r
-       if (!Silent) {\r
-          if (code) \r
-              com_err (rn, code, "writing Kerberos ticket file");\r
-          else fprintf (stderr, "Wrote ticket file to /tmp\n");\r
-      }\r
-   }\r
-#endif\r
\r
-#ifdef DEBUGEXPIRES\r
-       if (password_expires >= 0) {\r
-        printf ("password expires at %ld\n", password_expires);\r
-       }\r
-#endif /* DEBUGEXPIRES */\r
-\r
-    return 0;\r
-}\r
-\r
-/* dummies to substitute for OSI */\r
-void *osi_Alloc(int sz) {\r
-    return malloc(sz);\r
-}\r
-void osi_Free(void *vs, int sz) {\r
-    free(vs);\r
-}\r
+#include <windows.h>
+#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; i<zero_argc; i++) memset (zero_argv[i], 0, strlen(zero_argv[i]));
+    zero_argc = 0;
+
+    /* first determine quiet flag based on -silent switch */
+    Silent = (as->parms[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);
+}
index d2f1e0d..916fc38 100644 (file)
@@ -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; i<NCBNAMSZ; i++) ncbp->ncb_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);
+}
+
+
index fd125bb..9e08a5d 100644 (file)
@@ -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;
 }
index d091965..f30fd50 100644 (file)
@@ -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_ */
index b35b416..9b6481b 100644 (file)
@@ -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 */
index 3ed4908..522230e 100644 (file)
@@ -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 ..
index bcd00e0..c80da33 100644 (file)
@@ -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)
 
index 1b7e7e5..e427baa 100644 (file)
@@ -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)
index 8bf2ed2..62b8749 100644 (file)
@@ -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:
index 39e3024..ccccece 100644 (file)
@@ -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 ..
index 15c0068..4b58c6a 100755 (executable)
@@ -7,24 +7,23 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
-#include <windows.h>\r
-\r
-typedef class HOURGLASS\r
-{\r
-   protected:\r
-      HCURSOR m_OldCursor;\r
-\r
-   public:\r
-      HOURGLASS (LPCSTR idCursor = IDC_WAIT)\r
-      {\r
-         m_OldCursor = GetCursor();\r
-         SetCursor (LoadCursor (NULL, idCursor));\r
-      }\r
-\r
-      virtual ~HOURGLASS (void)\r
-      {\r
-         SetCursor (m_OldCursor);\r
-      }\r
-\r
-} HOURGLASS, *PHOURGLASS;\r
-\r
+#include <windows.h>
+
+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;
index 3139740..a66a263 100644 (file)
@@ -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*.
 
index add51a8..40050a3 100644 (file)
  */
 
 /*
- * INCLUDES _________________________________________________________________\r
- *\r
- */\r
-#include "afscfg.h"\r
-#include "resource.h"\r
-#include "validation.h"\r
-\r
-\r
-/*\r
- * DEFINITIONS _________________________________________________________________\r
- *\r
- */\r
-\r
-\r
-/*\r
- * PROTOTYPES _________________________________________________________________\r
- *\r
- */\r
-BOOL Validation_IsValid(TCHAR *pszInput, VALIDATION_TYPE type, BOOL bShowError);\r
-\r
-static BOOL CheckAfsPartitionName(TCHAR *pszInput, int &nErrorMsgResID);\r
-static BOOL CheckAfsCellName(TCHAR *pszInput, int &nErrorMsgResID);\r
-static BOOL CheckAfsPassword(TCHAR *pszInput, int &nErrorMsgResID);\r
-static BOOL CheckAfsUid(TCHAR *pszInput, int &nErrorMsgResID);\r
-static BOOL CheckAfsServerName(TCHAR *pszInput, int &nErrorMsgResID);\r
-static BOOL CheckFileName(TCHAR *pszInput, int &nErrorMsgResID);\r
-static BOOL CheckPath(TCHAR *pszInput, int &nErrorMsgResID);\r
-static void ShowError(int nErrorMsgResID);\r
-\r
-\r
-/*\r
- * EXPORTED FUNCTIONS _________________________________________________________________\r
- *\r
- */\r
-BOOL Validation_IsValid(TCHAR *pszInput, VALIDATION_TYPE type, BOOL bShowError)\r
-{\r
-    BOOL bValid;\r
-    int nErrorMsgResID;\r
-\r
-       switch (type) {\r
-               case VALID_AFS_PARTITION_NAME:  bValid = CheckAfsPartitionName(pszInput, nErrorMsgResID);\r
-                                        break;\r
-\r
-        case VALID_AFS_CELL_NAME:              bValid = CheckAfsCellName(pszInput, nErrorMsgResID);\r
-                                        break;\r
-\r
-               case VALID_AFS_PASSWORD:                bValid = CheckAfsPassword(pszInput, nErrorMsgResID);\r
-                                        break;\r
-\r
-               case VALID_AFS_UID:                             bValid = CheckAfsUid(pszInput, nErrorMsgResID);\r
-                                        break;\r
-\r
-               case VALID_AFS_SERVER_NAME:             bValid = CheckAfsServerName(pszInput, nErrorMsgResID);\r
-                                        break;\r
-\r
-               default:                                                nErrorMsgResID = 0;\r
-                                                                               ASSERT(FALSE);\r
-                                                                               return FALSE;\r
-       }\r
-\r
-    if (!bValid && bShowError)\r
-        ShowError(nErrorMsgResID);\r
-\r
-    return bValid;\r
-}\r
-\r
-\r
-\r
-/*\r
- * STATIC FUNCTIONS _________________________________________________________________\r
- *\r
- */\r
-\r
- /*\r
-  * Utility Functions _________________________________________________________________\r
-  *\r
-  */\r
-static BOOL CheckAfsPartitionName(TCHAR *pszPartitionName, int &nErrorMsgResID)\r
-{\r
-    short bIsValid;\r
-    afs_status_t nStatus;\r
-\r
-    char *pszName = new char[strlen("/vicpe") + lstrlen(pszPartitionName) + 1];\r
-    if (!pszName) {\r
-        ASSERT(FALSE);\r
-        return TRUE;\r
-    }\r
-\r
-    strcpy(pszName, "/vicep");\r
-    strcat(pszName, S2A(pszPartitionName));\r
-\r
-    int nResult = cfg_HostPartitionNameValid(pszName, &bIsValid, &nStatus);\r
-    ASSERT(nResult);\r
-\r
-    if (!bIsValid)\r
-       nErrorMsgResID = IDS_PARTITION_NAME_VALIDATION_TYPE;\r
-\r
-    delete pszName;\r
-\r
-       return bIsValid;\r
-}\r
-\r
-static BOOL CheckAfsCellName(TCHAR *pszInput, int &nErrorMsgResID)\r
-{\r
-       nErrorMsgResID = 0;\r
-\r
-       return TRUE;\r
-}\r
-\r
-static BOOL CheckAfsPassword(TCHAR *pszInput, int &nErrorMsgResID)\r
-{\r
-       nErrorMsgResID = 0;\r
-\r
-       return TRUE;\r
-}\r
-\r
-static BOOL CheckAfsUid(TCHAR *pszInput, int &nErrorMsgResID)\r
-{\r
-       nErrorMsgResID = 0;\r
-\r
-       return TRUE;\r
-}\r
-\r
-static BOOL CheckAfsServerName(TCHAR *pszInput, int &nErrorMsgResID)\r
-{\r
-       nErrorMsgResID = 0;\r
-\r
-       return TRUE;\r
-}\r
-\r
-static void ShowError(int nErrorMsgResID)\r
-{\r
-    Message(MB_ICONSTOP | MB_OK, GetAppTitleID(), IDS_VALIDATION_ERROR_TEMPLATE, TEXT("%m%m"), nErrorMsgResID, nErrorMsgResID);\r
-}\r
+* 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);
+}
index 0be954e..1621763 100644 (file)
@@ -7,22 +7,21 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
-#ifndef        _VALIDATION_H_\r
-#define _VALIDATION_H_\r
-\r
-\r
-enum VALIDATION_TYPE { \r
-       VALID_AFS_PARTITION_NAME, \r
-       VALID_AFS_CELL_NAME,\r
-       VALID_AFS_PASSWORD,\r
-       VALID_AFS_UID,\r
-       VALID_AFS_SERVER_NAME,\r
-       VALID_FILENAME,\r
-       VALID_PATH\r
-};\r
-\r
-\r
-BOOL Validation_IsValid(TCHAR *pszInput, VALIDATION_TYPE type, BOOL bShowErorr = TRUE);\r
-\r
-#endif // _VALIDATION_H_\r
-\r
+#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_
index 45e709e..3c5210b 100644 (file)
@@ -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 ..
index b97d825..88b6632 100644 (file)
@@ -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*.
 
index d270815..97619e3 100644 (file)
@@ -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 ..
index eabde46..09e0071 100644 (file)
@@ -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*.
 
index 15b39dc..40d0fb0 100644 (file)
@@ -95,7 +95,7 @@ LPTSTR Server_GetColumnText (LPIDENT lpi, SERVERCOLUMN svrcol)
          break;
 
       case svrcolADDRESS:
-         if (lpss)\r
+         if (lpss)
             FormatSockAddr (pszBuffer, TEXT("%a"), &lpss->aAddresses[0]);
          break;
 
index 4b27b62..422c478 100644 (file)
@@ -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 ..
index d0bc5be..9f0eb8f 100644 (file)
@@ -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*.
 
index 754f4d7..fa75d21 100644 (file)
@@ -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
 
 
 ############################################################################
index 5bb2049..cea122e 100644 (file)
@@ -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 ..
index 096b324..7b65a57 100644 (file)
@@ -10,6 +10,7 @@
 extern "C" {
 #include <afs/param.h>
 #include <afs/stds.h>
+#include <afs/fs_utils.h>
 }
 
 #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;
index db61e27..8300112 100644 (file)
@@ -11,6 +11,7 @@ extern "C" {
 #include <afs/param.h>
 #include <afs/stds.h>
 #include <rx/rxkad.h>
+#include <afs/fs_utils.h>
 }
 #include <windows.h>
 #include <stdlib.h>
@@ -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)
       {
index 3843ebb..3cba5cb 100644 (file)
@@ -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)
 
 ############################################################################
 #
index 8ec5905..5b10bed 100644 (file)
@@ -10,6 +10,7 @@
 extern "C" {
 #include <afs/param.h>
 #include <afs/stds.h>
+#include <afs/fs_utils.h>
 }
 
 #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
    //
index ccdaf50..a12b165 100644 (file)
 #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
index 565e660..501aa0d 100644 (file)
@@ -10,6 +10,7 @@
 extern "C" {
 #include <afs/param.h>
 #include <afs/stds.h>
+#include <afs/fs_utils.h>
 }
 
 #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);
 }
 
index 0221e0e..d4c1893 100644 (file)
@@ -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 ..
index 9174965..ff6e80e 100644 (file)
@@ -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)
 
index 5967c03..9a94eed 100644 (file)
@@ -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 ..
index b3d7fce..928bd28 100644 (file)
@@ -10,6 +10,7 @@
 extern "C" {
 #include <afs/param.h>
 #include <afs/stds.h>
+#include <afs/fs_utils.h>
 }
 
 #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);
index e987966..2f6e443 100644 (file)
@@ -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)
 
 ############################################################################
 #
index 747c32d..2cafd0c 100644 (file)
@@ -10,6 +10,8 @@
 extern "C" {
 #include <afs/param.h>
 #include <afs/stds.h>
+#include <osilog.h>
+#include <afs/fs_utils.h>
 }
 
 #include "afscreds.h"
@@ -17,7 +19,6 @@ extern "C" {
 #include "drivemap.h"
 #include <stdlib.h>
 #include <stdio.h>
-#include <osilog.h>
 #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;
index fafb158..4694deb 100644 (file)
@@ -10,6 +10,7 @@
 extern "C" {
 #include <afs/param.h>
 #include <afs/stds.h>
+#include <afs/fs_utils.h>
 }
 
 #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;
       }
index e80c456..4cc3cc9 100644 (file)
 #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
index 686d73d..066560f 100644 (file)
@@ -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 ..
index d0917b2..d1eebfa 100644 (file)
@@ -17,6 +17,7 @@ extern "C" {
 #include <winsock2.h>
 #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, &registryKey);
+
+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;
+}
+
index 4b5283b..0359abf 100644 (file)
@@ -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<MAX_PATH);
+    struct ViceIoctl blob;
+    char orig_name[MAX_PATH+1];                /*Original name, may be modified*/
+    char true_name[MAX_PATH+1];                /*``True'' dirname (e.g., symlink target)*/
+    char parent_dir[MAX_PATH+1];               /*Parent directory of true name*/
+    char *last_component;      /*Last component of true name*/
+       UINT code;    
+       strcpy(orig_name, strName);
+       strcpy(true_name, orig_name);
+       /*
+        * Find rightmost slash, if any.
+        */
+       last_component = (char *) strrchr(true_name, '\\');
+       if (!last_component)
+           last_component = (char *) strrchr(true_name, '/');
+       if (last_component) {
+           /*
+            * Found it.  Designate everything before it as the parent directory,
+            * everything after it as the final component.
+            */
+           strncpy(parent_dir, true_name, last_component - true_name + 1);
+           parent_dir[last_component - true_name + 1] = 0;
+           last_component++;   /*Skip the slash*/
+       }
+       else {
+           /*
+            * No slash appears in the given file name.  Set parent_dir to the current
+            * directory, and the last component as the given name.
+            */
+           fs_ExtractDriveLetter(true_name, parent_dir);
+           strcat(parent_dir, ".");
+           last_component = true_name;
+            fs_StripDriveLetter(true_name, true_name, sizeof(true_name));
+       }
+       blob.in = last_component;
+       blob.in_size = strlen(last_component)+1;
+       blob.out_size = MAXSIZE;
+       blob.out = space;
+       memset(space, 0, MAXSIZE);
+       if ((code = pioctl(parent_dir, VIOC_LISTSYMLINK, &blob, 1)))
+               strcpy(space,"???");
+       ASSERT(strlen(space)<MAX_PATH);
+       strncpy(strPath,space,nlenPath);
+}
index 01a7387..4942172 100644 (file)
@@ -41,5 +41,4 @@ long fs_ExtractDriveLetter(const char *inPathp, char *outPathp);
 BOOL IsSymlink(const char * true_name);
 UINT MakeSymbolicLink(const char *,const char *);
 void ListSymbolicLinkPath(const char *strName,char *strPath,UINT nlenPath);
-
 #endif //__GUI2FS_H__
index 15c0068..d78d2fa 100755 (executable)
@@ -7,24 +7,24 @@
  * directory or online at http://www.openafs.org/dl/license10.html
  */
 
-#include <windows.h>\r
-\r
-typedef class HOURGLASS\r
-{\r
-   protected:\r
-      HCURSOR m_OldCursor;\r
-\r
-   public:\r
-      HOURGLASS (LPCSTR idCursor = IDC_WAIT)\r
-      {\r
-         m_OldCursor = GetCursor();\r
-         SetCursor (LoadCursor (NULL, idCursor));\r
-      }\r
-\r
-      virtual ~HOURGLASS (void)\r
-      {\r
-         SetCursor (m_OldCursor);\r
-      }\r
-\r
-} HOURGLASS, *PHOURGLASS;\r
-\r
+#include <windows.h>
+
+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;
+
index 0ddae6b..5e50b34 100644 (file)
@@ -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 (file)
index 0000000..d1889fb
--- /dev/null
@@ -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 <afs/param.h>
+#include <afs/stds.h>
+}
+
+#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 (file)
index 0000000..db3c86d
--- /dev/null
@@ -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()
+};
index 4550009..2f2c50a 100644 (file)
 #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
 #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
index 304cd77..c44fe49 100644 (file)
@@ -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 <atlconv.h>
+#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;