7654 Commits

Author SHA1 Message Date
Jeffrey Altman
5e8d0a7b5f Windows: Parse Freelance entries and enforce trailing dot but no trailing ws
Make sure that there is a trailing dot and no trailing whitespace
for both Mount Point and Symlink entries read from the Freelance
registry key.

LICENSE MIT

Change-Id: I339d1bd2a8fc3e5f44362c65e872396adf64fdf6
Reviewed-on: http://gerrit.openafs.org/2555
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-08-15 20:55:31 -07:00
Chaz Chandler
e8bb948db1 autoconf detection of label support
acinclude.m4 now has struct label support detection and sets
HAVE_STRUCT_LABEL_SUPPORT in afsconfig.h.  Obviates complicated
ifdefs in various src/afs/ and src/rx/ files.  Must run regen.sh
to generate new configure and afsconfig.h.in, then configure will
detect label support and set afsconfig.h appropriately.  Not sure
what to do for Windows, but should be a step in the right
direction.

Fixes issue with compilation of libuafs on IRIX and sunpro by accurately
detecting label support.

Change-Id: I092eda47c4cfcc2517dc39f5e48b5038c413cb01
Change-Id: I2ff8449b28db645d9cfd27796b5f89e5c328a2b2
Reviewed-on: http://gerrit.openafs.org/2516
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-12 15:07:21 -07:00
Marc Dionne
90b75531ad Linux: avoid oops in memcpy_toiovec
With ADAPT_PMTU enabled, kernel_recvmsg can be called to receive
errors.  The call is made with no iovec supplied (we pass a NULL
pointer), but with a size of 256.  In the kernel, the memcpy_toiovec
function tests for size > 0, and proceeds to check iovec->iov_len,
which causes an oops.  Fix by setting the size to 0.

Change-Id: I3c672c2e67d0aa5af2bd54d0c14aaeae3bb3c530
Reviewed-on: http://gerrit.openafs.org/2546
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-12 13:57:18 -07:00
Marc Dionne
08552ad8a9 Linux: Rework statfs super block operations configure test
The configure test to detect if the statfs super block operation
needs a dentry argument is based on vfs_statfs, and assumes that
its signature matches the one of the operation.  In 2.6.36 this is
no longer true and the test fails.

Rework the test to actually test the operation we're interested in.

This change is required for 2.6.36.

Change-Id: I5a712fb47e48c1bcc7ea2cfbf6c53c2b27627723
Reviewed-on: http://gerrit.openafs.org/2545
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-12 13:46:37 -07:00
Marc Dionne
fb01fbd7cd Linux: switch to evict_inode
In 2.6.36, the delete_inode and clear_inode inode operations
are replaced by evict_inode.
Rename our current clear_inode to evict_inode, and add a few
things that were previously handled by the generic delete_inode.

This is required for 2.6.36.

Change-Id: I68d75830b43df710ccce173ab36f3bb39074c59e
Reviewed-on: http://gerrit.openafs.org/2544
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-12 13:46:04 -07:00
Marc Dionne
eaf3378f53 Linux: adapt to truncate sequence changes
As part of changes to the truncate sequence, inode_setattr() no
longer exists, and all filesystems have to define the setattr op
so we can assume that it is not NULL.

Introduce a compat inline function afs_inode_setattr that hides
the tests and the different versions from the main code.

Note that the existing test for the inode_setattr() return type
will fail, but the value is no longer used in that case.

This is required for 2.6.36

Change-Id: I2f5e8a0b660b48453d0152b6c4db64e57539f91a
Reviewed-on: http://gerrit.openafs.org/2543
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-12 13:43:53 -07:00
Marc Dionne
d4018b2673 Linux: use %pI4 if NIPQUAD is not available
The definition of NIPQUAD has been removed from the kernel headers
in the mainline kernel.  Replace it by using the %pI4 format
specifier which takes the IP address as a single argument.

There should be no change in the output.

This fix is required for 2.6.36.

Change-Id: I269e5bd754b7aef49b005081eb6b3af1b2679293
Reviewed-on: http://gerrit.openafs.org/2542
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-08-12 13:43:04 -07:00
Derrick Brashear
3121a07fbf disable pmtu error gathering
don't enable kernel pmtu, don't collect errors.

a report from Marc Dionne suggests there are still issues here

Change-Id: Ib54fa522ba53efe50e8f08b27422ebfc8af7f9e5
Reviewed-on: http://gerrit.openafs.org/2538
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-11 22:54:54 -07:00
Jeffrey Altman
03f76092bd Windows: comparisons of nul strings should match
When comparing nul strings in cm_strnicmp_utf8 and cm_strnicmp_utf16
the functions should return 0.

LICENSE MIT

Change-Id: I30c1321f42135a5e0160407467549b13cc92393f
Reviewed-on: http://gerrit.openafs.org/2539
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-08-11 21:53:10 -07:00
Andrew Deason
3daf18a3cb viced: VNOVOL on deleted volumes
When the volserver deletes a volume, the fileserver should respond to
future access to that volume with VNOVOL and not VOFFLINE, since the
volume doesn't exist anymore. Do this in DAFS via a new state,
VOL_STATE_DELETED, and in non-DAFS by just setting specialStatus to
VNOVOL.

In the future we should also make sure the vp's for deleted volumes
get freed after a couple of hours, but not yet.

Change-Id: I6dec3e0a5e9e54f6ad09fad9f2355b513cce3bf6
Reviewed-on: http://gerrit.openafs.org/2533
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-11 21:26:59 -07:00
Andrew Deason
72da1d2eb2 volser: Ignore duplicate file tags when restoring
Currently, if the volserver encounters multiple file tags for a vnode
when restoring a volume dump, it will create extra vnodes which are
not recorded anywhere, and are leaked when the volume is removed.
Instead of doing that, ignore any duplicate file tags that are
encountered (which is what happens with other tags), and log a
warning.

Change-Id: I1ac76b0217096d013db355b899f1a53174d20eb5
Reviewed-on: http://gerrit.openafs.org/2531
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-11 20:36:54 -07:00
Simon Wilkinson
f7d298d367 LINUX: More flock fixes
Turns out the we have two almost identical lock routines on Linux,
one for POSIX locks, and one for flocks. Fix them both. Also,
while we're at it, make the same fixes in the LINUX24 tree.

Thanks to Andrew Deason for pointing out the oversight in the
original patch (5abe706a7e237d3872db3638d947a14c935370d5)

Change-Id: I59f0f1e12af36a97e490df36537ac17e8ed87303
Reviewed-on: http://gerrit.openafs.org/2535
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-08-11 16:47:04 -07:00
Derrick Brashear
5a2ae98327 fs discon support alternate uid
this is a short-term hack. macos lacks pags, and anywhere without
pags won't have tokens when fs discon online is run as root unless
the tokens are explicitly set for root... which can be bad mojo.

instead, allow a uid to be passed in.

Change-Id: I44ebf9468976fa43d449f72d392fbb9e830e44d6
Reviewed-on: http://gerrit.openafs.org/2515
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-11 14:58:16 -07:00
Derrick Brashear
e6aa0b38e9 macos disconnected vnode holding fix
tweak how we hold vcaches to avoid issues with the underlying
vnode having an iocount underrun due to races.

Change-Id: I96526ed52c11aac1124a8cf66458ba3e25e7efb2
Reviewed-on: http://gerrit.openafs.org/2501
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-11 14:57:34 -07:00
Simon Wilkinson
5abe706a7e LINUX: Use correct type of error in flock code
The flock code gets a kernel error code from afs_posix_lock_file()
but then passes this error code through afs_convert_code (which sees
that it is already negative, and returns EIO). Instead, we should just
return afs_posix_lock_file()'s code direct to our caller.

Change-Id: I28bbc2dc8535d28a4e9e9f564392fd4cbfa76569
Reviewed-on: http://gerrit.openafs.org/2534
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-11 14:56:08 -07:00
Jeffrey Altman
bc6fe06ae5 Windows: cm_Analyze should treat VOFFLINE like VMOVED or VNOVOL
Volume package bugs in the file server can result in VOFFLINE
being returned to the client instead of VNOVOL or VMOVED.  As
a result the Unix CM treats VOFFLINE the same as VMOVED and VNOVOL.
The Windows client has not.  As a result, bugs in the file server
can cause the Windows client to lose if the volume has in fact
been moved to another server.

As part of this change, the volume location list is updated prior
to the volume status being applied to the server from which the
error was received.

LICENSE MIT

Change-Id: I01036aa9d1999d0ba6822beb1b73500d365bf0b3
Reviewed-on: http://gerrit.openafs.org/2532
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-08-10 22:41:35 -07:00
Andrew Deason
219ab91243 salvage: update inodes array after CopyAndSalvage
CopyAndSalvage makes a copy of the directory to salvage it. So, the
new directory will have a new inode. Update the array of directory
inodes to reflect this. Without this, we can fail to alter the
copied/salvaged directory later on, since we will try to read/write to
the wrong inode.

Change-Id: I2466981e8ee54c5aecf1a166a37d8146b126de24
Reviewed-on: http://gerrit.openafs.org/2530
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-10 21:32:58 -07:00
Andrew Deason
9903f4805e salvage: Remove redundant 'code' declaration
'code' is declared at the top of SalvageVolume; no need to declare it
again in a lower block.

Change-Id: I9b48830c17e5043e6abcda4dd4dd3cc040031d9a
Reviewed-on: http://gerrit.openafs.org/2529
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-10 21:32:19 -07:00
Andrew Deason
56218cab39 salvage: Do not look at not-found root dir
If we have not found any root directory, don't even look at
'oldrootdir' or 'rootdir', since they will be uninitialized at this
point.

Change-Id: Ia1a7037e06a223a7e1fbc48c0bfadd3b7aaa0e4b
Reviewed-on: http://gerrit.openafs.org/2528
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-10 21:20:15 -07:00
Andrew Deason
1c002a5b5d salvage: Zero corrupted header
In the salvager, if we read in a corrupt header (either we get a short
read or the magic is mismatched), make sure we zero out the contents,
so we don't read garbage further on.

Change-Id: Ifb4b9fc1b25d5eab470f0950a1d3bb240f75b0d3
Reviewed-on: http://gerrit.openafs.org/2527
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-10 21:19:33 -07:00
Andrew Deason
9da5e4700b tviced: Fix serialize_state.o objdir
At least some makes treat ./serialize_state.c as only in the current
dir, ignoring VPATH. So just specify serialize_state.c.

Change-Id: I250886cb4bbfb955984b39c5a7d1a1acd5d9e0c4
Reviewed-on: http://gerrit.openafs.org/2524
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-05 21:15:13 -07:00
Andrew Deason
cdbf7827ef Eliminate $< outside of pattern rules
The $< variable in makefiles is not portable when used outside of
pattern rules. Replace each usage with the actual name of the file we
want.

Change-Id: Idc9309e7d7bd3b1bd93e8225507b8b53c9433d69
Reviewed-on: http://gerrit.openafs.org/2523
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-05 21:15:06 -07:00
Andrew Deason
16bad29f03 Fix objdir install/dest targets
Many 'install' and 'dest' targets were referring to source files
without a srcdir prefix. Fix them so we can 'make install' / 'make
dest' with objdir.

Change-Id: Id76c5e326309baf8ec3f1213ecb2e40b19aea7d4
Reviewed-on: http://gerrit.openafs.org/2522
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-05 21:14:50 -07:00
Andrew Deason
17a57cdafe tubik: Fix objdir builds
- Make netutils.c include afs/dirpath.h, so we don't have to find the
   correct include dir for "dirpath.h"

 - Fix dependencies in tvlserver, tbudb, and tptserver, and refer to
   sources in srcdir where appropriate

Change-Id: Id9c2b3eefaa9d02ccb197a61341776444b958cdc
Reviewed-on: http://gerrit.openafs.org/2521
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-05 21:14:21 -07:00
Andrew Deason
a5ff380e89 Fix afsd.fuse for objdir builds
afsd_fuse.o could not find afsd_fuse.c for objdir builds. While we're
here, make the afsd_fuse.o rule more closely match the rules close by.

Change-Id: I675359134e2672cb36c9eb780edefb498d498bb1
Reviewed-on: http://gerrit.openafs.org/2520
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-05 21:12:58 -07:00
Andrew Deason
b832cdc1c7 rxgen: Error out if cpp exits with error
If we call 'cpp' and it returns with an erroneous exit code, exit with
an error ourselves. Otherwise we will return success and generate
empty results even if the input file is unreadable, for instance,
which causes confusing errors later in the build.

Change-Id: Ia12dc58eee0937a6bd529dcd6b552e253dbc40c8
Reviewed-on: http://gerrit.openafs.org/2519
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-05 21:12:42 -07:00
Derrick Brashear
a4267ef140 namei decodevolume allow low volume ids
the smallest thing which can be encoded is a single character;
also allow it to be decoded, such that low numbered volumes
are treated as valid.

Change-Id: Ia5e694f7f73e1035af741bd23c7f50805910d0c4
Reviewed-on: http://gerrit.openafs.org/2470
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-05 13:29:35 -07:00
Jeffrey Altman
aa24d1392c Windows: add flags field to smb_ioctlProc_t function signature
Add a general framework to permit flags to be passed into the
smb ioctl interface functions.  This patchset does not define
any such flags.

LICENSE MIT

Change-Id: I9a894a186c4ca455116ea79bdd6c3cc0d02a2dc3
Reviewed-on: http://gerrit.openafs.org/2525
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>
2010-08-05 12:36:49 -07:00
Simon Wilkinson
ed42886927 Unix CM: Remove erroneous comment
Despite what the comment says, shutdown_axscache does have a caller,
so just remove the comment lest it confuse people.

Change-Id: I0491bf4f945c372d7ddbafb7a43390821c95a0c1
Reviewed-on: http://gerrit.openafs.org/2471
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-05 12:28:52 -07:00
Jeffrey Altman
f6a91a28cc Windows: optimize buf_FlushCleanPages
If the pages to be flushed are from a readonly or backup volume
they can't be dirty.  In this case there is no need to stabilize
the pages before they are locked and recycled.

Stablilization is performed on the cm_scache_t object so do not
stabilize and unstablize for each cm_buf_t object.

LICENSE MIT

Change-Id: I6fa86cf0a33dc9f45d77911909e799c0fc6510cf
Reviewed-on: http://gerrit.openafs.org/2518
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-08-05 12:14:52 -07:00
Andrew Deason
f08e953e62 Unix: docbook revision tag requires a date
The docbook DTD requires a <revision> element to contain a <date>
element. So make a blank <date> one even though we don't keep track of
a date, so we can pass xmllint.

Change-Id: I06e68b756d215ec3ce279561a05b5bc5fc418028
Reviewed-on: http://gerrit.openafs.org/2517
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-05 05:07:52 -07:00
Andrew Deason
d0080e261c Add DAFS docs to the Unix Quick Start guide
Modify the sections dealing with creating the 'fs' bnode to also
mention how to create the 'dafs' bnode, and add an appendix explaining
DAFS and the differences between DAFS and non-DAFS.

Change-Id: I026405dbc3838a9a0247b85cbdc508d6be93275d
Reviewed-on: http://gerrit.openafs.org/2508
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-04 13:18:54 -07:00
Andrew Deason
ae1ac72783 HPUX: Add limits.h to sysincludes
xdr_mem uses INT_MAX, so we need limits.h in the kernel for HP-UX.

Change-Id: I5c75f9d3cb9cfd5da78cf625f042c1dee862dcd7
Reviewed-on: http://gerrit.openafs.org/2506
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-04 13:15:21 -07:00
Derrick Brashear
8e5d6ce150 fix unlabelled xdr field order on sun457 kernel for now
alternate to 2503 (which we will push after branching)

Thanks to Andrew Deason for discovering this issue.

Change-Id: I3a43bb1eab1a753f099c9d21e440f6660c706e37
Reviewed-on: http://gerrit.openafs.org/2514
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-04 13:14:37 -07:00
Derrick Brashear
7556326e01 discon remove dirty vcaches from queue when discarding
the discardall loop was not dequeueing vcaches, meaning we would loop.
caught by Simon Wilkinson

Change-Id: I80256ef5f91d7030e0cb11e78a79f137a217a29a
Reviewed-on: http://gerrit.openafs.org/2513
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-04 07:31:03 -07:00
Derrick Brashear
6d0b97c7ac reorder vcache references in discondiscardallshadows
reset the vcache before we (nominally, it's still under a lock)
discard it. remove superfluous shadow clearing.

Caught by Simon Wilkinson

Change-Id: I55b91fa4f2f92a8b6fd1f8117c2448f7a7d1d98a
Reviewed-on: http://gerrit.openafs.org/2512
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-04 07:25:32 -07:00
Derrick Brashear
85e29294ee discon getparentvcache leak fix
don't leak an unref'd vcache pointer if we are returning an error
(EAGAIN). thanks to Simon Wilkinson for catching this.

Change-Id: I40c5aa0fd50e1f2c76b09ba073a7109bca706d8c
Reviewed-on: http://gerrit.openafs.org/2511
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-04 07:22:22 -07:00
Derrick Brashear
9bfae6b76c discon needs static_inline macro
don't use static inline keywords in common code.

Change-Id: I29cbe312e27c8fb75d2d07f720789a4a5b900fa5
Reviewed-on: http://gerrit.openafs.org/2510
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-04 07:09:09 -07:00
Derrick Brashear
b82ac032a6 darwin unused prototype
we don't gave our own vn_rele. don't prototype it.

Change-Id: I3a2d193c95a2d63c8d80054dd4600f949d1a01d2
Reviewed-on: http://gerrit.openafs.org/2509
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-04 07:08:50 -07:00
Andrew Deason
a5bcd61a16 util: add afs_exec_alt
Add the function afs_exec_alt to help programs easily execute an
"alternate" version of themselves. For example, for programs that are
built with/without DAFS support, or are built for 32-bit/64-bit
structures, etc.

Change-Id: Ibb2b7105d58476f84bd9f15987f8b7df37314b6b
Reviewed-on: http://gerrit.openafs.org/2483
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-04 05:24:04 -07:00
Andrew Deason
6b6535279a tbudb: Use INSTALL_PROGRAM, not INSTALL -f
"$INSTALL -f" is not portable. Use $INSTALL_PROGRAM instead.

Change-Id: I5013476cc036350b0b61b6e3c01a86d303aa70b6
Reviewed-on: http://gerrit.openafs.org/2507
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2010-08-04 05:23:08 -07:00
Jeffrey Altman
ba7d8d7810 Windows: Reduce complexity of Freelance Callback Logic
Over the years the processing of the Freelance callbacks have
added functionality that behaves much more like FetchStatus checks
to a file server.  If the data version of the object has changed,
get the new data.  Given that is the case, we can remove much of
the original refresh logic that is rather race prone.   Say goodbye
to cm_fakeGettingCallback and cm_fakeDirCallback.

LICENSE MIT

Change-Id: I249c84201afc16611039b2ba0801a643fcf05f28
Reviewed-on: http://gerrit.openafs.org/2505
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-08-03 04:58:53 -07:00
Jeffrey Altman
a03f1960da Windows: When processing pioctl paths ensure callbacks are obtained
When processing a pioctl path with either smb_ParseIoctlPath or
smb_ParseIoctlParent, cm_SyncOp(CM_SCACHESYNC_NEEDCALLBACK|GETSTATUS)
must be called on the cm_scache_t object to ensure that it is up
to date before we permit cm_Lookup or other operations to be performed
on it.  Add the cm_SyncOp() call to smb_ParseIoctlPath and
smb_ParseIoctlParent to ensure it is done for all pioctl operations.

LICENSE MIT

Change-Id: I2fe5d5ec2567693155277b40929dedb8155d9ebf
Reviewed-on: http://gerrit.openafs.org/2504
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-08-03 04:58:38 -07:00
Derrick Brashear
fccd35961f fs disconnected remove ifdefs
disconnected is always on; remove the ifdefs around it

Change-Id: Iaa982f83f7619fc0ad1162a64b68231e02eae916
Reviewed-on: http://gerrit.openafs.org/2502
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-08-02 11:54:39 -07:00
Jeffrey Altman
deb96d3986 Windows: docbook revision tag requires a date
Even if we can't generate a date, we must include the date tag
within the revision tag in order for the docbook dtd to be applied
and pass xmllint.

Change-Id: Ic58995ecd7b07a1163f0965e22bcd78769d4565e
Reviewed-on: http://gerrit.openafs.org/2500
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-08-02 10:32:52 -07:00
Asanka Herath
c5ffaf7a3c Windows: Don't configure client when not installing client
The 32-bit tools installer was displaying client configuration wizard
pages.  Since, the 32-bit tools share configuration with the AFS
service, the 32-bit tools installer should not be attempting to change
client configuration.  Remove said wizard pages from the 32-bit tools
installer.

Change-Id: Ib52b5741d5d412b1aea1856e0304364ed928b2ba
Reviewed-on: http://gerrit.openafs.org/2492
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-08-02 10:29:44 -07:00
Asanka Herath
60878f4d2a Windows: Fix MC options
Newer versions of the Message Compiler included with Windows SDKs
break when using the -s option.  Remove it.

Change-Id: I71bcd2d5aa000b11c44b77ce4687bc0f070699b0
Reviewed-on: http://gerrit.openafs.org/2495
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-08-02 09:36:11 -07:00
Andrew Deason
5e946d5b66 ptserver: Do not use cell for entry name len check
Do not use the local cell name when determining if a new entry name is
too long. This check assumes that foreign cells will use our local
cell name (assumed to be our local Kerberos realm) in a certain way,
and prevents creating users that will make those names too long.

This is undesirable for several reasons. One is that the local realm
name may not be the same as the local cell name (and we may have many
local realms). Another is that we cannot reliably predict how foreign
cells will construct foreign pt entry names, so preventing entry
creation based on that may prevent names that will never cause any
problems. This check also assumes that our names will be used as
foreign entries in other cells, which may not be the case.

So, remove the check based on the local cell name, and remove the
pr_realmNameLen variable while we are at it, since this is all it is
used for.

Thanks to Jeffrey Altman for discussion, and for bringing this up in
the first place.

Change-Id: Ief4bc94d9ead61a1589797b5dc663a6473c9ed72
Reviewed-on: http://gerrit.openafs.org/2488
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-08-02 09:35:29 -07:00
Jeffrey Altman
89afd3c21e Windows: Do not reference cm_data.rootSCachep directly
cm_data.rootSCachep is a global pointer to the cm_scache_t that
represents the root.afs volume root directory.  Throughout the
code this cm_scache_t was being used without ensuring that a
callback to the volume is in fact valid.

Under most circumstances this would not be a problem.  However,
it is possible for a request to fail due to the lack of a callback
at a critical moment.  Add a new function cm_rootScachep() that
attempts to ensure that a callback is present (if possible) prior
to use the cm_scache_t object.

LICENSE MIT

Change-Id: I997dc05a2214788d32727c261947206a61cd8d32
Reviewed-on: http://gerrit.openafs.org/2491
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-08-02 09:27:18 -07:00
Jeffrey Altman
78f99d4a02 Windows: Update root.afs scache dv when Freelance dir bufs are regenerated
When the contents of the Freelance root directory changes the fake
directory buffers are updated and a fakeDirVersion is incremented.
The dataVersion of the cm_scache_t object is supposed to be updated
on the next access by performing a fake get callback request.
Unfortunately, this did not always occur because of a race.  If another
Freelance object is updated first, the root directory object would
never successfully get a fake callback.

This patchset ensures that the generation of the fake directory
buffer content and the callback are obtained under the same set
of locks thereby removing the race.

LICENSE MIT

Change-Id: Ic8c77fc3c652cd056f84db55ca6db32499bcb0c9
Reviewed-on: http://gerrit.openafs.org/2490
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-08-02 09:26:46 -07:00