openafs.git
14 years agoFix UKERNEL afs_mount arguments
Andrew Deason [Thu, 30 Jul 2009 17:43:27 +0000]
Fix UKERNEL afs_mount arguments

Change 73 (commit dc6299f5) changed the order of arguments for the
UKERNEL implementation of afs_mount, causing uafs_mount to segfault
whenever called. This changes them back to what they were before.

Reviewed-on: http://gerrit.openafs.org/256
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: Rename README-NT to README-WINDOWS
Jeffrey Altman [Thu, 30 Jul 2009 14:00:00 +0000]
Windows: Rename README-NT to README-WINDOWS

Windows has not been referred to as NT in a long time.
We do not support Windows 9x any longer.  Rename
README-NT to README-WINDOWS.

Reviewed-on: http://gerrit.openafs.org/254
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Update the README-NT file
Jeffrey Altman [Thu, 30 Jul 2009 13:56:33 +0000]
Windows: Update the README-NT file

Update the README-NT to be more up to date.
It still requires a lot of work.

Reviewed-on: http://gerrit.openafs.org/253
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoAdd additional vlprocs safety checks
Andrew Deason [Mon, 20 Jul 2009 17:31:44 +0000]
Add additional vlprocs safety checks

This adds additional safety checks to the vlserver's implementation of
the VL_CreateEntry, VL_ReplaceEntry, and VL_UpdateEntry RPCs. Now in all
three of these, any new volume ID that would be added to the VLDB or
that would be newly referenced in a VLDB entry is checked against
duplication in other entries. Additionally, any new volume names added
to the VLDB (either by creation, or modifying an existing volume) are
checked against duplication. This should make it impossible for clients
to make a volume ID or volume name correspond to multiple volume groups
(either conceptually or literally in the vldb).

This also alters the vlserver's implementation of the VL_GetNewVolumeId
RPC such that the vlserver increments maxvolid until the range of volume
IDs [*newvolumeid, *newvolumeid+bumpcount) is unused. 'vos' is modified
to only allocate one new volume id at a time, so we don't skip over
potentially-usable vol ids.

Reviewed-on: http://gerrit.openafs.org/158
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agomacos 10.6 package naming
Derrick Brashear [Thu, 30 Jul 2009 02:56:08 +0000]
macos 10.6 package naming

call the dmg Snowleopard for 10.6.

Reviewed-on: http://gerrit.openafs.org/252
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agomacos 10.6 amd64 kmod build fix
Derrick Brashear [Thu, 30 Jul 2009 02:14:01 +0000]
macos 10.6 amd64 kmod build fix

make the ARCHFLAGS support for amd64 work correctly by grepping for the correct thing

Reviewed-on: http://gerrit.openafs.org/250
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agomacos 10.6 pam support
Derrick Brashear [Wed, 29 Jul 2009 21:23:14 +0000]
macos 10.6 pam support

Make pam module compile on 10.6. Not tested yet.

Reviewed-on: http://gerrit.openafs.org/249
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoafs_pag_call.c needs rx/rxstat.h for RXSTATS_ExecuteRequest
Marc Dionne [Thu, 30 Jul 2009 02:35:21 +0000]
afs_pag_call.c needs rx/rxstat.h for RXSTATS_ExecuteRequest

This fixes a build error introduced by change 247 (commit 967abaf2).

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

14 years agoMake rxgen emit prototype for ExecuteRequest
Simon Wilkinson [Wed, 29 Jul 2009 15:58:03 +0000]
Make rxgen emit prototype for ExecuteRequest

Make rxgen provide a prototype in its header file for _ExecuteRequest, and
remove all of the adhoc prototypes from the tree.

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

14 years agoWindows: test for and react to SMB Extended Session Timeout support
Jeffrey Altman [Wed, 29 Jul 2009 18:31:45 +0000]
Windows: test for and react to SMB Extended Session Timeout support

SMB Extended Session Timeout Support is available only on
Windows systems with specific versions of the mrxsmb.sys driver.
Add a test for those driver versions.  If a supporting version
is present use the extended session timeout value instead of the
standard timeout value for the redirector timeout.  Adjust the
rx hard, conn, and idle timeouts accordingly.

The SMB module will define the ExtendedSessTimeout registry
value if it does not exist.  We rely on the fact that this is
done after the rx timeout values are calculated.  The mrxsmb
driver only reads the value at boot.

LICENSE MIT

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

14 years agoFix signed vs unsigned pointers in volser
Simon Wilkinson [Tue, 28 Jul 2009 09:32:10 +0000]
Fix signed vs unsigned pointers in volser

Cast iod_Read returns to (char *)
Fix signed vs unsigned pointer argument issues

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

14 years agoCode cleanup for vlserver
Simon Wilkinson [Tue, 28 Jul 2009 10:09:30 +0000]
Code cleanup for vlserver

Move the cnvldb.h include so it's after vlserver.h
Don't define MAXSERVERS in cnvldb.h (it's already defined elsewhere)
Cast nvldbentry(s) to vldbentry to avoid warnings from display_entry
Volume IDs are unsigned
Use var[0]='\0' rather than sprintf(var, "");

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

14 years agoWarnings work in util/
Simon Wilkinson [Tue, 28 Jul 2009 11:25:08 +0000]
Warnings work in util/

Make afs_ctime an inline function, instead of a complex macro.
This both improves our type safety, and suppreses warnings about
unused results.

Add bracing to clarify operator precedence in if (a && b || c)
statement

AFS_DARwiN60_ENV != AFS_DARWIN60_ENV

Use (void) rather than () in function prototypes

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

14 years agoCleanup for the USS directory
Simon Wilkinson [Tue, 28 Jul 2009 11:13:10 +0000]
Cleanup for the USS directory

Add additional header files for prototypes
Add additional prototypes to header files
yyerror() is internal, not external. Make it static while we're at it.
ANSIfy various function definitions
Unsigned vs signed cleanup

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

14 years agoinstall AFSCommander in prefpane dir
Derrick Brashear [Tue, 28 Jul 2009 16:13:24 +0000]
install AFSCommander in prefpane dir

make the AFSCommander prefPane be installed, in /Library (as
are growl, macfuse, etc)

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

14 years agoProtect rx_call iovq from simultaneous attempts to empty it
Jeffrey Altman [Mon, 27 Jul 2009 16:54:16 +0000]
Protect rx_call iovq from simultaneous attempts to empty it

The iovq queue is not safe to clear without holding the call lock.

FIXES 125110

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/242
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Hans-Werner Paulsen <hans@MPA-Garching.MPG.DE>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoUse an anonymous pointer for lpioctl
Simon Wilkinson [Tue, 28 Jul 2009 10:55:47 +0000]
Use an anonymous pointer for lpioctl

The block passed to lpioctl as cmarg is an anonymous chunk of
memory, so use a type that represents it as such.

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

14 years agoAdditional UKERNEL headers, prototyping and other fixes
Simon Wilkinson [Tue, 28 Jul 2009 11:55:36 +0000]
Additional UKERNEL headers, prototyping and other fixes

Add additonal headers to include prototypes for UKERNEL builds
Add some more prototypes
Remove some unused variables

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

14 years agoMore warnings cleanup for vol/
Simon Wilkinson [Mon, 27 Jul 2009 21:32:01 +0000]
More warnings cleanup for vol/

Prototype a number of functions
Add additional includes as required
Make some existing prototypes match the actual declarations
Volume IDs are unsigned in most of the code, change this bit to match
Make various Procs take an anonymous pointer, so they can be type checked
Add vol_internal.h for prototypes internal to this package

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

14 years agoFurther warning cleanup for the libadmin directory
Simon Wilkinson [Sun, 26 Jul 2009 18:41:30 +0000]
Further warning cleanup for the libadmin directory

More code cleanup for libadmin, including additional header inclusion,
better prototyping, and signed/unsigned and const fixes

Reviewed-on: http://gerrit.openafs.org/228
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoMove end label into correct position
Simon Wilkinson [Sun, 26 Jul 2009 18:23:08 +0000]
Move end label into correct position

The end label was in the wrong #ifdef block in order to actually be referenced
in the case where USEIFADDR is unset

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

14 years agoAdditional prototyping in dir.h
Simon Wilkinson [Sun, 26 Jul 2009 18:34:48 +0000]
Additional prototyping in dir.h

Add prototypes for functions used by the file and volservers

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

14 years agoEliminate some "implicit function declaration" warnings
Marc Dionne [Mon, 27 Jul 2009 15:29:34 +0000]
Eliminate some "implicit function declaration" warnings

Include appropriate header files to eliminate some warnings for
implicit function declarations.  These are simple cases that don't
generate new warnings because of the prototypes.
Use grp.h if it exists to get setgroups() definition.

Reviewed-on: http://gerrit.openafs.org/233
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoIn rxi_SendPacket[List], down hosts if ENETUNREACH or equivalent
Adam Megacz [Mon, 27 Jul 2009 03:32:07 +0000]
In rxi_SendPacket[List], down hosts if ENETUNREACH or equivalent

This patch causes rxi_SendPacket[List] to "down" a host if
rxi_Sendmsg() returns -ENETUNREACH (or equivalent).  Previous behavior
only did this check if defined(KERNEL) becauase non-defined(KERNEL)
implementations did not return meaningful error codes from
rxi_Sendmsg().

Jeff Altman <jaltman@openafs.org> supplied the logic for the
AFS_NT40_ENV case; I was not able to test this (I do not own a
Windows license) and took him on his word.

Reviewed-on: http://gerrit.openafs.org/59
Reviewed-by: Adam Megacz <megacz@gmail.com>
Tested-by: Adam Megacz <megacz@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoUnused variable cleanup
Marc Dionne [Mon, 27 Jul 2009 02:28:29 +0000]
Unused variable cleanup

Eliminate some warnings for unused variables.  In most cases the
variables are not used at all and are removed; in a few cases the
declarations need to be ifdef'ed to follow the code that uses them.
For a typical build here this removes 24 warnings.

Reviewed-on: http://gerrit.openafs.org/232
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoFuture-proof the wording of the auditlog options in the man pages
Jason Edgecombe [Mon, 27 Jul 2009 01:26:59 +0000]
Future-proof the wording of the auditlog options in the man pages

It was suggested that the auditlog option should not say there is one
record per RPC. In the future, there might be a need for multiple records
per RPC.

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/229
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoBuild fix - pre-processor typos in rx_lwp.c and rx_pthread.c
Marc Dionne [Mon, 27 Jul 2009 01:45:33 +0000]
Build fix - pre-processor typos in rx_lwp.c and rx_pthread.c

Commit 119c756d96c4a7f9e01e4ff6bb20156f1abf761b introduced a typo
in two places, using #elif instead of the apparently intended #else.

Reviewed-on: http://gerrit.openafs.org/231
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoUse -errno or WSAGetLastError() as return value from rxi_Sendmsg()
Adam Megacz [Sun, 19 Jul 2009 18:00:41 +0000]
Use -errno or WSAGetLastError() as return value from rxi_Sendmsg()

This patch causes the pthread and lwp implementations of rxi_Sendmsg()
to use -errno or WSAGetLastError() as the return value if it is
positive.  This is required in order to communicate more meaningful
error conditions to rxi_SendPacket[List], which should "down" a host
immediately when it observes ENETUNREACH.

Jeff Altman <jaltman@openafs.org> supplied the logic for the
AFS_NT40_ENV case; I was not able to test this (I do not own a
Windows license) and took him on his word.

Reviewed-on: http://gerrit.openafs.org/58
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Adam Megacz <megacz@gmail.com>
Tested-by: Adam Megacz <megacz@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: Add buf_FindAll() and buf_FindAllLocked()
Jeffrey Altman [Sun, 26 Jul 2009 17:03:49 +0000]
Windows: Add buf_FindAll() and buf_FindAllLocked()

Add two new buffer search functions buf_FindAll and buf_FindAllLocked.
Similar to buf_Find and buf_FindLocked except they search the all buffer
list.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/225
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Add cm_GetVolumeType
Jeffrey Altman [Sun, 26 Jul 2009 16:57:10 +0000]
Windows: Add cm_GetVolumeType

Add new volume utility function cm_GetVolumeType which returns
the type of volume based upon provided volume group and volume id.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/224
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Add cm_req_t parameter to cm_MergeStatus
Jeffrey Altman [Sun, 26 Jul 2009 16:20:26 +0000]
Windows: Add cm_req_t parameter to cm_MergeStatus

cm_MergeStatus allocates its own local cm_req_t object even
though all of its callers already have an active cm_req_t object
available.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/223
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Add cm_req_t parameter to buf_Get* functions
Jeffrey Altman [Sun, 26 Jul 2009 15:54:27 +0000]
Windows: Add cm_req_t parameter to buf_Get* functions

The buf_Get* functions do not currently accept a cm_req_t
parameter.  As a result they allocate their own cm_req_t on
the stack even though all callers already have one that can
be used.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/222
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Add enhanced audit log to afsauthent.dll
Jeffrey Altman [Sun, 26 Jul 2009 15:48:37 +0000]
Windows: Add enhanced audit log to afsauthent.dll

Add the enhanced audit log support to afsauthent.dll.

Reviewed-on: http://gerrit.openafs.org/221
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoPermit enhanced audit logs to work on Windows
Jeffrey Altman [Sun, 26 Jul 2009 15:01:43 +0000]
Permit enhanced audit logs to work on Windows

Gerrit 82 / Git 7b0b6a0ce9b320a3145f9d600596946230d815f0
broke the Windows build.

Add audit-file.obj to file list in NTMakefile.
Remove unnecessary includes from audit.c.
Properly conditionalize includes in audit-file.c.

Reviewed-on: http://gerrit.openafs.org/219
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Tests for afsd modules
Asanka Herath [Sun, 26 Jul 2009 14:16:33 +0000]
Windows: Tests for afsd modules

Add test routines for internationalization routines.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/218
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoExpanded the -auditlog entries in the man pages of the server processes
Jason Edgecombe [Sat, 25 Jul 2009 17:37:08 +0000]
Expanded the -auditlog entries in the man pages of the server processes

The expanded auditlog explanation includes what information is recorded
in the auditlog.

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/213
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoPortable lock-free data structures by Keir Fraser (MCAS)
matt@linuxbox.com [Wed, 22 Jul 2009 19:43:22 +0000]
Portable lock-free data structures by Keir Fraser (MCAS)

The MCAS suite, previously released as lock-free library, under a
non-restrictive license.

This software includes software previously released in 2003 under a
GPL license, but released by the original copyright holder, Keir
Fraser, under a BSD license, on 5/28/2008.

Reviewed-on: http://gerrit.openafs.org/183
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoDocument human-readable size suffixes
Russ Allbery [Fri, 24 Jul 2009 20:38:09 +0000]
Document human-readable size suffixes

Document that the quotas passed to fs setquota, vos create, and vos
setfields and the size passed to fs setcachesize may take a suffix
indicating the unit.  This documents the change in behavior implemented by
54c0a3f3e6575fa5af39ddd797d5381c36b48001.

Fix a copy/paste error in the vos create -maxquota option definition.

Reviewed-on: http://gerrit.openafs.org/212
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoEnhance audit logs to support SysV message queues
Andrew Deason [Wed, 24 Jun 2009 21:46:27 +0000]
Enhance audit logs to support SysV message queues

Adds support for sysv message queues for fileserver audit logs. This
also organizes the audit log code into various 'interfaces', of which
there are two: the original 'file' interface, and the 'sysvmq' interface
that this adds. The interface is configurable at runtime with the
-audit-interface switch.

FIXES 124674

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

14 years agoAllow specifying vos create/addsite volume IDs
Andrew Deason [Mon, 6 Jul 2009 15:29:20 +0000]
Allow specifying vos create/addsite volume IDs

This adds the -id option to 'vos create', and the -roid option to 'vos
create' and 'vos addsite'. This allows the user to manually specify the
volume IDs that a new RW or RO volume will get (or explicitly specify
that an RO volume ID should be unset), instead of always relying on the
volume IDs retrieved from the vlserver.

Reviewed-on: http://gerrit.openafs.org/157
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoRunning bos -noauth should not require client CellServDB configuration
Jeffrey Altman [Fri, 24 Jul 2009 16:58:26 +0000]
Running bos -noauth should not require client CellServDB configuration

When setting up a new cell, the admin is instructed to use "bos -noauth"
to configure the servers and only afterwards create the client configuration.
This leads to a catch-22 since currently bos -noauth fails if there is no
client configuration even though it is not required.

This change avoids the call to afsconf_Open() which is only required
if tokens are being acquired.

FIXES 125156

Reviewed-on: http://gerrit.openafs.org/209
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoafsprefs pane shouldn't hardcode 10.4 sdk
Derrick Brashear [Fri, 24 Jul 2009 04:44:31 +0000]
afsprefs pane shouldn't hardcode 10.4 sdk

10.4 sdk isn't available in the release after 10.5 as a default. don't hardcode it
same with afscell

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

14 years agoWindows: Move src/NTMakefile to top-level in order to avoid copying
Jeffrey Altman [Fri, 24 Jul 2009 02:23:13 +0000]
Windows: Move src/NTMakefile to top-level in order to avoid copying

For some unknown reason the Windows top-level NTMakefile is stored
at src/NTMakefile and must be copied to the top-level before it can
be used.  Now that git permits easy file moves, relocate src/NTMakefile
to where it belongs.

Reviewed-on: http://gerrit.openafs.org/206
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoMake buildpkg work out of tree
Simon Wilkinson [Thu, 23 Jul 2009 19:33:36 +0000]
Make buildpkg work out of tree

Don't reference files in the local directory, so that buildpkg.sh can be
invoked from elsewhere

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/202
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoFinish afscell implementation work
Toby Blake [Thu, 23 Jul 2009 19:18:28 +0000]
Finish afscell implementation work

This patch completes the implementation of an install time prompeter
for information about the local AFS cell, which is then used to populate
the ThisCell file. It removes the need for manual editing of
configuration files as part of the installation.

(Build system modified by Simon Wilkinson from Toby's original patch)

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/201
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agocorrect macos 10.6 amd64 support
Derrick Brashear [Thu, 23 Jul 2009 19:42:14 +0000]
correct macos 10.6 amd64 support

add a missing space so the kernel module can link

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/203
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoMove afscell to platform/DARWIN
Simon Wilkinson [Thu, 23 Jul 2009 18:27:47 +0000]
Move afscell to platform/DARWIN

Move our current afscell code into platform/DARWIN so that it's in a
location that can be added to the build, rather than packaging, step

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/200
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix build error - libafsrpc.map syntax
Marc Dionne [Thu, 23 Jul 2009 20:52:46 +0000]
Fix build error - libafsrpc.map syntax

Fix a build error introduced by commit 3a6d18:
/usr/bin/ld:./libafsrpc.map:125: syntax error in VERSION script

There seems to be a missing semicolon with the new rx_GetLocalPeers
entry.

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/205
Reviewed-by: Jacob Thebault-Spieker <summatusmentis@gmail.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoClean up some obsolete Autoconf code
Russ Allbery [Sat, 18 Jul 2009 18:38:22 +0000]
Clean up some obsolete Autoconf code

Remove hand-crafted equivalents of AC_SEARCH_LIBS for socket, connect,
and gethostbyname functions.  The only effective difference between
this code and AC_SEARCH_LIBS was to define the HAVE_* macros for the
functions, which are not used anywhere in the tree.

Remove AC_FUNC_SETVBUF_REVERSED.  This call no longer does anything in
current versions of Autoconf since the last system with this problem
was based on SVR2 and became obsolete in 1987.  Remove the one place in
the source tree where the results are used.

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/154
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoWindows: rename compile_et.pod to afs_compile_et.pod
Jeffrey Altman [Thu, 23 Jul 2009 19:43:55 +0000]
Windows: rename compile_et.pod to afs_compile_et.pod

Gerrit 175 renamed compile_et and compile_et.pod to afs_compile_et*.
Fix the Windows build system to process the new pod file name
and modify the WiX installer scripts to install afs_compile_et.html.

FIXES 125152

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/204
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoFurther code cleanup for the backup suite
Simon Wilkinson [Tue, 21 Jul 2009 19:53:57 +0000]
Further code cleanup for the backup suite

Protect butm.h against multiple inclusion
Prototype more functions for internal use in bucoord
Remove some unused variables
Include additional headers as required
Prototype exported functions in budb
Make SendReturnList helper function generic, by using a void * rock

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/168
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

14 years agoRemove duplicate copy of afssettings.m
Simon Wilkinson [Thu, 23 Jul 2009 17:44:42 +0000]
Remove duplicate copy of afssettings.m

afssettings.m lives in src/platform/DARWIN. Remove the duplicate copy
from this directory, and the (now unnecessary) Makefile.

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/199
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoRename installed version of compile_et
Simon Wilkinson [Wed, 22 Jul 2009 00:11:15 +0000]
Rename installed version of compile_et

Rename the installed version of compile_et to afs_compile_et to avoid
conflicts with other, more standard, users of com_err. Also rename the
man page to match

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/175
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoRefactor OpenBSD param files into common and architecture-specific
Matt Benjamin [Tue, 21 Jul 2009 21:07:36 +0000]
Refactor OpenBSD param files into common and architecture-specific
sections.

The new structure follows the pattern of the NetBSD param files, as
suggested by Derrick.  Since the change is retroactive, it seems
reasonable to also make the retroactive change to add the amd64 param
files, back to OpenBSD 3.6.  OpenBSD 3.6 added SMP support for x86_64,
so the architecture was a mature subtarget at that point.

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/177
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoFix warnings in vlserver/vlprocs.c
Russ Allbery [Tue, 21 Jul 2009 18:04:41 +0000]
Fix warnings in vlserver/vlprocs.c

rxinfo's code to print out the principal corresponding to an rx_call uses
static arrays for the principal components but was checking that the array
pointer was non-NULL when deciding whether to print principal components.
Instead check whether each portion of the principal is the empty string.

Add explicit initializations of the static buffers to the empty string so
that we're not relying on rxkad_GetServerInfo always initializing them for
us.

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

14 years agoModify Solaris Rx NetIfPoller to avoid Panic
Jeffrey Altman [Wed, 15 Jul 2009 07:58:02 +0000]
Modify Solaris Rx NetIfPoller to avoid Panic

This patch changes the common error reporting type from CE_PANIC
to CE_WARN and adds appropriate cleanup processing so that we do not
leak resources if an error occurs.

LICENSE MIT
FIXES 124498

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

14 years agoSquish more warnings in xstat
Simon Wilkinson [Wed, 22 Jul 2009 21:07:32 +0000]
Squish more warnings in xstat

Use a correct prototype for a_ProbeHandler in xstat_cm_Init
Fix a printf warning
rx_getAllAddr and afs_cb_interface.addr disagree on the sign of addresses
afs_interface.addr is a [], which we then use & to get the address of. Fix
this to stop the compiler from sulking.

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

14 years agoDo not call principal_ntoh to copy ktc_principal structs
Simon Wilkinson [Wed, 22 Jul 2009 21:40:13 +0000]
Do not call principal_ntoh to copy ktc_principal structs

principal_ntoh() is designed for butc_principal structures, which are a
different size from ktc_principal structures, and so it can't be used to
copy them.

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

14 years agoplatform makefile should handle clean target
Derrick Brashear [Thu, 23 Jul 2009 15:46:50 +0000]
platform makefile should handle clean target

pass "make clean" through to platform-specific makefiles

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/198
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoMakefile.in modification for compile AFSPreference source code
Claudio Bisegni [Thu, 23 Jul 2009 14:40:39 +0000]
Makefile.in modification for compile AFSPreference source code

Have been added the rule "OpenAFS.prefPane" tha compile with xcodebuild the xcode project

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/197
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoOSX Preference Pane Source Import
Claudio Bisegni [Fri, 10 Jul 2009 22:18:56 +0000]
OSX Preference Pane Source Import

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/196
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoExpose locally collected rx peer statistics
Jacob Thebault-Spieker [Wed, 22 Jul 2009 21:56:32 +0000]
Expose locally collected rx peer statistics

This implements rx_GetLocalPeers(), which exposes peer statistics
that are currently collected to the cache manager. This function
will later be used to rank both the file server and vldb server
lists using the statistics exposed by rx_GetLocalPeers().

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

14 years agoOSX Preference Pane
Claudio Bisegni [Fri, 10 Jul 2009 22:18:04 +0000]
OSX Preference Pane

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/195
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoUpdate Windows strcmpi call
Mickey Lane [Thu, 23 Jul 2009 13:20:27 +0000]
Update Windows strcmpi call

This POSIX function is deprecated beginning in Visual C++ 2005
Change to _stricmp instead
This change affects 4 calls in 3 Windows only files.

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/188
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoWindows: Fix cm_UpdateVolumeStatusInt log message
Jeffrey Altman [Thu, 23 Jul 2009 14:12:02 +0000]
Windows: Fix cm_UpdateVolumeStatusInt log message

In the server "down" case, the log message reported "online".
Fix that to avoid confusion while debugging.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/194
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoRemove 8.3 dir requirement for Windows IDN path
Mickey Lane [Wed, 22 Jul 2009 18:55:02 +0000]
Remove 8.3 dir requirement for Windows IDN path

This adds double quotes around the IDNMRedistDir symbol in ..\wix\NTMakefile
so that the 8.3 alternate directory name is no longer required.

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/182
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoRemove conditional on LINUX/osi_pag_module.c
Russ Allbery [Wed, 22 Jul 2009 14:00:10 +0000]
Remove conditional on LINUX/osi_pag_module.c

osi_pag_module.c should not be built conditionally based on whether the
NFS translator is enabled.  This file is used by afspag.ko, which is run
on NFS translator clients, not servers, and should not have GPL symbol
problems.

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

14 years agoUnite CacheStoreProcs and add abstraction calls.
Felix Frank [Thu, 2 Jul 2009 06:55:47 +0000]
Unite CacheStoreProcs and add abstraction calls.

The cache type specific differencies among afs_MemCacheStoreProc
and afs_UFSCacheStoreProc are divided into two sets of "storeOps".
Upon rxfs_storeInit, the appropriate set is chosen.

FIXME: Simon suggests that there should be a single set of storeOps,
as the main difference lies in what rx_ calls must be made.
This decision would then be made by calling a wrapper function from
each storeOp. These wrappers should be cachetype-specific and protocol-
independent. They would be associated to struct afs_cacheOps.
Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/107
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>

14 years agoFix warnings in comerr directory
Simon Wilkinson [Tue, 21 Jul 2009 19:58:36 +0000]
Fix warnings in comerr directory

Prototype yylex in error_table.y to remove warning
Fix the bizarre definition of LOCK_ET_LIST so that it upsets neither the
compiler, nor the reader.

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

14 years agoFurther prototyping and cleanup of UKERNEL
Simon Wilkinson [Tue, 21 Jul 2009 19:16:51 +0000]
Further prototyping and cleanup of UKERNEL

This patch continues to reduce the number of warnings that come from
a UKERNEL build. It also replaces the use of a system provided suser()
call (which isn't available everywhere), with afs_suser that's provided
by UKERNEL. Note that this makes UKERNEL applications usable by
everyone, not just root.

fork_syscall() becomes a normal function
call_syscall() is ANSIfied
UKERNEL/osi_groups.c gets the includes it needs
UKERNEL/osi_machdep.c stops thinking it's on Solaris
UKERNEL/osi_vnodeops.c stops confusing vnodes and vcaches

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

14 years agoUse Posix regex(3) within src/bucoord/commands.c
Hans-Werner Paulsen [Mon, 20 Jul 2009 10:06:23 +0000]
Use Posix regex(3) within src/bucoord/commands.c

Normally pattern matching against volume names is done on the server, but
if this fails, the client (src/bucoord/commands.c) is doing this.
This program had no code to use regex(3) when HAVE_POSIX_REGEX is defined.
This patch adds calls to regex(3) if HAVE_POSIX_REGEX is defined.
For systems without POSIX regex there were two (slightly different)
implementations in src/bucoord/regex.c and src/util/regex.c. The newer
version src/bucoord/regex.c has been modified and moved to src/util/regex.c.
Some header files and Makefiles have been removed/updated to work with this
setup.

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

14 years agoBuild fixes: prevent unnecessary rebuilding
Marc Dionne [Tue, 21 Jul 2009 22:16:45 +0000]
Build fixes: prevent unnecessary rebuilding

Fixes to a few Makefiles to prevent needless rebuilding when using make
after a successful build.

Rework dependencies in src/bubasics to prevent needless rebuilding and
fix some remaining parallel build issues.  Multiple targets really
have to be avoided.

Remove dependency on the include/afs directory from the src/config Makefile.
Depending on a directory means that we will rebuild the target if the
timestamp changes, for instance if other files or sub-directories are
installed.  This caused param.h to get re-installed in some cases and
the kernel module source files to be recompiled.  This directory is
created in the top-level Makefile anyway so we shouldn't need an
explicit dependency.

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

14 years agoavoid call to rxi_FreePacket with NULL pointer
Hans-Werner Paulsen [Wed, 22 Jul 2009 13:14:33 +0000]
avoid call to rxi_FreePacket with NULL pointer

the function rx_ReadProc32 (src/rx/rx_rdwr.c) checks the pointer
call->currentPacket before the function rxi_FreePacket is called. This
test was missing in the function rx_ReadProc.

FIXES 125110

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/178
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoOSX lock initialization cleanup
Derrick Brashear [Tue, 21 Jul 2009 21:09:39 +0000]
OSX lock initialization cleanup

Move GLOCK creation before other things at modload time. Also
remove unused rwlock support from rx kmutex package.

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

14 years agoAdd amd64 subtarget for OpenBSD
Matt Benjamin [Sat, 18 Jul 2009 13:29:20 +0000]
Add amd64 subtarget for OpenBSD

The subtarget name is amd64_obsd.  A sysname is created for the
OpenBSD 4.5 release, since it's current.  The sysname id range starting at
4000 is claimed for amd64_obsd, with amd64_obsd45 at 4014, so that prior
releases can be added in the correct order, if needed.

Mention of Jim Rees and CITI in new param file changed to line crediting
them for original work.

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/153
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoAFSOP_STOP_RXEVENT sometimes set without wakeup
Derrick Brashear [Tue, 21 Jul 2009 17:14:57 +0000]
AFSOP_STOP_RXEVENT sometimes set without wakeup

make sure when AFSOP_STOP_RXEVENT is set, a wakeup is sent on the
variable so waiters realize it's the case

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/162
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Russ Allbery <rra@stanford.edu>

14 years agoCorrect ctime arguments
Andrew Deason [Wed, 15 Jul 2009 14:54:32 +0000]
Correct ctime arguments

Corrects a few places throughout the tree where ctime() is incorrectly passed a
pointer to an afs_uint32 or similar fixed-width datatype, instead of a pointer
to a time_t.

FIXES 124538

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

14 years agoMake DRelease take an anonymous pointer
Simon Wilkinson [Tue, 21 Jul 2009 10:58:47 +0000]
Make DRelease take an anonymous pointer

DRelease is used to free data blocks returned by the dir package. These
can be any of a number of different types, which we were previously
dealing with by casting everything to (struct buffer *) before calling
DRelease.

Instead, make DRelease take a (void *), so we can free any dir package
product without requiring casts.

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

14 years agoClarify the proscription of $<
Simon Wilkinson [Tue, 21 Jul 2009 13:06:36 +0000]
Clarify the proscription of $<

Clarify the situations in which $< can be used, as we do use it in
some places in the tree. It is sufficiently portable in pattern rules,
but should not be used elsewhere

Also, change the function definition example to match the format used
through out the source tree.

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/160
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agofix init script install rules for linux and darwin
Derrick Brashear [Mon, 20 Jul 2009 13:40:26 +0000]
fix init script install rules for linux and darwin

the mode needs to be provided before src dest; do so, so we get boot scripts
again

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/156
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>

14 years agoFixed out-of-tree builds.
Felix Frank [Mon, 20 Jul 2009 09:50:06 +0000]
Fixed out-of-tree builds.

The problems were
* wrong location of Makefile.version-CML
* lots of omissions of "$?" in favor of actual file names in Makefiles
* wrong dependencies in pam/Makefile.in

The latter now point to TOP_INCDIR. Still, ktc.c could not be built
from src/pam (buildtree), as include "..." would not work on generated
headers. Therefore, it uses include <...> where appropriate now.

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

14 years agoWarning cleanups for kernel module build
Marc Dionne [Sat, 18 Jul 2009 04:15:01 +0000]
Warning cleanups for kernel module build

Take care of various warnings (about 70) during a libafs build.
A non-exhaustive list of changes:
- Unused variables, in some cases to be IFDEFed along with the code
that uses it
- Cast some const char * to char * for the afs_* functions
- Move afs_UFSCacheFetchProc and afs_UFSCacheStoreProc declarations
to afs_prototypes.h
- Include afsutil.h in error_msg.c to get strlcpy
- Change type of argument 3 in export_sysname, to match what the callers
are actually doing
- Rework a few lines in pthread_glock.c to avoid a warning about unused
value
- Fix a warning in rpc_scan.c that really looks like a bug (but
probably harmless in our case)

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

14 years agoBuild on linux 2.4 again
Michael Meffie [Fri, 17 Jul 2009 15:06:34 +0000]
Build on linux 2.4 again

Add missing conditional to fix building on
linux 2.4.

FIXES 125120

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/148
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>

14 years agoCorrect ifdefs in rx.c for rx packet debugging
Jeffrey Altman [Sat, 18 Jul 2009 07:46:21 +0000]
Correct ifdefs in rx.c for rx packet debugging

Reported by Marc Dionne

Fix two sets of ifdefs in rx.c required for RXPACKET_DEBUG.

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/http://gerrit.openafs.org/152
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoDisable kdump build on linux 2.6
Marc Dionne [Sat, 18 Jul 2009 01:29:10 +0000]
Disable kdump build on linux 2.6

Don't try to build kdump on linux 2.6 where it has been known to be broken
for a long time.  The build failure was ignored, but produced a large number
of errors and warnings, polluting the build log.
On a test amd64_linux26 system with a recent kernel and --enable-warnings,
this results in over 750 fewer warnings and 100+ fewer errors.

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

14 years agoGathered alternative afs_TttCacheFetchProcs and afs_TttCacheStoreProcs
Felix Frank [Wed, 1 Jul 2009 11:20:14 +0000]
Gathered alternative afs_TttCacheFetchProcs and afs_TttCacheStoreProcs

Fetch and Store procs now live in the new source file afs_fetchstore.c

Reviewed-on: http://gerrit.openafs.org/106
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Russ Allbery <rra@stanford.edu>

14 years agofstrace needs -lnsl on Solaris
Derrick Brashear [Thu, 16 Jul 2009 18:59:09 +0000]
fstrace needs -lnsl on Solaris

in order for gethostbyname to be satisfied for util.a, -lnsl is needed

Reviewed-on: http://gerrit.openafs.org/146
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>

14 years agoUse AFS_PTR_FMT to format pointers
Simon Wilkinson [Mon, 13 Jul 2009 23:01:09 +0000]
Use AFS_PTR_FMT to format pointers

Replace "0x%x" with "%"AFS_FMT_PTR for pointer printing in all locations
where gcc flags a warning.

This change is warnings reduction driven - there are many more
occurences of this in the code which don't currently result in
compiler warnings, because the va_args functions they're used in
aren't defined as printflike.

Reviewed-on: http://gerrit.openafs.org/75
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoMake afs_warn() and afs_warnuser() va_args
Simon Wilkinson [Fri, 10 Jul 2009 15:13:09 +0000]
Make afs_warn() and afs_warnuser() va_args

The afs_warn() and afs_warnuser() functions take a variable number of
arguments. Historically, we've handled this by just not prototyping
them. This change builds on the work done a while back to get a
prototyped osi_Panic() working in the kernel, and contains the same
work arounds for platforms with no usable va_args support (HPUX) and
those where support is limited (some Darwin, some Linux)

Reviewed-on: http://gerrit.openafs.org/27
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Russ Allbery <rra@stanford.edu>
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoDemystify catopen return value in fstrace
Russ Allbery [Wed, 15 Jul 2009 07:47:09 +0000]
Demystify catopen return value in fstrace

For some reason, the code was, on all platforms other than Digital
UNIX, assigning the return value of catopen to an integer, with
and then immediately assigning it to an nl_catd (the actual return
value type).  Remove all of that and store the return value directly
in an nl_catd variable.

Reviewed-on: http://gerrit.openafs.org/93
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Verified-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoSimplify fstrace message catalog and support non-dest installation
Russ Allbery [Wed, 15 Jul 2009 07:06:09 +0000]
Simplify fstrace message catalog and support non-dest installation

fstrace was searching for its message catalog first through the normal
NLS message catalog search paths and then falling back on the client
configuration directory.  This, however, is neither a traditional
message catalog for internationalization nor is it a configuration file.

Instead, search for the message catalog only in a C directory under
AFSDIR_CLIENT_DATA_DIRPATH, which is for architecture-independent data,
and simplify the code.

Now that we have a standard location for the message catalog, install
it with make install as well as make dest.

Reviewed-on: http://gerrit.openafs.org/92
Verified-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoRemove misplaced lines
Hartmut Reuter [Thu, 16 Jul 2009 08:33:57 +0000]
Remove misplaced lines

The same lines appears 17 lines up. So it is already done.
But here we shouldn't do it again after having released the
write lock in tdc and tdc itself

Reviewed-on: http://gerrit.openafs.org/79
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>

14 years agoProvide an AFSDIR_DATA_DIR path for architecture-independent data
Russ Allbery [Wed, 15 Jul 2009 06:22:00 +0000]
Provide an AFSDIR_DATA_DIR path for architecture-independent data

Add AFSDIR_DATA_DIR to dirpath.h, defined to be the location for
installing and finding architecture-independent data files.  Add a
corresponding AFSDIR_CLIENT_DATA_DIRPATH macro that retrieves the
possibly-prefixed version of this path.  This will be ${datadir}/openafs
with normal UNIX installation paths and /usr/vice/etc for Transarc
paths.  Since there is no apparent need for this path on Windows, it
is not defined in Windows builds.

The only intended use for this path for right now is the message
catalog for fstrace.

Reviewed-on: http://gerrit.openafs.org/91
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoDo not print volume name in DisplayFormat2 if status is not VOK
Jeffrey Altman [Thu, 16 Jul 2009 15:53:52 +0000]
Do not print volume name in DisplayFormat2 if status is not VOK

DisplayFormat2 is used to generate volume output for ListVolumes
and ExamineVolume.  If the volume status is not VOK, the name field
will not have been populated with valid data.  Do not print it.

This commit also removes an extraneous switch block from
XDisplayFormat2.  The switch variable is already known to
have the value VOK due to an enclosing conditional.

FIXES 125111

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/140
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Derrick Brashear <shadow@dementia.org>

14 years agoMake UAFS builds stop the main build
Simon Wilkinson [Mon, 13 Jul 2009 22:00:44 +0000]
Make UAFS builds stop the main build

The sub-make invocations in libuafs ignored the return code of the make,
which allowed the libuafs build to appear to succeed even if files had
failed to build. Fix this.

Reviewed-on: http://gerrit.openafs.org/74
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoMacOS 10.6 support update
Derrick Brashear [Wed, 15 Jul 2009 18:57:56 +0000]
MacOS 10.6 support update

Make things build on MacOS 10.6 again. Don't break 10.5 build.
Fix an error in the MacOS port which was left from previous head.

Reviewed-on: http://gerrit.openafs.org/96
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

14 years agoCorrect build rules for NSIS in top-level NTMakefile
Jeffrey Altman [Thu, 16 Jul 2009 05:54:56 +0000]
Correct build rules for NSIS in top-level NTMakefile

NSIS.i386 build rule must build the NSIS directory, not the NSIS.i386
directory.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/105
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoRemove NLS message catalog implementation for pre-2.0 OSF
Russ Allbery [Wed, 15 Jul 2009 05:52:35 +0000]
Remove NLS message catalog implementation for pre-2.0 OSF

fstrace had its own copy of the NLS catopen/catgets/catclose library
functions only on OSF platforms prior to 2.0 with the functions
renamed to add a "1" (which looked cut and pasted from somewhere
else).  This is old enough that we no longer support that platform,
so drop all of that code and partly untangle the #ifdefs to remove
the pre-2.0 OSF case.

Reviewed-on: http://gerrit.openafs.org/88
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Simon Wilkinson <sxw@inf.ed.ac.uk>

14 years agovos print_addr() must call ubik_VL_GetAddrsU with correct level of indirection
Jeffrey Altman [Wed, 15 Jul 2009 15:26:12 +0000]
vos print_addr() must call ubik_VL_GetAddrsU with correct level of indirection

Reported by Marcus Watts.

print_addr() accepts a afsUUID* and must not pass the address of
that variable to ubik_VL_GetAddrsU.

LICENSE IPL10

Reviewed-on: http://gerrit.openafs.org/101
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>

14 years agode-"register" src/WINNT
Jeffrey Altman [Wed, 15 Jul 2009 23:58:47 +0000]
de-"register" src/WINNT

Remove all uses of "register" from the src/WINNT source tree.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/104
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>