614 Commits

Author SHA1 Message Date
Jeffrey Altman
328632fdce STABLE14-windows-vcp-fidsp-empty-20060210
protect against the case in which the vcp->fidsp list is empty
which de-queuing smb_fid_t objects


(cherry picked from commit 81cfded7dbdf25d774375719ce02ebbfe698d77c)
2006-02-10 18:44:17 +00:00
Jeffrey Altman
e910710f85 STABLE14-windows-afslogon-20060209
replace sizeof(opt) with sizeof(LogonOption_t)

add more debug statements


(cherry picked from commit 4b3c120e8e571f650e8274da553b1489cc34bd5e)
2006-02-09 15:29:41 +00:00
Jeffrey Altman
0b95cfab6f STABLE14-windows-winqual-20060206
Fix two bugs reported via Windows Crash Reporting:

 * Freelance initialization is somehow broken allowing the number of
   locally defined mountpoints to become negative.  Due to the use of
   != instead of < in loops, it is possible to read/write unallocated
   memory.

 * GetTextualSid() was not properly handling a NULL output buffer
   pointer as an indication that the desired size should be returned.


(cherry picked from commit 77de32ed745d912e35990c5602b4a69a1b654973)
2006-02-06 07:07:08 +00:00
Jeffrey Altman
dbbfa9adc8 STABLE14-windows-mountpoints-20060205
* if the mountpointstring is empty, return No Such Path; do not panic


(cherry picked from commit 3da66f26980d7cfcde54f6ba9c9a0114e23f6f40)
2006-02-05 17:47:49 +00:00
Jeffrey Altman
ef2660831c STABLE14-windows-afslogon-20060205
* AFS_Logoff_Event must destroy tokens even if integrated logon is not
   being used unless LogoffPreserveTokens is non-zero


(cherry picked from commit 18e7ef272ab4efbd599c5d10174f0afd87c57c2e)
2006-02-05 17:47:12 +00:00
Jeffrey Altman
0843a5cc8c STABLE14-windows-release-notes-20060204
update release notes for 1.4.1
2006-02-05 08:14:16 +00:00
Jeffrey Altman
7936f8d721 STABLE14-windows-afslogon-20060204
* fix LogoffPreserveTokens to work in the correct direction

 * modify behavior to avoid domain controller queries when integrated
   logon is disabled or the logon account is local


(cherry picked from commit f213588374ab92e27bb524cd747152270f9290ca)
2006-02-05 07:46:55 +00:00
Jeffrey Altman
c21a070a4c STABLE14-windows-todays-bugs-20060203
* cell names must be treated as case insensitive

* smb logoff messages do not mean the user is logging off the machine.
  do not use as an indication that tokens should be destroyed

* use the correct lock and avoid a deadlock when handling dead VCs


(cherry picked from commit 22b02189ecc70a94410fb1648da987d0964ddcaf)
2006-02-03 23:05:26 +00:00
Jeffrey Altman
9a12b3d0e0 STABLE14-windows-more-cleanup-20060201
missed one case where the vcpCounter wrapped fids at 0


(cherry picked from commit 57d3a8b72168bf03400ed42e8a8eab78ea75271c)
2006-02-01 18:29:49 +00:00
Jeffrey Altman
1e53ca0084 STABLE14-windows-more-cleanups-20060201
* remove all references to 'dead_vcp'; cleanup smb_vc_t's as soon as
  we know they are dead

* add mx holds across the cm_cell_t updates

* add cm_FindSCacheParent() and remove duplicate code elsewhere

* add mx holds across scp->flags updates

* add cm_CleanFile()

* clear CM_SCACHEFLAG_CALLBACK when discarding callbacks

* fix smb fid wrapping.  wrap at 0xFFFF instead of 0 because 0xFFFF
  is -1 which is INVALID_HANDLE

* add missing mx holds around vcp->flags updates


(cherry picked from commit 8b39114d5b36f60904e5a615a16b43b7e65c3017)
2006-02-01 18:03:18 +00:00
Jeffrey Altman
da19dc02e4 STABLE14-windows-smb_fid_t-mx-20060130
Fixup token deletion logic

Surround all references to smb_fid_t flags and other references
by obtaining and releasing the 'mx' lock.


(cherry picked from commit bceabce8498127c550bbe5a9a430c8589f76d162)
2006-01-31 09:09:59 +00:00
Jeffrey Altman
21c576178b STABLE14-windows-smb_fid_t-audit-20060125
Further testing revealed that some smb_vc_t objects could not be freed
because the associated smb_fid_t objects never reached a zero refcount.
Additional auditing uncovered cases in which there were holds not being
released and others in which they were released to many times.  This
patch fixes the problems and improves auditability by modifying the
behavior of the smb_IoctlXXX() functions to not release a reference
that was obtained by the caller.  Now the caller releases the reference.
2006-01-26 06:09:47 +00:00
Jeffrey Altman
becae29977 STABLE14-windows-continued-refcount-cleanup-20060124
* re-enable LogoffTokenTransferTimeout and LogoffTokenTransfer.
  Tokens are now destroyed at logoff based upon the values specified
  here.  Default is ON and 120 seconds.  Setting this to OFF will
  result in tokens never being destroyed.  This will leak memory.

* protect global queues with mutexes and avoid a variety of race
  conditions.


(cherry picked from commit 97304b84f76154d067717e3b34a3525abebc0cf7)
2006-01-24 17:16:05 +00:00
Jeffrey Altman
33589811b6 STABLE14-windows-smb-logoff-or-abandonment-detection-20060121
This patch:

(1) removes the rest of the dead logoff code that was originally
    stripped of any meaning by DELTA
    winnt-win2000-win98-afs-client-updates-20010623.

(2) gives new meaning to smb_TokenTransfer and smb_TokenTransferTimeout.
    these variables now control how long a smb_username_t and its
    associated cm_user_t and its cm_cellinfo_t (including tokens)
    will be preserved after a logoff.

(3) adds logic to detect logoff conditions

(4) adds cm_CheckVCs().  This function probes the SMB client with a ECHO
    response to determine if the associated SMB virtual circuit is still
    valid.   This is executed once every five minutes by smb_Daemon()
    and whenever the machine's IP addresses change.  This allows
    abandoned VCs to be detected and the associated user credentials,
    file handles, and locks to be cleaned up.  This will also prevent
    the exhaustion of the limited number of SMB sessions.

====================
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.
====================

and remember to mark the session dead so it can be re-used

====================

fix an error caused by patch conflict during pullup


(cherry picked from commit 7fde756a2c6f17e6a3b0db7659c6edcc2eaa0bd7)
2006-01-21 23:40:36 +00:00
Jeffrey Altman
a1e514c0f7 STABLE14-windows-integrated-logon-hack-fix-for-proper-refcounts-20060119
The Integrated Logon hack of setting a token for a smb name different
than the one associated with the current smb session fails when smb
virtual circuits, sessions and username objects are properly reference
counted.  When refcounts are not leaked the constructed smb_username_t
is destroyed immediately after the token is set since there are not
references to it from a current session.

The fix is to mark the smb_username_t object with a flag indicating that
it was created by the Network Provider.  This flag prevents the destruction
when the refcount is zero so that it will be available at the time the
smb session is created (just a moment or two later.)  During the binding
of the smb_username_t to the smb_vc_t the flag is cleared allowing the
tokens to be destroyed when the smb session is closed.


(cherry picked from commit 70b76b3a1cff1dabe9b10b8222cd84fc207b6704)
2006-01-19 23:08:44 +00:00
Jeffrey Altman
a51692ee6d STABLE14-windows-truncate-after-lock-check-20060116
In smb_ReceiveNTCreateX the lock check, cm_CheckNTOpen(), must take place
before we allow the file to be truncated.


(cherry picked from commit d921ee381aa46e4385524f0c31ca5ad606aa920a)
2006-01-17 21:45:12 +00:00
Jeffrey Altman
78ad3f7154 STABLE14-windows-afsmap-20060116
strcpy -> strncpy


(cherry picked from commit 4bb334ef6e40250630aec96b319de8db72619134)
2006-01-17 03:58:05 +00:00
Jeffrey Altman
0eeab1d675 STABLE14-windows-vc-locks-and-more-20060115
This patch fixes several issues:

 * the smb virtual circuits can be active and/or dead.   this patch
   improves the handling of vc's making the transition from active
   to dead

 * correct the refcounts on the smb_user_t and smb_vc_t objects

 * replace the deprecated GetCurrentTime() with GetTickCounts() which
   is the new name.  This function needs to be replaced with something
   else because its return value wraps after 49.7 days

 * hold the correct locks when adjusting the scp->fileLocksH queue


(cherry picked from commit 880a6b66a5477e092d5bb74febbf24639d786c64)
2006-01-16 02:06:58 +00:00
Jeffrey Altman
cdd514a350 STABLE14-windows-cmfinduserbyname-20060112
FIXES 25347

Fix invalid access after freeing newly allocated data structure


(cherry picked from commit af202cac551ad541a0a1ca4525b03c2ec05f6507)
2006-01-12 05:55:58 +00:00
Jeffrey Altman
29a68de93b STABLE14-windows-smb-username-refcount-20060110
the smb_username_t objects are reference counted but they were never
released on their own accord.  Instead the smb_uid_t objects when
released were also cleaning up the smb_username_t.  Since the smb_username_t
is reused, now that smb_user_t objects are being cleaned up, this was
a problem.


(cherry picked from commit a9df3ca715f483a31c14b72bae3f548a4c9291d4)
2006-01-10 13:28:01 +00:00
Jeffrey Altman
27f8315f8e STABLE14-windows-relnotes-20060108
updates 1.4.1-rc4
2006-01-09 05:29:23 +00:00
Asanka Herath
8f65c99214 STABLE14-windows-byte-range-locking-20060108
When SMB sessions are prematurely terminated as part of the tear down
of the virtual circuit we must clean up any remaining file handles,
tree connections, and user sessions.


(cherry picked from commit 78c40badbd8c65d82f6c384fdff8056c03100b67)
2006-01-09 04:49:17 +00:00
Jeffrey Altman
5b7d5d3d08 STABLE14-windows-byte-range-locks-fix-20060107
fix the SERVERLOCKS_ENABLED macro


(cherry picked from commit 36596b93e0b45cb1074b554e57c5f71171350f62)
2006-01-08 04:18:53 +00:00
Jeffrey Altman
395170a5a0 STABLE14-windows-byte-range-locking-20060107
* Update architectural documentation

* Allow locks to be obtained as soon as it is possible instead of
  enforcing a requirement that locks be granted in order.

* Fix other bugs

* Disable byte range lock processing


(cherry picked from commit f057d9515c72609e4ca9e51ff96f658689679497)
2006-01-08 00:39:56 +00:00
Asanka Herath
7121e5295f STABLE14-windows-vista-wix-install-20051230
Update the MSI to install the network provider without impersonation


(cherry picked from commit 40f151f5c47460927bcaa5b5a631057ae72790ad)
2005-12-30 22:41:49 +00:00
Jeffrey Altman
f9c98f804e STABLE14-windows-rpc-warning-20051214
If osi_InitDebug() fails due to RPC_S_NO_PROTSEQS, log to the afsd_init.log
file a warning indicating that the registry should be examined for a
misconfiguration of Windows.


(cherry picked from commit 8204b5968c0181e094f8369b94c5a4cf1a9de04a)
2005-12-14 05:33:46 +00:00
Jeffrey Altman
9e7ae6f02d STABLE14-windows-fs-setserverpref-vldb-20051214
prevent a panic condition if "fs setserverprefs -vlserver" is executed
more than once before the vlserver is associated with a cell.


(cherry picked from commit b99bd38da60f374a03382090fdaae906a00c8428)
2005-12-14 05:30:53 +00:00
Jeffrey Altman
61f9832c38 STABLE14-windows-afsd-service-20051121
improvements to VNOVNODE fix
2005-12-07 12:02:41 +00:00
Jeffrey Altman
ade038725e STABLE14-windows-release-notes-20051130
A very rough set of updates for 1.4.1 RC2
2005-11-30 07:12:55 +00:00
Jeffrey Altman
eca5d04d53 STABLE14-windows-afskfw-20051130
correct the construction of the client name (with realm) when krb524
is being used.


(cherry picked from commit eeee5a9e14a693538a62565483db8f1b3d46cc99)
2005-11-30 06:40:53 +00:00
Jeffrey Altman
bbe760a385 STABLE14-windows-locks-uninit-20051122
Initialize 'code' to non-zero at the top of each loop to avoid
setting the last updated timestamp on skipped locks


(cherry picked from commit 030ecf1af9773c0e058ded784dd096fc886fd6d8)
2005-11-23 05:02:11 +00:00
Jeffrey Altman
bfb0b1a28e STABLE14-windows-drivemap-renewal-20051121
When afscreds.exe performs a drive map renewal it should not delete
all existing drive mappings.  This undoes the efforts of the AFS
logon network provider and any persistent mappings created with the
explorer shell.   This patch extends the interface to provide a mode
in which DoMapShareChange does not remove unknown drive mappings.


(cherry picked from commit 5ce322c9f13522cf96addaf09804021c6d78b22f)
2005-11-22 00:37:48 +00:00
Jeffrey Altman
fe5cd430d3 STABLE14-windows-date-representation-20051121
change date representation to yyyy-MM-dd HH:mm:ss so that it sorts
properly


(cherry picked from commit 81365856ce91121c82969f97c1e79d34d30da648)
2005-11-22 00:32:41 +00:00
Jeffrey Altman
d009e36f84 STABLE14-windows-afsd-service-20051121
add logic to process VNOVNODE in cm_Analyze.  Force re-evaluation of symlink
strings and flush the stat cache entry.

force the use of new rx_connections when the server is marked down.

prevent server objects from being freed if user preferences are set.
2005-11-22 00:30:01 +00:00
Jeffrey Altman
47f4fb26c6 STABLE14-windows-wix-update-20051121
Wix 2.0.2419.0 changes the way that RadioButton values are specified.


(cherry picked from commit d99995ccfe30bff1f45f5f2e37beee7ac3566f3b)
2005-11-21 15:53:12 +00:00
Jeffrey Altman
9dbe65fcc6 STABLE14-windows-release-locks-at-shutdown-20051108
remember to release all of the locks we obtained from the file server
at shutdown.


(cherry picked from commit 685ba16a0b9db8cf5df2e875ff9a6e5b72d6539c)
2005-11-09 03:05:33 +00:00
Asanka Herath
08eb81822d STABLE14-windows-tests-winflock-20051031
A windows specific file locking test app for exercising the byte range
locking code.


(cherry picked from commit 8cf272e5f16abfe6b90b01bc613bf7f47bc4336c)
2005-10-31 22:17:02 +00:00
Jeffrey Altman
c0312289b7 STABLE14-windows-checkserver-fix-20051029
the windows client was not treating Verror responses from the server
as indicating the server as up if they were positive


(cherry picked from commit eaa142645227b1af8a7d41f8b9c376ddf789c532)
2005-10-30 01:01:10 +00:00
Jeffrey Altman
17e271787c STABLE14-windows-daemon-timers-20051028
the daemon up server check was set for 1 hour and not ten minutes.

turned all interval constants into variables so that they can be
set via registry entries at a future time.


(cherry picked from commit 288886618b347cdd2d4bfaa06a2df18b1a24229e)
2005-10-29 21:15:07 +00:00
Jeffrey Altman
2a22b19a8b STABLE14-windows-rap-debug-20051024
some more debugging messages


(cherry picked from commit 2bcece3cfad14f22759b1ec546646be900c3c504)
2005-10-25 03:09:05 +00:00
Jeffrey Altman
53861a346f STABLE14-cmdebug-merge-20051024
Merge src/WINNT/cmdebug.c into src/venus/cmdebug.c


(cherry picked from commit 765e8606b9cda1f70f3117b4e1c7397d1ae42690)
2005-10-25 02:57:59 +00:00
Jeffrey Altman
5dbd32c49a STABLE14-windows-mkdir-root-exists-20051021
If a request is received to create the root directory of a device,
return CM_ERROR_EXISTS instead of CM_ERROR_NOTFOUND for the nul-string
file name.


(cherry picked from commit 47cc7643e1b04bacd858a3893accab8c377b34ac)
2005-10-23 01:32:52 +00:00
Jeffrey Altman
a44e078d7e STABLE14-window-largeint-20051019
The large integer support was applying a <<32 to a 32-bit value.
This is an undefined operation.


(cherry picked from commit 8b0b064f7ec60d8b5913248c97553ce3b7fdb775)
2005-10-19 21:12:05 +00:00
Jeffrey Altman
09ad86b21e STABLE14-windows-rxkadunknownkey-20051019
report RXKADUNKNOWNKEY as SEC_E_NO_KERB_KEY


(cherry picked from commit a92aa204855b6459ac483f0dd5b704b4a52edec8)
2005-10-19 07:58:46 +00:00
Jeffrey Altman
01c6a4154c STABLE14-windows-locking-error-codes-20051018
cm_Lock(), cm_RetryLock() should not interpret servers be unreachable as
a sharing violation.


(cherry picked from commit 9f0f50a2b165392fc0a62f82d8c54e35108ab429)
2005-10-18 21:53:50 +00:00
Jeffrey Altman
8b2b6569d6 STABLE14-windows-ip-change-20051018
add a monitor to watch for IP Address changes.  When a change is detected,
wait 2.5 seconds for things to settle down and then check to see if down
servers are reachable.


(cherry picked from commit a923af27265c8d0aa359d57c8c47b50eb0dbeee3)
2005-10-18 21:51:01 +00:00
Jeffrey Altman
d2b95196a4 STABLE14-windows-error-codes-20051018
handle the CM_ERROR_ALLDOWN case when translating cm errors to nt status


(cherry picked from commit 5cd3d016fdbc6d14c6ac942b0b4e3e92a09755c5)
2005-10-18 16:31:33 +00:00
Jeffrey Altman
17d2bff03c STABLE14-windows-fw-service-test-20051017
Do not perform Firewall Configuration if the firewall service is not installed


(cherry picked from commit d16fb72074a3e81ad5ce295fbc49fa8707852545)
2005-10-17 22:30:00 +00:00
Jeffrey Altman
0251a2e4d3 STABLE14-windows-firewall-configuration-20051016
Windows Firewall Policy cannot be accessed by a service unless from the
Service Manager thread nor until the service is in a RUNNING state.
Firewall configuration moved to cm_Daemon() thread.


(cherry picked from commit cd98a20f1c9e89eb44ef5c5349337292bd3ba243)
2005-10-17 20:33:04 +00:00
Jeffrey Hutzelman
24e12618d9 STABLE14-cellservdb-update-20051015
15 Oct 2005


(cherry picked from commit 3437c1ad7b15eef9c1e33f936ac500b360e1ff9c)
2005-10-16 01:56:46 +00:00