466 Commits

Author SHA1 Message Date
Jeffrey Altman
f8836a4db5 STABLE14-windows-rx_mtu-20050404
cmdebug -addr should report the rx_mtu size if it is set and less than
the actual mtu size


(cherry picked from commit d0879e78e6a8824eb745359a00b1d3170b977eaa)
2005-04-05 03:17:15 +00:00
Jeffrey Altman
4e6227a168 STABLE14-windows-deadlock-20050402
One final deadlock was discovered in cm_TryBulkStat().  Do not hold
the scp->mx while calling an RXAFS function.


(cherry picked from commit 48b2968e0a3ff5f07bd1e04f01e625b110d78482)
2005-04-02 09:35:49 +00:00
Jeffrey Altman
c8abfcb1c8 STABLE14-windows-time-20050331
Replace the time translation hack based on smb_NowTZ with a purely
mathematical conversion from UTC based unixTime (time_t) to UTC
based FILETIME


(cherry picked from commit 9a3844a96b07ffa7b677460d0a9f0dbffd774e03)
2005-04-01 00:36:42 +00:00
Jeffrey Altman
b9e4c1bb4d STABLE14-windows-afsd-minor-20050330
Add bounds checking to the comparison of fid->vnode and cm_localMountPoints
when Freelance mode is used.

Fix typo in DJGPP section of smb.c

Use rx_connection * instead of rx_call * in previous fix to cm_dcache.c


(cherry picked from commit 0a9609d8eb599dfe11ff04d8752e15b58c3ef89d)
2005-03-31 07:05:47 +00:00
Jeffrey Altman
3ed69d2cbd STABLE14-windows-stress-test-fixes-20050330
Ran more stress tests against 1.3.80b on a dual processor machine and
found a number of additional errors which could be fixed.

cm_callback.c: correct the refCount handling of server lists when
processing registering callbacks on the scache entry

cm_conn.c: cm_Analyze was not handling the CM_ERROR_NOSUCHVOLUME case.
In this case force a retry and Force Update the Volume info

cm_dcache.c; do not hold mx locks around calls to rx_NewCall().  That is
why we have reference counting on the rx_connection objects.

cm_ioctl.c: replace references to afsdcell.ini with CellServDB

cm_utils.c: formatting

cm_vnodeops.c: improve the logging and add a missing call to
cm_EndCallbackGrantingCall()

cm_volume.c: allows cm_volume_t objects to be reused if their
ref count is 0 and we have hit the maximum number allowed.

smb.c: improve the logging and the handling of dead_vcp references.
If all of the SMB sessions and NCBs are in use, return BUSY to the
CIFS client.

smb3.c: convert constants to preprocessor symbols


(cherry picked from commit b9bf7ee01acc7f2646fbc6e09c1ca8d41cc59d55)
2005-03-30 21:50:15 +00:00
Jeffrey Altman
7851fbb01e STABLE14-windows-logon-20050323
Fix initialization error when getting domain parameters


(cherry picked from commit d33cd7595bc7afffec277d761d911b54e39f3dbf)
2005-03-23 22:31:45 +00:00
Jeffrey Altman
c9d561e321 STABLE14-windows-smb-fix-20050322
the use logon cache hack only works on xp and above. do not give up
use of smb auth simply because it fails

fix the smb_vc_t refCount fix to smb_CopyPacket.  Only hold a smb_vc_t
if there is one.


(cherry picked from commit 46f7713f16c8c96983872a801cf1ce9cf7b80530)
2005-03-22 05:43:12 +00:00
Jeffrey Altman
1bcdd1cf52 STABLE14-windows-smb_vc_t-refcounts-20050321
conditionalize the assertions on smb_vc_t refcounts as they are only
for debugging.  We know there is a problem but don't want to deal with
it for the 1.3.80 release.

added logging info for each hold and release.  perhaps that will provide
a clue in the future

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

When copying a packet we must increment the vcp refcounts


(cherry picked from commit 247a58de77004ec10c2e55451d99dd04bd982df4)
2005-03-21 16:28:33 +00:00
Jeffrey Hutzelman
7923c40656 STABLE14-CellServDB-update-20050317
Public CellServDB 16 Mar 2005


(cherry picked from commit 9055824240a1c7c5b1a13c179159922098ba0b05)
2005-03-17 17:43:00 +00:00
Jeffrey Altman
547d0e2967 STABLE14-windows-dns-crypt-20050516
Found another case in which the windows client could break connections
which should not be broken if cryptall is on.  If the connection is
unauthenticated because there are no tokens, the connections will be
broken.

If a site relies on AFSDB records and the client machine is configured
to append a domain suffix to all queries it is possible for "foo" and
"foo.bar" to appear to be separate cells.  fixed by appending a trailing
'.' to all AFSDB queries if there is not already one.


(cherry picked from commit 164d4ee959547e4791a497bc86377b269ec43dd2)
2005-03-16 21:37:52 +00:00
Jeffrey Altman
a796c890d4 STABLE14-windows-comments-20050314
Update the comments to indicate how we force authentication to be
performed against the Windows logon cache instead of a domain controller
and how BackConnectionsHostNames will work in Longhorn Beta 1.


(cherry picked from commit 80d60b9cd1275c4a4ded571c5876a1e704baf53e)
2005-03-15 00:43:54 +00:00
Jeffrey Altman
6c7121593a STABLE14-windows-mumble-20050311
Add new registry setting to force a lana to be treated as a loopback

Move hack to force use of MSV1_0 cache


(cherry picked from commit 834adacf6a65609d2d013b31ccbfba44d540abfa)
2005-03-11 18:17:34 +00:00
Jeffrey Altman
04d86d2038 STABLE14-windows-pcache-20050310
This patch applies all of the work done to add persistent cache support,
cache manager debugging, and a variety of bug fixes.  A full description
will be committed within doc/txt/winnotes as part of a later commit.


(cherry picked from commit 0b90d69f8a44e6c7ba20553cfb7d5cf7072bab57)
2005-03-11 07:22:30 +00:00
Jeffrey Altman
49e37244b2 STABLE14-windows-misc-20050207
smb3.c: another fix for pattern matching.  Patterns can include '<' and '>'
        instead of '*' and '?'.  Treat any pattern with angle bracket as
        star patterns

afslogon.c: instead of retrying the username lowercased if it is all
        uppercased.  retry the username lowercased if it was not already
        lowercased.  this captures the mixedcase username case.

afskfw.c: If Leash is configured to not import tickets from the MSLSA,
        neither should we.

cm_vnodeops.c: If the second to last component of a path is a symlink and
        the last component cannot be found, return NOSUCHPATH instead of
        FILE_NOT_FOUND.


(cherry picked from commit 641c2b17efbffa523818a950761e612e9fc6f5f7)
2005-02-21 01:16:39 +00:00
Jeffrey Altman
aa8b4a2f56 STABLE14-windows-misc-20050131
afskfw.c: fix cross-realm token acquisition in ANDREW vs CS CMU case

cm_aclent.c: when ACL's timeout, remove them from the associated
   cm_scache_t object's randomACL list and place them on the end
   of the ACL LRU queue

   correct tgtLifetime to be unsigned

smb3.c: fix case sensitive matching


(cherry picked from commit 09feb1be1711dbbe053b572915df4384f488eb0e)
2005-02-21 01:16:20 +00:00
Jeffrey Altman
e5d20a6c5e STABLE14-windows-longfilename-matching-20050203
retry pattern matching when ambiguous matches are found for long file
names


(cherry picked from commit d5495f26ec6e02bc09ad0d6ee6a9a62f545bfd9c)
2005-02-21 01:15:44 +00:00
Jeffrey Altman
f7bb850073 STABLE14-createx-null-ptr-20050126
Don't release null scps


(cherry picked from commit 4cc0394af02a07a0000dd4ce9384398d8b03a6f4)
2005-01-31 04:24:58 +00:00
Jeffrey Altman
d82351b409 STABLE14-windows-aclent-20050126
Undo the FreeACLEnt lock as it is an automatic deadlock


(cherry picked from commit 4c27de95394d44e2066413de7eca65315b83cacb)
2005-01-31 04:24:44 +00:00
Jeffrey Altman
c0dc03d391 STABLE14-windows-misc-20050126
* The list of ACL entries was becoming corrupted because the function
    which obtained a free entry was doing so without the appropriate lock
    being held.

  * Changed the default @sys name list to "x86_win32 i386_w2k i386_nt40"
    for 32-bit x86 systems.  The default for itanium will be "ia64_win64"
    and "amd64_win64" for amd 64-bit processors.


(cherry picked from commit 516614090190f34cb74ec741cf06f86384bff4d1)
2005-01-31 04:23:57 +00:00
Jeffrey Altman
fa4b62ebb4 STABLE14-windows-misc-20050125
The list of ACL entries was being corrupted because the function
which obtains a free ACL entry was doing so without the appropriate
lock being held.

Returning Not A Directory is not the right thing to do when we are
attempting to resolve a path if the error is found on one of the
intermediary path components.  Instead return No Such Path or
No Such File as appropriate.


(cherry picked from commit ff3436446e1c8447d0f9703b088c6d65c6845aa0)
2005-01-31 04:23:45 +00:00
Jeffrey Altman
0e9de60611 STABLE14-windows-smb_vc_t-refcounts-20050117
Rework the reference counting of the smb_vc_t objects to use
smb_ReleaseVC and smb_HoldVC.  Add missing counts for references
from waiting locks.

Fix cm_ioctl.c to allow it to compile once again.


(cherry picked from commit eabe2b6f77da6913b4a6bd51220708c363762fe6)
2005-01-31 04:17:43 +00:00
Jeffrey Altman
5a8303f799 STABLE14-windows-fs-wscell-20050112
when freelance mode is in use, "fs wscell" will now return
"Freelance.Local.Root"


(cherry picked from commit b11e76ce63b6c23265d17d5597342e4aa296f6c0)
2005-01-31 04:09:42 +00:00
Jeffrey Altman
58c23d2810 STABLE14-windows-misc-20050112
New AFS Logo Icon

Fix the assignment of the dataVersion for the freelance scache entries

Fix the calling convention of the AFSD Service Main function to be
WINAPI.


(cherry picked from commit 4c861ab65683add205d062790036b27123d0fe6b)
2005-01-31 04:09:28 +00:00
Jeffrey Altman
5d309485c1 STABLE14-windows-remove-extra-parameter-20050104
aklog.c - remove extra parameter from pr_Initialize()


(cherry picked from commit 1a3e8d9e1641a301a87dd0a0f5b2ca5ef2528e58)
2005-01-31 04:09:10 +00:00
Jeffrey Altman
65f2a099f3 STABLE14-windows-cb-deadlock-20050104
afskfw.c - remove extra parameter to pr_Initialize

afsd_service.c - move SERVICE_STOP_PENDING to before we start to
                 do any work.

afsd_init.c - initialize rx and rpc after starting the cache manager

cm_callback.c - release cm_callbackLock before attempting to re-obtain
                scp->mx lock in cm_EndCallbackGrantingCall()


(cherry picked from commit ca1c67688bf92903c9803976e918266753ef0aae)
2005-01-31 04:08:57 +00:00
Jeffrey Altman
25297a74ee STABLE14-windows-misc-fix-20050102
fix typo


(cherry picked from commit 5bbfc9302503af54ecfd78450abc0b1edf88a860)
2005-01-31 04:08:49 +00:00
Jeffrey Altman
ae2b17e1eb STABLE14-windows-misc-20050102
link to afsutil.lib for hostutil functions


(cherry picked from commit 635abf2d8fb4cfb94ecb396f125e8b65af1d7813)
2005-01-31 04:05:00 +00:00
Jeffrey Altman
5e90243279 STABLE14-windows-virtual-memory-20041224
* The variable used to determine whether a file or virtual memory
    mapped cache is used was not properly initialized to a default
    value. If the registry setting "NonPersistentCaching" was not
    set, the choice would be random.   Properly initialized to be
    "file".

 * The memory mapped view was never unmapped before closing the file
   at service shutdown.  This is now properly cleaned up.

 * Default location of Cache file is now %TEMP%\AFSCache


(cherry picked from commit d3d4af7795dd7371750bfdb9612b6419561cf32b)
2005-01-31 03:53:21 +00:00
Jeffrey Altman
69f2fe49d7 STABLE14-windows-freelance-default-root-cell-20041217
FIXES 16860

Forgot to add trailing dot on auto-generated default root.cell mountpoints.


(cherry picked from commit f26bd30c980288132f800ebbc1bfc1a2b281c2b2)
2004-12-16 19:02:48 +00:00
Jeffrey Altman
3303ae8f2a STABLE14-windows-smb-auth-debug-20041213
Add more OutputDebugF() calls to the smb auth routines to assist in
debugging


(cherry picked from commit b6ef8c484f47e100298e5187abf117e7cc88e242)
2004-12-13 23:48:47 +00:00
Jeffrey Altman
7b12a5af6e STABLE14-windows-1376-pullups-20041213
Pullup all Changes since 1.3.75:

- multihomed server support in AFS Client Service

- fix autogeneration of freelance symlinks

- replace SMB InfoLevel constants with preprocessor symbols
2004-12-13 14:13:08 +00:00
Jeffrey Altman
b8894e18a1 STABLE14-wix-update-20041208
Add property for StoreAnsiFilenames


(cherry picked from commit e8e9a297bc92f40ff03a468b64e8f0b5c930fa6c)
2004-12-08 10:20:50 +00:00
Jeffrey Altman
6e4b4696e5 STABLE14-wix-updates-20041208
Add new property for StoreAnsiFilenames
2004-12-08 09:58:49 +00:00
Robert S Murawski IV
0fd03ea39e STABLE14-nsis-installer-20041208
Preserve previous install settings during upgrade


(cherry picked from commit 3b361484428cd276627c92add48747c57f3db360)
2004-12-08 09:10:37 +00:00
Jeffrey Altman
e3e8a0fb1b STABLE14-pthread-event-names-20041207
pullup change for debugging purposes.
2004-12-07 16:16:09 +00:00
Jeffrey Altman
0811b1eeae STABLE14-store-ansi-filenames-20041207
Provide option to users to allow file names to be stored using Windows
ANSI code pages (similar to ISO Latin character sets) instead of the
traditional OEM code pages
2004-12-07 12:48:57 +00:00
Jeffrey Altman
aadec7b865 STABLE14-windows-smb-20041206
Fixup references to SMB Dfs functions.  Now need to fill in the details


(cherry picked from commit cca8097cb99349bd57aca44113cc0c3cebb537ca)
2004-12-07 06:16:47 +00:00
Jeffrey Altman
79b97bfa9f STABLE14-windows-shutdown-20041205
Synchronize the shutdown of all smb_Server threads by waiting on a
shutdown event before continuing

Do not lock a buffer object if the attempt to obtain the buffer failed.


(cherry picked from commit fe97ddf25b550365fd54a3300fa7388cf71d8631)
2004-12-07 06:16:22 +00:00
Jeffrey Altman
8179c7d66b STABLE14-windows-freelance-20041204
perform a bit more error checking and logging when loading mountpoints and
symlinks from the registry


(cherry picked from commit 38ed975350a879cd2a8d45c3e71aa2ed49e8b664)
2004-12-07 06:14:52 +00:00
Jeffrey Altman
8b112ce5c5 STABLE14-windows-afsd-init-20041202
Fix a memory overwrite condition caused when the BackConnectionHostNames
key does not exist


(cherry picked from commit a8d0ca81a8d79b65e265ebf67ae6b9ddc868cac6)
2004-12-07 06:13:26 +00:00
Jeffrey Altman
df39a2578a STABLE14-windows-auto-disable-sig-verify-20041130
If the desired cache size is greater then 700MB auto disable the
signature verification check in order to prevent fragmentation of
memory.


(cherry picked from commit 9ba17afadb859bf9e3ef912aa1a4c120b7998eb5)
2004-12-07 06:02:46 +00:00
Jeffrey Altman
69baf6e0d7 STABLE14-windows-maxmem-20041130
There is currently a maximum cache size of 1.3GB.  The limit is imposed
by the largest contiguous block of unused memory within the 2GB process
space which can be assigned to the memory mapped file.  Unfortunately,
when the executable digital signature verification code is activated
Windows sees fit to further segment the process memory which in turn
reduces the size of the maximum cache file to less then 800MB.  If
larger cache sizes are desired, a new registry value should be set:

  HKLM\SOFTWARE\OpenAFS\Client (DWORD) "VerifyServiceSignature" = 0x0

Setting this value will disable the runtime verification of digital
signatures on afsd_service.exe and the afs dlls which it loads.  It
will not disable the the version number check on those same files.
The signature verification is not a security messure and is only meant
to enhance the ability to afsd_service.exe to detect potential
destablizing mixtures of DLLs from incompatible distributions.


(cherry picked from commit f8ce184140b2f54bd2d82d4f62b47b5387225419)
2004-12-07 06:02:22 +00:00
Jeffrey Altman
5b6ceee49f STABLE14-windows-digital-sigs-and-more-20041130
Switch the Trust Provider used to verify the validity of executables
and libraries to the Software Publisher Trust Provider.

Add code (with Asanka's help) to extract the certificate details and
log them to afsd_init.log.  Ensure that if files are signed that all
of the files are signed by the same entity.

Add a number of missing prototypes

Correct conversions from time_t to long or short.


(cherry picked from commit 852a0518624c13e45a4d0f2561b171687e07b9cc)
2004-12-07 06:01:41 +00:00
Asanka Herath
fe60f79700 STABLE14-windows-clean-20041129
Cleanup clean targets to not break with cmd shell


(cherry picked from commit 0f1892f09b123d8251c99e81106aae49b42d477e)
2004-12-07 06:00:54 +00:00
Jeffrey Altman
b30c6cd228 STABLE14-windows-dyn-symlinks-20041129
in the freelance root.afs volume, instead of creating a mountpoint when
a name is evaluated and it is a partial representation of a cellname,
create a symlink.


(cherry picked from commit 1a050671c9af89857a31cd41e13c64e95ae7a8e3)
2004-12-07 06:00:23 +00:00
Jeffrey Altman
5d93346cf7 STABLE14-winverifytrust-20041129
Add support for WinVerifyTrust().  If afsd_service.exe is a digitally
signed executable, make sure that all of the associated binaries not
only have the same file version number but are signed as well.


(cherry picked from commit a3c06afa0b7a9a94248af080bc5208291c08e08f)
2004-12-07 05:59:54 +00:00
Jeffrey Altman
e9b4e84ea6 STABLE14-windows-freelance-init-20041127
replace the registry population scheme with cm_freelanceAddMount
based on the CellRootName


(cherry picked from commit a688328e8524f7232bfc294ea02b4d87d7172656)
2004-12-07 05:59:27 +00:00
Jeffrey Altman
8425839232 STABLE14-windows-robust-freelance-20041126
Implement new functions: cm_freelanceMountPointExists and
cm_freelanceSymlinkExists.  Use them along with other validity checks
in cm_freelanceAddMount and cm_freelanceAddSymlink to ensure that name
collisions do not occur and that empty strings are not valid file names.

A symlink may not have a name which would resolve to a valid cell name.
Doing so would prevent access to the cell.


(cherry picked from commit 3c487ecb59c0bace3a417245f639f7e3388ae5dc)
2004-12-07 05:58:52 +00:00
Jeffrey Altman
81673c10c6 STABLE14-windows-scache-locks-20041126
replace all direct manipulations of the cm_scache_t refCount field
with calls to cm_{Hold,Release}SCache[NoLock]().

add missing call to cm_HoldScacheNoLock in freelance Mount Point
re-initialization code.

experiment a bit more with "special folders".   ensure that checks
for "desktop.ini" are case insensitive.


(cherry picked from commit 976465c87e027a3721a464324cf1d83c522dd996)
2004-12-07 05:58:20 +00:00
Dave Tanner
a99dbf645c STABLE14-windows-ini-file-mapping-20041124
Install registry values to force a mapping from afsdsbmt.ini file updates
via the old profile API to the new HKLM\Software\OpenAFS\Client\Submounts
key.


(cherry picked from commit 081993a6274866507bfa3969a7b692a24e6491e1)
2004-12-07 05:57:46 +00:00