12155 Commits

Author SHA1 Message Date
Ben Kaduk
e1105acb1c auditU: also report for rxkad-always-encrypt
The logic that works for security index 2 also works for index 3.

While here, update a comment in preparation for rxgk.

Change-Id: Ifd868fa8d9d0ba2f422fa1fac43e4f583d27a1ff
Reviewed-on: http://gerrit.openafs.org/10527
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-06-09 18:39:09 -04:00
Ben Kaduk
30a1c829af Use the RX_SECIDX_* enums in more places
Add symbols for security indices 1 (rxvab, unused) and 3 (rxkad with
always-encrypt, maybe-used).

kauth and bubasics defined macros for RX_SCINDEX_*; replace those
with the common core rx enums as well.

Use the global symbols instead of custom defines like BULK_NULL and
SAMPLE_NULL, which can now be removed.

Reformat a comment to match current style, since we're changing it anyway.

Change-Id: I82bbb0016a5c3129dfd18ff7dc77ff7839501ad8
Reviewed-on: http://gerrit.openafs.org/10526
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-06-09 18:38:28 -04:00
Mark Vitale
c8dfe8e4c2 afs: maintain afs_users buckets in sorted order
Modify afs_GetUser() to insert a new unixuser into an afs_users
hash bucket in sorted order, by uid/PAG.  This is in support of
other small optimizations in future commits.

Change-Id: I68c51ab38733575290aa0c8aa2a306168c5483c0
Reviewed-on: http://gerrit.openafs.org/11071
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-06-05 07:20:56 -04:00
Mark Vitale
7d4f3a4710 afs: only reset access caches for the matching cell
When an AFS user's tokens change (unlog, aklog) or expire,
afs_ResetAccessCache() is called to reset all the access caches
for that uid/PAG.

However, a user/PAG may have tokens for multiple cells, and they
may expire or be set/reset at different times.  Therefore, it is
incorrect to assume that all access caches for a uid/PAG should
be discarded when only one cell's tokens have changed.

Modify afs_ResetAccessCache() to acccept a new argument 'cell',
and only reset the access caches for a uid/PAG if the vcache
resides in the specified cell.  If the caller really wants to
reset all a user's access caches, specify cell=-1.

For cache managers that are running with multiple PAGs and multiple
cells, this should improve performance because 1) it avoids
scanning access caches chains for vcaches that are not part of the
current cell and 2) it avoids deleting access caches that may still
good, thus preventing unnecessary FetchStatus calls.

Change-Id: Id4c138dab45fd48265a4029880a5d57947e67a52
Reviewed-on: http://gerrit.openafs.org/11070
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-06-05 07:20:40 -04:00
Michael Meffie
e2f666fe81 roken: configure checks for getaddrinfo and friends
Change-Id: Icb2ace89332024668c9dc4326b967a1015afc1e9
Reviewed-on: http://gerrit.openafs.org/11199
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-06-05 07:19:29 -04:00
Heimdal Developers
b0bb7bdb49 Import of code from heimdal
This commit updates the code imported from heimdal to
5dfaa0d10b8320293e85387778adcdd043dfc1fe (git2svn-syncpoint-master-311-g5dfaa0d)

New files are:
	roken/freeaddrinfo.c
	roken/gai_strerror.c
	roken/getaddinfo.c
	roken/getnameinfo.c

Change-Id: I4a80dfd0d95cfd252af5ce3228fb824b4aacb961
Reviewed-on: http://gerrit.openafs.org/11198
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-06-05 07:19:09 -04:00
Michael Meffie
064b69ca26 roken: add getaddrinfo and friends the imported file list
Change-Id: I2203bf9ab45feb47df760b404727d23d1fa15381
Reviewed-on: http://gerrit.openafs.org/11197
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-06-05 07:18:46 -04:00
Michael Meffie
48789d47b6 linux: dont ignore kmod build errors
Errors from the linux kmod build are not propagated, since make is
run as the first command in a pipeline, and the shell returns the
exit code of the last command in the pipeline.  Run the make command
in a subshell to detect errors, and exit afterwards.  (This method
is more portable than bash specific pipeline processing options.)

Thanks to Mark Vitale for pointing out this build system defect
to me.

Change-Id: If3e204fe31dbdc9e7416d52fae897f792d27d678
Reviewed-on: http://gerrit.openafs.org/11186
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-06-05 07:18:28 -04:00
Andrew Deason
1673764ea0 bozo: Ignore ListKeys ka_KeyCheckSum return value
With commit c04de52da4e89e15b211b4a19a3d9bc4d612b209, an error in
ka_KeyCheckSum here makes the entire BOZO_ListKeys RPC to fail. This
caused two changes:

 - That commit makes the RPC fail in situations where it did not
   before. But even if we cannot calculate the checksum, we can still
   return other information about the key, so this is undesirable.

 - It masks the previous 'code' value, returned from stat(). The
   return code of stat() is now effectively ignored, except for the
   purposes of setting st_mtime, whereas previously a failure caused
   the RPC to fail. This is a behavior change.

So, effectively revert c04de52da4e89e15b211b4a19a3d9bc4d612b209.
Explicitly cast the return value of ka_KeyCheckSum to void, to make it
clear that we are intentionally ignoring the return value, so
hopefully this will not be flagged as a warning by code analysis tools
such as coverity.

Change-Id: Iac745d7c88ed7c2d97660e6949caa63580eef6e2
Reviewed-on: http://gerrit.openafs.org/11194
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-06-05 07:17:45 -04:00
Benjamin Kaduk
4bf942f5c3 rx: Do not try to cancel nonexistent events
Unconditionally cancelling the resend event and releasing the
reference it was supposed to have on the call, can cause the
call reference count to go negative.

In particular, the call chain when a new rx_call structure is
allocated would cause its reference count to become negative.

Behave similarly to all the other rxevent_Cancel calls touched
by 20034a815750beff262d49b37fba225c72dd0ab1, and only cancel the
event and drop a reference when the event is present on the call.

Change-Id: Icf2dd58c2545814ac17bb960077621c6d3209da0
Reviewed-on: http://gerrit.openafs.org/11201
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-06-05 07:17:23 -04:00
Chas Williams (CONTRACTOR)
2d973c10f1 afs/VNOPS: use osi_AllocSmallSpace() correctly
Send the size down to the allocator so it can perform some
consistency checks.

Change-Id: I6c089ab912014c639888b744a92a28813fb4b3c4
Reviewed-on: http://gerrit.openafs.org/11168
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-06-04 11:19:44 -04:00
Stephan Wiesand
3ab5463955 fstrace: Don't read uninitialised data on other platforms either
Commit 908105fe8d51551e45692de4e145022138a0356c fixed an off-by-one
error potentially causing a buffer overread in CheckTypes, but only
in the IRIX/AIX version of the function. Apply the same fix to the
code for the other platforms.

Spotted by Andrew Deason.

Change-Id: I5f70c072e609337b39064ba48353b4fdf23acf17
Reviewed-on: http://gerrit.openafs.org/11185
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2014-06-03 17:13:41 -04:00
Perry Ruiter
6970578231 afs: Delete unneeded duplicate code
Delete a memory release and a goto since natural code flow will
result in exactly the same thing.

Change-Id: I8fe1400aa2db0e15cbbd577ba18cc1fcdec18447
Reviewed-on: http://gerrit.openafs.org/11179
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-06-03 17:13:10 -04:00
Perry Ruiter
0256559185 config: Move AFS_LRALLOCSIZ to afs_args.h
AFS_LRALLOCSIZ is currently defined in afs/afs.h.  Other memory
related definitions such as AFS_SMALLOCSIZ and AFS_MDALLOCSIZ
are defined in config/afs_args.h.  Move AFS_LRALLOCSIZ to
config/afs_args.h for consistency.

Change-Id: Ie1e286c24be6a2def404a54355a2fa4b2c42330d
Reviewed-on: http://gerrit.openafs.org/11174
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-06-03 17:12:42 -04:00
Marc Dionne
de74227d9c libafs: Speed up afs_CheckTokenCache
On systems with a large number of PAGs and files in use, the
periodic daemon job that checks for expired credentials and
cleans up the axs cache can run for a very long time.  This
can lead to kernel soft lockups and eventually hang processes
and file access because of unavailable locks.

Rework the scanning logic in afs_CheckTokenCache to make the
scanning more efficient in most real world cases.  On a test
system accessing ~4000 files from processes in 1000 PAGs, this
has been observed to reduce the runtime of afs_CheckTokenCache
from a problematic ~70s down to about 0.7s.

Additionally, this changes the conditions in which an axscache is
discarded. uid+cell (rather than just uid) must now match, and
if no matching unixuser is found, it will also be discarded.

Adapted from code from Jeffrey Altman who provided the original
loop algorithm and code.

Change-Id: I65b275b4244b3b6ab65453623bb8729530a9e1a6
Reviewed-on: http://gerrit.openafs.org/11123
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-06-03 11:20:23 -04:00
Ben Kaduk
231bd022ed Dummy Makefile for rxgk
Include a libtool export symbol list for the shared library, which
only has the client RPC calls and the NewFooSecurityObject primitives
for now, since that's all that's stubbed out.

Also connect the rxgk directory up to be buildable from the root, but
nothing depends on it yet so it will not be built.

Looking ahead, build a libafsrpc_rxgk.la object.

Change-Id: I12ddefbdaa1ad4845649e3a32efdeaaa21b5e9b7
Reviewed-on: http://gerrit.openafs.org/10563
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-06-03 08:28:11 -04:00
Ben Kaduk
ee56e925f0 Add rxgk boilerplate
Just the skeleton of what needs to be there.  The actual import is split
over multiple commits, to make the reviewer's burden more manageable.

Error table, protocol description, and stubs for the security object
routines, with header to declare them.

The public header rxgk.h currently only contains a few typedefs and the
NewSecurityObject prototypes, and includes the RPC interface and com_err
code headers.

Change-Id: I7893f78119bb4aef12112cc1e51e1ec69de326c2
Reviewed-on: http://gerrit.openafs.org/10562
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-06-03 08:27:54 -04:00
Ben Kaduk
e156fae7a1 Add some configure bits for GSS-API
rxgk will require gss_pseudo_random and might want a couple other
krb5-specific bits.  We'll also need substvars to tell whether or
not we can try building these things.

Change-Id: Id18eb3f554605875696095eb40c25ec54df1f74b
Reviewed-on: http://gerrit.openafs.org/10561
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2014-06-03 08:27:19 -04:00
Marc Dionne
0abf5fcbe8 Linux: Drop PageReclaim AOP_WRITEPAGE_ACTIVATE case
The exit case here seems to have been added to avoid recursion into
the writeback code and eventual deadlock (see RT #15239).  One issue
is that the PageReclaim check can trigger in code paths that don't
deal with the AOP_WRITEPAGE_ACTIVATE code correctly, leading to EIO
errors when multiple threads are doing large mmap writes and memory
pressure is sufficient to trigger reclaim.

The check could be improved to check wbc.for_reclaim which seems to
indicate more reliably when it is safe to return ACTIVATE, but given
that the CPageWrite flag already provides more targeted recursion
prevention, it seems safer to just drop this special case.

Note that many kernel filesystems used to have a similar check mainly
to prevent excessive stack usage, but as more recent kernels have
moved away from doing any writeback during direct reclaim this is a
case that should no longer occur.  Partly as a result of this there
are very few users of AOP_WRITEPAGE_ACTIVATE left in the kernel,
which may be a motivation to find a better mechanism for OpenAFS
eventually.

This has been shown to help avoid EIO errors with multiple processes
doing intensive mmap writing.

Thanks to Yadav Yadavendra for identifying the issue and providing
extensive analysis and testing.

Change-Id: I88d9ef6e6e7a8f666f82c5ca481254839c2ba1e5
Reviewed-on: http://gerrit.openafs.org/11125
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2014-06-02 10:33:51 -04:00
Michael Meffie
21a85792c4 volser: log message for cross-device link errors
Add a log entry to the volume server to help diagnose those pesky
'Invalid cross-link device' errors returned by vos, which occur when
a clone volume is located in a different partition than the parent
read-write volume, or when a read-only volume is on the incorrect
partition on the server.

With this change, a new log entry is added when the volume server
fails to create a clone or a read-write volume because a volume with
the target volume id already exists on a different partition.  For a
clone volume, this would be a different partition than the
read-write volume. For a read-only volume, this would be a different
partition than indicated in the vldb.

Examples:

Volume foobar is on /vicepb, but foobar.backup is incorrectly on
partition /vicepa.

$ vos backup foobar
Failed to clone the volume 536870934
: Invalid cross-device link

VolserLog:
 VCreateVolume: volume 536870936 for parent 536870934 found on /vicepa; unable to create volume on /vicepb.
 1 Volser: Clone: Couldn't create new volume 536870936 for parent 536870934; clone aborted
 ...

The vldb indicates a read-only volume should be on /vicepa on a
remote site, but the actual volume is on /vicepb.

$ vos release xyzzy
Failed to create the ro volume: : Input/output error
The volume 536870921 could not be released to the following 1 sites:
	                             mantis /vicepa
VOLSER: release could not be completed
...

VolserLog on mantis:
 VCreateVolume: volume 536870922 for parent 536870921 found on /vicepb; unable to create volume on /vicepa.
 ...

Change-Id: Iaa471c46059d598a5095d59580e3b0b8ac6e1992
Reviewed-on: http://gerrit.openafs.org/10849
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-31 07:37:34 -04:00
Marc Dionne
c0683441a0 vol: Fix gcc 4.9 warnings
gcc 4.9 complains here because the trailing 0 in these macros
has no effect, the value having already been set to NULL.
Just remove the offending 0s, nothing uses the return value
anyway, even if there were platforms where 0 != NULL.

Change-Id: Ic9a79d51419726c0c823a9228c21c13dea918dc8
Reviewed-on: http://gerrit.openafs.org/11176
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-31 07:34:52 -04:00
Michael Meffie
40fb2650b7 libafs: allocate vattrs in LINUX to reduce stack used
Allocate temporary vattrs in LINUX to reduce the amount
of stack space used.

Change-Id: Iafa8d920b7149486f1ea8fb1999c1f4c9a935615
Reviewed-on: http://gerrit.openafs.org/11170
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-31 07:33:36 -04:00
Michael Meffie
9630c07540 libafs: api to create and free vattrs
Add a pair of functions to allocate and free struct vattrs,
to avoid having struct vattrs on the stack.

Change-Id: Ia5a148ebcdf8a2f1e3a2aa9d8fd3c0e0cd0e25e9
Reviewed-on: http://gerrit.openafs.org/11169
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-31 07:33:23 -04:00
Benjamin Kaduk
f66c467bdd Use a separate toplevel target for venus/tests
There's no particular reason to lump them in with the venus target,
and we have reports that it causes parallel build failures on some
systems.

Just use a separate 'venustests' target akin to rxtests and ubiktests
and the like, instead.

Some of these lines are now long and should be wrapped, but leave
that for a follow-up commit.

Change-Id: Idd50c02d3c0c88dc2788ecfd221bbc5cbf8cba19
Reviewed-on: http://gerrit.openafs.org/11177
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-31 07:32:53 -04:00
Stephan Wiesand
f05abc4793 libadmin: Remove redundant memset call
Commit bf78bf2c115659b78c34d3bc9d1934bcff21c8cc added initialisation
of the nbulkentries structure to 0, to avoid freeing garbage due to a
goto fail_... before the structure is initialised. As pointed out by
Andrew Deason, there already is an equivalent memset call later in the
code which is now redundant. Remove it.

Change-Id: I236e6de2a79f4f483be314654225bd52316f5a02
Reviewed-on: http://gerrit.openafs.org/11180
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2014-05-31 07:25:51 -04:00
Perry Ruiter
e7a4359a08 audit: Delete va_copy kludge
When I developed fix c3d4c109305b2db8a63b754c1894ad37326dc340 I used
va_copy.  I was nervous because it required C99, but I had no
problem with any of the buildbots, nor did any reviewer comment.
audit/audit.c contains a local hack to simulate va_copy in the
pre C99 days.  There are no uses of va_copy in audit.c but
presumably at some point there was.  Delete the local va_copy.

Change-Id: I5e30c7e3052aeffe56e366888c5a3db3a705fd00
Reviewed-on: http://gerrit.openafs.org/11184
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-31 07:25:11 -04:00
Perry Ruiter
85f3d0941b Delete several unused memory management constants
Change 412854593cf368006c18e6c0dc607a9ecd76a0e0, removed from
the code base the last usage of:
AFS_SALLOC_LOW_WATER (defined in afs/afs.h)
AFS_MALLOC_LOW_WATER (defined in config/afs_args.h)
AFS_MDALLOCSIZ (defined in config/afs_args.h)
This patch deletes these constants.

Change-Id: I1333aed508875e9b13dc3f36f3ff0d5eadfb2cfd
Reviewed-on: http://gerrit.openafs.org/11173
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2014-05-29 12:54:33 -04:00
Ben Kaduk
7a37f49e9d bcrypt keys are on the rxkad list, not rxgk
Make the code match the comment.

Change-Id: If891b9a4b33eafc93816077c321790f5af10803f
Reviewed-on: http://gerrit.openafs.org/10582
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-28 17:26:16 -04:00
Ben Kaduk
882b9dedef Suppress nonliteral format string warning/error
Clang doesn't like a nonliteral format string, and some kernel
builds (e.g., freebsd) are done with -Werror.  Use the standard
workaround for FreeBSD and UKERNEL builds by calling vsnprintf()
into a fixed buffer.

Remove the !defined(AFS_LINUX26_ENV) check, as it duplicates a
conditional around the entirety of osi_Panic().

Change-Id: If6287dd19604b78150c81febba8a59b73f56783c
Reviewed-on: http://gerrit.openafs.org/9880
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-28 16:56:44 -04:00
Georg Sluyterman
4b4d44b3dd cmd: List version in help for commands
List version in help for commands using cmd library

Change-Id: I4da64be11244e64d961e8de47cecb24cbbadce32
Reviewed-on: http://gerrit.openafs.org/10956
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-28 10:25:50 -04:00
Michael Meffie
c01236beb5 build: separate source and header compile_et rules
Generate source and header files separately to support parallel make
without contortions.

Add a complete list of dependencies for each generated header file
to avoid build errors during parallel make.

Change-Id: I804ff553e08d411a1cfe20a4ef4e57da9d321837
Reviewed-on: http://gerrit.openafs.org/10370
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-28 10:25:22 -04:00
Michael Meffie
0408718b81 rxkad: fix include quotes for generated headers
Change-Id: I36f7df2205fb4e655c3f342b864df5b877469aec
Reviewed-on: http://gerrit.openafs.org/10871
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-28 10:24:49 -04:00
Michael Meffie
d3eed1e58a auth: fix include quotes for generated headers
Change-Id: If4786c30b0b448ea4ff663d62d5e0f8623736084
Reviewed-on: http://gerrit.openafs.org/10870
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-28 10:24:37 -04:00
Michael Meffie
4e6b7ab904 libafs: separate source and header compile_et rules
Use the new compile_et -emit flag to generate source and header
files separately to support parallel make.

Export afs_trace.h since it is required to build libafs.  Before the
compile_et -emit flag was available, The afs_trace.h file was
generated as a side-effect of creating afszcm.cat.

Change-Id: I4e93691dda34ddc8600d6a818503e0c9e75e618a
Reviewed-on: http://gerrit.openafs.org/10729
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-28 10:24:24 -04:00
Michael Meffie
e97198372a libadmin: separate source and header compile_et rules
Use the new compile_et -emit option to generate source
and header files separately for parallel make support.

Remove unneed -h options, since there are no prolog
files and the header names match the error table names.

Change-Id: Ib94bf2cd34e9102d4047d8f1ae0b108af3299cc4
Reviewed-on: http://gerrit.openafs.org/10730
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-28 10:24:09 -04:00
Michael Meffie
1141d120a5 doxygen: make dox
Add an optional make target (make dox) and doxygen configuration to
generate doxygen output files.  Auto-detect when the doxygen and
graphviz dot tools are available.  When dot is present, configure
doxygen to create dependency graphs.

Since the graph generation can take a very long time, a new
configure option has been added to override the dot tool
auto-detection. To disable the graph generation (even if dot is
installed), run configure with the option: --without-dot

When graph generation is desired, but graphviz dot is not present in
the PATH, specify the path to dot with the configure option
--with-dot=<path-to-dot>.

The configure summary has been updated to show when doxygen document
and graph generation is configured.

Thank you Jason Edgecombe for providing the doxygen configuration
for OpenAFS.

Change-Id: Ie875fc2961877ee76e4c17631bbb95c29ef20b9e
Reviewed-on: http://gerrit.openafs.org/10970
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-28 10:08:16 -04:00
Michael Meffie
8050a005a3 configure: fix comment about unix variants
Remove vulgar comment, and remove commented out checks for
aix and minix.

Change-Id: I1ee6948bab3185a7855f1d9dc0e9557e27d4e1d2
Reviewed-on: http://gerrit.openafs.org/10969
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-28 10:07:58 -04:00
Benjamin Kaduk
3836023449 rxgen: use unsigned type for max array length
Plain '0' is of type int, i.e., signed, and therefore so is '~0'.
The length of an XDR array is unsigned, so this constant should
be of an unsigned type.

Change-Id: I13f5f94b2f54bc0adcdf2ded1696b797b5205057
Reviewed-on: http://gerrit.openafs.org/11107
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-23 15:31:14 -04:00
Benjamin Kaduk
200658834f Some rx type cleanup for signedness
The epoch, Cid, and security header/trailer sizes are all fundamentally
unsigned quantities.  Change the types exposed in some API signatures
to match this reality, and also change the global variables for the
epoch and Cid to match.  (Per-connection variables were already of
an unsigned type.)

Change-Id: I4a56736ef7d78028d1d0b980cda0b4c37d694388
Reviewed-on: http://gerrit.openafs.org/11106
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-23 15:30:33 -04:00
Benjamin Kaduk
7a701239d8 Install afscp.h from srcdir, not the build dir
That header is not a generated file, and is not found in the
object directory.  make install would fail from a separate objdir
prior to this change.

Change-Id: I31041c793bd930cfe2fc3c5f8a754ba1b91c26e5
Reviewed-on: http://gerrit.openafs.org/11160
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2014-05-23 09:07:00 -04:00
Michael Meffie
1ac4eb1b84 libafs: reduce stack space in LINUX
Allocate temporary vrequests to reduce the amount
of stack space used.

Change-Id: I71ed86b6345ce69a70f33cdbaf5eed2abb2cef19
Reviewed-on: http://gerrit.openafs.org/11005
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-21 16:12:50 -04:00
Michael Meffie
76ad941902 libafs: api to create and free vrequests
Add a pair of functions to allocate and free struct vrequests, which
are to be used to avoid having struct vrequests on the stack.

Change-Id: I6cbfe2ed21beb1ba500975188bb76608fdee4bc7
Reviewed-on: http://gerrit.openafs.org/11074
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
2014-05-21 10:31:17 -04:00
Christof Hanke
b71a041364 Logfiles: open with O_APPEND
This does not change the current (normal) behaviour, but allows
logrotation via "copy and truncate" as offered by logrotate.
Otherwise the processes will remember the offset of the last write
and a truncated file is filled with '\0' until the current offset.
The mrafsStyleLogs are untouched, since they can be rotated by a
kill -HUP and are deprecated anyway.

Change-Id: I09437aac63205fee3d97850507531e6833fed14f
Reviewed-on: http://gerrit.openafs.org/11092
Reviewed-by: Nathaniel Filardo <nwfilardo@gmail.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
2014-05-21 10:12:41 -04:00
Nathaniel Wesley Filardo
f4ab11a8dd Add a small string formatting utility to opr
This is to be used by the (coming next) vos-foreach utility, but it seemed
sufficiently general and useful to break out into its own free-standing
component.

Change-Id: I92c3a615fecb80e1766f78492b229a826a23e18a
Reviewed-on: http://gerrit.openafs.org/10965
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-21 07:22:41 -04:00
Michael Meffie
18511623f2 readme: move README.WARNINGS to CODING
Move the information about compiler warnings to the CODING
readme file.

Change-Id: I0be752c76ddee809fe80bd1f97048953eeee89ee
Reviewed-on: http://gerrit.openafs.org/10975
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-21 07:19:36 -04:00
Michael Meffie
eff41a2e53 readme: move git info to CODING
Move the REAME.GIT information to the CODING readme file.

Change-Id: I3013e03ebfe003dce23f0e2d808ab6905dd2b452
Reviewed-on: http://gerrit.openafs.org/10974
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-21 07:19:21 -04:00
Michael Meffie
04c7ed855e readme: rename README.DEVEL to CODING
Rename the developer's readme file to CODING as a home
for developer related information.

Change-Id: I8c2cf70258671387b926ef3d666f6476056ef06e
Reviewed-on: http://gerrit.openafs.org/10973
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-21 07:19:06 -04:00
Michael Meffie
2db8242aeb makefile: remove comment about washtool
Once upon a time, AFS used something called washtool as part
of the build system. Remove the remnant comment about it.

Change-Id: I566920b98c03d3cc65a6e2974a78a9247fd79842
Reviewed-on: http://gerrit.openafs.org/10968
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-21 07:15:12 -04:00
Michael Meffie
9930567bcf libafs: reduce stack space in VNOPS
Allocate temporary vrequests to reduce the amount
of stack space used.

Change-Id: Ic14cc4f657f7c7e97ef396601bd6c8c7f91abe55
Reviewed-on: http://gerrit.openafs.org/11004
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-21 07:09:44 -04:00
Michael Meffie
027e2bbb11 libafs: reduce stack space
Allocate temporary vrequests to reduce the amount
of stack space used.

Change-Id: I8c50a3af3028512003a02e46a2960b9b135213a5
Reviewed-on: http://gerrit.openafs.org/11003
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
2014-05-21 07:08:34 -04:00