Commit Graph

8761 Commits

Author SHA1 Message Date
Andrew Deason
8b07814e03 viced: Print a warning when using a deleted client
We should never get a deleted client back from GetClient. Log a
message if we do, to explain why access may suddenly appear to fail,
and assist in determining why.

Note that we still try to service the request, since the accessing
user may still have enough access to do whatever was requested.

Change-Id: Ie1d0c2d8a33a68a760704bfff9f268c6c507118f
Reviewed-on: http://gerrit.openafs.org/4529
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 13:38:54 -07:00
Andrew Deason
484b5b4cf4 viced: Force valid host enumeration flags
Make sure that the callback functions for h_Enumerate and
h_Enumerate_r give us back valid flags values by aborting if they
return an invalid value.

Change-Id: Id34b461d5452ac318a1714b6c3ffdaf41015995c
Reviewed-on: http://gerrit.openafs.org/4528
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 13:38:44 -07:00
Andrew Deason
5b9d427141 viced: Fix host enumeration flags
Do not give uninitialized flags values to h_Enumerate callback
functions. In fact, do not give a flags value to h_Enumerate or
h_Enumerate_r callback functions at all, since they are not actually
used.

Fix host enumeration callback functions to just return 0 or the
relevant flags, instead of basing the return value off of the given
flags value. Update MultiBreakVolumeCallBack_r to use the correct
return values, since it currently tries to use the old meanings of the
host enumeration return values.

FIXES 129376

Change-Id: Ibb01ce62411602a9f83f437125fb87a7a84160b4
Reviewed-on: http://gerrit.openafs.org/4527
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 13:38:28 -07:00
Jeffrey Altman
ebf5329e8c Windows: remove trailing whitespace
remove trailing whitespace from

  NTMakefile
  *.h
  *.c
  *.cpp
  *.idl
  *.def
  *.txt
  *.htm

Change-Id: I948a7511a20d0ad522b647b788536f9b6f5dda16
Reviewed-on: http://gerrit.openafs.org/4548
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 08:19:14 -07:00
Simon Wilkinson
d7b1e6a1ad autoconf: Add required headers to net/if.h test
On Darwin, net/if.h is only usable if sys/socket.h is included first.
Do so, to stop autoconf from warning about this test.

Change-Id: I9e7a2642cce86c5ad6ebb3ae3cb60401dd9c26cf
Reviewed-on: http://gerrit.openafs.org/4535
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-25 07:29:15 -07:00
Simon Wilkinson
ce256d5864 Windows: Remove duplicate file
The 'Streamfiles.txt' file had been committed with both that name,
and an all lower case name. This makes git very sad on systems with
case insensitive filenames.

Change-Id: I0284415649d7568f9834ccd4d2c6a1627d309fed
Reviewed-on: http://gerrit.openafs.org/4550
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-04-25 06:01:01 -07:00
Jonathan A. Kollasch
da3ee81396 Fix build of user-space on nbsd50 and greater
Change-Id: I7b2fef051da7c5ff820e9ecb1fe77b8d8d9e011a
Reviewed-on: http://gerrit.openafs.org/4509
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-23 20:51:40 -07:00
Jonathan A. Kollasch
9fd238ea05 Add nbsd60 param files and autoconf logic
Change-Id: I7fa40455315325f75d0fb754fc23620f12fd634a
Reviewed-on: http://gerrit.openafs.org/4512
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-21 22:29:41 -07:00
Andrew Deason
bdb08420ba Revert "aklog: Return token when performing 524 conversion"
This reverts commit 65186d8390, which
was mistakenly merged to the wrong branch.

Change-Id: I3b2bf874cca15b4248978575213eae21ece2207f
Reviewed-on: http://gerrit.openafs.org/4519
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-21 21:49:35 -07:00
Andrew Deason
1b37cc8942 libafs: Initialize _settok_tokenCell primary flag
Always set the *primary flag to something in _settok_tokenCell.
Otherwise, the lag may be unset, as it is not required to be
initialized by all callers.

Change-Id: I78c775f8cd70f74f6a344094a6a677cbc74f3281
Reviewed-on: http://gerrit.openafs.org/4521
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-21 21:49:20 -07:00
Jeffrey Altman
ce77b0e572 Windows: change thyper to offset and fix error
In cm_ReadMountPoint and cm_HandleLink the variable 'thyper'
represets the 'offset' at which cm_GetData should fetch data.
Rename 'thyper' to 'offset' and fix a coding error caused by
misinterpreting the variable purpose.

Change-Id: If60669d850f4bfba2aae6e4aaf642f7ec6f920b2
Reviewed-on: http://gerrit.openafs.org/4501
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-04-21 18:17:48 -07:00
Simon Wilkinson
b178496063 Darwin CM: afs_IsDynrootFid takes a fid ...
... not a vcache.

Change-Id: Iff1f33f32ec0d208ff80a4c7bcc1ce1b3dccd9a3
Reviewed-on: http://gerrit.openafs.org/4511
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-21 13:17:59 -07:00
Andrew Deason
65186d8390 aklog: Return token when performing 524 conversion
We weren't actually returning a token and username from
rxkad_get_converted_token. Do so.

This is a 1.6-specific change. This issue was fixed on master when
aklog was changed to use the new SetTokenEx family of pioctls in
commit 53837416cb.

Change-Id: I4c85c03be00c45fdae5657554dcd85b3a6301b23
Reviewed-on: http://gerrit.openafs.org/4513
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-21 13:09:54 -07:00
Derrick Brashear
7ff99d1eee afsio: fix objdir build
use the relative path for afsio.c
use objdir path for generated files

Change-Id: I3b16108eacd949bcb1ddc2224961e87bce9999bb
Reviewed-on: http://gerrit.openafs.org/4508
Reviewed-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Tested-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-21 07:51:57 -07:00
Marc Dionne
fe8897015c Unused variable warning fixes
Fix several simple cases of unused variables.

Change-Id: I6e61ea625c6bcef7b0bc70c61909f22d1f8dd9a7
Reviewed-on: http://gerrit.openafs.org/4504
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-20 21:26:00 -07:00
Jonathan A. Kollasch
8588f4a9cc Allocate system type ID numbers for i386_nbsd60 and amd64_nbsd60
Change-Id: I1860fbacb0d41a3d13b73b4248b920e17b731184
Reviewed-on: http://gerrit.openafs.org/4506
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-20 21:25:29 -07:00
Jonathan A. Kollasch
507c481a0a Make whitespace consistent in NetBSD system type ID number section
Change-Id: If3835225bb85fd7469cd817dc48bc52f841081b7
Reviewed-on: http://gerrit.openafs.org/4505
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-20 21:25:07 -07:00
Marc Dionne
c721bff503 adminutil: parallel build fixes
Rearrange the Makefile to make it more parallel build proof.
Add some dependencies on the header files, and avoid rules
with 2 targets.

Change-Id: I267f25504137d58dd1a335eccb7c9b138a7c66ab
Reviewed-on: http://gerrit.openafs.org/4497
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-19 19:18:23 -07:00
Simon Wilkinson
a1eed135d2 FreeBSD: Don't ignore Makefile
The file src/packaging/FreeBSD/Makefile is part of the repository,
and so shouldn't be excluded by .gitignore (the exclusion is inherited
from the top level). So, restore it with .gitignore in this directory.

Change-Id: I841e67aba707fd7193ba0d15a11f969ffd55829c
Reviewed-on: http://gerrit.openafs.org/4495
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-04-19 08:26:28 -07:00
Derrick Brashear
f4ae9ef653 libafscp: add lock support
add support for locking as well as for tracking callbacks so a
lock break can be detected

Change-Id: Iff36c6528fc55cf250bc27d49af80123d7ecece3
Reviewed-on: http://gerrit.openafs.org/4476
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-04-19 08:08:38 -07:00
Jeffrey Altman
04950bec1b Windows: avoid race when writing mountPointString
cm_GetData() drops the cm_scache_t rw lock which permits other
threads to access the data while it is in an inconsistent state.
Avoid the race by using a stack allocated temporary buffer to
receive the data from cm_GetData().  Only copy the data into
the mountPointStringp buffer under the rwlock.

Change-Id: Ica853976b1094be1087e49c22d878f8ae7fca03a
Reviewed-on: http://gerrit.openafs.org/4498
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-04-19 07:03:10 -07:00
Stephan Wiesand
1105d63ddf make afsdump_scan get ACLs right
This makes afsdump_scan get the ACLs right on little endian systems.
It also corrects and slightly beautifies some output (indentation,
cut&paste error for negative ACL label).

Change-Id: I5a120630158e56fe8b55500ff9db70dded5fe0d9
Reviewed-on: http://gerrit.openafs.org/4494
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-04-18 11:34:04 -07:00
Derrick Brashear
9f2fc1c707 roken header dependencies mean we need roken
and probably more than just these but let's start here.

Change-Id: Id0f174a84ecb8ffd1fbdcade6f139fc78c4b99e2
Reviewed-on: http://gerrit.openafs.org/4492
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-04-18 11:01:13 -07:00
Andrew Deason
fa6339d7ff auth: Set correct flags in token_extractRxkad
The flags that token_extractRxkad returns are flags that are passed to
ktc_SetToken, not the flags that are passed directly to the PSetTokens
pioctl. So, we should be setting AFS_SETTOK_SETPAG, which is
interpreted by ktc_SetToken.

Change-Id: Id63ba4d5874e43c8d1f02817bf33975516a974be
Reviewed-on: http://gerrit.openafs.org/4480
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-04-18 05:17:26 -07:00
Derrick Brashear
03edae9cc5 libafscp: fix kerberos bits
get the correct afs principal. this entire blob will go away
and be replaced by rxgk token getting, but deal for now.

Change-Id: I8e63a5de74efa6c2eeec4c67b4d14d1f69396e41
Reviewed-on: http://gerrit.openafs.org/4475
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-17 05:05:03 -07:00
Simon Wilkinson
9bf314d90a libafs: Remove afs_write duplication
The afs_write() code for memory and disk cache suffered from exactly
the same duplication problems as the afs_read() code.

Apply a similar fix - unify afs_UFSWrite and afs_MemWrite into a single
afs_write function, place the UFS specific code into afs_UFSWriteUIO,
and make use of the existing afs_MemWriteUIO for the memcache case.

Change-Id: I074e1f56597e5cf04d13a45bcda5ad5fedb6377f
Reviewed-on: http://gerrit.openafs.org/4465
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-16 13:49:57 -07:00
Derrick Brashear
25a46780fc libafscp fixes
fix callback package in libafscp to track addresses correctly (use
correct byte order)

Change-Id: I58207492389869591e38e582f332c910cd53f169
Reviewed-on: http://gerrit.openafs.org/4474
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-16 13:27:42 -07:00
Chaz Chandler
94d44d59e3 afsio: rewrite using libafscp
afsio is a utility for file transfer to and from AFS file space
without the help of the AFS client/cache manager.  Using libafscp,
this (partially rewritten) version of afsio is able to accomplish
(1) authenticated access to an AFS path or FID (an existing
KerberosV ticket is required), (2) fall back on unauthenticated
("anonymous") access if authentication (token acquisition) fails,
and (3) work independtly of the AFS cache manager (afsd need not
be running, though CellServDB and ThisCell are currently required).

issues:
1) libvldbint and libafsint are not compiled pthreaded. we link in
what we need. this should be changed when we are all-pthreaded.
2) venus is not a pthreaded-directory otherwise. same deal:
in an all-pthreaded universe, undo the bodge that we do here.
3) venus is not an all-krb5 directory either. slight ick.

Change-Id: I946e6eef58ac77c6fb97be256c4c564188201262
Reviewed-on: http://gerrit.openafs.org/4381
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-16 13:27:29 -07:00
Andrew Deason
44f13d8feb RX: Remove allocation counters
Remove the osi_alloccnt and osi_allocsize counters, and the associated
osi_alloc_mutex. These counters are pretty useless since nothing looks
at them, and their use of a mutex requires Rx to be initialized before
XDR can be used. Removing them lifts this restriction.

Change-Id: I22fa1335b6d34675d37cca41a2c393b9c20d3d24
Reviewed-on: http://gerrit.openafs.org/4478
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-15 15:07:22 -07:00
Andrew Deason
21578144e0 Suppress cmp component version error messages
When we use cmp to determine whether to replace
AFS_component_version_number.c, suppress stderr in addition to stdout,
to slightly reduce output during the build.

Change-Id: I4f687ce5ffff316d8f9806181bccf1c28d218932
Reviewed-on: http://gerrit.openafs.org/4471
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-04-15 14:37:33 -07:00
Andrew Deason
27d08416af AIX51: Fix PAGs
On AIX 5.1 and later, we set a process' PAG by using the AIX PAG
mechanism (and not by group ids), but we were determining what PAG a
process was in by the group list. Instead use the PAG identifier.

This effectively reverts 277c37f48c, but
it puts the kcred_getpag call in a different place that makes more
sense in the current PAG code organization.

Change-Id: If9fe621060a06664718a00acff91dea66760d5c2
Reviewed-on: http://gerrit.openafs.org/4479
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-15 14:28:54 -07:00
Andrew Deason
6c0d77b905 tsm41: Reformat function definitions
Make function definitions consistent with the formatting in the rest
of the tree.

Change-Id: Ifbccc02739f6fbc111e061397538a903b6f2289a
Reviewed-on: http://gerrit.openafs.org/4477
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-15 14:23:56 -07:00
Andrew Deason
78d1f8d883 pam: Use PAM_CONST more often
Some callers of pam_get_item et al were just casting their argument to
a const void **. Some PAM implementations (Linux) want a const void**,
but others (Solaris) do not. Use the PAM_CONST symbol already defined
by autoconf to declare or cast the relevant variable const or not as
appropriate.

Change-Id: I81c7863797396eb146b78ffbb2586e4f3a1e854e
Reviewed-on: http://gerrit.openafs.org/4470
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-15 10:13:17 -07:00
Andrew Deason
fbb4c6115b pam: Check for null upwd from getpwnam_r
The POSIX getpwnam_r can yield a NULL struct passwd pointer even when
the returned error code is 0 (in particular, when the requested entry
is not found). Just add a check for a null upwd to make sure we don't
dereference a NULL pointer.

Change-Id: I00e8d6c53e8228f468c984010695b798f5dcf999
Reviewed-on: http://gerrit.openafs.org/4469
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-15 10:13:01 -07:00
Andrew Deason
a7d4fbd36a pam: Use POSIX getpwnam_r on Solaris
_POSIX_PTHREAD_SEMANTICS is now always defined for Solaris, which
means we get a POSIX-conforming getpwnam_r, which takes 5 arguments.
So, add Solaris to the list of platforms that use a POSIX getpwnam_r.

Change-Id: I1ad12420f56cf39816d94a8e9c9740436100134b
Reviewed-on: http://gerrit.openafs.org/4468
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-15 10:12:06 -07:00
Andrew Deason
f26f7ed226 vfsck: Fix roken fallout
Including roken.h in vfsck sources pulls in some more modern headers
that vfsck code isn't used to. Accommodate:

 - Prevent roken.h from pulling in dirent.h so we don't conflict with
   the old-style directory defines for HP-UX. Also move the inclusion
   of the old-style directory defines to before roken.h, so we have
   the directory types defined in roken.h.

 - Remove some prototypes so the don't conflict with the prototypes in
   system headers.

 - Remove a couple of bizarre vprintf invocations, as they conflict
   with the actual vprintf definitions.

Change-Id: Ifd7cd2544e75ed49b93ab491c4acadcb18528315
Reviewed-on: http://gerrit.openafs.org/4472
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-15 10:11:15 -07:00
Derrick Brashear
f4776f0a4d kernel upcall rx env should shut down event daemon
also shut down event daemon in upcall environment

Change-Id: Ifd40754fc34bc8ea6f844867d1775a8b8b7a5044
Reviewed-on: http://gerrit.openafs.org/4473
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-04-15 09:37:45 -07:00
Andrew Deason
80df5096e7 Fix some configure header prereqs
On at least Solaris, the configure tests for netinet/if_ether.h and
security/pam_modules.h issued warnings because they existed but were
not compilable. Perform the tests with the prerequisite headers of
net/if.h and security/pam_appl.h, respectively, so autoconf will stop
yelling at us.

Change-Id: I05d637784954c10af468b6065acd78139fc45245
Reviewed-on: http://gerrit.openafs.org/4467
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-13 11:04:22 -07:00
Andrew Deason
8180f9abbf RX: Include sys/file.h for rx_lwp.c
rx_lwp.c uses FNDELAY, which requires sys/file.h on at least Solaris.
So, include it.

Change-Id: Ida652a3c9bfccb120a67f0c5d4f71537a11fa00f
Reviewed-on: http://gerrit.openafs.org/4466
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-13 10:50:15 -07:00
Jeffrey Altman
340a2c639a asetkey: permit des-cbc-md5 and des-cbc-md4 keys
A DES key is a DES key.  Permit importing CRC, MD5 and MD4
when using non-MIT keytab support.

Add a special error message that specifies what principal
name, kvno, and enctype were being searched for when the
error is KRB5_KT_NOTFOUND.

Change-Id: I7d3b5fbc41db5e5e91278854ce52842720e6b5d3
Reviewed-on: http://gerrit.openafs.org/4458
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-13 10:03:27 -07:00
Simon Wilkinson
e56b1f79b9 libafs: Remove unecessary parameters to afs_read
We were providing additional buffer and length parameters to
afs_read which are now unused, as the necessary information is
contained within the iovec. Just remove these parameters to tidy the
code up a bit.

Change-Id: I2ca80b20e253e0d54be759e6d504961958b40e6e
Reviewed-on: http://gerrit.openafs.org/4464
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-13 10:02:37 -07:00
Simon Wilkinson
fd620283a9 libafs: Remove afs_read duplication
The disk cache and memcache afs_read functions are effectively
duplicates of each other. Abstract out the common code into a generic
afs_read() function, and put the cache type specific code into
UFSReadUIO (there is already a MemReadUIO which contains the code
necessary for the memcache).

Change-Id: Ic66242fa4695a146ac874a82bd48a7c1f1f412a6
Reviewed-on: http://gerrit.openafs.org/4463
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-13 10:02:01 -07:00
Simon Wilkinson
763ec5250d fs: Abstract out code to get the last component
fs.c contained two identical copies of code to parse a path, resolve
any symbolic links in that path, and return the directory and basename.

Abstract this code out into a single function, rather than maintaining
two separate copies of it.

Change-Id: Id9fc835506f90bae2fc1f0db18c640bf28f0d39d
Reviewed-on: http://gerrit.openafs.org/4462
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-04-13 10:01:51 -07:00
Simon Wilkinson
b5bd42efb6 libuafs: Add afsd symlink to the clean rules
The libuafs Makefile creates a link to afsd in the libuafs build
directory. So, have the clean rule tidy it up after us.

Change-Id: I24a3be34bc04dfa7c9db9be2ace4ab32f3f5d5f7
Reviewed-on: http://gerrit.openafs.org/4461
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-12 15:52:13 -07:00
Simon Wilkinson
b59da7674e viced: Remove logging duplication
In lots of places in the fileserver we were doing
    ViceLog(0, (x))
    osi_Panic(x)

Remove this duplication by creating a new macro, ViceLogThenPanic,
which does both of these in one fell swoop.

Change-Id: Icea349d60298eba1cca4a45db790f21ba3e7b3c7
Reviewed-on: http://gerrit.openafs.org/4455
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-04-12 15:51:56 -07:00
Ken Dreyer
d5ded9afa1 fix manpage for udebug -servers
The proper option to udebug is "-server", not "-servers". Fix the manpage to line up with the binary.

Change-Id: I3ec83c028dcefb827bd05666401e4a667e29fb6a
Reviewed-on: http://gerrit.openafs.org/4457
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-11 17:44:09 -07:00
Jeffrey Altman
81e77fa923 roken: export tsearch, tdelete, tfind on windows
Change-Id: Ic862b65a8c1b37bc3ca3da8db77ba76fe8879296
Reviewed-on: http://gerrit.openafs.org/4456
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-11 08:23:42 -07:00
Derrick Brashear
d534981073 afscp: build for windows
attempt windows support for afscp

Change-Id: I61cb1349466f24558b320bc40e3fae42ce654810
Reviewed-on: http://gerrit.openafs.org/4424
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-11 08:23:07 -07:00
Andrew Deason
de0c72bf7c DAFS: Request salvage on detach for volser
When the volserver notices that a volume needs salvaging, mark
V_needsSalvaged. So when we VDetachVolume the volume, we can then just
request the salvage in the volume package.

Fix the VolClone salvaging code to do this as well, instead of using
the vol-private VRequestSalvage_r interface.

Change-Id: I9d48e4ea18fe4e3e2e1dc38593db4beb5ad79a84
Reviewed-on: http://gerrit.openafs.org/4452
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-10 20:50:40 -07:00
Andrew Deason
399655e3df volser: Avoid assert on ViceCreateRoot failure
If IH_CREATE fails in ViceCreateRoot, it may just be due to an on-disk
inconsistency. So, don't assert, but just return an error and detach
the volume.

Change-Id: I8acacff8c858b0d27234265fee5d7b49ebab5101
Reviewed-on: http://gerrit.openafs.org/4444
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-04-10 20:49:41 -07:00