Commit Graph

6376 Commits

Author SHA1 Message Date
Jeffrey Altman
c1c8da78b6 Windows: Handle "(Default)" regsitry value in MountGlobalDrivesThread
In MountGlobalDrivesThread(), if the "(Default)" registry value
is defined that should be interpreted as a drive mapping to a
device with no name.  This is specified using NULL instead of the
nul-string.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/446
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-11 08:59:52 -07:00
Felix Frank
bef42619ba fetchDestroy can end calls now too.
Reviewed-on: http://gerrit.openafs.org/130
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-11 08:12:09 -07:00
Felix Frank
b961dc1630 Included proper 64bit case in fetchClose() and storeClose().
Reviewed-on: http://gerrit.openafs.org/129
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-11 08:10:33 -07:00
Derrick Brashear
3898524693 darwin knet avoid rx socket during shutdown
theoretically a user thread can race us during shutdown and end up
panicing us if the soclose happens at the wrong time. if we're shutting down
just return. using afs_shuttingdown would have the side effect that we'd lose
the ability to add any graceful behavior.

Reviewed-on: http://gerrit.openafs.org/443
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-11 08:05:28 -07:00
Felix Frank
cc7938e8ff Added guard against missing call and moved alength assignment in fetchInit.
The returned value of rx_NewCall is important of course and must be taken
into account before trying to start RPCs. Do assign the length output
variable ASAP.
Also fixes an overlong line and the type of the pos local var to unsigned.

More style fixes:
* Moved length64 to use proper scope, initialized code.
* Generally make more tidy

Reviewed-on: http://gerrit.openafs.org/128
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-11 08:02:19 -07:00
Derrick Brashear
98f9b6ae2b des crypt cope with 64 bit longs
we test for them in configure; instead of hardcoding it in yet
another place, use the information we have

Reviewed-on: http://gerrit.openafs.org/442
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-10 23:09:58 -07:00
Jeffrey Altman
e24d64f2a6 Windows: Add pioctl data output validation to fs and symlink command line tools
pioctl data buffer output was not being validated to ensure that
buffers were not overwritten or accessed beyond their limits.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/441
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-10 21:50:29 -07:00
Russ Allbery
fdea6a3418 Windows: update build system for restorevol man page move
restorevol moved from section 8 to section 1.  The Windows build
system needed corresponding changes.

Reviewed-on: http://gerrit.openafs.org/440
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-10 11:06:04 -07:00
Russ Allbery
d96ec9ec03 Stop using sig_t
acinclude.m4 was adding to afsconfig.h some code to define sig_t as the
type of a signal handler.  This definition was in terms of RETSIGTYPE,
which is deprecated by Autoconf.  It also adds an unnecessary abstraction
for only two places in the AFS source code where it was used.  Remove it
and change those two spots to use the standard C declaration of the
function pointer.

Reviewed-on: http://gerrit.openafs.org/335
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-10 05:46:40 -07:00
Russ Allbery
d6df1a8cec Move restorevol to bin from sbin
restorevol only requires access to a dump file and write access to the
directory in which the dump is being unpacked.  It doesn't require being
a superuser, so it should be installed in bin instead of sbin.  Also
move the man page to section 1 and update references accordingly.

Reviewed-on: http://gerrit.openafs.org/333
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-09 21:22:34 -07:00
Derrick Brashear
c46689c05f redhat spec dkms don't strip modules
provide a debug module which is unstripped. this is necessary for debugging
problems.

Reviewed-on: http://gerrit.openafs.org/391
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-09 20:04:46 -07:00
Derrick Brashear
96a176ed58 make salvager able to cope with corrupt class index
right now if a directory ends up in the small vnode index, the salvager
will never fix it. unlinking from the index (and recovering an orphan later)
beats crashing forever

Reviewed-on: http://gerrit.openafs.org/309
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
2009-09-09 16:21:08 -07:00
Derrick Brashear
754a4b628a macos panic decoder should handle 64 bit kernel in 32 bit mode
panic from 64 bit should be decodable in 32 bit mode. make it so. add
-k switch to allow a path to a kernel to be specified.

Reviewed-on: http://gerrit.openafs.org/438
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-09 16:17:51 -07:00
Marc Dionne
392e3dab97 Avoid __USE_XOPEN redefinition
Only define __USE_XOPEN if not already defined.
This eliminates a few build warnings where __USE_XOPEN is already
defined in system header files.

Reviewed-on: http://gerrit.openafs.org/439
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-09 16:16:30 -07:00
Marc Dionne
12a7afa648 Remove extraneous + character in src/volser/common.c
Remove an unneeded extra + character at the end of line - probably
from a typing accident.

This generates a warning at compile time.

Reviewed-on: http://gerrit.openafs.org/437
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-09 16:02:28 -07:00
Felix Frank
f041bd2534 Cosmetics: Rename some variables, fix types.
* Replaced tsize by new local var llbytes in rxfs_storeInit.
* Make int32 lengths unsigned in rxfs_storeInit.
* Renamed lengthFound to length64.
* renamed abase to base.

Reviewed-on: http://gerrit.openafs.org/127
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-09 13:37:31 -07:00
Christof Hanke
23143230e6 Moved CForeign check to rxfs_storeInit/storeMore.
This is rxfs-specific, so move it out of CacheStoreProc.

It must be done before entering the do { } while (moredata) loop proper
now, as rxfs_fetchMore is never called during the first iteration

(moredata is always 0), but the length may need fixing (note that
this was done after what is now the fetchMore op originally). Thus
it appears in rxfs_fetchInit.
To prevent a bogus call during the first loop iteration, also check
for length!=0. Finally, don't bother with fetchMore at all unless
CForeign is set.

In rxfs_fetchInit, we added an additional check for length_hi being
zero.

uploade patchset 8.

Reviewed-on: http://gerrit.openafs.org/126
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-09 12:56:51 -07:00
Jeffrey Altman
01fae60242 Windows: Use secure ctime and strncpy in afs_ctime
Microsoft compilers version 1400 and above provide secure
versions of ctime and strncpy. Use them in afs_ctime.

Correction to sha1:359c64bb674ea0606e64b91fd8252297310a9862

Thanks to Andrew Deason for identifing the mistake.

Reviewed-on: http://gerrit.openafs.org/429
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-08 21:29:13 -07:00
Jeffrey Altman
5d1efd3cd8 Windows: secure rand()
rand_s() is available on Visual Studio 2005 and above (aka 1400 and above)

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/430
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-08 21:28:55 -07:00
Jeffrey Altman
0f7efd94fa Windows: Add data validation to ktc_xxxx functions that perform pioctls
The ktc_GetToken and ktc_ListTokens functions perform a pioctl
and then parse the response data.  There is no validation that the
data required is not longer than the pioctl output or that the
data received fits into the data structures that are being written.
As a result, random crashes have occurred when the wrong data
has been received from the pioctl.

This commit adds data validation to at least ensure that these
functions cannot read beyond the data provided or write beyond
the allocated memory.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/405
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-08 21:28:25 -07:00
Marc Dionne
f7085c38e1 build fix: ubik_client is a struct
Fix a build failure - ubik_client is a struct and not a type

Reviewed-on: http://gerrit.openafs.org/431
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-08 21:27:37 -07:00
Jeffrey Altman
359c64bb67 Windows: Use secure ctime and strncpy in afs_ctime
Microsoft compilers version 1500 and above provide secure
versions of ctime and strncpy.  Use them in afs_ctime.

Reviewed-on: http://gerrit.openafs.org/408
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-08 10:56:00 -07:00
Russ Allbery
1992b702f6 Only force a specific compiler where necessary
Rather than setting the compiler to cc on all platforms by default,
use the Autoconf default unless the specific compiler might matter.
Conservatively set the compiler to cc for all non-Linux, non-BSD
operating systems that previously didn't explicitly set it.  Fix a
few places on Linux where the compiler was set to gcc explicitly
rather than using the Autoconf result.

Don't bother setting the Linux i386 compiler to gcc -pipe.  The compile
performance difference isn't enough to bother with the special
exception, and we don't do this for other Linux systems.

With this change, setting CC at Autoconf time will correctly set the
compiler per the user's preferences unless they're on an operating
system where we care about having a particular compiler for kernel
purposes.  This can be relaxed further in the future, particularly if
the kernel compiler is broken out to a separate setting.

Reviewed-on: http://gerrit.openafs.org/337
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-08 10:54:07 -07:00
Russ Allbery
950b96f290 Remove old disabled code to support truncated passwords
ka_UserAuthenticateGeneral had code disabled with #ifdef OLDCRUFT to
retry failed authentications by truncating the password to eight
characters, with a comment that the truncating behavior of kpasswd
was disabled in 1990.  Nothing references this preprocessor define in
the source tree.  Delete the dead code.

Reviewed-on: http://gerrit.openafs.org/336
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-08 10:53:47 -07:00
Jeffrey Altman
7e91d071f0 Windows: Prevent pioctl races from crashing afsd_service
The SMB redirector will permit two processes to open the
pioctl file at the same time without giving SMB server an
opportunity to say 'no'.  As a result multiple reads and writes
on the allocated smb_fid->ioctl can play havoc with the pioctl
state.  Since afsd_service doesn't know the writes and reads
are coming from separate requests there is nothing it can do
to prevent incorrect data going to the wrong process.  However,
it can (and should) protect itself when the state becomes invalid.

Two prevention methods are applied:

 1. add an additional state flag that explicitly indicates
    when the ioctl is in the dataout state

 2. validate the length of data in the ioctl input or
    output buffers before copying it.  If the length
    becomes negative, return a CM_ERROR_INVAL error.

In addition, when the invalid state results in a failure to
to find a matching pioctl function do not return CM_ERROR_BADOP.
CM_ERROR_BADOP can only be returned if the SMB operation is not
supported.  Returning it in response to a ReadFile request will
cause the SMB client to drop the connection.

Finally, fix smb_FindFID to prevent the same 'fid' from being
used for more than one open file.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/407
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-08 10:22:50 -07:00
Jeffrey Altman
96ebb6df31 Windows: Fake scache not completely initialized
The fake scache object used for pioctl operations was not
fully initialized.  The magic value, data version, and
several locks were not initialized.  Do so.

Since the fid of the fake scache object is 0.0.0.0
remove the assert in cm_GetSCache for cell != 0.
Instead simply return CM_ERROR_INVAL.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/406
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-08 10:15:24 -07:00
Jeffrey Altman
132268042d Windows: Prevent simultaneous pioctls
The Windows pioctl implementation makes an incorrect assumption.
It is not true that every CreateFile() operation results in a
SMB NTCreateX operation being delivered to SMB Server.  The SMB
client can combine open requests from multiple processes or threads
onto a single SMB file descriptor and locally manage the operations.
This is a problem for pioctls since the Transceive operation requires
that a WriteFile/ReadFile combination must belong to the same request.

Prior to this change simultaneous pioctl operations would be
combined and the individual reads and writes could overlap resulting
in responses going to the wrong requestor and end of file errors
being received by the others.

Due to lack of data validation in fs.c, ktc_nt.c, symlink.c,
etc random crashes are produced.

This change alters the sharing mode under which the pioctl file is
opened.  Instead of FILE_SHARE_READ | FILE_SHARE_WRITE, only
FILE_SHARE_READ is specified to CreateFile().  This ensures that
the CreateFile will fail with a sharing violation if the pioctl
file was previously opened for writing.

A sharing violation check is provided and the CreateFile is retried
indefinitely until the open succeeds or the error is not a sharing
violation.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/404
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-08 10:14:54 -07:00
Jeffrey Altman
60caadec3a Windows: smb_FindShareCSCPolicy uses invalid registry key
smb_FindShareCSCPolicy() ignored the error state of RegCreateKeyEx()
and would pass the uninitialized hkCSCPolicy to RegQueryValueEx()
and RegCloseKey().  While this did not produce invalid results, it
did result in unnecessary operations and exception handling within
the Win32 registry apis.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/402
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-08 10:14:28 -07:00
Jeffrey Altman
5aced2e8d6 Correct nvldbentry and vldbentry misuse in uss/uss_vol.c
The uss module relies on MapNetworkToHost / MapHostToNetwork from
src/volser.  These functions convert a struct nvldbentry and not
a struct vldbentry.  When src/volser was converted to struct nvldbentry
src/uss must have been forgotten.

In uss_vol.c convert GetServerAndPart() to accept a nvldbentry
instead of a vldbentry.

Add two static functions:

 * ovlentry_to_nvlentry() to convert from vldbentry to nvldbentry
   if required

 * uss_vol_GetEntryByID() which first attempts to use
   ubik_VL_GetEntryByIDN() and if that is not supported falls
   back to ubik_VL_GetEntryByID() and ovlentry_to_nvlentry().

LICENSE MIT

FIXES 125101

Reviewed-on: http://gerrit.openafs.org/377
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-07 19:34:59 -07:00
Derrick Brashear
0ee69d5b9a fetchstore nocall argument breaks non-64bit clients
a label before the end of a loop breaks, which is the case
when AFS_64BIT_CLIENT's not defined (e.g. UKERNEL).

fix it.

Reviewed-on: http://gerrit.openafs.org/410
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-07 19:33:50 -07:00
matt@linuxbox.com
8a8244dd35 Remove struct from AFS_UCRED instantiations (opaque credential type support)
The identifier AFS_UCRED is intended as a preprocessor alias to
a possibly-opaque credential type.  A platform header will normally
rename AFS_UCRED to a platform credential type with #define.

This is not intended to change the meaning of AFS_UCRED, but removes
the assumption that it is a struct type, which may not be true, depending
on the platform and other decisions made by the AFS client port.

Reviewed-on: http://gerrit.openafs.org/397
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-07 09:04:30 -07:00
Jeffrey Altman
3de3cb03c2 Windows: Log RXKAD errors in cm_Analyze
RXKAD errors were not logged at the point where the errors were
handled.  As a result they were never logged.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/400
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-05 06:42:18 -07:00
Jeffrey Altman
edccb905d4 Windows: Explorer Shell Invalid Parameter Errors
The attempt to follow the smb protocol specification by returning
extended responses to NTCreateAndX requests (when specified)
resulted in random "invalid parameter" errors from the Explorer
Shell (and common control dialogs) on Vista SP2.
As a result we won't send the extended responses.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/399
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-05 06:42:01 -07:00
Jeffrey Altman
a43c893d49 Windows: Freelance get callback sync and uninitialized variables
In cm_GetCallback the Freelance mode case did not properly
synchronize attempts to fake obtain a callback.

cm_GetCallback also failed to initialize the contents of afsStatus and
volSync which are used as input to cm_MergeStatus.
cm_MergeStatus special cased the freelance root.afs volume root
directory but failed to handle any other freelance volume objects.
As a result it used the contents of the uninitialzed input structures
to populate the status of the object for which the callback was
obtained.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/401
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-05 06:41:32 -07:00
Derrick Brashear
ad1e9c7084 make afsd partition size check be large partition safe
right now the math overflows the 32 bit type for >2tb partitions.
use larger variables to avoid this.

Reviewed-on: http://gerrit.openafs.org/392
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-03 12:37:09 -07:00
Andrew Deason
5d9c767ac5 Update accessDate on volume access
Right now accessDate is simply never updated, so the last access time
for a volume is never reported. Simply update the field in
VBumpVolumeUsage_r, so we track the last time the volume was accessed.

Note that this does not increase disk writes to the volume header; the
performance impact is effectively nil.

Reviewed-on: http://gerrit.openafs.org/385
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-03 12:35:53 -07:00
matt@linuxbox.com
24ddc90e5d Add tracing to MCAS allocator and GC
Adds conditional trace logging to MCAS object cache and supporting GC,
using ViceLog.  While in future this should be normalized, it is correct
for both fileserver and volserver, the two programs using MCAS currently.

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/374
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-03 12:35:25 -07:00
Jason Edgecombe
fb79d6e1f0 Updated Chapter 2, Section 3.4 of the Admin Guide
Added a bullet point explaining the use of a Kerberos cross-realm trust and PTS
foreign groups to give foreign users access.

Replaced a reference to Authentication Database with Kerberos Database.

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/381
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-03 11:02:16 -07:00
Jeffrey Altman
880664bd0d Windows: The unnamed stream is a synonym
Treat a file request for "name::$DATA" as if it were specified as
"name".  Otherwise, the inclusion of the colon in the file name
will cause it to be treated as invalid.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/395
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-03 06:30:32 -07:00
Jeffrey Altman
ae7ef5f5b9 Windows: rx_Write failures must be processed
The error code returned by rx_Write takes precedence under
all circumstances over the error returned by EndRXAFS_StoreData.

cm_ReleaseBIOD must apply the error code to all buffers in the
BIOD list.

cm_ReleaseBIOD accepts an error code, not a boolean indicating
failure.

Fix a related signed/unsigned error.

FIXES 125351

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/396
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-03 06:28:27 -07:00
Jeffrey Altman
baa883aa6b Windows: avoid inappropriate dns searches
Do not perform searches for cells if the string prefix
matches _._AFS_IOCTL_._.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/394
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-03 06:28:08 -07:00
Jason Edgecombe
d352ca1df4 Updated Chapter 2, Section 3.2 of the Admin Guide
Removed the reference to the Authentication Server and added a reference to the Kerberos Server and Kerberos 5 authentication for foreign clients.

Replaced AFS Product Support with the AFS registrar as the maintainer of the
public CellServDB file. A link was added to grand.central.org for getting the
latest copy of the file and submitting changes for the local site.

Reviewed-on: http://gerrit.openafs.org/379
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-02 16:02:28 -07:00
Andrew Deason
e86cb488b3 SALVSYNC_com initialization typo
The size of sres_hdr is sizeof(sres_hdr), not sizeof(sres).

Reviewed-on: http://gerrit.openafs.org/393
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-02 10:03:08 -07:00
Russ Allbery
5dd137c474 Turn on --enable-bos-new-config unconditionally
Remove the conditional and Autoconf flag for enabling BosConfig.new
handling and change bosserver to always rename BosConfig.new to BosConfig
on startup if the former exists.

Document BosConfig.new handling in the bosserver and BosConfig man pages.
Tone down the warning about the BosConfig file format changing and warn
that bosserver rewrites BosConfig when shutting down.

Reviewed-on: http://gerrit.openafs.org/211
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-01 09:46:37 -07:00
Andrew Deason
64bad257d6 DAFS: avoid shutdown hang during salvage
Right now, when the fileserver shuts down, it tries to cancel any
demand-salvages in progress. This causes the fileserver to hang, since
during shutdown, the salvageserver may already be gone. This avoids
cancelling in-progress salvages, and allows salvages to continue after
the fileserver has shut down.

To do this, the salvageserver now closes SALVSYNC sockets in spawned
children, so the children don't get SALVSYNC requests directed at them,
since they can't handle them. The salvageserver also now periodically
scans for logs of salvaging children that have terminated, and
incorporates them into SalsrvLog, just like it does for it's own
children. The salvageserver children that actually perform salvages now
also set the inUse volume header field to their programType, so the
fileserver knows not to schedule new salvages for that volume in the
event of a fileserver restart during a salvage.

FIXES 124486

Reviewed-on: http://gerrit.openafs.org/279
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-01 09:21:10 -07:00
Christof Hanke
5fd700d1fd Uploaded patchset 9. Sorry for the mess.
Reviewed-on: http://gerrit.openafs.org/125
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-01 06:04:27 -07:00
Andrew Deason
04aecc99e0 Fix cache tracking for small fragsizes
The tracked amount of disk cache used by a client can be incorrect when
afs_fsfragsize is tuned to below 1023. Since we round up to the next
nearest afs_fsfragsize+1 then round down to the kb, if afs_fsfragsize+1
< 1kb, we can undershoot the cache usage.

This enforces afs_fsfragsize to always be at least 1023.

Reviewed-on: http://gerrit.openafs.org/338
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-01 04:38:43 -07:00
Jason Edgecombe
67bcc19c75 Updated Chapter 2, Section 3.3 of the Admin Guide
Added text about Freelance Mode and Dynamric Root Mode and the changes they
cause when dealing with mounts to foreign cells in /afs and \\AFS

Reviewed-on: http://gerrit.openafs.org/380
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-01 03:22:58 -07:00
Christof Hanke
3e28e72e40 Remove unnecessary type ViceFid
The type "ViceFid" is just a clone of the type AFSFid and used only in a couple of places.
Thus, for simplicity, rename all occurences of ViceFid to AFSFid and remove the
typedef itself.

Reviewed-on: http://gerrit.openafs.org/383
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-01 02:27:39 -07:00
Jeffrey Altman
ac1e6fa1a6 Windows: Permit cygwin apps to read from AFS again
For some reason specifying a unique GUID for each open
file based on the cm_fid results in cygwin apps being
unable to read from AFS.  ReadFile() calls fail with
Invalid Device Request errors instead.

While fixing that issue discovered that not all of the
data was properly set for QueryPathInfoAll operations.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/388
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-08-31 17:47:34 -07:00