Commit Graph

6067 Commits

Author SHA1 Message Date
Derrick Brashear
ba27f1b3cb 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>
2009-07-21 11:49:53 -07:00
Andrew Deason
f149a3c54b 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>
2009-07-21 08:14:12 -07:00
Simon Wilkinson
262be76294 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>
2009-07-21 06:44:52 -07:00
Simon Wilkinson
f56ca81fbf 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>
2009-07-21 06:19:39 -07:00
Derrick Brashear
7ee55ba59f 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>
2009-07-20 06:50:07 -07:00
Felix Frank
5bc9641620 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>
2009-07-20 05:57:23 -07:00
Marc Dionne
b4783c245d 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>
2009-07-18 17:36:40 -07:00
Michael Meffie
f6e46babd8 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>
2009-07-18 09:36:09 -07:00
Jeffrey Altman
2797f8380a 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>
2009-07-18 00:50:45 -07:00
Marc Dionne
25eb69a32a 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>
2009-07-17 19:45:30 -07:00
Felix Frank
0b3e7a0747 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>
2009-07-16 14:31:45 -06:00
Derrick Brashear
07692c44d3 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>
2009-07-16 13:09:24 -06:00
Simon Wilkinson
2cf12c43c6 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>
2009-07-16 12:36:19 -06:00
Simon Wilkinson
0c7bb45c91 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>
2009-07-16 12:04:39 -06:00
Russ Allbery
54b1324094 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>
2009-07-16 11:49:04 -06:00
Russ Allbery
0e3036e4d1 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>
2009-07-16 11:48:55 -06:00
Hartmut Reuter
5b224f299e 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>
2009-07-16 11:45:36 -06:00
Russ Allbery
79f00021ce 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>
2009-07-16 11:06:28 -06:00
Jeffrey Altman
868ddef206 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>
2009-07-16 11:05:08 -06:00
Simon Wilkinson
a2d3f60222 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>
2009-07-16 09:04:16 -06:00
Derrick Brashear
1d1ae6195b 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>
2009-07-16 08:59:53 -06:00
Jeffrey Altman
7cd6733433 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>
2009-07-15 23:56:47 -06:00
Russ Allbery
280861970e 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>
2009-07-15 19:43:46 -06:00
Jeffrey Altman
86b0f09bdd 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>
2009-07-15 19:33:59 -06:00
Jeffrey Altman
6d9617981c 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>
2009-07-15 18:38:17 -06:00
Jeffrey Altman
1c24db09fa 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>
2009-07-15 18:37:16 -06:00
Michael Meffie
15d203c7be 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>
2009-07-15 12:01:52 -06:00
Andrew Deason
4f36dd089a 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>
2009-07-15 11:46:37 -06:00
Asanka Herath
00e32618c0 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>
2009-07-15 10:11:10 -06:00
Jeffrey Altman
0732d45056 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>
2009-07-15 01:32:24 -06:00
Jeffrey Altman
6a68be71da 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>
2009-07-15 01:31:22 -06:00
Jeffrey Altman
47e31b020c 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>
2009-07-15 01:23:48 -06:00
Jeffrey Altman
f498c18a6f 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>
2009-07-15 01:19:30 -06:00
Jeffrey Altman
a8cd0240e1 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>
2009-07-15 01:15:08 -06:00
Jeffrey Altman
91ff083dfb 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>
2009-07-14 23:16:31 -06:00
Jeffrey Altman
6d6390338c 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>
2009-07-14 21:46:56 -06:00
Jason Edgecombe
8a2330a9a6 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>
2009-07-14 21:07:50 -06:00
Jeffrey Altman
d9445f505a 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>
2009-07-14 15:53:47 -06:00
Michael Meffie
cdda13eec2 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>
2009-07-14 10:51:49 -06:00
Simon Wilkinson
dc6299f5bb 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>
2009-07-14 06:36:59 -06:00
Simon Wilkinson
243836efbb 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
7191005e4d

Reviewed-on: http://gerrit.openafs.org/76
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-13 19:39:28 -06:00
Evan Broder
54c0a3f3e6 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>
2009-07-13 15:42:34 -06:00
Russ Allbery
2510a6ec67 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>
2009-07-13 14:40:40 -06:00
Russ Allbery
cd37fd33f7 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>
2009-07-13 14:39:49 -06:00
Simon Wilkinson
7191005e4d 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>
2009-07-13 11:57:28 -06:00
Simon Wilkinson
86cfd23020 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>
2009-07-13 11:46:06 -06:00
Russ Allbery
215838d657 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>
2009-07-13 08:59:35 -06:00
Marc Dionne
4c2a6c8799 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>
2009-07-13 08:53:52 -06:00
Simon Wilkinson
d58dc56d99 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>
2009-07-12 17:49:32 -06:00
Hartmut Reuter
42d64b5b1f 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>
2009-07-12 16:07:34 -06:00