libusd can contain a reference to AssertionFailed, which is in
libafsrpc. So link libafsrpc after libusd, so it gets resolved when
building e.g. vos.
Change-Id: I30140b5ede5afa2495f4c2b7b7edbbd878bf6dca
Reviewed-on: http://gerrit.openafs.org/3477
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The caller expects identity to be populated when we return 1. So for
localauth, give it an identity. Don't set uname, and in fact, move the
uname declaration so that it is clear that it's not used for most of
this function.
Change-Id: I4dcd466b25f578362290ed2fc65b5bd6e23a91e4
Reviewed-on: http://gerrit.openafs.org/3475
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Add a #define for "<NoAuth>" and related values. Use them.
Change-Id: I0e1d374403a0ad20be6a2839e37a5894b15446cd
Reviewed-on: http://gerrit.openafs.org/3482
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
all the support code handles this only for DAFS. the
case statement should treat as unknown if it is.
Change-Id: I14816875b7a0b172d6f6fc9893cb0add90503111
Reviewed-on: http://gerrit.openafs.org/3485
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Right before shutdown, go through all of our vcaches and flush them,
freeing any pages associated with the vcaches. If we don't do this,
pages associated with our vcaches may still be around after we
shutdown and the module is unloaded, causing a panic when the kernel
tries to deference the page's vnode.
Abstract out afs_freevfs() following the gafs_foo/afs_foo convention
from the vnode ops, since we're calling this in two different places.
Change-Id: I64b88799acce3a55648ec94b53ed63319cd04698
Reviewed-on: http://gerrit.openafs.org/3472
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
If FindIndex is provided a server address and entry has a valid
uuid, obtain the uuid for 'server' and use that search for a
matching entry.
This modification is necessary in order to permit operations
against multi-homed servers in split horizon DNS configurations.
Change-Id: I8929c500eb4f71c8cf0aa8328bc3b3a0345368aa
Reviewed-on: http://gerrit.openafs.org/3468
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
if we didn't get an identity back, don't try to use it.
Change-Id: Iff6069b9231c3adc3f74cbf7fff4dffcfc289cd3
Reviewed-on: http://gerrit.openafs.org/3471
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
No pioctl yet but implement enough so that GetTokenEx and
ListTokensEx can provide results.
Change-Id: I261f21db6e10502602aa0cb453b24632fdefd25c
Reviewed-on: http://gerrit.openafs.org/3469
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Check that the path is in afs before testing to see
if it is a symlink
Change-Id: If22331595b675bf9347d832eca70edfc6d1d0365
Reviewed-on: http://gerrit.openafs.org/3467
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Always define xdr_foo to afs_xdr_foo when we're in the kernel.
Otherwise, we can get warnings that our xdr_foo symbols are colliding
with the xdr_foo symbols from the kernel.
Change-Id: I74b2cdd24f01734c2c36506bb5bab0b386d46094
Reviewed-on: http://gerrit.openafs.org/3465
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Fix some macros to eliminate unreached trailing empty statements (such
as: "{code = foo; goto error;};"), and other oddities causing
"statement not reached" warnings. Also eliminate a couple of code
blocks that were never reached.
Change-Id: Iac626976268e13f5ef05f379ad1c9b5437c57f86
Reviewed-on: http://gerrit.openafs.org/3368
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Make sure we go through the error recovery code when we can't create a
stream, instead of just returning without cleaning up.
Change-Id: Ie3a5be9a81b36624a7d49958233c42e82a0e4bfa
Reviewed-on: http://gerrit.openafs.org/3466
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
libubik_pthread.a requires libafsauthent.a, since we make use of
afsconf_* functions. Add libafsauthent to LIBS and make tubik depend
on it.
Remove linking to liblwp while we're here, as we should not be using
any LWP code.
Change-Id: Ie028fedfbc3e7a8a78dc69a2c38be99eb72602da
Reviewed-on: http://gerrit.openafs.org/3464
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
We never export a function called 'daemon'. We only export a function
called rk_daemon, and the define daemon to rk_daemon. So, only include
rk_daemon in the map file, since that is the only symbol that will
appear.
Change-Id: Ib0f5ba88ba6d8bdefe3191050bc9e9e36f1b9134
Reviewed-on: http://gerrit.openafs.org/3463
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Include atomic.h so we get atomic_* prototypes, pass atomic->var in
rx_atomic_sub, and pass unsigned int*s to the atomic_* functions.
Change-Id: Ic8d745bc1726c850bd15d38702163e92587bb0a5
Reviewed-on: http://gerrit.openafs.org/3462
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
When we call InlineBulkStatus or BulkStatus, we currently do not touch
tvcp->callback for any of the vcaches before making the call. This can
cause us to not notice an InitCallBackState issued by the fileserver
before the BulkStatus call returns, since the InitCallBackState
handler looks at tvcp->callback to determine what vcaches to clear
callbacks for. In turn, this can cause us to think we have a callback
agreement with the fileserver on one of the BulkStatus'd files, when
the fileserver does not actually have such a callback agreement.
So, set tvcp->callback to the server we are contacting, so if we get
an InitCallBackState call from that fileserver, the CBulkFetching
state will be cleared, and we will correctly discard the callback
information for that vcache.
Change-Id: Ib8790c8f9621d7a9da12588ea6115f9cb3ff9022
Reviewed-on: http://gerrit.openafs.org/2548
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
we happily go to the "good dentry" path and exit, leaking the
result of dget_parent, if parent is globalVp. Let's not
Change-Id: I3848a1aa2611d17ba08e04b3f33f22623645d233
Reviewed-on: http://gerrit.openafs.org/3448
Reviewed-by: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/WINNT/talocale has not been built for UNICODE in a long time.
Fix it.
Change-Id: Ia8b182b711838e2d6592f9040d2173f5977f9cfd
Reviewed-on: http://gerrit.openafs.org/3439
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Add link.ico and mount.ico Windows icon files.
Use these images as overlays instead of extracting an image
from shell32.dll which is a bad idea. See
Change-Id: I624f959229a91329507aec5ff61045c49d296401
http://blogs.msdn.com/b/oldnewthing/archive/2005/10/26/485133.aspx
Reviewed-on: http://gerrit.openafs.org/3445
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Make the context menu handler also work for folder backgrounds
and on Win7 for library folder backgrounds
For folder backgrounds, the shell passes the PIDL of the folder
instead of a data object. Extract the path from that PIDL. Also
extended the register function of the dll to add the required
registry keys.
Change-Id: I8928efd25058dced3820478a2858ce20336b4301
Reviewed-on: http://gerrit.openafs.org/3443
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
If the file server responds to RXAFS_GetCapabilities with
RXGEN_OPCODE the server is up and there is no need to fallback to
RXAFS_GetTime. Remove the code that performs the extra work.
Change-Id: Ieb0d1cce6f356a8988f2464227dec9b6cd9e6fcf
Reviewed-on: http://gerrit.openafs.org/3419
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>
Just ignore some files created during the build.
Change-Id: Ifb276b2a71fe8e58517605584e918d990b8f2f5d
Reviewed-on: http://gerrit.openafs.org/3435
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
When the kernel does not have the zero_user_segments function, we
define it ourselves. Also define the zero_user_segment function, since
we use it, and a kernel lacking zero_user_segments will also lack
zero_user_segment.
Change-Id: I5c786d2af27227793a7a2768d1af76ccd2d6a415
Reviewed-on: http://gerrit.openafs.org/3432
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
When building libafs, the make file variable COMMON_INCLUDE is
assigned a value in two places: Makefile.common.in and
MakefileProto.OBSD.in. The assignment in the latter place is both
wrong and unnecessary. Remove it.
Change-Id: Ie322f01b023898d4f246243ee3d196aa714147df
Reviewed-on: http://gerrit.openafs.org/3430
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The netinet/in.h header file requires the inclusion of sys/types.h
(or some portion thereof). Most systems include it implicitly
within netinet/in.h. Some, such as OpenBSD, do not. In kopenafs.c,
sys/types.h is included after netinet/in.h which is fine in most
cases but means that, as a result, it will not compile on OpenBSD.
Moving sys/types.h before netinet/in.h solves this problem (and
should cause no problems on any other system).
Change-Id: Ifc3295f3eb4f0b2b4718d0b2aa6dcbb2b06da8df
Reviewed-on: http://gerrit.openafs.org/3429
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
if we get a negative (rx) error, it means the server is down,
*except* for RXGEN_OPCODE. make this handling consistent
Change-Id: I8459ec49ca311dc336aed8da7b106fe0f647fc32
Reviewed-on: http://gerrit.openafs.org/3407
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Implements a connection pool for Rx client connections with the
same credentials. The code trivially avoids the limit on Rx
call channels, without touching Rx directly. The conn call limit
is known to be hit in cache-bypass, and probably other use cases,
so there is an incentive to address it potentially sooner than
larger Rx changes are ready to merge.
Upgrade to exclusive lock before calling find_preferred_connection.
Unset trace option. Fix a warning around modular increment of
select_index, we'll go with the change suggested by Marc, I don't
see a real need to save the value mod CVEC_LEN.
Change-Id: I956aa22cd52b1c43187c7e03230e36820ba11c4d
Change-Id: Ie5f936ba912bcfe0544dbc1d035bb74e5ddc50f8
Reviewed-on: http://gerrit.openafs.org/2216
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
when we dole out a vcache, count it.
Change-Id: Id0f9e20b4b8a9de6ee83dcb383c3a152f6b733e6
Reviewed-on: http://gerrit.openafs.org/3423
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
previously both root and reclaim could end up leaking refs. fix it.
Change-Id: Ib3c9dab2f31b988a2887821f5192ff1fad0e732c
Reviewed-on: http://gerrit.openafs.org/3424
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
fix quoting to avoid substing during configure, instead let it happen in make
Change-Id: I31ec2e7f15ca14f337b4f3f43dd1ef5c0b423756
Reviewed-on: http://gerrit.openafs.org/3420
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
because of how we configure afsdb, we can end up needing libresolv
but not configuring it for threaded code. link it in. at the same time,
make sure the link can succeed on e.g. macos
Change-Id: Ibf2445638f36d543a0df8be1eaccfc0c31b72ae1
Reviewed-on: http://gerrit.openafs.org/3408
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The osi_PostPopulateVCache() routine in the OpenBSD version of
osi_vcache.c tries to use the non-existent variable "vc" instead
of "avc". This fixes it.
Change-Id: Idac09739d36e253518fbdbd600ab43c9ea87da3a
Reviewed-on: http://gerrit.openafs.org/3418
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The code for osi_VM_FlushPages() in osi_vm.c for OpenBSD incorrectly
tries to access field "m.Length" in the vcache structure "avc"
instead of "f.m.Length".
Change-Id: I44ac0bbbd0e6279c54be185fbf9514b23c65017b
Reviewed-on: http://gerrit.openafs.org/3417
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
We had previously been waiting for the SO_ISDISCONNECTED flag
to show up in the so_state field, but the flags are not really
used for stateless protocols such as UDP, and that flag never
shows up. Even with a full three-second wait, the rxk_Listener
sometimes still failed to fully terminate, preventing the reuse
of the rx port for a restarted afsd.
Copy from Solaris and loop until rxk_ListenerPid is zero, doing
bogus one-byte NetSends in the body of the loop.
Change-Id: I6a5ad4509549fa64c551af642ef5867602b182c0
Reviewed-on: http://gerrit.openafs.org/3391
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit updates the code imported from heimdal to
42f9c644cf00be752f09d85a9664bf2e3502101c (switch-from-svn-to-git-1962-g42f9c64)
Upstream changes are:
Asanka C. Herath (9):
Windows: Registry based configuration
Rename get_entry() -> _krb5_config_get_entry()
Deal with quoted strings when reading lists of config strings
Add missing export and calling convention annotations
Windows: Build and export localtime_r
Windows: Older Windows SDKs need <winsock2.h>
More compatibility macros
Increase KBR5_BUFSIZ to 2048 and use it in config_file.c
Deal with backslash escaped quotes
Love Hornquist Astrand (3):
provide symbol renameing for sha512 and sha384
less exit with failures
add random abstraction
Change-Id: I495fa8e9c1c037d6dee191279c1155a4ec6be945
Reviewed-on: http://gerrit.openafs.org/3400
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
A forthcoming Heimdal update will require that KRB5_BUFSIZ be
defined in order to use its config parsing code. Define it in
our hacky krb5_locl.h
Change-Id: Ieda8df8f31a759927fade44f9196e7411f4a0a59
Reviewed-on: http://gerrit.openafs.org/3399
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Add roken's mkstemp to the build on all platforms, either through
configure (Unix) or explicitly (Windows). Change all callers so
that mkstemp is used unconditionally, rather than falling back
to more risky alternatives.
This is based on original change from Russ Allbery submitted as
http://gerrit.openafs.org/2146
Change-Id: Ia1def41e438e6517b3e7cd5790df3c99eddb8ef6
Reviewed-on: http://gerrit.openafs.org/3398
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
With OpenBSD 4.7, the ia_subnet and ia_subnetmask fields have been removed
from the in_ifaddr structure as part of a cleanup that considers them
unnecessary. Thus, the version of afsi_SetServerIPRank() that OpenBSD was
using no longer compiles. On the other hand, the Darwin version of this
routine seems suited to OpenBSD's needs since it doesn't use those fields
so we'll use that version for OpenBSD 4.7 and above instead.
Change-Id: I27333056378a023e175bddeb637288fc6d1b6e88
Reviewed-on: http://gerrit.openafs.org/3405
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The value in sin->sin_addr.s_addr that's assigned to myDstaddr in the
Darwin version of afsi_SetServerIPRank() is in network byte order but
really needs to be in host byte order.
Note: This patch assumes that change I66f5c790d8c55b359e3550b6d71f3abe040a2820
has been previously installed. The patch fails otherwise.
Change-Id: I3078da1efb94f87f84dbe357f3272d908818256b
Reviewed-on: http://gerrit.openafs.org/3402
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The macros rx_ifaddr_address, rx_ifaddr_netmask, and rx_ifaddr_dstaddress
all expand to a call to memcpy() which returns the destination address as
its return value. The test in the DARWIN version of afsi_SetServerIPRank()
for completion when using this macro, however, seems to assume that success
returns zero, which is wrong and results in myAddr, subnetmask, and
myDstaddr always being set to zero. This patch corrects this behaviour.
Change-Id: I66f5c790d8c55b359e3550b6d71f3abe040a2820
Reviewed-on: http://gerrit.openafs.org/3401
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>