openafs.git
13 years agowindows cm_BeginDirOp add flags (nobuildtree)
Matt Benjamin [Thu, 27 May 2010 23:14:20 +0000]
windows  cm_BeginDirOp add flags (nobuildtree)

Add a flags argument to cm_BeginDirOp, and define a flag
CM_DIROP_FLAG_NOBUILDTREE which asserts that the operation
being synchronized does not require scp->dirPlus to be
constructed.

Change-Id: Ibc4345574da3c1e7717c83b64a83260f70a3b06c
Reviewed-on: http://gerrit.openafs.org/2053
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoRX: Can't assert a void result
Simon Wilkinson [Fri, 11 Jun 2010 09:48:37 +0000]
RX: Can't assert a void result

We can't assert(MUTEX_DESTROY(blah) == 0) when the MUTEX_DESTROY
macro already returns void (and asserts), as it does in the
pthread case. This fixes the build failure introduced by
53c9258cd7300c03be3f3e50003cad3dfc59baf3

Change-Id: I0b7a30e785de3437f0c1e264b4a63c87f63b6783
Reviewed-on: http://gerrit.openafs.org/2120
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agorx service specific data
Matt Benjamin [Tue, 8 Jun 2010 22:29:13 +0000]
rx service specific data

Adds rx_GetServiceSpecific and rx_SetServiceSpecific to the rx_service interface,
conforming to the equivalent calls in the rx_connection interface.
For consistency, the implementation strategy is the same.  The intended
use is to more cleanly support server multiplexing within an RPC-based
test dispatch library.

Change-Id: I6a8968484efe2c858857008321996e67328bb75c
Reviewed-on: http://gerrit.openafs.org/2097
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoBreak origin's callback for RXAFS_Rename target
Andrew Deason [Thu, 22 Oct 2009 03:16:38 +0000]
Break origin's callback for RXAFS_Rename target

When we RXAFS_Rename something, the status of the renamed FID can
sometimes change, and thus we break callbacks on it. Currently, however,
we do not break the callback for the originating client, even though the
status of the target changes and we do not return an AFSFetchStatus to
the caller.

Since the callback is not always broken for the target, it may not be
immediately obvious to client implementations to implicitly break the
target's callback. Since we do not have an explicit protocol
specification saying that the callback is implicitly broken, break the
callback for the origin client as well, to be safe.

Change-Id: I97d90518a240f852013d1d63fccef663c8b0e998
Reviewed-on: http://gerrit.openafs.org/709
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoAvoid unnecessarily updating .. in SAFSS_Rename
Andrew Deason [Wed, 9 Sep 2009 20:56:26 +0000]
Avoid unnecessarily updating .. in SAFSS_Rename

Currently the .. entry for a directory is always recreated on a Rename
operation, even if the parent directory does not change. Now, avoid
altering the directory at all (including no COW nor DV bump nor vnode
modify time update) when we don't need to.

Change-Id: I53478ec05e2fc6362836043476ff67e2c41b7feb
Reviewed-on: http://gerrit.openafs.org/436
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoWindows: Revise SMB QuerySecurityInfo for MS10-020
Jeffrey Altman [Wed, 9 Jun 2010 17:55:14 +0000]
Windows: Revise SMB QuerySecurityInfo for MS10-020

MS10-020 (http://support.microsoft.com/kb/980232) has caused
many problems for implementors of SMB 1.0 servers and applications
that call GetFileSecurity() without checking the return code to
determine if the call succeeded.  The gist of the vulnerability
was that the SMB redirector would pass any buffer it received
to the application regardless of whether or not it was valid.
MS10-020 protects the applications by strictly validating the
SMB response data structure and the data in the security descriptor
that is returned.

The problem for SMB 1.0 server implementors is that there have
been at least three different protocol descriptions for
NT_TRANSACT_QUERY_SECURITY_DESC published over the last decade
and all of them are incomplete.  Therefore, just about no one but
Microsoft has an SMB 1.0 server implementation that produces the
exact out that they are expecting to validate.

The end result is that in an attempt to protect applications from
crashing due to invalid input being passed in directly caused
dozens of applications to crash by not returning any security
descriptor data at all.  Even when the applications didn't crash
they might not have been able to save their data.  Cisco WAAS
and NetApp DataOnTap systems were most adversely affected and
they have had CIFS protocol licenses for many many years.

To fix OpenAFS here is what needed to be done:

1. Instead of returning a security descriptor that gives ownership
   to the NUL SID, give it to the Everyone SID and set the flag
   that states that everyone has full access.

2. Validate the input parameters.  In particular, check to ensure
   that the SMB file descriptor is valid and the file has not
   been deleted.

3. Enforce the maximum output data and parameter counts.

4. Handle buffer overflow and buffertoosmall conditions
   in the manner that Microsoft expects them to be handled.
   In particular, note that the parameter data which is returned
   in the SMB Data Region is not counted in the Data Count.
   Even if MaxData is 0, we can still return parameters values
   as long as MaxParm is large enough.

LICENSE MIT

Change-Id: I95034bc6f24a282decc507edcffb93bc58b986be
Reviewed-on: http://gerrit.openafs.org/2110
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

13 years agofurther constrict nat pings
Derrick Brashear [Mon, 7 Jun 2010 04:29:06 +0000]
further constrict nat pings

one more constrainment of nat pings on unix

Change-Id: I8b3db989b0e16a79cd63795147145c5e0ab55e6e
Reviewed-on: http://gerrit.openafs.org/2091
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoAdd additional documentation for the new test suite
Russ Allbery [Wed, 9 Jun 2010 21:12:49 +0000]
Add additional documentation for the new test suite

Add a copy of docs/writing-tests from C TAP Harness as HOWTO and add
a README with some additional explanations more specific to OpenAFS.

Change-Id: Ic5b04805db6b00bcb82862ad8d2ebe466f2c266b
Reviewed-on: http://gerrit.openafs.org/2109
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

13 years agoInstall pthreaded ptserver and vlserver
Andrew Deason [Fri, 21 May 2010 16:47:42 +0000]
Install pthreaded ptserver and vlserver

When --enable-pthreaded-ubik is specified, install the pthreaded
versions of ptserver and vlserver instead of the non-pthreaded
versions. Previously, the pthreaded versions were getting built but
not installed with 'make dest' or 'make install'.

Change-Id: If2f08342df4c94c1cce3001614d9e050222bf0f6
Reviewed-on: http://gerrit.openafs.org/2102
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoMove FreeBlock prototype to vlserver_internal.h
Andrew Deason [Fri, 21 May 2010 16:19:53 +0000]
Move FreeBlock prototype to vlserver_internal.h

FreeBlock is only used in internal vlserver code and should not be
called by anything else; it should not be prototyped in a public
header. Move its prototype to go along with the other vlserver
internal prototypes.

Change-Id: Id66f046c76a9d4c454bbd6fd6e65c75dbeccf68e
Reviewed-on: http://gerrit.openafs.org/2101
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoDefine updateUbikNetworkAddress static
Andrew Deason [Wed, 2 Jun 2010 20:06:51 +0000]
Define updateUbikNetworkAddress static

updateUbikNetworkAddress is static, and its prototype says so. The
actual implementation of the function lacks 'static', though. Add it.

Change-Id: Ida8e54cecabfffb2adbeb5f12d233668897893f8
Reviewed-on: http://gerrit.openafs.org/2100
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFix the trailing #endif comment in tests/tap/basic.h
Russ Allbery [Wed, 9 Jun 2010 01:51:16 +0000]
Fix the trailing #endif comment in tests/tap/basic.h

Change-Id: I3a7dbda8d2792229365df4266ca43cbb4bc815bf
Reviewed-on: http://gerrit.openafs.org/2099
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoAdd okv function to the TAP test library
Russ Allbery [Wed, 9 Jun 2010 01:40:11 +0000]
Add okv function to the TAP test library

Add an okv() varient of the ok() function that takes the arguments as
a va_list instead of as a variable argument list.  This makes it easier
to reuse ok() when writing other tests.

Change-Id: Icaeaaf9d6bd9d54bfd886a75961d98367ee0fb9a
Reviewed-on: http://gerrit.openafs.org/2098
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoWindows: Detect if AFSCache is memory mapped to a new address
Jeffrey Altman [Mon, 7 Jun 2010 22:18:39 +0000]
Windows: Detect if AFSCache is memory mapped to a new address

The Windows AFSCache paging file contains pointer addresses
that are only valid if the file is memory mapped at a specific
memory address.  If the file is mapped at a new address, the
pointer values will be invalid and the service will crash with
an invalid memory access.

Check for address consistency and force the cache to be rebuilt
if the consistency is lost.

LICENSE MIT

Change-Id: Ie7fb64659f808f09279445f47c2f1385be0a53f0
Reviewed-on: http://gerrit.openafs.org/2095
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoSolaris: lookup "" like "."
Andrew Deason [Tue, 8 Jun 2010 15:38:07 +0000]
Solaris: lookup "" like "."

At least on some versions of solaris, we can get passed an empty
string to afs_lookup, if the root directory is in AFS (e.g. after a
chroot). Interpret this as the same as looking up the "." entry;
otherwise we return ENOENT, implying that the "/" directory does not
exist, even if its subdirectories do.

FIXES 127356

Change-Id: I84283e78fbf33b946afaf3c80ef4a1a679e8fc93
Reviewed-on: http://gerrit.openafs.org/2096
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agolibafs: consistently hold vnode refs
Andrew Deason [Tue, 18 May 2010 16:39:21 +0000]
libafs: consistently hold vnode refs

Make all common libafs code call AFS_FAST_HOLD to hold an afs vnode
reference, instead of sometimes calling VN_HOLD(AFSTOV(tvc)) directly.
Make AFS_FAST_HOLD always call osi_vnhold, and have each platform
define osi_vnhold for their platform-specific quirks (as it was doing
before).

This way, if a platform has an osi_vnhold that is special somehow (on
solaris, we bump a VFS refcount if the vnode refcount goes from 0->1),
it will always be called on vnode references.

Change-Id: I7bb2b5ac116c8e86f6c6c0d40f414523870275a3
Reviewed-on: http://gerrit.openafs.org/1987
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoAIX: make osi_procname a stub
Andrew Deason [Mon, 7 Jun 2010 16:42:02 +0000]
AIX: make osi_procname a stub

'curproc', 'curthread', or other such conveniences do not exist on
AIX, so the current osi_procname implementation breaks the build.

Determining the current process name on AIX is, while possible,
difficult and error-prone. Since we only need the process name for
informational messages to users, don't bother trying to determine it,
and just return the empty string so we can build.

Change-Id: I452a9786d809c3dee3da519cd3d6ca053f8d7ab8
Reviewed-on: http://gerrit.openafs.org/2094
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoMake lib/afs.exp in sys_depinstall
Andrew Deason [Mon, 7 Jun 2010 17:18:53 +0000]
Make lib/afs.exp in sys_depinstall

The AIX libafs uses lib/afs.exp to build, and libafs depends on
sys_depinstall. So, make lib/afs.exp in addition to
include/afs/afs.exp in sys_depinstall.

Change-Id: I8788a49cd4a5e7545f0f1f45572cdfb0f014c3db
Reviewed-on: http://gerrit.openafs.org/2093
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoAIX: declare code in osi_TryEvictVCache
Andrew Deason [Mon, 7 Jun 2010 17:13:11 +0000]
AIX: declare code in osi_TryEvictVCache

osi_TryEvictVCache was missing 'code's declaration. Declare 'code'.

Change-Id: Ife5b9bfaea4d6a88bcbd82b862e26afcee1c149f
Reviewed-on: http://gerrit.openafs.org/2092
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoWindows: remove src/NTMakefile
Jeffrey Altman [Sat, 5 Jun 2010 23:34:29 +0000]
Windows: remove src/NTMakefile

NTMakefile was moved from src to the top level.
A second copy in src just gets out of sync.

Change-Id: I9474fab56cee46c3acb1758aee62729c1cfadd7b
Reviewed-on: http://gerrit.openafs.org/2088
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: Cleanup .exp .res .manifest and others
Jeffrey Altman [Sat, 5 Jun 2010 23:29:59 +0000]
Windows: Cleanup .exp .res .manifest and others

Fix the cleanup procedure to work when the tree has not previously
been built.

Delete .exp, .res, and .manifest files from the $(OBJ) tree.

Perform cleanup on all language directories.

Change-Id: I2a24c69293066f012cb869fe67dbacb5ffdc2d43
Reviewed-on: http://gerrit.openafs.org/2087
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: Update fs newcell and add VIOCNEWCELL2
Jeffrey Altman [Thu, 3 Jun 2010 16:04:15 +0000]
Windows: Update fs newcell and add VIOCNEWCELL2

The Windows version of "fs newcell" did not accept any parameters
and behaved quite differently from the Unix version.  Instead of
permitting new cell information to be added, the Windows version
simply forced the existing cell information to be reacquired.

This update adds a new pioctl, VIOCNEWCELL2, to support the
implementation of a Unix-style "fs newcell".  The functionality
added here differs from the Unix version in the following ways:

 1. "fs newcell" with no arguments is still accepted
    in order to maintain compatibility with prior Windows
    behavior.

 2. "fs newcell -cell <cell> -dns" instructs the cache manager
    to add the new cell but obtain the vldb server info from
    DNS.

 3. "fs newcell -cell <cell> ... -registry" instructs the cache
    manager to add the new cell and also save the cell configuration
    data in the registry for use the next time the service restarts.

 4. The -vlport and -fsport options are accepted although the
    -fsport value is currently unsupported by the cache manager.

LICENSE MIT

Change-Id: If62cc8e1c6cc8ba2defb4cd72dae8a87b4d915e0
Reviewed-on: http://gerrit.openafs.org/2080
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: Freelance Import CellServDB
Jeffrey Altman [Thu, 3 Jun 2010 15:59:45 +0000]
Windows: Freelance Import CellServDB

Add a new registry option that permits automatic generation of
Freelance mountpoints for every cell listed in the CellServDB info
(file and registry).  "FreelanceImportCellServDB".  This functionality
is only triggered when the afsd_service is started.   The operation
is performed in the background by the daemon thread after the firewall
configuration is set.

LICENSE MIT

Change-Id: Ic6cc0738f8c185d77f9cf69d4997b8044522e50e
Reviewed-on: http://gerrit.openafs.org/2079
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: engage path mtu discovery for rx
Jeffrey Altman [Fri, 4 Jun 2010 04:46:39 +0000]
Windows: engage path mtu discovery for rx

Change-Id: Ice32ca652dfcf1c14577c696eaca074f61a62675
Reviewed-on: http://gerrit.openafs.org/2085
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: enable circular buffer management for rx socket input
Jeffrey Altman [Fri, 4 Jun 2010 04:45:21 +0000]
Windows: enable circular buffer management for rx socket input

LICENSE BSD

Change-Id: Ibbcb6171738b4f6adfb267b5782b53ae7170b0e9
Reviewed-on: http://gerrit.openafs.org/2084
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoComprehensive edit of Admin Guide chapter two (first 20%)
Russ Allbery [Sat, 29 May 2010 21:45:04 +0000]
Comprehensive edit of Admin Guide chapter two (first 20%)

Update and revise chapter two (Issues in Cell Configuration and
Administration) of the Administration Guide for current AFS and current
computing concepts.

Remove references to an AFS-provided login utility and discuss local login
configuration for Kerberos more generically.  Further clarify the role of
ssh in ensuring the user has access to files in AFS during remote login.
Improve the inode and namei discussion slightly.  Update the setuid
discussion for the new default of disabling setuid for cells and for the
known security flaws in enabling setuid.  Modernize terminology for DNS
around cell naming and remove the descriptions of TLDs.  We can now assume
our target audience knows this stuff.

Move index terms into the appropriate section for what's being indexed in
a few more cases.

Lots of other, more minor wording changes and updates.

Change-Id: Id8b1ace5afca6b8b7b2082a9a0779a4b91c89dcd
Reviewed-on: http://gerrit.openafs.org/2065
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agorx mtu discovery constrainment code
Derrick Brashear [Tue, 1 Jun 2010 17:10:32 +0000]
rx mtu discovery constrainment code

this code makes us work in the face of a sub1500 mtu network.
a subsequent commit is needed to make it more effective: attempts
to grow the mtu must be scheduled so we aren't forced to heavily
brute-force on failure to discover the exact mtu immediately;
for performance, we do want to grow to the real mtu.

Change-Id: If876c134efd4b0952035193ef00a6e780f7adc64
Reviewed-on: http://gerrit.openafs.org/2069
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: convert cm_config.c to use strsafe library
Simona Poilinca [Fri, 4 Jun 2010 04:42:38 +0000]
Windows: convert cm_config.c to use strsafe library

Replaced the unsafe string functions with the safe versions
available in microsoft's strsafe library.

Change-Id: Id9e9acf7eaa1b045d91b972b37a411c7a94ed3ac
Change-Id: I377fe4e2e5bac904f5dd28916f1244262e1933c2
Reviewed-on: http://gerrit.openafs.org/1778
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: Support building a lite-client installer
Asanka Herath [Fri, 4 Jun 2010 03:58:42 +0000]
Windows: Support building a lite-client installer

If LITECLIENT is defined when invoking the WiX based MSI installer
build, we will build a light-weight client installer MSI.  This
minimizes the size of the installer for users who only need client
functionality from OpenAFS.

The light-weight client excludes:

  - Server components
  - Control center components
  - Administration utilities
  - Debug symbols

Lite-client installer can also be built by invoking target wix-lite
from the root NTMakefile.

Change-Id: I544cdb7170d17358eb235f3c476c468dbae62776
Reviewed-on: http://gerrit.openafs.org/2034
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years ago"fs checkservers" during cache creation can crash client
Rainer Toebbicke [Wed, 2 Jun 2010 16:12:36 +0000]
"fs checkservers" during cache creation can crash client

Many pioctl calls pass as soon as the afs_resourceinit_flag is set,
which happens relatively early, alas before the cell name is set.
PCheckServers and others need the latter and dereference NULL.

Easiest: set the cell name as soon as it is known and the dynroot initialisation
piggy-backed to it can be done.

Change-Id: I9985f2c4a0afddfed04b85338108b3d6e97b64e6
Reviewed-on: http://gerrit.openafs.org/2072
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoDocument in SalvageLog(5) the per-partition salvager logs
Russ Allbery [Wed, 26 May 2010 18:15:30 +0000]
Document in SalvageLog(5) the per-partition salvager logs

Document that salvager creates separate logs per partition when doing
a full server salvage and then appends them all to SalvageLog when it
completes.

Change-Id: I2ffa8c79ef83b590f90bb014fc318559deae7113
Reviewed-on: http://gerrit.openafs.org/2035
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

13 years agoWindows: Fix usage of cm_FreeServerList
Jeffrey Altman [Thu, 3 Jun 2010 15:54:04 +0000]
Windows: Fix usage of cm_FreeServerList

cm_FreeServerList will set the input variable to NULL if the
contents of the list could in fact be freed.  If they could not
be freed, the individual entries are marked for deletion and will
not be subsequently used.  Do not set the list variable to NULL
after calling cm_FreeServerList otherwise memory can be leaked.

LICENSE MIT

Change-Id: Ia3cacd760d7395a2dd6b063643a8aa86f9e468b9
Reviewed-on: http://gerrit.openafs.org/2078
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: Reduce number of Nat Ping Connections
Jeffrey Altman [Thu, 3 Jun 2010 15:51:17 +0000]
Windows: Reduce number of Nat Ping Connections

Instruct rx library to only perform NAT pings on file server
connections that are actively in use and which are anonymous.

LICENSE MIT

Change-Id: I6b74e8070f2c522ed13e0c06ea7a304cce525ab9
Reviewed-on: http://gerrit.openafs.org/2077
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoWindows: Fix cm_IoctlSkipQueryOptions buffer management
Jeffrey Altman [Thu, 3 Jun 2010 15:49:14 +0000]
Windows: Fix cm_IoctlSkipQueryOptions buffer management

When cm_IoctlSkipQueryOptions advances the input buffer
pointer it must also reduce the available input length.

LICENSE MIT

Change-Id: I4e0d673e3ff5d8621e715d33d73616a22211a8a9
Reviewed-on: http://gerrit.openafs.org/2076
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: do not request KEY_WRITE privilege if not required
Jeffrey Altman [Thu, 3 Jun 2010 15:47:46 +0000]
Windows: do not request KEY_WRITE privilege if not required

When querying the registry cellservdb info the KEY_WRITE privilege
is not required, therefore do not request it.

LICENSE MIT

Change-Id: I050717be3afb5df979897ffbef65987160a65149
Reviewed-on: http://gerrit.openafs.org/2075
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: warning removal
Jeffrey Altman [Thu, 3 Jun 2010 15:44:33 +0000]
Windows: warning removal

cast away size_t larger than afs_uint32 warnings

use variables with the proper signed vs unsigned state in order
to avoid signed vs unsigned comparison warnings

disable deprecated string function warnings

LICENSE MIT

Change-Id: I78a3786a0766979c8d83cc5dbd06f91e70b0ee47
Reviewed-on: http://gerrit.openafs.org/2074
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

13 years agodarwin notify don't recurse on vcache lock
Derrick Brashear [Thu, 3 Jun 2010 19:50:46 +0000]
darwin notify don't recurse on vcache lock

afs_vop_access->afs_VerifyVCache2->afs_GetVCache->afs_FetchStatus->
afs_Analyze->afs_NotifyUser can recurse and try to notify us. Don't
worry about it; we're best-effort.

we lack a lock primitive to see if we own this lock.

Change-Id: Ibc0c8a8164a95f0d268e5f1f42a62c3a28c4ab9d
Reviewed-on: http://gerrit.openafs.org/2081
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoup: refuse multicharacter arguments
Andrew Deason [Thu, 3 Jun 2010 14:54:28 +0000]
up: refuse multicharacter arguments

The 'up' command currently silently accepts and discards extra
characters when specifying arguments. This can produce rather
confusing behavior such as mistyping '-v -1' as '-v-1' resulting in
the '-v' switch being honored, but the '-1' being ignored. The same
thing occurs for specifying '-v1', even though the usage message
implies that you can combine arguments.

So instead, report an error message for any arguments specified that
are longer than 2 characters, since they are never valid.

Change-Id: I64846b53248ea1d06d03b6ac1fdb4317ba04b03b
Reviewed-on: http://gerrit.openafs.org/2073
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoWindows: Fix midl options for generating stub code
Asanka Herath [Wed, 26 May 2010 16:34:08 +0000]
Windows: Fix midl options for generating stub code

MIDL is used to generate server stub code for implementing SMB RPC.
Fix the invocation of MIDL so that MIDL can locate include files and
respect AFSDEV_AUXMIDLFLAGS.

Change-Id: I31e90897c8f0d8db6746dbc94a3fe4de53aab060
Reviewed-on: http://gerrit.openafs.org/2033
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agorx allow setpeermtu to take a peer
Derrick Brashear [Tue, 1 Jun 2010 16:13:42 +0000]
rx allow setpeermtu to take a peer

modify setpeermtu to work when a peer is passed in. modify existing
callers. note solaris caches a whole host's pmtu, so use that
on all peers at the host.

Change-Id: Iba05fffd47a7c7b63742d6c539be4fe248336fb7
Reviewed-on: http://gerrit.openafs.org/2068
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agorx setpeermtu should handle a host correctly
Derrick Brashear [Tue, 1 Jun 2010 16:08:57 +0000]
rx setpeermtu should handle a host correctly

right now, when no port is passed, we don't correctly tweak
the mtu for all peers on a host. do that here.

Change-Id: Ia07f592bf001415d8a76bd3326f2dc6aa0641809
Reviewed-on: http://gerrit.openafs.org/2067
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoaklog no krb524 kill warnings
Derrick Brashear [Tue, 1 Jun 2010 16:04:43 +0000]
aklog no krb524 kill warnings

if you're disabling krb524, these variables are unused. make them
not be part of such a compile

Change-Id: Ib10e8fc82614b7a821daa7c77540ce246551cb0a
Reviewed-on: http://gerrit.openafs.org/2066
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoAdd warnings for Authentication Server commands
Russ Allbery [Thu, 27 May 2010 21:40:21 +0000]
Add warnings for Authentication Server commands

For each command only useful with the Authentication Server, add
warnings that the Authentication Server is obsolete and will be
removed in a future version of OpenAFS.  Encourage people who care
to update uss to work with a modern Kerberos KDC, recommend kinit
and aklog or klog.krb5 over klog, and warn that klog will be of
limited use without an Authentication Server.

Change-Id: Idc78ba548134b83ac1eea0fb81a5bc38a431bb38
Reviewed-on: http://gerrit.openafs.org/2052
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoprune further list of connections we natping on
Derrick Brashear [Fri, 28 May 2010 12:49:37 +0000]
prune further list of connections we natping on

if it had tokens before, again, still not worth a nat ping.
nor for the vlserver.

Change-Id: I30281801b604b67b418b8a54a1889c54c8f6e4db
Reviewed-on: http://gerrit.openafs.org/2058
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoRewrite vldb_check -fix
Rod Widdowson [Thu, 20 May 2010 17:27:11 +0000]
Rewrite vldb_check -fix

vldb_check -fix was very 'topical' in nature.  It showed signs that
each sucessive corruption had been treated as a one off needing a
specific fix.  This made the code difficult to understand and
incomplete: for instance a single volume on the wrong hash only was
not corrected.  Further there was some rather unfortunately code which
would under certain circumstances stamp the last volume at various
places across the file.

This checkin removes all the old code and replaces it with a
'systematic' fix.  During the last scan across all the volumes, all
four of the hash chains are rebuild from the ground up.  We can then
get rid of the outer 'Mung Until Now Good' iteration and further we
benefit from a linear run time.

Tested by building several different forms of broken-ness in all three
chains and then fixing it.

Now with improved logging and correct non insertion of nonexistant elements
and clean compiled with extra warning.

Change-Id: Id39d806c9c90f67c6967bd99460ba9842a043158
Reviewed-on: http://gerrit.openafs.org/1991
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

13 years agoAdd bounds checking prior to IOs in vldb_check
Rod Widdowson [Wed, 19 May 2010 09:45:57 +0000]
Add bounds checking prior to IOs in vldb_check

vldb_check would just read where it was sent.  This means that if a
hash entry was beyond the end of file the read would fail and halt the
program dead.

This change adds checks for that so we can go limping on.

There is no code to fix this sort of corruption.  I have another
(preexisting) checkin to do that which will happen once I can get a
clean test run.

This checkin also removes a some pointless debugging printfs.

Change-Id: Ib285e113c8db024de41ffaf6c11ceb2979d07041
Reviewed-on: http://gerrit.openafs.org/1990
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

13 years agoReformat chapter two of the OpenAFS Administration Guide
Russ Allbery [Fri, 28 May 2010 14:42:24 +0000]
Reformat chapter two of the OpenAFS Administration Guide

Purely reformatting to make the document more maintainable.  There are
no content changes.

Change-Id: I349c8e86de925cbed6e09be529a22e0a08b227f6
Reviewed-on: http://gerrit.openafs.org/2059
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

13 years agoAdd a sample test program to the new test suite
Russ Allbery [Fri, 28 May 2010 19:15:52 +0000]
Add a sample test program to the new test suite

Add a modified version of src/util/test_ktime to the new test suite
as an example of how to write a test program with the new harness.

Change-Id: Ifbceff1905f9f0dd686c2a2d2edc2f8796e7918f
Reviewed-on: http://gerrit.openafs.org/2063
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoImport C TAP Harness 1.2 as a testing harness
Russ Allbery [Fri, 28 May 2010 16:35:28 +0000]
Import C TAP Harness 1.2 as a testing harness

Creates a new top-level tests directory that will be used for all
future automated test code eventually.  Import runtests and the
basic TAP library from C TAP Harness 1.2.  Add top-level check and
test targets that build the full source tree and then the new tests
directory, and then runs runtests on the test list.

Change-Id: I896f8ae488cd1dfa8529a10b4b479e45e7c67afe
Reviewed-on: http://gerrit.openafs.org/2062
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoAdd src/tests/OpenAFS/Dirpath.sh to .gitignore
Russ Allbery [Fri, 28 May 2010 16:34:37 +0000]
Add src/tests/OpenAFS/Dirpath.sh to .gitignore

Change-Id: I027d71ead7c75037bdc070932659c3f7da69dc0a
Reviewed-on: http://gerrit.openafs.org/2061
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoClean up warnings in the tests directory
Russ Allbery [Fri, 28 May 2010 16:03:50 +0000]
Clean up warnings in the tests directory

Build repair.o with strict aliasing disabled because it addresses the
same data structure via two different structs at the same time.  Fix
various other, more minor warnings.

Several fixes here require more Autoconf glue to work properly, but
that's deferred to future work (such as some HAVE_* defines that we
don't probe for and the handling of non-native 64-bit integers in
some of the code).

Change-Id: I721a9fb952d2cf485d2df8e5672e5e5f5d9d6159
Reviewed-on: http://gerrit.openafs.org/2060
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLinux: 2.6.35 - fsync no longer takes a dentry
Marc Dionne [Fri, 28 May 2010 21:48:12 +0000]
Linux: 2.6.35 - fsync no longer takes a dentry

In 2.6.35, the fsync file operations drops the dentry argument.
Add a configure test and cope.

Change-Id: Iaf660808d52688a4a8fd53a76d8d055602f746b9
Reviewed-on: http://gerrit.openafs.org/2064
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoTypo made sysctl table invisible
Rainer Toebbicke [Fri, 28 May 2010 11:41:41 +0000]
Typo made sysctl table invisible

AC_CHECK_LINUX_STRUCT for the check for ctl_name in ctl_table instead
of AC_CHECK_LINUX_FUNC.

Change-Id: Ia0e0de5d62ce7f702a3f1d7a5cd4d19ef726095c
Reviewed-on: http://gerrit.openafs.org/2057
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoviced: kill console use
Derrick Brashear [Tue, 18 May 2010 17:41:38 +0000]
viced: kill console use

don't open /dev/console in the fileserver. if you want this,
let syslog do it.

Change-Id: I1d7c0fb4a8582b6c781acdb9ae0764b64dc1c301
Reviewed-on: http://gerrit.openafs.org/1986
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoComprehensive edit of chapter one of the Administration Guide
Russ Allbery [Thu, 27 May 2010 16:45:06 +0000]
Comprehensive edit of chapter one of the Administration Guide

Update and revise chapter one (An Overview of OpenAFS Administration)
of the Administration Guide for current AFS and current computing
concepts.

Replace the Kerberos Server terminology with Kerberos KDC and add
additional details about the relationship between AFS and a Kerberos
KDC.  Remove some remaining Authentication Server references.  Add
some details about the Protection Server management of the mapping
from Kerberos principals to AFS IDs.

Remove some now-obsolete distinctions and concepts between mainframes
and workstations and recommendations for server systems.

Reorganize the order in which the servers are discussed to follow a
somewhat more natural order.

Be clear that the Backup Server is optional and that there are other
methods available to back up AFS.  Mention backing up to disk as well
as tape in a few places.

Change-Id: I57ce083a84ca2a44f7a4383d80b05508e6448284
Reviewed-on: http://gerrit.openafs.org/2045
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoReformat chapter one of the OpenAFS Administration Guide
Russ Allbery [Thu, 27 May 2010 14:57:42 +0000]
Reformat chapter one of the OpenAFS Administration Guide

Purely reformatting to make the document more maintainable.  There are
no content changes.

Change-Id: Ic3fb32ef68c14418b3ac6bab92fda759db89b394
Reviewed-on: http://gerrit.openafs.org/2044
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoAdd k_haspag to libkopenafs
Russ Allbery [Thu, 27 May 2010 04:23:10 +0000]
Add k_haspag to libkopenafs

Add the k_haspag function to libkopenafs, which returns true if the
current process is in a PAG and false otherwise.

The implementation currently duplicates code from the ktc_curpag
function since the latter calls the regular pioctl() interface and
hence introduces an Rx dependency that we're avoiding for libkopenafs.
This should be refactored to avoid the code duplication at some point,
but that will require building a utility library that can be reasonably
linked into libkopenafs and is therefore deferred for future work.

Change-Id: Ib97322ef24dc3a4e48cb45090c516c95b71e9fc7
Reviewed-on: http://gerrit.openafs.org/2041
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agolibuafs: Add uafs_Init compat function
Andrew Deason [Wed, 19 May 2010 20:04:45 +0000]
libuafs: Add uafs_Init compat function

Recent libuafs changes changed the libuafs initialization API. Add a
uafs_Init wrapper for compatibility in case someone is using the old
way.

Change-Id: I30611479e0c281526dc52ac6a1969ae526886537
Reviewed-on: http://gerrit.openafs.org/2047
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoMake all the default target in libadmin samples and test
Russ Allbery [Thu, 27 May 2010 19:53:57 +0000]
Make all the default target in libadmin samples and test

Change-Id: Idae0c8a6bf1b057d52c1d385daab5193083b63f6
Reviewed-on: http://gerrit.openafs.org/2051
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoClean up warnings in libadmin/bos/afs_bosAdmin.c
Russ Allbery [Thu, 27 May 2010 17:33:57 +0000]
Clean up warnings in libadmin/bos/afs_bosAdmin.c

Use the correct data structures for BOS timestamps.  Use afs_int32 for
the expressed timestamps for executables since that's what the BOS RPC
says it's using for right now; we should change this, but when we do,
warnings will catch this use along with the others.  Cast some const
char *'s that are passed into BOS functions that take char *'s.

Change-Id: Iff3a6c42241953ed086f8e739cdb344a41a44635
Reviewed-on: http://gerrit.openafs.org/2050
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoClean up the introduction to the Administration Guide
Russ Allbery [Thu, 27 May 2010 14:41:38 +0000]
Clean up the introduction to the Administration Guide

Provide a more useful abstract and remove the (outdated) specific list
of supported platforms and the M.m version number placeholders.  Update
the list of associated documents to match their current titles, and
provide a better description of the Reference Manual.

Reformat the parent document and preface for easier maintenance in the
future.

Change-Id: I42ce78274ed7c4ca7a2f0b9c5ec2e6f7a786adb8
Reviewed-on: http://gerrit.openafs.org/2043
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

13 years agolibuafs: Remove afsd symlink in setup
Andrew Deason [Mon, 17 May 2010 00:47:04 +0000]
libuafs: Remove afsd symlink in setup

Remove the 'afsd' symlink in the build setup, along with the other
symlinks. Otherwise, we try to recreate it every time and fail, since
it already exists.

Change-Id: I8fd70d6c29695f92a5a800bea34630221d142370
Reviewed-on: http://gerrit.openafs.org/2046
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agobackground daemon don't wipe code before it gets used
Derrick Brashear [Thu, 27 May 2010 14:58:03 +0000]
background daemon don't wipe code before it gets used

the bop allocation will clear the bop structure on reuse. don't
clear the error code early.

Change-Id: Ie32bef854d28a575387e2488f10c302486dfd20b
Reviewed-on: http://gerrit.openafs.org/2042
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFlesh out NEWS for recent work
Russ Allbery [Wed, 26 May 2010 21:07:43 +0000]
Flesh out NEWS for recent work

Add entries to NEWS for all development releases back to 1.5.36, which
is the point at which I got bored, taken from the release announcements
to openafs-announce.  Try to use a relatively readable and consistent
formatting for all the entries and convert the old entries to the new
format (mostly).

Further history can be added from the release announcements when I or
someone else gets bored.

Change-Id: Iaf9171c82ca74cd98be3745d9c1965efc39d889a
Reviewed-on: http://gerrit.openafs.org/2036
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

13 years agoUpdate Debian packaging to 1.5.74.1-1
Russ Allbery [Wed, 26 May 2010 21:45:22 +0000]
Update Debian packaging to 1.5.74.1-1

Change-Id: I828f21edffce67eaba6cfdd76e66e754a58e52a0
Reviewed-on: http://gerrit.openafs.org/2037
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFix compilation of the imported config_file.c parser
Russ Allbery [Thu, 27 May 2010 03:04:48 +0000]
Fix compilation of the imported config_file.c parser

Include additional missing header files for proper function prototypes,
define TRUE and FALSE, and declare krb5_clear_error_message as unused
so that the config_file.c will compile and pass --enable-checking.

Make the build depend on krb5_locl.h.

Change-Id: I25a35098aa81c9d2a0efea48257dcb958602c785
Reviewed-on: http://gerrit.openafs.org/2040
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoscout.c: only declare width once
Marc Dionne [Wed, 26 May 2010 21:50:43 +0000]
scout.c: only declare width once

The width variable was declared twice, for the whole function
and also within the for loop, leaving the first one unused
and triggering a warning and a failed build with enable-checking.

Change-Id: Idd061aa0e9eff1f158bfdbd67a20fe5876570089
Reviewed-on: http://gerrit.openafs.org/2039
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

13 years agoProtect ubik cache accesses
Andrew Deason [Wed, 31 Mar 2010 16:40:42 +0000]
Protect ubik cache accesses

Currently, ubik application cached data could be updated and read by
different threads simultaneously. Add a mechanism in ubik for
protecting accessing and updating the cached data. This adds the
function ubik_CheckCache to do this, and removes ubik_CacheUpdate as
an exported function (since it's not safe).

Update all callers to use the new mechanism. In ptserver, remove the
'initd' variable; just rely on cachedVersion and ubik_CheckCache to
tell us when to re-read the database. Remove db.lock in buserver and
cheader_lock in kaserver, which served similar (though not completely
threadsafe) protection as ubik_CheckCache. Add the ubik database lock
cache_lock to protect the application cache.

Change-Id: I857a67d410e2c539197c5212c3b114c3fd0403c2
Reviewed-on: http://gerrit.openafs.org/1546
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Russ Allbery <rra@stanford.edu>

13 years agoFix syntax error when supergroups are not enabled
Russ Allbery [Wed, 26 May 2010 21:47:49 +0000]
Fix syntax error when supergroups are not enabled

1f22cab broke non-supergroups builds due to incorrect brace placement.
Move the correct closing brace outside of the #ifdef.

Change-Id: I2ed3f8f57b35f0030e26306f7e791ea6b5158c9a
Reviewed-on: http://gerrit.openafs.org/2038
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

13 years agoAdd /dest and /obj to .gitignore
Asanka Herath [Wed, 26 May 2010 16:31:39 +0000]
Add /dest and /obj to .gitignore

These are build directories used on Windows.

Change-Id: I20c37ae4ada78949c3a09d618476286f64f9b682
Reviewed-on: http://gerrit.openafs.org/2032
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>

13 years agoRemove references to IBM AFS
Russ Allbery [Wed, 26 May 2010 17:20:57 +0000]
Remove references to IBM AFS

Change references to the documentation sets that we still ship to
reference the OpenAFS manuals instead of the IBM AFS manuals.  Remove
references to the IBM AFS/DFS Migration documentation, since that
doesn't appear to be available anywhere any more, replacing them where
relevant to more generic references to the DFS documentation.  Add
links to docs.openafs.org for mentions of the manuals in SEE ALSO, and
standardize on one link format.  Replace a few references to the IBM
AFS Release Notes with the actual information in those notes, or drop
the reference if it doesn't seem particularly useful.

Change-Id: Ie9666842f1315891c6a9c37c0424200f4b78bff7
Reviewed-on: http://gerrit.openafs.org/2031
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoavoid nat ping for authenticated connections
Derrick Brashear [Thu, 20 May 2010 15:27:10 +0000]
avoid nat ping for authenticated connections

this is a cheap way to ensure one nat ping per server. basically,
only do it for the one unauth connection we have.

Change-Id: I4583112d7b4a10a0e8f524795527d99a5b2adf51
Reviewed-on: http://gerrit.openafs.org/2010
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoRemove references to AFS Product Support in -oktozap
Russ Allbery [Wed, 26 May 2010 16:33:29 +0000]
Remove references to AFS Product Support in -oktozap

salvager and salvageserver's documentation of -oktozap says to not use
without consultation with AFS Development or Product Support, left over
from the IBM product.  Remove those references and add a caution more
in line with open source.

Change-Id: I136dc145caf3e8e3a992c239e1a46d86f96580ed
Reviewed-on: http://gerrit.openafs.org/2030
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoRemove -rebuildDB flag to ptserver
Russ Allbery [Wed, 26 May 2010 16:28:57 +0000]
Remove -rebuildDB flag to ptserver

The -rebuildDB flag was documented to rebuild the Protection Database at
startup, but it was accepted and ignored in the ptserver source, doing
nothing.  Remove the documentation and the option recognition in ptserver.

Change-Id: I36f30f38464b602cb4739a958663a6feb5fe27bf
Reviewed-on: http://gerrit.openafs.org/2029
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoRemove documentation of kaserver -fastKeys
Russ Allbery [Wed, 26 May 2010 16:25:39 +0000]
Remove documentation of kaserver -fastKeys

-fastKeys wasn't accepted by the kaserver binary, but was still
mentioned in the usage message and the kaserver man page.  Remove
the remnants of the flag.

Change-Id: Ifb3ae49ea0cab80c325a77b0eb1062944697b53d
Reviewed-on: http://gerrit.openafs.org/2028
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoAdd an OpenAFS config file parser
Simon Wilkinson [Tue, 27 Apr 2010 21:53:47 +0000]
Add an OpenAFS config file parser

This adds a Kerberos INI style config file parser to OpenAFS, using
the parser contained in Heimdal as a base. Currently, it only exports
a very small number of functions, but exporting further functions is
simply a matter of adding additional shims to hide the Kerberos
context and other specifics.

Note that we don't want to just use the parser as a library because
firstly, we don't want OpenAFS to have a Kerberos dependency (as
other crypto mechanisms will, and do, exist). Secondly, MIT and
Heimdal use a different API here, so we would have to shim anyway.
Also, our own parser means that we don't need to worry about passing
in the krb5 context, and all of the issues that that presents.

Change-Id: Ic0a5ddf03266c454827c6505d5f6ffefcddd2614
Reviewed-on: http://gerrit.openafs.org/1935
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoscout: adjustable column widths
Michael Meffie [Wed, 19 May 2010 16:37:35 +0000]
scout: adjustable column widths

Adds new command line option to scout so users can set the
number of characters to display without truncating.

Change-Id: I69f159549d7f5b4cfee26c276ad34705f504ee2b
Reviewed-on: http://gerrit.openafs.org/1951
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

13 years agodumpstuff nbytes can't exceed 32 bits
Derrick Brashear [Tue, 25 May 2010 22:21:32 +0000]
dumpstuff nbytes can't exceed 32 bits

the read returns a 32 bit type; we can't possibly need to write 64 bits.
(ssize_t is 32 bits on macos and so this ends up being a bad shift)

Change-Id: I4d8f99b0c752a2c75ce65b9cfa1b3cb0d484cc7f
Reviewed-on: http://gerrit.openafs.org/2024
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoSynchronize LICENSE files
Russ Allbery [Tue, 25 May 2010 19:37:05 +0000]
Synchronize LICENSE files

We have two LICENSE files, which had been somewhat independently
modified.  Resynchronize them, remove trailing whitespace, and convert
from ISO 8859-1 to UTF-8.

Change-Id: Ia3dba0e328e7f026362e2e8efda206c34ce4e768
Reviewed-on: http://gerrit.openafs.org/2025
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agowindows handle NONODE case uniformly in cm_BPlusDirDeleteEntry
matt@linuxbox.com [Tue, 25 May 2010 00:26:46 +0000]
windows  handle NONODE case uniformly in cm_BPlusDirDeleteEntry

Fix handling of a NONODE case in cm_BPlusDirDeleteEntry.  Previously in
this case, the routine referenced uninitialized memory.

Change-Id: Ic3e3520b4c28ccc52e04486777bdcf0c5e54ef1f
Change-Id: Id57a72112caf55b4b84ed64f709b8b73c72b7866
Reviewed-on: http://gerrit.openafs.org/2017
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoImport of code from heimdal
Heimdal Developers [Sun, 9 May 2010 18:33:54 +0000]
Import of code from heimdal

This commit updates the code imported from the external
heimdal git repository to their revision
64651b4be5be1eaacd4388c428cb936cb8be34b5 which is
described as switch-from-svn-to-git-1210-g64651b4

This commit imports the Heimdal configuration file parser.

Change-Id: I9e061c439f9aabd4f09c876811bd1033d3f25f22
Reviewed-on: http://gerrit.openafs.org/1934
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agofs getserverprefs needs a larger buffer
Derrick Brashear [Tue, 25 May 2010 04:03:16 +0000]
fs getserverprefs needs a larger buffer

it's very easy for the size of server preferences to be too large for the
default buffer. cope.

Change-Id: I0535edf784eb9e9a309dc17e571719e204b9d29b
Reviewed-on: http://gerrit.openafs.org/2021
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoAutoconf : Kill dead code
Simon Wilkinson [Sun, 16 May 2010 21:48:52 +0000]
Autoconf : Kill dead code

Remove unused autoconf macros - they're not being called, and so
have bitrotted, and are just cluttering up the tree.

Change-Id: Ib2d1fc5121b6845cf0b500e5aef8ca822be58ad3
Reviewed-on: http://gerrit.openafs.org/1971
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

13 years agoLinux: Disable syscall probes if we have keyrings
Simon Wilkinson [Thu, 20 May 2010 10:57:20 +0000]
Linux: Disable syscall probes if we have keyrings

If we are building for are kernel with keyrings, and we can
guarantee that we can make use of those keyrings, then we no longer
need to probe for the syscall table at all. Change our default
behaviour so that when these two conditions are true, syscall probing
is disabled. Both --enable-linux-syscall-probing and
--disable-linux-syscall-probing can be used to override the
autodetection and force things one way or the other.

We have to check that we can use the keyrings because there was a
window in the 2.6 kernel series where keryings were available, but
the key_type_keyring definiton (which we use to create the session
keyring) wasn't exported. In that situation, we attempt to traverse
the process table and use the type of init's session keyring. This
traversal is fragile, and if it fails, keyring PAGs will be disabled.
So, we still want to be able to fall back to patching the syscall
table, if we can, in this case.

FIXES 125215

Change-Id: I11ba5c68fe37609bbd6b9c9f7e7c699334f42ebc
Reviewed-on: http://gerrit.openafs.org/2002
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

13 years agovol, volser, and viced type fixes
Andrew Deason [Thu, 6 May 2010 20:40:36 +0000]
vol, volser, and viced type fixes

Correct many uses of incorrect types for file offsets, sizes, etc. in
the volume server, fileserver, and the volume package.

Thanks to Tom Keiser who pointed out the incorrect types and suggested
solutions.

Change-Id: If4aedfe0cc06d05b3775069ae1285d4c330976cd
Reviewed-on: http://gerrit.openafs.org/1920
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Russ Allbery <rra@stanford.edu>

13 years agoAdd libafs_tree to .gitignore
Russ Allbery [Tue, 25 May 2010 03:21:29 +0000]
Add libafs_tree to .gitignore

Change-Id: Iff4a22319be1659f123a3a8b62c27a39d957bc29
Reviewed-on: http://gerrit.openafs.org/2020
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFix libafs_tree's cross-architecture support
Russ Allbery [Tue, 25 May 2010 03:03:49 +0000]
Fix libafs_tree's cross-architecture support

The results of libafs_tree are supposed to build on any platform that
shares the same basic kernel code, but this had broken in two ways:
libafs_tree was including a pre-built afs/param.h, which needs to be
regenerated on different architectures, and the Linux kernel build
makefile was being pre-generated despite having some architecture-specific
options.

Copy over more of src/config and postpone generation of afs/param.h and
generation of libafs/Makefile to the libafs build.

Remove the substitution of AFS_SYSNAME from make_libafs_tree.pl; it was
unused and now definitely shouldn't be used since it will break the
architecture-independence of the resulting tree.

Change-Id: I2730d3745cc67cf5f3ae61cf4643842f87865a80
Reviewed-on: http://gerrit.openafs.org/2019
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoPostmoderize use of AC_CHECK_TYPE
Russ Allbery [Tue, 25 May 2010 02:34:53 +0000]
Postmoderize use of AC_CHECK_TYPE

Use AC_TYPE_SSIZE_T to handle the ssize_t check (introduced in Autconf
2.60).  Use AC_CHECK_TYPE, not AC_CHECK_TYPES, to check for sig_atomic_t
and socklen_t, and define them in afsconfig.h if they're not present on
this platform.  Do not define them in stds.h, since stds.h is an installed
header file and cannot rely on Autoconf defines.

Change-Id: I80e1a00efc84420002a95d6cafc25ea70befa49d
Reviewed-on: http://gerrit.openafs.org/2018
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoUpdate fs {get,set}serverprefs documentation for DNS
Russ Allbery [Mon, 24 May 2010 19:28:01 +0000]
Update fs {get,set}serverprefs documentation for DNS

Mention in the fs getserverprefs and fs setserverprefs documentation
that VL servers may also come from DNS AFSDB and SRV records.  Document
that SRV record information is not (yet) properly used.

Change-Id: I223efedf4d00ac1b57b3dce74a807790691abdbf
Reviewed-on: http://gerrit.openafs.org/2015
Tested-by: Russ Allbery <rra@stanford.edu>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoreport server address when known for afs warnings
Derrick Brashear [Tue, 27 Apr 2010 17:16:20 +0000]
report server address when known for afs warnings

if we have the server info, give an address with the error.
we could probably give the program name too, as for flock
warning, but...

Change-Id: I508572357c8c7027003900156dbb1a09ace04731
Reviewed-on: http://gerrit.openafs.org/1851
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agogetcapabilities avoid panic when cell is not filled
Derrick Brashear [Mon, 24 May 2010 20:12:24 +0000]
getcapabilities avoid panic when cell is not filled

for a new server, getcapabilities is not safe, as cell may not be filled.

Change-Id: I0926034c1d9e9c8c08e7ca993de1bcef9c0de8cf
Reviewed-on: http://gerrit.openafs.org/2016
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoRead volume at correct address when looking for broken forward links.
Rod Widdowson [Tue, 18 May 2010 13:48:38 +0000]
Read volume at correct address when looking for broken forward links.

vldb_check was reading a volume at the index rather than the file
offset to read the volume.  This was giving rise to phantom warnings
since the hash was usually 0.

The possibility of a broken flink is determined in another manner
which is why in normal case we are not flooded with warnings.

At the same time make the error message slightly more coherent.

Change-Id: I35f237772819f6418eb9f8d77e0902bca28c4134
Reviewed-on: http://gerrit.openafs.org/1983
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoAutoconf: Tidy up resolver retrans retry test
Simon Wilkinson [Sat, 22 May 2010 08:40:05 +0000]
Autoconf: Tidy up resolver retrans retry test

There's no need for the retrans retry test to be a TRY_RUN test,
TRY_COMPILE will pick up the existence of the '_res' structure and
its elements.

Also, clean up the use of the cache variable to set the result. In
the old implementation a true test result would print '1', not 'yes',
a false result would result in bad output in the config.log, and a
cross compiling output would give
  #define HAVE_RES_RETRANSRETRY no
which will give unexpected results with #ifdef tests.

Change-Id: If78c1b01ee89242c67f87238ca502ce43718c6a2
Reviewed-on: http://gerrit.openafs.org/2014
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agowindows map lstat to _stat (mrafsStyleLogs)
matt@linuxbox.com [Sat, 22 May 2010 23:40:03 +0000]
windows  map lstat to _stat (mrafsStyleLogs)

Provides function macros mapping lstat to _stat, in Windows param
files (i386, amd64, i64).

change per jaltman

Change-Id: I414422f26114fc270dff0b5915765bf3906a400e
Reviewed-on: http://gerrit.openafs.org/2013
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoUpdate bos addkey/listkeys and KeyFile man pages for asetkey
Russ Allbery [Mon, 10 May 2010 00:58:33 +0000]
Update bos addkey/listkeys and KeyFile man pages for asetkey

Clearly prefer asetkey to bos addkey in the KeyFile, bos addkey, and
bos listkeys man pages.  Reference asetkey list and asetkey delete as
alternatives to bos listkeys and bos removekey.  Distinguish between
Authentication Server cells and Kerberos v5 cells and mention the
preferred afs/<cell> principal format.  Add some cautions around
matching enctypes and salts when synchronizing keys with a v5 KDC.

Update man-pages/README for completion of this task, clean up some
other wording, and remove some other now-irrelevant information.

Change-Id: I29b83a61cbdb08de508bdb313524a307e385044b
Reviewed-on: http://gerrit.openafs.org/1938
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>

13 years agoDo not lie about needing Giant
Ben Kaduk [Sat, 22 May 2010 01:39:16 +0000]
Do not lie about needing Giant

Catch up to 2005.  Giant has not been needed for vnode page
operations for quite some time now.

Change-Id: I59c7b4fb1f7cd4133d459d801db9bb6d9cef866f
Reviewed-on: http://gerrit.openafs.org/2012
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLinux: remove unused label
Marc Dionne [Wed, 19 May 2010 20:49:07 +0000]
Linux: remove unused label

The out label is no longer used and triggers a warning.
So just remove it.

Change-Id: Ic701b82fcd4f93ddf3673dbc16618201314f6fb3
Reviewed-on: http://gerrit.openafs.org/2000
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoMore warnings cleanup
Simon Wilkinson [Wed, 24 Feb 2010 21:39:10 +0000]
More warnings cleanup

Remove uneccessary warning inhibition in vol/
Update README.WARNINGS to match the current state of the tree

Change-Id: Ic1e5c74e0e7c2ccce0519b1572034f3666aa75e9
Reviewed-on: http://gerrit.openafs.org/1392
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoLinux: Use positional r/w, not llseek
Simon Wilkinson [Wed, 19 May 2010 17:11:58 +0000]
Linux: Use positional r/w, not llseek

The Linux read/write file operations take a position. Use this
position to determine where we're reading or writing in a file,
rather than using the vfs_llseek() operator to set the file
position argument. This avoids a potential race condition, as
well as simplifying this code.

Change-Id: I82b4a109f9871fa2ce5b308bc32923b1bf910920
Reviewed-on: http://gerrit.openafs.org/1993
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agodafs: don't restart for new binaries using mrafs scanner time
Derrick Brashear [Wed, 19 May 2010 14:57:31 +0000]
dafs: don't restart for new binaries using mrafs scanner time

if binary restart times are enabled, dafs restarts every time due to
a flawed comparison. fix it.

Change-Id: I7eff4eb6406dc7eef12c75491191566a906a4adf
Reviewed-on: http://gerrit.openafs.org/1992
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>