Reformat the loopback tests to match our house style - 4 spaces for
first indent, a tab for the second, and so on, opening brace of a
function on a newline, spaces around assignments, and so on.
Change-Id: I54f168ca143e7ff46c9d82289331b8314849f848
Reviewed-on: http://gerrit.openafs.org/8229
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Remove the unused h_errno extern, which in turn removes the need
for disabling strict prototype warnings in the Makefile
Use roken.h, instead of hardcoding system libraries
Change-Id: Ie654c77ff60ed14fc3b659fa3eb527535be71164
Reviewed-on: http://gerrit.openafs.org/8228
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
An hlist is not circular, and the end is marked by a NULL next
pointer.
Change-Id: Iec7ad7e3e7ee989d548233b045aa8def1ebfb1dc
Reviewed-on: http://gerrit.openafs.org/8233
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
One caller of VRequestSalvage_r in attach2 was not passing the
VOL_SALVAGE_NO_OFFLINE flag. This really should be passed for every
place that manually sets vp->nUsers = 0, since then the VPutVolume_r
handlers will never fire.
Change-Id: I088d93a6c598a4d636224f4cf4c0d89454efcca8
Reviewed-on: http://gerrit.openafs.org/8203
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Currently we echo a string to syscall.lo to generate it. However,
'echo' is often a shell builtin, and some shells (such as bash) do not
interpret escape codes like \n unless the -e option is given. So, this
results in syscall.lo containing a single commented line, which
results in .libs/libafsrpc_sys.a not getting created, which later on
causes errors.
Instead, just split the syscall.lo generation into separate echo
invocations, to make sure we work everywhere.
Change-Id: I8a6ed42a0837086de604be0936d830f0f4558ebf
Reviewed-on: http://gerrit.openafs.org/8202
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
in order that this can potentially be extracted entirely
to a platform-specific file, (and possibly dbus-equivalents
inserted also) consolidate the macos system events handling code
Change-Id: I8fc4a96dc2590778a13f27610b383ee35626871e
Reviewed-on: http://gerrit.openafs.org/8201
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Advisory file locks for RO volumes don't make a lot of sense, since
there are no possible writes to worry about. The fileserver already
does not track these, so don't even bother processing them in the
client.
Change-Id: Ie2a20d2f7af67799cfb8d30e72aa3e52a1ecc2d5
Reviewed-on: http://gerrit.openafs.org/8197
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
provide a way to run native rxgen, config and compile_et
Change-Id: I9d1a2b4a1d4100fdc4a042005586e8fc40f39f7b
Reviewed-on: http://gerrit.openafs.org/8199
Tested-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Update makefiles to have 'make test' and 'make check' use the
_nolibafs build version, since there are no tests that (currently)
require the AFS kernel module to be built.
Clean up fuse test copyright notice, Alphabetize configure.ac
Change-Id: Icc95dd3393cd66f0d04fa5f6e8f806db60ca031e
Reviewed-on: http://gerrit.openafs.org/8135
Reviewed-by: Troy Benjegerdes <hozer-gerrit@hozed.org>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
all of our helper tools should be configured in one place,
so a cross compile can override them
Change-Id: I35044832257fa3389504f79207aa423e39d1ad4a
Reviewed-on: http://gerrit.openafs.org/8198
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
afs_lockctl has common cleanup code in the 'done' label. Use it here,
instead of trying to duplicate it.
Currently this code path appears to not be dropping the discon lock,
which this rectifies.
Change-Id: I136a78bc3235454db7e3d69bb79b0061cfcab265
Reviewed-on: http://gerrit.openafs.org/8196
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Convert struct bnode to use the common linked list code from opr.
bnode_Deactivate() was converted but is unused by the code and isn't
tested.
Change-Id: I0edec453f15cf19e82088e3d361483cc5833f897
Reviewed-on: http://gerrit.openafs.org/8168
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Convert struct bnode_proc to use the common linked list code from opr.
Change-Id: I30753ad10387b23509be0831d378772049f4be9d
Reviewed-on: http://gerrit.openafs.org/8167
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Convert struct bnode_type to use the common linked list code from opr.
Change-Id: I21329aff81a91a79a1fcf525f4fdd3a22b33ec92
Reviewed-on: http://gerrit.openafs.org/8166
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Move the bosserver specific parts of bnode.p.h into bnode_internal.h
so that inclusion of bnode.h doesn't expose bosserver's internals.
Change-Id: Id58714507211331a57c36eb71c1c3937fff0dd2a
Reviewed-on: http://gerrit.openafs.org/8169
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
For Symlinks, always set the Reparse Point attribute and
set the Directory attribute if the target is a directory.
Do not return the file attributes of the target.
Change-Id: I72dcde912c998e1ab3eea45426d019314e10e740
Reviewed-on: http://gerrit.openafs.org/8171
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Comparisons of the behavior of cmd.exe, powershell.exe, and tcc.exe
with regards to directory enumeration show that when Symlink file
information is returned that the "reparse point" data should be
reported along with whether or not the target is a directory.
For mount points, the reparse point file information should always
be returned and the type should always be directory.
The target timestamps, file sizes, etc. should never be returned.
Change-Id: I0f899229061a282d0d218155407ffc4ab62ad377
Reviewed-on: http://gerrit.openafs.org/8170
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
The process type check in afsredir.sys was performed during the
Process Creation callback which is processed in the context of the
parent process which might not be the same type (32-bit or 64-bit)
as the process being created.
Change-Id: I6ae79a6dacf434a986c7bb0135b2238fcfeeb0cd
Reviewed-on: http://gerrit.openafs.org/8165
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
In commit 19f1e0f7cf strdup()
was replaced by xdr_alloc() and memcpy(). Unfortunately,
the patch was wrong and the pointer to which the result of
xdr_alloc() was assigned was overwritten with zero.
Change-Id: I0a9e6c03d67e2a1c811e84808fbbdd39f782ba87
Reviewed-on: http://gerrit.openafs.org/8162
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
All callers to AFSDoExtentsMapRegion() hold the ExtentsResource
so there is no need to obtain it again within the function. Instead
add an ASSERT to confirm that the resource is held.
Change-Id: Id34a3d650062d6e519a66732d248c136a92e4be3
Reviewed-on: http://gerrit.openafs.org/8161
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
The RDR_ParseIoctlPath and RDR_ParseIoctlPathParent functions
are helper functions within RDRIoctl.cpp. Make them static
and remove them from the header.
Change-Id: I5f3b68f87701e2d8423a01c236c7cb598c3ff743
Reviewed-on: http://gerrit.openafs.org/8160
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
The RDR_IoctlWrite and RDR_IoctlRead functions no longer
use the cm_req_t parameter so remove it.
Change-Id: I1c6f09da9e4a386f79dae1c15b0b2ccdce944d51
Reviewed-on: http://gerrit.openafs.org/8159
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
The cm_req_t structure flags store information related to
the source of the request and whether the process is WOW64 or not.
This information is required for proper pioctl processing. Add
a cm_req_t structure to the RDR_ioctl_t structure and initialize
it in RDR_SetupIoctl() which is called from RDR_PioctlOpen().
Change-Id: I351101f036f63bbb1f0d7b19e9b092b18a3e070e
Reviewed-on: http://gerrit.openafs.org/8158
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
on 64-bit Windows, only 32-bit processes have the WOW64 request
type flag set. Reverse the conditional to permit proper evaluation
of the 64-bit sysname list.
Change-Id: I0bbad7b275b836ecaff73c69afdde08e17f310a7
Reviewed-on: http://gerrit.openafs.org/8147
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Depending on the version of DKMS, the current MAKE[0] variable in the
dkms.conf needs different numbers of backslashes. Commit 81a9a33e
tried to address this by changing the contents of dkms.conf depending
on whether or not we were on Fedora. However, the change occurred in
DKMS 2.2, so if someone running RHEL tries to use a newer DKMS, this
will fail.
So instead of trying to guess at the level of escaping we need, just
avoid needing to escape anything with backslashes. We can quote the
heredoc marker to avoid variable expansion inside the heredoc, we can
use a case statement instead of using backticks and local variables
and such, and we can use single quotes for the outer MAKE assignment.
With this, we should not need any backslashes when writing dkms.conf,
so we should work with any DKMS version.
Change-Id: I5484826c37da13ee383e08bbfeb473aa993e245e
Reviewed-on: http://gerrit.openafs.org/8156
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Casting NULL shouldn't be necessary in most cases. Eliminate this
in favor of shorter lines and consistency. Function pointers, variadic
arguments should still be cast.
Change-Id: Ibcd67378556e45c2b24f7aa85a4d73c72cd88e02
Reviewed-on: http://gerrit.openafs.org/8151
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
StartTime and EndTime are set with gettimeofday(), but are not
used for any calcualtions or statistics, and appear to never have
been used. There are platforms where gettimeofday is expensive,
so remove the variables and the calls.
Change-Id: I9ff8035377227cb07383ffea15b7e04f155e307f
Reviewed-on: http://gerrit.openafs.org/8164
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
instead of reallocing n+1 tokens, we would realloc 1 token
plus N bytes
Change-Id: Idb5a20b5b9becc9d48cb645bbc0bd26459220ccd
Reviewed-on: http://gerrit.openafs.org/8163
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Allow the user to optionally not use encryption (and also allow
user to ensure that encryption is being used).
Change-Id: I3ad590e21f5139654b22c8284ea2634ce902a1b5
Reviewed-on: http://gerrit.openafs.org/8138
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
The following exports are added:
libafsauthent:
afsconf_SetExtendedCellInfo
afsconf_PickClientSecObj
afsconf_SawCell
ka_PrintBytes
ka_KeyIsZero
libafsrpc:
initialize_RXK_error_table
Those functions are referenced by the bos code.
Change-Id: I26898070c8e9dc7cac53f13c49dadf28d58457f4
Reviewed-on: http://gerrit.openafs.org/8154
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Fix a typo for "interface" in the help text for bosserver.
Change-Id: I042fc52e46f50dd00be9fc9bf62525a0f2755dda
Reviewed-on: http://gerrit.openafs.org/8144
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jason Edgecombe <jason@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Make 'wakeup' a static inline function instead of redefining 'wakeup',
so we can use the keyword 'wakeup' elsewhere.
Specifically, 'wakeup' is used in some Linux kernel structures, so
redefining it can confuse some things.
Change-Id: I462903099426b4d2e940e749dd958e03a04f7eb1
Reviewed-on: http://gerrit.openafs.org/8149
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Instead of defining the string 'printf' itself, make printf (and
uprintf) variadic macros. This avoids renaming printf to printk for
things like '__attribute__((format(printf,X,Y)))'.
Note that this is Linux-specific; compilers on other platforms may not
support variadic macros.
This avoids many warnings in the Linux kernel module build if we
include Linux headers after AFS headers.
Change-Id: I2b8ed67f25e93f559535e40680ecab6fe7579e9c
Reviewed-on: http://gerrit.openafs.org/8150
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
For Linux, each object in the kernel module needs to be in only one
module for KBUILD_MODNAME. For AFS_RXERRQ_ENV, we pull in some
additional headers that require KBUILD_MODNAME in rx. So, just add a
few more afspag-specific rx objects.
Change-Id: I80b4a8648141856dffce6e26d5c034dffd8dd5cf
Reviewed-on: http://gerrit.openafs.org/8113
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
This isn't available in userspace; we don't need it, so just don't
include it at all.
This was introduced in 9cd98379. I had thought it fixed a build
failure, but I believe now I just made a mistake during build.
Change-Id: If97d8e3204b27acd053ec021ddd8cd1527dad3c5
Reviewed-on: http://gerrit.openafs.org/8112
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
Much of this code examines errno or WSAGetLastError to determine what
to do. However, some other operations between the actual sendmsg call
and code that examines errno may modify errno. So, save the value of
errno to ensure errno reflects the actual error we got from sendmsg;
this also slightly simplifies some of the logic.
Change-Id: I5a8643fce5d2e29131069743b14805bbc2428805
Reviewed-on: http://gerrit.openafs.org/8110
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This logic is duplicated in a couple of places. Just extract it into
its own little function for easier modification.
Change-Id: Iebcc460698beaee6f1cee4b4fb633b9a10e37213
Reviewed-on: http://gerrit.openafs.org/8109
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
For Solaris 11, the module goes in drv, not fs.
Change-Id: Ib297239b845977eaf7e4cdb3edaba32db6733e12
Reviewed-on: http://gerrit.openafs.org/8152
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Use kindlegen located by the configure stage and test for
kindlegen and dbtoepub before building in all cases.
Change-Id: Ieb46023ddf0725a2c93f96e29f942b71343d53dd
Reviewed-on: http://gerrit.openafs.org/8148
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
In appendix C in the QSG, we give an example 'bos create'. The given
-cmd arguments should have quotes, or they will be interpreted as
individual arguments to 'bos create'.
Change-Id: Ie8b0a69908b3419af303716acce51e8d1e97837b
Reviewed-on: http://gerrit.openafs.org/7930
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
when we catch a control-c, do a clean shutdown
Change-Id: I8da28c28d0a238d3642f65c381c399a883d6d4b1
Reviewed-on: http://gerrit.openafs.org/8141
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>