openafs.git
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>

14 years agoAdd/Update .gitignore files for Windows builds
Jeffrey Altman [Wed, 15 Jul 2009 23:16:14 +0000]
Add/Update .gitignore files for Windows builds

Many Windows files were not included in the .gitignore files.
Many directories did not have .gitignore files at all.
Add and update where required.

LICENSE IPL10

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

14 years agoFix assert message to avoid printing garbage
Michael Meffie [Wed, 15 Jul 2009 16:46:56 +0000]
Fix assert message to avoid printing garbage

Fix an off by one error in assert() to avoid printing garbage
characters to the log. Remove the newline character generated by
ctime() to match the format generated by the other logging functions.

FIXES 124613

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

14 years agoIgnore SIGSYS when issuing pioctl syscall
Andrew Deason [Tue, 14 Jul 2009 16:29:01 +0000]
Ignore SIGSYS when issuing pioctl syscall

Ignore SIGSYS when we issue the pioctl syscall, so we don't dump core
when the kernel module hasn't yet been installed on several platforms.
Also, restore the old SIGSYS signal handler afterwards, so we don't
cause any side-effects.

Reviewed-on: http://gerrit.openafs.org/81
Verified-by: Andrew Deason <adeason@sinenomine.net>
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>

14 years agoUse InterlockedExchangeAdd() instead of InterlockedAdd() on Windows
Asanka Herath [Wed, 15 Jul 2009 15:23:42 +0000]
Use InterlockedExchangeAdd() instead of InterlockedAdd() on Windows

InterlockedAdd() is not supported on all the platforms we wish to
support.  However, InterlockedExchangeAdd() is.  The two
functions are semantically similar with the exception that
InterlockedExchangeAdd() returns the initial value of the object
being modified while InterlockedAdd() returns the resulting
value.  Since the return value of the rx_MutexAdd() macro is
unused, this is irrelevant.

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

14 years agoTo reference one element of a C-string use []
Jeffrey Altman [Wed, 15 Jul 2009 06:41:03 +0000]
To reference one element of a C-string use []

Reported by Marcus Watts

Pointer arithmetic is inappropriate when attempting to output
one of the elements of an array or C-string.

LICENSE IPL10

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

14 years agoRXAFSCB_GetCellServDB takes a serverList not an array of afs_int32
Jeffrey Altman [Wed, 15 Jul 2009 06:27:29 +0000]
RXAFSCB_GetCellServDB takes a serverList not an array of afs_int32

Reported by Marcus Watts

ListCellsRPC calls RXAFSCB_GetCellServDB which takes a serverList
and not an array of afs_int32.  Add the serverList and copy the
resulting server addresses into the array of afs_int32 address
values.

Include afs/afscbint.h instead of afs/afsint.h in order to obtain
prototypes for RXAFSCB_ functions.

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

14 years agoCorrect pointer type of 'next' field within struct volinfo
Jeffrey Altman [Wed, 15 Jul 2009 05:53:32 +0000]
Correct pointer type of 'next' field within struct volinfo

Reported by Marcus Watts

The next field of struct volinfo is supposed to be a pointer
to a struct volinfo.

LICENSE IPL10

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

14 years agoDo not call principal_hton() to copy ktc_principal structs
Jeffrey Altman [Wed, 15 Jul 2009 05:46:45 +0000]
Do not call principal_hton() to copy ktc_principal structs

Reported by Marcus Watts.

principal_hton() is used to copy butc_principal structs.
Passing in a ktc_principal as source and destination will
result in beyond the end of the ktc_principal.

LICENSE IPL10

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

14 years agoDo not call ctime() twice in the same statement
Jeffrey Altman [Wed, 15 Jul 2009 05:32:28 +0000]
Do not call ctime() twice in the same statement

Reported by Marcus Watts.  Two calls to ctime() in the same
fprintf() statement will result in only one of the times being
printed twice.  This is due to the fact that ctime() returns
a static buffer.

LICENSE IPL10

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

14 years agoAdd missing TapeLog parameter to warning message
Jeffrey Altman [Wed, 15 Jul 2009 05:06:07 +0000]
Add missing TapeLog parameter to warning message

Bug identified by Marcus Watts.
Add missing TapeLog parameter to warning message.

LICENSE IPL10

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

14 years agoImprove Windows Build System By Using MT-safe Versions of Libraries
Jeffrey Altman [Tue, 14 Jul 2009 01:24:58 +0000]
Improve Windows Build System By Using MT-safe Versions of Libraries

For many years the Windows Build System has incorrectly mixed
some Pthread and LWP code.  One of the side effects of this
mixing was the need for the EXT2 extern macro definition in
src/rx/rx_globals.h which permitted the LWP compiled routines
to link with the Pthreaded afsrpc library.

This commit creates or modifies multi-threaded versions of various
libraries including mtafsubik.lib, mtafsutil.lib, mtafsvldb.lib,
and mtafsvol.lib.

All of the threaded servers now make use of these libraries.
This reduces the number of times that many source files were
recompiled for each server directory.

util_GetInt32 was defined in both src/util/volparse.c and
src/WINNT/afsd/fs_utils.c.  Now that mtafsutil.lib is being
used within src/WINNT/afsd there is no need to maintain the
duplicate copy.

The export list for afsauthent.def now includes all of the
ubik_PR_xxxx function variants and afsrpc.def now include
rxi_CallError as it is linked to outside the rx library.

The top-level NTMakefile has been modified to permit the
tree to build with the new header and library dependencies.

The threaded volserver which never built before now does.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/77
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Verified-by: Asanka Herath <asanka@secure-endpoints.com>
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoUpdated chapter 2, sections 1-3 of the Admin Guide
Jason Edgecombe [Wed, 15 Jul 2009 02:12:18 +0000]
Updated chapter 2, sections 1-3 of the Admin Guide

Replaced some references to the Authentication Database with Kerberos.
Removed text about obsolete tools like rcp, inetd, and rlogin.
Corrected references to AFS Product support by replacing them with links
to the OpenAFS Support page. Added warnings about using the wrong fsck binary
with inode and namei-based fileserver binaries. Removed an obsolete paragraph
about ThisCell and how it interacts with the Authentication Database.

LICENSE BSD
FIXES 124931

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

14 years agoPrevent crash on Windows when data version goes backwards
Jeffrey Altman [Tue, 14 Jul 2009 21:49:00 +0000]
Prevent crash on Windows when data version goes backwards

Within cm_MergeStatus() cm_FindVolumeByID() was called with
a NULL pointer instead of a valid cm_req_t object pointer
in the case where the data version for an object received
from the file server is smaller than the value already stored
in the cache.   This results in a NULL pointer dereference.

Allocate a cm_req_t object on the stack and initialize it
before calling cm_FindVolumeByID() in this case.

LICENSE MIT

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

14 years agoFix dirpath shell script generated from makefile
Michael Meffie [Tue, 14 Jul 2009 16:03:22 +0000]
Fix dirpath shell script generated from makefile

Generate the correct paths when building transarc style paths.
Remove the redundant dirpath shell script that was generated by the
afs-newcell script. Update the run-tests driver to use the build
time generated dirpaths.

FIXES 124976

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

14 years agoUkernel prototypes
Simon Wilkinson [Fri, 10 Jul 2009 23:15:26 +0000]
Ukernel prototypes

Prototypes and warning fixes for the cache manager when built as
part of libuafs

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

14 years agoCapabilities are unsigned on Windows too
Simon Wilkinson [Mon, 13 Jul 2009 23:18:25 +0000]
Capabilities are unsigned on Windows too

Capabilities are defined in the .xg file as being an array of
unsigned integers. Implement them as such on Windows, too.

This is a Windows version of the fix in
7191005e4df1eaaf4ec94c8199ffeb72be785794

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

14 years agoAllow passing in human-readable units for specifying amounts of space
Evan Broder [Wed, 25 Mar 2009 23:18:09 +0000]
Allow passing in human-readable units for specifying amounts of space

Add a util_GetHumanInt32 function for parsing numbers human-readable
units using single-character, uppercase suffixes for indicating orders
of magnitude (e.g. 'M', 'G').

Use this function to parse human readable values for all arguments
that previously accepted a value in kilobytes: fs setquota, fs
setcachesize, vos setfields, and vos create.

Reviewed-on: http://gerrit.openafs.org/66
Verified-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

14 years agoEnsure PAM modules are built PIC and pthread-aware where needed
Russ Allbery [Sun, 12 Jul 2009 16:07:12 +0000]
Ensure PAM modules are built PIC and pthread-aware where needed

Link the PAM modules against libafsauthent_pic and libafsrpc_pic instead
of the large collection of LWP AFS libraries so that they are always
built PIC, even on platforms that don't normally build everything PIC.
This also uses the pthread-aware version of the AFS routines on platforms
that support it, avoiding conflict problems between LWP in PAM modules
and pthread in a calling application.

Build a separate copy of ktc.krb.o in the pam directory for pam_afs.krb
since there is no AFS_KERBEROS_ENV-aware version of libafsauthent.

Enable the PAM module build by default on x86_64-linux now that it's
properly built PIC and can compile.

Stop ignoring build failures in the PAM modules if they're configured to
build.  On platforms where they should not be built, they should be
excluded in acinclude.m4.

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

14 years agoMake ktc_curpag generally available
Russ Allbery [Sun, 12 Jul 2009 18:26:03 +0000]
Make ktc_curpag generally available

ktc_curpag isn't specific to a Kerberos v4 environment, so move it outside
the AFS_KERBEROS_ENV #ifdef.  Add it to the auth.h header and to the
exports from the shared libafsauthent.

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

14 years agoCapabilities are unsigned
Simon Wilkinson [Mon, 13 Jul 2009 17:24:42 +0000]
Capabilities are unsigned

Capabilities are defined in the .xg file as being an array of unsigned
ints. Implement them as such.

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

14 years agoRemove unused variables in vol
Simon Wilkinson [Fri, 10 Jul 2009 16:57:16 +0000]
Remove unused variables in vol

Remove some unused variables and isolate items that are demand attach only

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

14 years agoAdd strlcat and strlcpy to libafsauthent and libafsrpc
Russ Allbery [Sun, 12 Jul 2009 18:24:17 +0000]
Add strlcat and strlcpy to libafsauthent and libafsrpc

Other functions included in libafsauthent and libafsrpc are using strlcpy
and strlcat, so include those objects in the libraries so that they stay
self-contained.

strlcat and strlcpy shouldn't be part of the public API for the libraries,
for various reasons including the fact that they're not built on all
platforms.  Therefore, don't add the functions to the library exports and
include them separately in each library.

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

14 years agoLinux build: properly install built kernel module
Marc Dionne [Mon, 13 Jul 2009 02:03:36 +0000]
Linux build: properly install built kernel module

Fix a problem introduced by the recent parallel make patches - the
resulting kernel module was not getting copied to the install or
dest location.
Copy some of the code from the COMPDIRS target for INSTDIRS and
DESTDIRS.  We still have to call into the lower level make and have it
install the module.

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

14 years agoAdd system headers
Simon Wilkinson [Sat, 11 Jul 2009 17:54:15 +0000]
Add system headers

There are a number of places in the tree which are missing system
headers such as <unistd.h> <ctype.h> and <dirent.h>. Add these.

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

14 years agoMake 'fs listquota' output readable for large quota
Hartmut Reuter [Fri, 10 Jul 2009 13:46:09 +0000]
Make 'fs listquota' output readable for large quota

With the old print format quota and used values became one large
number for quotas in the terabyte range.

Fix alignment of the "no limit" string in the Windows fs command
for volumes with no quota.

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

14 years agoTidy up the rx directory
Simon Wilkinson [Fri, 10 Jul 2009 17:14:21 +0000]
Tidy up the rx directory

Give functions that need them return values
Add prototyping for server_proc and rx_ts_tinfo_init
Make debug functions only build when RXDEBUG is enabled

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

14 years agoRemove vlclient.h
Simon Wilkinson [Sat, 11 Jul 2009 17:07:20 +0000]
Remove vlclient.h

The vlcient.h header file just provides definitions for functions that
are now protoyped elsewhere by rxgen. It is only referenced by
vlclient.c which was already including the rxgen header. So, nuke
vlcient.h, and references to it.

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

14 years agoParallel make: additional fixes
Marc Dionne [Sat, 11 Jul 2009 22:18:08 +0000]
Parallel make: additional fixes

Testing turned up a few more errors with parallel builds:

- Linux: Apply a similar fix for "make dest" to the one in the previous
patch for "make install".  Avoid conflict between DESTDIRS and COMPDIRS,
which also prevents unneeded duplicate work.

- Fix a couple of cases where we have 2 targets in a single rule with a
command that generates both of them.  Two parallel jobs can run this
command at the same time, with missing or corrrupted files as a result.
The workaround: make one of the targets build the files, and make the
second target depend on the other one.

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

14 years agoProbe for getcwd in configure
Russ Allbery [Fri, 10 Jul 2009 23:48:42 +0000]
Probe for getcwd in configure

src/venus/test/fulltest.c wants to use getcwd and expects HAVE_GETCWD to
be defined, but we weren't probing for it in configure.

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

14 years agoMake lwp.h always provide fasttime prototypes
Simon Wilkinson [Sat, 11 Jul 2009 13:37:37 +0000]
Make lwp.h always provide fasttime prototypes

The fasttime functions are used regardles of whether we're using
pthreads or LWP. Previously, lwp.h only provided their prototypes
if LWP was in use. Change this so these prototypes are always provided,
by refactoring the header a little. In the process, remove some
duplicate header includes.

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

14 years agoParallel make fixes
Marc Dionne [Tue, 7 Jul 2009 00:41:25 +0000]
Parallel make fixes

Fixes several problems with parallel makes in the current source:
- Add '+' prefix to many top-level Makefile commands. This informs make that
the following command should be treated as a sub-make and propagates the -jN
flag.
- Add a few missing dependencies
- Tweak some Makefiles that work with generated header files to prevent cases
where we attempt to use the file while it's being generated
- For the Linux kernel build, eliminate duplicated effort between COMPDIRS
and INSTDIRS, which also prevents conflict between the two in a
parallel situation.

FIXES 125031

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

14 years agoUpdate IRIX build issues
Derrick Brashear [Fri, 10 Jul 2009 19:59:55 +0000]
Update IRIX build issues

Refer to srcdir, not SYS, for syscall.s
Don't build fc_test for all (libsys doesn't exist yet)
Include needed header for Fd_t in xfs_size_check

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

14 years agoCorrect format specification for "struct clock" values
Jeffrey Altman [Sat, 11 Jul 2009 05:37:45 +0000]
Correct format specification for "struct clock" values

struct clock contains signed seconds and signed microseconds.
The format specification should be %d.%06d in all cases.

LICENSE MIT

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

14 years agoCorrect computation of rx packet resends and data packets sent.
Jeffrey Altman [Sat, 11 Jul 2009 00:43:13 +0000]
Correct computation of rx packet resends and data packets sent.

rx packet resends were being double counted.

rx data packets sent were one more per send list than it
should have been.

LICENSE MIT

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

14 years agoANSIfy bu_utils
Simon Wilkinson [Fri, 10 Jul 2009 23:54:04 +0000]
ANSIfy bu_utils

A very small amount of code cleanup to add prototypes, ANSIfy,
and remove warnings from the fms.c file

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

14 years agoPrototypes for the update directory
Simon Wilkinson [Fri, 10 Jul 2009 23:51:14 +0000]
Prototypes for the update directory

Prototyping, ANSIfication, and warning cleanup for the update
directory

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

14 years agoRename printf cast helpers and clean up format string warnings
Simon Wilkinson [Fri, 10 Jul 2009 23:41:02 +0000]
Rename printf cast helpers and clean up format string warnings

Some confusion had ensued about the usage of our printf cast helper
functions. Rename these to attempt to allay that confusion, and restore
the functions themselves to their original definitions.

Essentially, afs_printable_int32_ld() and friends are helpers to go
from afs specifc types to things that can be emitted by printf without
causing compiler warnings.

Also clean up some additional warnings from type mismatches between
escapes in printf format strings and the variables being printed.

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

14 years agoWarning cleanup for the libadmin directory
Simon Wilkinson [Fri, 10 Jul 2009 23:07:37 +0000]
Warning cleanup for the libadmin directory

Where we can, include headers from the include directory
Resolve a load of const char* /char * issues
Mark some Windows only variables as such
Fix prototypes

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

14 years agoPrototypes for venus/test
Simon Wilkinson [Fri, 10 Jul 2009 22:57:38 +0000]
Prototypes for venus/test

Add additonal headers, prototypes, and ANSIfy function definitions in
venus/test

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

14 years agoFurther cleanup of the butc directory
Simon Wilkinson [Fri, 10 Jul 2009 22:36:39 +0000]
Further cleanup of the butc directory

Now that butm is sharing its prototype, further cleanup, ansification
and warnings reduction for butc.

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

14 years agoPrototypes for rxdebug
Simon Wilkinson [Fri, 10 Jul 2009 22:46:36 +0000]
Prototypes for rxdebug

Trivial prototyping and warning cleanup for the rxdebug directory

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

14 years agoAdd exported butm_prototypes.h header
Simon Wilkinson [Fri, 10 Jul 2009 22:04:25 +0000]
Add exported butm_prototypes.h header

Add exported header for the butm directory so it can be used
elsewhere

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