3535 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
e493f895ac STABLE14-viced-probe-uuid-on-old-connection-20060210
When we have found an existing host via Uuid, send the probe to the
connection associated with the old host instead of the new one.  If
you send it to the new connection, we will fail to detect that the
old host is no longer responding and hence that it should be removed.
This should solve the 55 second delay problem seen from clients with
Uuids that move addresses or sit behind a NAT.


(cherry picked from commit 0c77d5332da76d223b007f8e85e8d81148b17737)
2006-02-10 17:12:25 +00:00
Jeffrey Altman
d8f1cc3a0b STABLE14-viced-log-typo-20060210
missing % in format string causes crash at log level 125


(cherry picked from commit d2de9e69bc08e04c00083166a59847be246a9e8c)
2006-02-10 17:11:45 +00:00
Derrick Brashear
4b44b8d754 STABLE14-viced-debug-port-numbers-20060210
fix port number printing to not print byteswapped port numbers


(cherry picked from commit 3416916228624b6b446b5106f40c4d7e5fbd8cb0)
2006-02-10 16:50:39 +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
9881da31a3 STABLE14-viced-host-nat-20060207
When we discover a new address for an existing host we can take the
opportunity to cleanup the hash table and the interface list if the
new address differs from an existing address only by the port number.
In that case we know the client is communicating to us from behind a
NAT and the old addr/port number combination is no longer going to
be of use to us.


(cherry picked from commit e4c21e9c6fe4a030cf271b614d8e3d78130e4fc9)
2006-02-07 07:47:31 +00:00
Jeffrey Altman
5505be384c STABLE14-viced-more-dbg-improvements-20060207
convert the rest of the addresses output in hex to dotted notation


(cherry picked from commit 6909509eca2a22b4b7003be60e0dbda75a30949c)
2006-02-07 06:05:08 +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
5886653be7 STABLE14-windows-version-20060206
1.4.0097 == 1.4.1-rc7
2006-02-06 04:12:34 +00:00
Jeffrey Altman
5061482298 STABLE14-windows-notes-20060206
updates for 1.4.1-rc7
2006-02-06 04:08:25 +00:00
Chaskiel M Grundman
98010e1f70 STABLE14-darwin-avoid-bogus-name-caching-20060205
FIXES 26225

avoid the possibility of creating bogus cached named vnodes


(cherry picked from commit f504df317572835718037fe177073e3202905753)
2006-02-05 18:26:48 +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
1d8782a7e5 STABLE14-viced-log-add-ports-20060202
* add port numbers to Host addresses so we can distinguish clients behind
  NATs

* make messages consistent with regards to case and punctuation of
  "Host x.x.x.x:y"

* convert hex addresses to dotted notation


(cherry picked from commit 04c3d3cc3900914725c479b993a6313b0ef29e3f)
2006-02-02 21:48:39 +00:00
Jeffrey Altman
27de3d04f7 STABLE14-windows-notes-20060201
notes for 1.4.1-rc6
2006-02-02 04:56:50 +00:00
Jeffrey Altman
12004709ba STABLE14-windows-version-20060201
1.4.1-rc6
2006-02-02 04:45:31 +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
Chaskiel M Grundman
c4d186cef2 STABLE14-bkg-disable-var-20060202
don't extern this


(cherry picked from commit 40d1b796c1dca9c51811224c5ad80bbd2c62cdb1)
openafs-stable-1_4_1-rc6
2006-02-02 08:28:42 +00:00
Derrick Brashear
f906237b0c STABLE14-openafs-1-4-1-rc6-20060201
happy groundhog day?
2006-02-02 04:37:45 +00:00
Jeffrey Altman
ff70d46d6e STABLE14-getsomespace-r-rewrite-20060201
rewrite of GetSomeSpace_r to get rid of the brokenness we had before.

also make GetCapabilities work like other rpc stubs which don't need callbacks


(cherry picked from commit ecb9da5839e8e2ed0d52d87e426a728700bbd389)
2006-02-01 15:59:43 +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
Russ Allbery
aedd15e74b STABLE14-man-page-html-20060124
Initial cut at an HTML conversion of the POD reference pages.  Requires
Pod::Simple be installed (version 3.0 or later, probably).  Also fix a POD
formatting bug in the afs(1) man page noticed while testing HTML output.


(cherry picked from commit 6eb9f473add1426b52861574c841b1fdfd80367b)
2006-01-30 18:21:48 +00:00
Russ Allbery
6221cb6af0 STABLE14-sparc64-linux-typo-20060114
XLDFLAGS64, not XLDFLAG64.


(cherry picked from commit ad207ee1134b42bd1a2204f7d91d0f4016a73c55)
2006-01-30 18:20:46 +00:00
Troy Benjegerdes
5cde4cb204 STABLE14-sparc64-linux-20060113
Hopefully fix sparc64 Linux support with 2.6 kernels.


(cherry picked from commit 0b24f2d91a444c4bb11b3eaf8082356907b32d44)
2006-01-30 18:19:38 +00:00
Chaskiel M Grundman
7ce44cff31 STABLE14-simple-darwin-disable-bkg-20060128
avoid potential hang by disabling bkg daemons on 10.4 for now


(cherry picked from commit 2e76a2450e06c93d7cdbc0fe07bd9302ac085952)
2006-01-28 19:22:30 +00:00
Chaskiel M Grundman
6e76880bf7 STABLE14-newvcache-dont-spin-20060128
make things so newvcache won't spin


(cherry picked from commit 29277d96bfade62e437b9206f885af307c74e3ca)
2006-01-28 18:06:37 +00:00
Chaskiel M Grundman
c2c2b8e336 STABLE14-reclaim-defered-flush-fixes-20060128
fix side effect of reclaim lookaside


(cherry picked from commit bb576b462d1d26cd07f03965c734ae6d2c5bd132)
2006-01-28 18:04:04 +00:00
Jeffrey Altman
35aaffe982 STABLE14-windows-64-bit-type-safety-20051105
this is only a partial pullup
64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler

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

this is a partial pullup
64-bit type safety changes required for successful compilation
on Windows 64-bit systems with the VS 2005 compiler
2006-01-26 20:58:47 +00:00
Chas Williams
4881ce6c77 STABLE14-linux-vcache-extra-ref-unneeded-20060126
FIXES 25829

the dynamic/system inode version of the linux client already keeps an
extra reference when the inode is on the vcache list. the inode/vnode
should not go away while we are trying to flush the dcache children.


(cherry picked from commit 78835720e0eac5897568f0ce32cd0ec20dc4c569)
2006-01-26 19:30:07 +00:00
Derrick Brashear
b12283bf2b STABLE14-macos-avoid-reclaim-hang-20060124
FIXES 25686

based on chaskiel's suggestion, implement a lookaside reclaim list


(cherry picked from commit 532147e45588039e6db64ef7deccfc1d5d21d16d)
2006-01-26 16:04:49 +00:00
Chas Williams
6d5149ca23 STABLE14-linux26-build-update-20060126
FIXES 25879

KBUILD_BASENAME will need to be set in 2.6.15 and later for configure to work usefully


(cherry picked from commit c7df78fd7f9c4a29f8af32e49217806ef352ea01)
2006-01-26 15:58:35 +00:00
Tom Keiser
8f56562c95 STABLE14-ukernel-rx-knet-deref-20060126
FIXES 25927

pass correct parameter to avoid type mismatch


(cherry picked from commit 27c42be1b9dced92f578664d57f2dd92aa21c8a0)
2006-01-26 15:53:36 +00:00
Derrick Brashear
4ab6ab784a STABLE14-sol10-vnode-cleanup-20060126
Because we use a private pool of vnodes, it's up to us to trigger cleanup.
here we do so.


(cherry picked from commit ad86f80fc2a7c02452d4bf280236f4c5df317fe9)
2006-01-26 15:50:08 +00:00
Niklas Edmundsson
6716aabdf1 STABLE14-aix5-warning-error-cleanup-20051102
FIXES 22855

aix 5.1 and 5.2 should also build


(cherry picked from commit 6792431d289a8bd5cc035907247c3d7b31a9b98c)
2006-01-26 15:45:51 +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
Derrick Brashear
6266a10f56 STABLE14-macos-avoid-reclaim-hang-20060124
FIXES 25686

based on chaskiel's suggestion, implement a lookaside reclaim list


(cherry picked from commit 1649de223462f5290974b7f05d09a41f9ff29bde)
openafs-stable-1_4_1-rc5
2006-01-25 04:47:11 +00:00
Jeffrey Hutzelman
079f1aeb3b STABLE14-release-avoid-negative-time-20060124
avoid any possibility of time going negative when releasing incrementally


(cherry picked from commit 179b4c31d93b511a5762c818a47cddc0e364c9d3)
2006-01-25 03:49:53 +00:00
Derrick Brashear
d4f7d158b6 STABLE14-implement-vpeek-for-listvol-20060124
roll back for listonevolume (only)


(cherry picked from commit feccc2a98770fd48eee58d380671539e4bc1fdfb)
2006-01-25 03:25:49 +00:00
Chas Williams
b8fd4073eb STABLE14-usebuffer-macros-20060124
FIXES 25819

get rid of usebuffers macro usage warning


(cherry picked from commit 1c53d7f34db626f6f44821844912e7f7012e5bfb)
2006-01-24 17:41:20 +00:00
Jeffrey Altman
96a1aa8399 STABLE14-windows-notes-20060124
more updates for 1.4.1-rc5
2006-01-24 17:19:09 +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
Chaskiel M Grundman
21bfb25d40 STABLE14-viced-grow-h_maxSlots-20060123
and jhutz@cs.cmu.edu

The size of h_maxSlots as computed based upon the value of
MAX_FILESERVER_THREAD is too small.   It is possible for h_lwpIndex
(in the pthread case) to have produce the same Slot value for multiple
threads.  In that case it is possible for the following to occur:

       X: h_Hold_r(host)
       X: H_UNLOCK
       ...
       E: H_LOCK
       E: Check h_Held_r(host); it is true, so don't hold
       E: H_UNLOCK
       X: H_LOCK
       X: h_Release_r(host)
       X: h_TossStuff_r(host)  [called by h_Release_r]
       X: H_UNLOCK
       E: CheckHost(host)

The end result would be a crash due to a reference to a null field
in the host processed by CheckHost.

This patch is a bit of a hack in that it solves the problem by increasing
the number of slots for threads and does not determine the correct number
of threads the process should be allowed to produce.


(cherry picked from commit 4a5dda84178842e3eaa61d03fecc96149333dd13)
2006-01-23 21:30:18 +00:00
Jeffrey Altman
713e30b7d2 STABLE14-check-host-optimize-20060123
There should never be a case where h_Enumerate calls CheckHost with a
host whose callback_rxcon that is NULL.  However, due to a bug it ended up
being the case that it happened.  An examination of the CheckHost code
showed that the check for the HOSTDELETED flag should take place before
a reference to callback_rxcon is obtained.  If HOSTDELETED were set, the
code would simply release the reference immediately.  However, the process
of obtaining and releasing the reference required dropping and obtaining
locks that would be a performance hit.


(cherry picked from commit ff40c87da3ce4c6a7a58c08eaa223e8760dc8f73)
2006-01-23 21:28:43 +00:00
Derrick Brashear
6867198aa1 STABLE14-fs-getfid-20060123
add a fs subcommand to get a fid


(cherry picked from commit db98b697fe4e1b38ac5e73d60dd101b2506e12a4)
2006-01-23 21:07:42 +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
448ed23b83 STABLE14-windows-notes-20060121
more notes for 1.4.1-rc5
2006-01-21 21:40:36 +00:00