openafs.git
11 years agoUnix: docbook revision tag requires a date
Andrew Deason [Thu, 5 Aug 2010 03:49:29 +0000]
Unix: docbook revision tag requires a date

The docbook DTD requires a <revision> element to contain a <date>
element. So make a blank <date> one even though we don't keep track of
a date, so we can pass xmllint.

Change-Id: I06e68b756d215ec3ce279561a05b5bc5fc418028
Reviewed-on: http://gerrit.openafs.org/2517
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

11 years agoAdd DAFS docs to the Unix Quick Start guide
Andrew Deason [Tue, 3 Aug 2010 22:32:11 +0000]
Add DAFS docs to the Unix Quick Start guide

Modify the sections dealing with creating the 'fs' bnode to also
mention how to create the 'dafs' bnode, and add an appendix explaining
DAFS and the differences between DAFS and non-DAFS.

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

11 years agoHPUX: Add limits.h to sysincludes
Andrew Deason [Tue, 3 Aug 2010 17:01:07 +0000]
HPUX: Add limits.h to sysincludes

xdr_mem uses INT_MAX, so we need limits.h in the kernel for HP-UX.

Change-Id: I5c75f9d3cb9cfd5da78cf625f042c1dee862dcd7
Reviewed-on: http://gerrit.openafs.org/2506
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

11 years agofix unlabelled xdr field order on sun457 kernel for now
Derrick Brashear [Wed, 4 Aug 2010 13:22:20 +0000]
fix unlabelled xdr field order on sun457 kernel for now

alternate to 2503 (which we will push after branching)

Thanks to Andrew Deason for discovering this issue.

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

11 years agodiscon remove dirty vcaches from queue when discarding
Derrick Brashear [Wed, 4 Aug 2010 13:04:34 +0000]
discon remove dirty vcaches from queue when discarding

the discardall loop was not dequeueing vcaches, meaning we would loop.
caught by Simon Wilkinson

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

11 years agoreorder vcache references in discondiscardallshadows
Derrick Brashear [Wed, 4 Aug 2010 13:02:54 +0000]
reorder vcache references in discondiscardallshadows

reset the vcache before we (nominally, it's still under a lock)
discard it. remove superfluous shadow clearing.

Caught by Simon Wilkinson

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

11 years agodiscon getparentvcache leak fix
Derrick Brashear [Wed, 4 Aug 2010 13:00:58 +0000]
discon getparentvcache leak fix

don't leak an unref'd vcache pointer if we are returning an error
(EAGAIN). thanks to Simon Wilkinson for catching this.

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

11 years agodiscon needs static_inline macro
Derrick Brashear [Wed, 4 Aug 2010 12:42:16 +0000]
discon needs static_inline macro

don't use static inline keywords in common code.

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

11 years agodarwin unused prototype
Derrick Brashear [Wed, 4 Aug 2010 12:41:00 +0000]
darwin unused prototype

we don't gave our own vn_rele. don't prototype it.

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

11 years agoutil: add afs_exec_alt
Andrew Deason [Thu, 29 Jul 2010 19:47:03 +0000]
util: add afs_exec_alt

Add the function afs_exec_alt to help programs easily execute an
"alternate" version of themselves. For example, for programs that are
built with/without DAFS support, or are built for 32-bit/64-bit
structures, etc.

Change-Id: Ibb2b7105d58476f84bd9f15987f8b7df37314b6b
Reviewed-on: http://gerrit.openafs.org/2483
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

11 years agotbudb: Use INSTALL_PROGRAM, not INSTALL -f
Andrew Deason [Tue, 3 Aug 2010 20:44:52 +0000]
tbudb: Use INSTALL_PROGRAM, not INSTALL -f

"$INSTALL -f" is not portable. Use $INSTALL_PROGRAM instead.

Change-Id: I5013476cc036350b0b61b6e3c01a86d303aa70b6
Reviewed-on: http://gerrit.openafs.org/2507
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agoWindows: Reduce complexity of Freelance Callback Logic
Jeffrey Altman [Tue, 3 Aug 2010 03:28:39 +0000]
Windows: Reduce complexity of Freelance Callback Logic

Over the years the processing of the Freelance callbacks have
added functionality that behaves much more like FetchStatus checks
to a file server.  If the data version of the object has changed,
get the new data.  Given that is the case, we can remove much of
the original refresh logic that is rather race prone.   Say goodbye
to cm_fakeGettingCallback and cm_fakeDirCallback.

LICENSE MIT

Change-Id: I249c84201afc16611039b2ba0801a643fcf05f28
Reviewed-on: http://gerrit.openafs.org/2505
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

11 years agoWindows: When processing pioctl paths ensure callbacks are obtained
Jeffrey Altman [Mon, 2 Aug 2010 20:06:39 +0000]
Windows: When processing pioctl paths ensure callbacks are obtained

When processing a pioctl path with either smb_ParseIoctlPath or
smb_ParseIoctlParent, cm_SyncOp(CM_SCACHESYNC_NEEDCALLBACK|GETSTATUS)
must be called on the cm_scache_t object to ensure that it is up
to date before we permit cm_Lookup or other operations to be performed
on it.  Add the cm_SyncOp() call to smb_ParseIoctlPath and
smb_ParseIoctlParent to ensure it is done for all pioctl operations.

LICENSE MIT

Change-Id: I2fe5d5ec2567693155277b40929dedb8155d9ebf
Reviewed-on: http://gerrit.openafs.org/2504
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

11 years agofs disconnected remove ifdefs
Derrick Brashear [Mon, 2 Aug 2010 18:51:39 +0000]
fs disconnected remove ifdefs

disconnected is always on; remove the ifdefs around it

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

11 years agoWindows: docbook revision tag requires a date
Jeffrey Altman [Mon, 2 Aug 2010 17:30:30 +0000]
Windows: docbook revision tag requires a date

Even if we can't generate a date, we must include the date tag
within the revision tag in order for the docbook dtd to be applied
and pass xmllint.

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

11 years agoWindows: Don't configure client when not installing client
Asanka Herath [Sat, 31 Jul 2010 08:30:10 +0000]
Windows: Don't configure client when not installing client

The 32-bit tools installer was displaying client configuration wizard
pages.  Since, the 32-bit tools share configuration with the AFS
service, the 32-bit tools installer should not be attempting to change
client configuration.  Remove said wizard pages from the 32-bit tools
installer.

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

11 years agoWindows: Fix MC options
Asanka Herath [Sat, 31 Jul 2010 17:07:44 +0000]
Windows: Fix MC options

Newer versions of the Message Compiler included with Windows SDKs
break when using the -s option.  Remove it.

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

11 years agoptserver: Do not use cell for entry name len check
Andrew Deason [Fri, 30 Jul 2010 20:32:53 +0000]
ptserver: Do not use cell for entry name len check

Do not use the local cell name when determining if a new entry name is
too long. This check assumes that foreign cells will use our local
cell name (assumed to be our local Kerberos realm) in a certain way,
and prevents creating users that will make those names too long.

This is undesirable for several reasons. One is that the local realm
name may not be the same as the local cell name (and we may have many
local realms). Another is that we cannot reliably predict how foreign
cells will construct foreign pt entry names, so preventing entry
creation based on that may prevent names that will never cause any
problems. This check also assumes that our names will be used as
foreign entries in other cells, which may not be the case.

So, remove the check based on the local cell name, and remove the
pr_realmNameLen variable while we are at it, since this is all it is
used for.

Thanks to Jeffrey Altman for discussion, and for bringing this up in
the first place.

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

11 years agoWindows: Do not reference cm_data.rootSCachep directly
Jeffrey Altman [Sat, 31 Jul 2010 04:21:06 +0000]
Windows: Do not reference cm_data.rootSCachep directly

cm_data.rootSCachep is a global pointer to the cm_scache_t that
represents the root.afs volume root directory.  Throughout the
code this cm_scache_t was being used without ensuring that a
callback to the volume is in fact valid.

Under most circumstances this would not be a problem.  However,
it is possible for a request to fail due to the lack of a callback
at a critical moment.  Add a new function cm_rootScachep() that
attempts to ensure that a callback is present (if possible) prior
to use the cm_scache_t object.

LICENSE MIT

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

11 years agoWindows: Update root.afs scache dv when Freelance dir bufs are regenerated
Jeffrey Altman [Sat, 31 Jul 2010 04:05:24 +0000]
Windows: Update root.afs scache dv when Freelance dir bufs are regenerated

When the contents of the Freelance root directory changes the fake
directory buffers are updated and a fakeDirVersion is incremented.
The dataVersion of the cm_scache_t object is supposed to be updated
on the next access by performing a fake get callback request.
Unfortunately, this did not always occur because of a race.  If another
Freelance object is updated first, the root directory object would
never successfully get a fake callback.

This patchset ensures that the generation of the fake directory
buffer content and the callback are obtained under the same set
of locks thereby removing the race.

LICENSE MIT

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

11 years agoFactor out the common text in vos_addsite, vos_copy, and vos_zap
Jason Edgecombe [Mon, 2 Aug 2010 01:39:56 +0000]
Factor out the common text in vos_addsite, vos_copy, and vos_zap

Factor out some common options out of the man pages.

LICENSE IPL

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

11 years agoWindows: Build preprocessed POD documentation
Asanka Herath [Sat, 31 Jul 2010 16:43:47 +0000]
Windows: Build preprocessed POD documentation

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

11 years agoSOLARIS: let xlator load if amd64/nfssrv is loaded
Andrew Deason [Mon, 2 Aug 2010 05:44:37 +0000]
SOLARIS: let xlator load if amd64/nfssrv is loaded

The NFS translator-enabled kernel module refuses to load if
misc/nfssrv is not also loaded. We were only checking misc/nfssrv and
misc/sparcv9/nfssrv, though, not misc/amd64/nfssrv. Check that, too,
as it may be loaded on amd64 machines.

Reported by Robert Milkowski.

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

11 years agoWindows aklog: remove lstat preprocessor definition
Jeffrey Altman [Mon, 2 Aug 2010 13:49:26 +0000]
Windows aklog: remove lstat preprocessor definition

lstat is now defined globally in the build system.
remove redundant definition.

LICENSE MIT

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

11 years agoWindows aklog: include afs/pterror.h
Jeffrey Altman [Mon, 2 Aug 2010 13:48:07 +0000]
Windows aklog: include afs/pterror.h

pterror.h is required for initialize_PT_error_message

LICENSE MIT

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

11 years agoSkip over 'fragments' directory when scanning for PODs
Asanka Herath [Sat, 31 Jul 2010 08:00:41 +0000]
Skip over 'fragments' directory when scanning for PODs

The generate-html script scans the directories to compile a list of
POD files.  The list of candidates include the 'fragments' directory,
which causes an error when the script attempts to open it as a file.

Change-Id: If1208561f58f869ccba60f4a263bee5200dad1ed
Reviewed-on: http://gerrit.openafs.org/2494
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>

11 years agoptserver: Allow longer foreign user names
Andrew Deason [Fri, 30 Jul 2010 17:03:06 +0000]
ptserver: Allow longer foreign user names

The ptserver was restricting all names to be less than PR_MAXNAMELEN -
pr_realmNameLen - 1, so that the local realm and a '@' can be safely
appended for foreign user registration. This check is overly
restrictive for foreign users, since the local realm will never be
appended to the user name (it already has the foreign realm name
appended). So, just check for PR_MAXNAMELEN for foreign users.

Original issue reported by Gunnar Krull.

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

11 years agoDocument krb.excl
Andrew Deason [Fri, 30 Jul 2010 19:45:29 +0000]
Document krb.excl

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

11 years agoFBSD: update ifa_ifwithnet usage
Ben Kaduk [Sat, 31 Jul 2010 01:20:06 +0000]
FBSD: update ifa_ifwithnet usage

FreeBSD 8.1 (and 9.0) now require a second parameter to
ifa_ifwithnet.  Fix the build by using the same macro
as OBSD46.

Change-Id: I22eac8722bef79b6349b9d879eb42d63450b362e
Reported-by: Jan Henrik Sylvester
Reviewed-on: http://gerrit.openafs.org/2489
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

11 years agoDocument the 'vos offline' -busy and -sleep opts
Andrew Deason [Thu, 29 Jul 2010 18:02:47 +0000]
Document the 'vos offline' -busy and -sleep opts

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

11 years agoRemove bless-related options from vos manpages
Andrew Deason [Thu, 29 Jul 2010 17:43:25 +0000]
Remove bless-related options from vos manpages

'vos online' and 'vos offline' were documented as taking -bless and
-unbless options, respectively. They do not actually take these
options, and since adding that functionality, while useful, will
require protocol changes, they are likely to take some time to appear.

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

11 years agoInstall DAFS and non-DAFS fssync-debug
Andrew Deason [Thu, 29 Jul 2010 15:36:56 +0000]
Install DAFS and non-DAFS fssync-debug

Install the non-DAFS fssync-debug along with the DAFS dafssync-debug,
since fssync-debug uses some structures that are specific to DAFS or
non-DAFS.

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

11 years agomacos prefs pane improved error handling
Derrick Brashear [Thu, 29 Jul 2010 14:59:35 +0000]
macos prefs pane improved error handling

NSScanner: nil string argument
is a lame thing to see. so let's not.

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

11 years agoviced: Correct unblessed attach2 errors
Andrew Deason [Wed, 28 Jul 2010 22:10:10 +0000]
viced: Correct unblessed attach2 errors

Don't set the vp to NULL; instead just go to the general error
handling code. When a volume is not blessed, we just want it to go
offline, not go into an error state. Furthermore, we must free the
volume header when nUsers is set to 0, so manually do so when we do
not call VRequestSalvage_r.

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

11 years agovol-bless: Detach, not put, volumes on completion
Andrew Deason [Wed, 28 Jul 2010 22:47:21 +0000]
vol-bless: Detach, not put, volumes on completion

vol-bless was just calling VPutVolume when it was done blessing or
unblessing a volume. Instead call VDetachVolume, so we actually give
the volume back to the fileserver when we are done if !nofssync.

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

11 years agogcc 4.5: Sequence point warning fixes
Marc Dionne [Mon, 12 Jul 2010 23:28:24 +0000]
gcc 4.5: Sequence point warning fixes

With gcc 4.5 the -sequence_point warning triggers some new
warnings.
Fix some of them by simplifying the arguments to some
problematic macros.

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

11 years agounix blacklistonce should default to fail if no fid
Derrick Brashear [Mon, 26 Jul 2010 20:15:46 +0000]
unix blacklistonce should default to fail if no fid

return fail, rather than success, if no fid and thus
no list of servers to resort, in BlackListOnce.

will need a later change for vlservers

reported by jhutz@cmu.edu

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

11 years agosalvage: Zero root/readme vnodes before writing
Andrew Deason [Thu, 22 Jul 2010 18:43:17 +0000]
salvage: Zero root/readme vnodes before writing

Previously we were writing out the root and readme vnodes with
uninitialized 'lock' structures, when we create a new root dir for
attaching orphans. Just use calloc so we ensure that everything is
zeroed before writing it out.

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

11 years agoautoconf: Force absolute INSTALL
Andrew Deason [Thu, 22 Jul 2010 17:21:14 +0000]
autoconf: Force absolute INSTALL

Force using an absolute path for install-sh. Autoconf normally prefers
using a relative path, which confuses (at least) part of the libafs
build system.

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

11 years agoRemove tsalvaged warning inhibition
Andrew Deason [Thu, 22 Jul 2010 16:24:10 +0000]
Remove tsalvaged warning inhibition

tsalvaged has no documented necessary warning inhibitions, and it
appears to cause no warnings. So, remove the warning inhibition.

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

11 years agoAFS_INT64_FMT takes a afs_int64, not int64_t
Andrew Deason [Thu, 22 Jul 2010 16:34:24 +0000]
AFS_INT64_FMT takes a afs_int64, not int64_t

Cast to afs_int64, as int64_t can reduce to a different type than
AFS_INT64_FMT's.

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

11 years agoLog lex/flex detection errors in the config log
Andrew Deason [Wed, 21 Jul 2010 22:30:39 +0000]
Log lex/flex detection errors in the config log

When we detect if lex is flex, we run 'lex --version', which may
complain to stderr if lex is not flex. Instead of printing such errors
to the person running 'configure', redirect stderr to config.log along
with stdout.

Change-Id: I812805245a2638eda5885a41a6d70ffeff608c58
Reviewed-on: http://gerrit.openafs.org/2462
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Russ Allbery <rra@stanford.edu>

11 years agovlserver - Don't overflow buffer with backup pattern
Derrick Brashear [Wed, 21 Jul 2010 16:06:39 +0000]
vlserver - Don't overflow buffer with backup pattern

based on a report from Hans-Werner Paulsen

avoid adding regex anchors to a buffer which is already full
when copying it to a like sized buffer. instead, leave extra space.

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

11 years agoRemove an outdated inode comment block
Andrew Deason [Wed, 21 Jul 2010 17:01:57 +0000]
Remove an outdated inode comment block

This comment is no longer true, and its existence now is just
confusing.

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

11 years agoSOLARIS: do not ignore libafs build failures
Andrew Deason [Wed, 21 Jul 2010 17:17:33 +0000]
SOLARIS: do not ignore libafs build failures

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

11 years agoDon't cd around invocations of install-man
Russ Allbery [Wed, 21 Jul 2010 17:36:21 +0000]
Don't cd around invocations of install-man

install-man is a config.status-generated script, so Autoconf will
substitute in the path to our install-sh script, but Autoconf prefers
relative paths that are only valid in the directory in which
install-man is generated.  We therefore must avoid changing directories
before calling install-man.

Instead of cd, use relative paths including the directory and adjust
the installation path accordingly.

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

11 years agolibafs: fix IOPEN for amd64 solaris
Andrew Deason [Wed, 21 Jul 2010 16:34:39 +0000]
libafs: fix IOPEN for amd64 solaris

Solaris afs_syscall_iopen was returning the fd in r_val2 for 64-bit
architectures (for 5.7 and beyond). If we are little-endian, though,
we want the return value in r_val1; otherwise we just always return fd
0. So, put the fd in r_val1 if we are little-endian.

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

11 years agoubik: Make ugen_ClientInit honor noAuthFlag
Andrew Deason [Tue, 20 Jul 2010 17:46:00 +0000]
ubik: Make ugen_ClientInit honor noAuthFlag

ugen_ClientInit was still trying to use tokens to make an
authenticated connection, even if noAuthFlag was set. Make it so we do
not attempt authenticated connections with noAuthFlag, and suppress
the "Could not get afs tokens" message if noAuthFlag was set.

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

11 years agobos: Do not assume DAFS just if DAFS bnode exists
Andrew Deason [Tue, 20 Jul 2010 17:32:10 +0000]
bos: Do not assume DAFS just if DAFS bnode exists

For salvaging purposes, we were assuming that if a DAFS bnode existed,
we should perform a DAFS salvage. Since it is possible to have a
disabled DAFS bnode alongside an enabled non-DAFS fs bnode, we should
perform a regular non-DAFS salvage if the DAFS bnode is disabled. Do
that.

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

11 years agobozo: Clean up bnode parms for each bnode
Andrew Deason [Tue, 20 Jul 2010 17:06:57 +0000]
bozo: Clean up bnode parms for each bnode

bosserver was remembering the parms for past bnodes, and just
overwriting parms for new bnodes. This is a problem if we have a
'dafs' bnode followed by an 'fs' bnode, since the 'fs' bnode will get
the 'dasalvager' parm, and bosserver will think it is its scanner
program.

So instead keep track of a separate array of the parms that we
actually pass to bnode_Create, so we only pass parms that we saw for
this specific bnode.

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

11 years agoWindows: Build Demand Attach File Service
Jeffrey Altman [Tue, 20 Jul 2010 04:05:18 +0000]
Windows: Build Demand Attach File Service

This patchset permits the building of demand attach file server
and volume server.

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

11 years agovol AttachByName should mimic other volpkg errors
Derrick Brashear [Mon, 19 Jul 2010 18:17:21 +0000]
vol AttachByName should mimic other volpkg errors

if later callers will deem a volume offline, note it at attach time.
additionally, log the cause.

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

11 years agoShakeLooseVCaches needs to avoid CVInit vcaches
Derrick Brashear [Mon, 19 Jul 2010 20:56:58 +0000]
ShakeLooseVCaches needs to avoid CVInit vcaches

the code refactoring missed this case. sadly, it means we
can panic under heavy vcache contention.

FIXES 127645

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

11 years agodocument dasalvager
Derrick Brashear [Fri, 16 Jul 2010 17:48:05 +0000]
document dasalvager

split dasalvager and salvager documentation.
refer both ways between docs.

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

11 years agodocument davolserver
Derrick Brashear [Fri, 16 Jul 2010 17:39:22 +0000]
document davolserver

split davolserver and volserver documentation.
refer both ways between docs.

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

11 years agodafileserver synopsis
Derrick Brashear [Sun, 18 Jul 2010 15:45:06 +0000]
dafileserver synopsis

missed this before, needed for dafs man page

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

11 years agodocument dafileserver
Derrick Brashear [Fri, 16 Jul 2010 17:21:57 +0000]
document dafileserver

split dafileserver and fileserver documentation. remove dafs-only
switches from fileserver doc. refer both ways between docs.

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

11 years agovos status: report human-readable last*Time
Andrew Deason [Tue, 6 Jul 2010 17:42:40 +0000]
vos status: report human-readable last*Time

Make 'vos status' print the lastReceiveTime and lastSendTime in a
human-readable format, instead of just printing the number of seconds
since the epoch as an integer. As suggested by Jeffrey Altman.

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

11 years agovos status: add lastActiveTime field
Andrew Deason [Tue, 6 Jul 2010 17:38:21 +0000]
vos status: add lastActiveTime field

Add a field in the 'vos status' output to report the last time a
transaction was touched by a volser RPC.

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

11 years agovos status: actually show created time
Andrew Deason [Tue, 6 Jul 2010 17:36:27 +0000]
vos status: actually show created time

The 'created' field in 'vos status' output was being reported as
something else. Make 'vos status' actually report the time the
transaction was created in that field.

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

11 years agodir: Add printf format checks to log
Simon Wilkinson [Sat, 17 Jul 2010 17:23:30 +0000]
dir: Add printf format checks to log

salvage.c uses the Log() function defined by vol/common.c. At the
moment, this isn't defined in a way that we can easily grab its prototype,
so the code has an extern definition at the beginning. For now, just add
format checks to this definition.

Fix all of the fallout from this - we were casting to intptr, and
printing with %x - use AFS_PTR_FMT as nature intended.

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

11 years agobudb: Add printf format checks to logging fns
Simon Wilkinson [Sat, 17 Jul 2010 17:06:39 +0000]
budb: Add printf format checks to logging fns

Add format checking to the Log, LogError and LogDebug functions.

Fix the resulting type errors. One of these in particular is a
signficant bug, where we would try to print a hash table pointer
as a string.

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

11 years agovol: Fix logging functions
Simon Wilkinson [Fri, 16 Jul 2010 22:20:27 +0000]
vol: Fix logging functions

Fix the Log, Abort and Quit functions used by the vol package so
that they are all defined in a common header file, rather than
prototyped in each file which uses them.

Use the appropriate macros to flag those functions which never
return, and mark them all as taking printf style input.

Fix all of the callers which had mismatched format strings and
arguments.

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

11 years agoLinux: Load exportfs first
Simon Wilkinson [Fri, 16 Jul 2010 20:58:33 +0000]
Linux: Load exportfs first

The changes to use the exportfs interface to access cache files
require that the exportfs module is loaded before our module.

In 'normal' operation depmod, and modprobe, would take care of
this for us, however our legacy installation format where we
ship the kernel module outside of /lib/modules stops modprobe from
working, and our init script uses insmod. So, explicitly load
exportfs first.

Note: I'm aware of just how much this sucks, and the fact that we
really should just tidy up all of the packaging and init scripts
around our kernel module - but this close to 1.6 branch is probably
not the time for those kinds of changes.

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

11 years agoRename configure.in to configure.ac
Russ Allbery [Thu, 15 Jul 2010 17:18:03 +0000]
Rename configure.in to configure.ac

Rename configure.in and configure-libafs.in to use the *.ac extension
instead, which is preferred by current Autoconf versions for input
files to Autoconf.  *.in can then be more consistently used for files
that are input into config.status.

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

11 years agoAdd include method for POD documentation
Russ Allbery [Fri, 16 Jul 2010 00:21:26 +0000]
Add include method for POD documentation

Add a preprocessor for POD documentation that handles a custom
=include directive.  Demonstrate how to use the preprocessor by
factoring out all the standard PTS options into a separate POD
fragment and including that fragment in all the PTS commands that
take the standard options instead of including that documentation
in each separate file.

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

11 years agoFix unterminated B<> sequence in bos addhost man page
Russ Allbery [Fri, 16 Jul 2010 00:18:12 +0000]
Fix unterminated B<> sequence in bos addhost man page

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

11 years agoFlesh out the configuration documentation
Russ Allbery [Thu, 15 Jul 2010 23:29:27 +0000]
Flesh out the configuration documentation

Remove obsolete configure options and document all remaining options
other than some provided by Autoconf and some that are currently not
very interesting.

Document that, on modern Linux systems, configure can find the kernel
build system and headers by itself and doesn't need the flag.

Include some more information in README about changing the default
installation paths, and mention that the da* versions of the file server
and volserver also aren't stripped.

Remove the generic GNU installation instructions, which aren't useful
for OpenAFS.

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

11 years agoAdd new demand-attach binaries to .gitignore
Russ Allbery [Thu, 15 Jul 2010 00:32:35 +0000]
Add new demand-attach binaries to .gitignore

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

11 years agoFix .version generation for make libafs_tree
Russ Allbery [Thu, 15 Jul 2010 00:30:11 +0000]
Fix .version generation for make libafs_tree

The first argument to the git-version script should be the root
directory of the tree, not the .version file in that directory.

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

11 years agoMove build support files into build-tools
Russ Allbery [Thu, 15 Jul 2010 00:29:34 +0000]
Move build support files into build-tools

Now that we have a build-tools directory, move the various support
files used by Autoconf and Automake into it as well to reduce clutter
at the top level.

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

11 years agoafspag version of rx_knet.o
Marc Dionne [Thu, 15 Jul 2010 02:43:01 +0000]
afspag version of rx_knet.o

in order to correctly generate KBUILD_MODNAME, each object
file needs to be built only once. in this case it matters because the
pr_debug macro, called as a result of including errqueue.h, needs it
and things which depend on it, and when it's built into 2 .kos,
the wrong thing happens.

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

11 years agoDebian: Install the demand-attach versions of the binaries
Russ Allbery [Wed, 14 Jul 2010 19:46:04 +0000]
Debian: Install the demand-attach versions of the binaries

This will need more comprehensive packaging work later, but in the
meantime, install the binaries so that make dpkg will complete
successfully.

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

11 years agoUse the full version number for Debian packages
Russ Allbery [Wed, 14 Jul 2010 19:33:40 +0000]
Use the full version number for Debian packages

Debian packaging can deal with the full version number that we
generate using git-version, so base the version we put into
src/packaging/Debian/changelog on that version instead of the
LINUX_PKGVER that we use for other packaging.

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

11 years agomake dpkg should only build binary packages
Russ Allbery [Wed, 14 Jul 2010 19:27:30 +0000]
make dpkg should only build binary packages

The source package we would get by running dpkg-buildpackage in the
source tree without further preparation is basically useless, since
it's a native source package for a non-native package and will contain
any random dirty cruft in the current source tree.  Since the purpose
of make dpkg is to provide quick Debian packages for testing purposes,
only build the *.deb files and don't bother to build the source
package.

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

11 years agoUpdate Debian packaging to 1.5.75-2
Russ Allbery [Wed, 14 Jul 2010 19:25:55 +0000]
Update Debian packaging to 1.5.75-2

Fixes the duplicate run of make install during the package build
process and updates the changelog to the current Debian packages.

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

11 years agoman: document bos addhost -clone
Michael Meffie [Wed, 7 Jul 2010 18:25:46 +0000]
man: document bos addhost -clone

Add the missing -clone option to the bos addhost
man page.

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

11 years agoFix ktime test on 64-bit systems
Russ Allbery [Wed, 14 Jul 2010 17:02:08 +0000]
Fix ktime test on 64-bit systems

0xffffffff is a bad representation for -1 when the size of the data
type may vary.  Rather than forcing everything to 32 bits and losing
later on platforms with 64-bit time_t, change the table to use time_t
and try to add a cast that will do the right thing.

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

11 years agoRX: ignore all local 127/8 IFF_LOOPBACK interfaces
Andrew Deason [Thu, 8 Jul 2010 20:59:58 +0000]
RX: ignore all local 127/8 IFF_LOOPBACK interfaces

Currently RX lists all non-127.0.0.1 interfaces in the interface list,
even those that are specified as IFF_LOOPBACK, to accomodate certain
special cases where IFF_LOOPBACK interfaces should be advertised.
However, this makes us advertise e.g. a 127.0.0.2 lo interface. So
instead, skip all interfaces that are both in 127/8 and claim they are
IFF_LOOPBACK, as this will skip a stray 127.0.0.2, but should not
confuse the special cases.

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

11 years agoTreat all 127.0/16 addresses as loopback
Andrew Deason [Thu, 8 Jul 2010 15:56:28 +0000]
Treat all 127.0/16 addresses as loopback

Many places treat loopback addresses specially; they are skipped over
when traversing local interface lists, and they are sometimes replaced
with the public IP of the local hostname when interpreting user
arguments.

However, we only treated 127.0.0.1 as 'loopback'. Many systems can
have more than one loopback interface, such as having an interface
with the address 127.0.0.2. So, to catch these, treat everything in
127.0/16 as a loopback address or otherwise 'invalid' address. We
still do not treat the rest of 127/8 like this, to still allow some
127.* addresses to not be treated as loopback if someone really wants
to.

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

11 years agoRewrite FUSE macro to skip FUSE if not found unless --enabled
Russ Allbery [Wed, 14 Jul 2010 16:28:47 +0000]
Rewrite FUSE macro to skip FUSE if not found unless --enabled

If no configure flags are given, build the FUSE afsd iff FUSE is
found.  If --enable-fuse-client is explicitly given, always try to
build the FUSE client and abort if FUSE libraries could not be found.

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

11 years agoLinux: use an int pointer for the size argument to getsockopt
Marc Dionne [Wed, 14 Jul 2010 13:52:03 +0000]
Linux: use an int pointer for the size argument to getsockopt

getsockopt expects an int pointer as the size parameter, both in
the kernel version and our replacement compat inline function, which
causes warnings because we give it a size_t pointer.

Use an int variable instead.

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

11 years agoDon't overflow a buffer on the server's stack at startup
Jeffrey Hutzelman [Wed, 14 Jul 2010 05:20:22 +0000]
Don't overflow a buffer on the server's stack at startup

The servers like to log the command line it was invoked with.
It does this by concatenating its arguments, separated by spaces,
into a 150-character buffer on the stack of main(). That's just
wrong. Use a dynamically-allocated buffer instead.

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

11 years agorx_user.c: Remove unused variable
Marc Dionne [Wed, 14 Jul 2010 13:29:49 +0000]
rx_user.c: Remove unused variable

There's an unused variable in the pmtu code in rx_user.c.
Remove the "offender".

Change-Id: I869b317d7e31b0f70b71f3e9ea2a0e0209709fcb
Reviewed-on: http://gerrit.openafs.org/2415
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

11 years agolinux rx pmtu fixes
Derrick Brashear [Wed, 14 Jul 2010 06:00:32 +0000]
linux rx pmtu fixes

failed to get committed in earlier round of pmtu revamping. oops.

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

11 years agosimple fuse enable change
Derrick Brashear [Wed, 14 Jul 2010 04:44:11 +0000]
simple fuse enable change

just turn on fuse by default. don't move anything

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

11 years agoAdd -unsafe-nosalvage fileserver option
Andrew Deason [Fri, 25 Jun 2010 22:02:54 +0000]
Add -unsafe-nosalvage fileserver option

Provide a runtime flag to the DAFS fileserver to allow for
fast-restart-like behavior for DAFS. Call the flag -unsafe-nosalvage, and
document it, warning against its use.

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

11 years agoCheck for crypt in external library
Simon Wilkinson [Tue, 13 Jul 2010 20:53:22 +0000]
Check for crypt in external library

Check to see if we need to explicitly include a library in order
to get the crypt() function

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

11 years agoUpdate Debian packaging to 1.5.75-1
Russ Allbery [Tue, 13 Jul 2010 22:39:29 +0000]
Update Debian packaging to 1.5.75-1

This update now builds shared library packages for the libafsauthent
and libafsrpc shared libraries.  It should also fix problems with
make dpkg due to debian/changelog being deleted on make distclean.

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

11 years agoenable pmtu in configure by default
Derrick Brashear [Tue, 13 Jul 2010 19:14:00 +0000]
enable pmtu in configure by default

if we can get a socket error to let us get pmtu discovery info,
use it.

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

11 years agodemand attach build always
Derrick Brashear [Tue, 13 Jul 2010 20:47:39 +0000]
demand attach build always

always build demand attach. includes doubtless-broken
windows support. installs dafileserver, dasalvager, davolserver.
salvageserver keeps its (unique) name.

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

11 years agoafs sunpro not always c99
Derrick Brashear [Wed, 14 Jul 2010 03:51:52 +0000]
afs sunpro not always c99

old enough sunpro c won't be c99, and doesn't define
a macro when it is c99. since there's no way to tell, be safe.

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

11 years agoxdr sunpro not always c99
Derrick Brashear [Wed, 14 Jul 2010 03:36:30 +0000]
xdr sunpro not always c99

old enough sunpro c won't be c99, and doesn't define
a macro when it is c99. since there's no way to tell, be safe.

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

11 years agomake dpkg should not depend on dest
Russ Allbery [Tue, 13 Jul 2010 22:57:25 +0000]
make dpkg should not depend on dest

It's pointless to have make dpkg build the tree before running the
Debian build rules, since the Debian build rules are just going to
build the tree again.

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

11 years agosimple is-lex-flex autoconf test
Derrick Brashear [Tue, 13 Jul 2010 18:31:41 +0000]
simple is-lex-flex autoconf test

if we're flex, we may need to be lex-compatible. engage
it if we're flex

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

11 years agoLink libafsauthent with -lresolv if required
Russ Allbery [Tue, 13 Jul 2010 20:42:01 +0000]
Link libafsauthent with -lresolv if required

libafsauthent includes auth/cellconfig.c, which uses res_search, so it
requires -lresolv even if it isn't needed for gethostbyname.  Add
LIB_AFSDB to the link line for libafsauthent.

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

11 years agoLink libafsauthent with -lresolv if required
Russ Allbery [Tue, 13 Jul 2010 20:42:01 +0000]
Link libafsauthent with -lresolv if required

libafsauthent includes auth/cellconfig.c, which uses res_search, so it
requires -lresolv even if it isn't needed for gethostbyname.  Add
LIB_AFSDB to the link line for libafsauthent.

Change-Id: I4dafdf83db9a00e4e30bff7c59357c13bf7af961
Reviewed-on: http://gerrit.openafs.org/2402
Tested-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jason Edgecombe <jason@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

11 years agodisconnected fix prototype warning
Derrick Brashear [Tue, 13 Jul 2010 19:47:41 +0000]
disconnected fix prototype warning

supporting disconnected in ukernel uncovered this
warning from lack of a prototype

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

11 years ago64bit macos new config.guess support
Derrick Brashear [Tue, 13 Jul 2010 18:29:38 +0000]
64bit macos new config.guess support

new config.sub/config.guess call 64 bit macos something
new. update our handling so we deal.

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

11 years agounix disconnected mode always
Derrick Brashear [Tue, 13 Jul 2010 17:06:02 +0000]
unix disconnected mode always

per 1.6 release plan, enable disconnected always. eject ifdefs
(and a stray printf that was hidden in one)

Change-Id: I6a68cb8506878c28502e1742a48858f2e84958f5
Reviewed-on: http://gerrit.openafs.org/2397
Tested-by: Jason Edgecombe <jason@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>