Commit Graph

5884 Commits

Author SHA1 Message Date
Simon Wilkinson
7c472cd9a6 Prototype the xstat directory
Prototype, ansify, and remove errors in the xstat directory

Reviewed-on: http://gerrit.openafs.org/20
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Russ Allbery <rra@stanford.edu>
2009-07-10 10:31:51 -06:00
Jeffrey Altman
79316efa84 Modify Windows top-level NTMakefile to use "md" instead of "mkdir"
Now that src/config/NTMakefile.<platform> actually uses the
override value.  Lets fix the definition of MKDIR to avoid
the Unix style executables.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/31
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-10 09:45:38 -06:00
Jeffrey Altman
386fea8d86 The Windows Makefiles provide macros for various commands.
The MKDIR macro is current assigned to mkdir which causes
the cygwin/msys mkdir.exe commands to be used instead of
the cmd.exe built-in command.  Change this to use "md" instead
so that the built-in will be used by default.

In addition, permit the macros to be overridden by the top
level NTMakefile or the environment.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/30
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-10 09:25:04 -06:00
Derrick Brashear
a9368a6c3d HP-UX 11i compiler will segv on static __inline in the fsbnode-bnode xlator
since this function appeared the compiler on HP-UX 11i started
segving. since it's not necessary, we simply remove it

Reviewed-on: http://gerrit.openafs.org/28
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Derrick Brashear <shadow@dementia.org>
2009-07-10 09:21:54 -06:00
Jeffrey Altman
9e8ae43b11 Add "PerFileAccessCheck" registry value.
The HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon
"PerFileAccessCheck" registry value (DWORD) is intended for
use only by developers who wish to test how Windows would
behave if a per-file access rights check was performed.

Windows performs all access rights checks using the directory
access rights.  There is no support for the VL_DFSFILESET flag.
During CreateFile() processing the requested access rights are
checked against the access rights reported by the file server
for the directory.  If the reported rights are more permissive than
the effective access rights for the file, Windows applications
(including the Explorer Shell) will behave quite poorly.  In other
words, if the request is for write privilege and the CreateFile()
successfully opens the file with write privilege, subsequently
reporting an access denied on a WriteFile() call will result in
very poor behavior.

The addition of this option is simply to make it easier on
developers to test various prototype solutions for adding per-file
access rights.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/15
Reviewed-by: Asanka Herath <asanka@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-10 09:07:10 -06:00
Simon Wilkinson
6c6f9dce24 Tidy the vol directory
- Remove some further warnings from the vol directory
- Add volutil_PartitionName2_r to afsutil_prototypes.h
- Export vol_prototypes.h so it can be used elsewhere in the tree

Reviewed-on: http://gerrit.openafs.org/17
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Derrick Brashear <shadow@dementia.org>
2009-07-10 08:45:27 -06:00
Simon Wilkinson
0cf977e535 Prototype the vlserver directory
Prototype, ansify, and other do warning cleanups on code in the vlserver
directory.

Reviewed-on: http://gerrit.openafs.org/16
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-10 08:41:39 -06:00
Aaron M. Ucko
b7942950c2 Always use kbuild for all Linux kernel configure probes
Some Linux kernel probes for the existence of header files were done
with file existence checks (test -f).  This breaks if the kernel build
system is stacking multiple directories of headers together with
compile-time -I include path options, as is the case for the current
Debian Linux header packages.  Instead, always use kbuild to check
whether a kernel header is available.

Similarly, use AC_TRY_KBUILD instead of AC_TRY_COMPILE when checking
for an SELinux kernel, since AC_TRY_COMPILE doesn't call into kbuild
and won't get the correct kernel header paths.

This is part of the fix for Debian Bug#521745 and has been included in
the Debian package since 1.4.10+dfsg1-1.

Reviewed-on: http://gerrit.openafs.org/5
Verified-by: Russ Allbery <rra@stanford.edu>
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-10 08:33:46 -06:00
Aaron M. Ucko
01d390d0d0 Build shadow header files when necessary on Linux
The current kernel module build infrastructure relies on the ability to
create symlinks from known directory names used in the AFS code to the
actual locations of the kernel header files.  This breaks if there is no
single kernel header tree and instead multiple trees are layered together
by kbuild using compile-time -I include paths.

Attempt to detect this case by seeing if linux/types.h is in the kernel
header directory where we expect it.  If not, rather than creating
symlinks for h, sys, and netinet, create directories and populate them
with single-line headers that just include the corresponding linux/*.h
header.  The list of headers for which to do this is generated dynamically
by analyzing the AFS kernel source code and looking for relevant #include
directives.

This patch has been part of the Debian OpenAFS package since
1.4.10+dfsg1-1.  The check for whether we have layered kernel header trees
may be specific to Debian and may require modification later if other
Linux distributions do something similar.

FIXES 124583

Reviewed-on: http://gerrit.openafs.org/6
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Derrick Brashear <shadow@dementia.org>
2009-07-10 07:58:09 -06:00
Simon Wilkinson
3bb5fa5f1b Remove the RCSID macro
The move to git means that we can no longer populate the RCSID
macro in the way that it was used with CVS. This patch simply
removes the macro from every file, except where it contains
information from upstream (and it's in a comment).

Reviewed-on: http://gerrit.openafs.org/14
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-09 22:58:37 -06:00
Russ Allbery
bbab48b047 Build and install PIC versions of libafsrpc and libafsauthent
To include AFS code in loadable modules such as PAM modules, NSS modules,
or Perl/Python/PHP/Ruby extensions, it needs to be built PIC or one must
link with the AFS shared libraries.  Since we haven't historically been
that great about maintaining the shared library ABI, it's nice to have
static libraries built with PIC code that can be linked into such modules.

Based on a patch by Garrett Wollman updated with the build system changes
that happened after 1.4.

Make shlib makefiles have clean rules for PIC libraries.
Make RedHat specfile know how to deal with PIC libraries.

Reviewed-on: http://gerrit.openafs.org/8
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-09 21:20:13 -06:00
Simon Wilkinson
072974935c Prototype the afsmonitor directory
Prototypes and code cleanup for afsmonitor

Reviewed-on: http://gerrit.openafs.org/13
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-09 21:19:41 -06:00
Andrew Deason
f52b97b76c Always display vnode accesses in vos output
Vos was not displaying the "N accesses in the past day (i.e., vnode
references)" message when updateDate was unset. Fix that.

FIXES 125064

Reviewed-on: http://gerrit.openafs.org/9
Verified-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-09 12:39:54 -06:00
Andrew Deason
722070a5c6 Correcting formatting typo in vos addsite manpage
Reviewed-on: http://gerrit.openafs.org/12
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
2009-07-08 15:27:35 -06:00
Andrew Deason
7488aeef5c Fixing manpage for vos addsite -valid
The -valid switch to vos addsite doesn't take an argument, and it is
optional. Correcting documentation to reflect that.

Reviewed-on: http://gerrit.openafs.org/11
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
2009-07-08 15:18:03 -06:00
Russ Allbery
ecd3fc42d1 Search for the Linux version in the correct header
src/config/linux-version already had support for handling either versioned
or unversioned kernel source directories, but the grep for UTS_RELEASE
was unconditionally done against the versioned source tree, ignoring the
previous determination of where the header file was.

Instead, check instead the header file location that we'd previously
determined.

This patch has been tested in the Debian OpenAFS 1.4.11~pre3+dfsg-1
package.

Reviewed-on: http://gerrit.openafs.org/4
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-07 07:14:58 -06:00
Jason Edgecombe
002363adb9 Fixed a minor grammatical error in the voz_zap man page
Reviewed-on: http://gerrit.openafs.org/7
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
2009-07-06 19:47:03 -06:00
Simon Wilkinson
d5081f264d Remove CVS ignore files
Now we're in git we don't need any cvsignore files any more...

Reviewed-on: http://gerrit.openafs.org/1
Verified-by: Derrick Brashear <shadow@gmail.com>
Reviewed-by: Derrick Brashear <shadow@gmail.com>
2009-07-06 11:03:16 -06:00
Simon Wilkinson
ba9ad62845 Revise git ignore files
Revise our git ignores to match the current state of the tree, and include
entires in the top level for all of the 'dest' directories for all of the
architectures we claim to support.

Reviewed-on: http://gerrit.openafs.org/2
Reviewed-by: Derrick Brashear <shadow@gmail.com>
Verified-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
2009-07-06 10:03:23 -06:00
Jeffrey Altman
46287f6790 windows-optimizations-20090703
LICENSE MIT

when performing offline volume checks, do so in most recently used order

if the system is entering suspend state, short circuit the background
daemon operations to avoid extra work that is going to fail when the
network is shutdown behind the back of the service.
2009-07-04 04:45:37 +00:00
Simon Wilkinson
ebc4f737ae linux-vnop-return-value-cleanup-20090703
LICENSE IPL10

rework all linux vnode ops so the vulnerability we previously had can't
recur later just because someone makes a change that would leak a negative
error
2009-07-03 14:16:53 +00:00
Andrew Deason
6ef1234402 viced-ubik-clientdestroy-null-20090703
LICENSE IPL10
FIXES 125020

null ubik client point when it's freed in hpr_End to avoid a null deref later
2009-07-03 14:03:57 +00:00
Derrick Brashear
22196a7fd7 redhat-spec-manpage-updates-20090703
LICENSE IPL10

add missing manpages to srpm
2009-07-03 13:56:43 +00:00
Jeffrey Altman
8a6bd63035 wix-manpages-chgrp-chown-20090701
LICENSE MIT

add fs_chgrp.html and fs_chown.html man pages
2009-07-01 22:14:42 +00:00
Jeffrey Altman
4db337f87c manpages-fs-chown-chgrp-20090701
LICENSE BSD

Add new man pages for fs chown and chgrp on Windows.

Update titles for Windows only commands to indicate they are Windows only.
2009-07-01 22:12:10 +00:00
Marc Dionne
4ca66112c2 linux-keyring-export-check-20090701
LICENSE IPL10
FIXES 125001

check for key_type_keyring being exported; only use it if so
2009-07-01 21:56:48 +00:00
Jeffrey Altman
ffd065a695 windows-fs-chown-chgrp-20090701
LICENSE MIT

On Windows there is no chown or chgrp command that can be used to
change the owner or group of an object in AFS.   Therefore we
add them to the fs command.

Usage: fs chown -owner <user name or id> [-path <dir/file path>+] [-literal] [-help]
Where: -literal  literal evaluation of mountpoints and symlinks

Usage: fs chgrp -group <user/group name or id> [-path <dir/file path>+] [-literal] [-help]
Where: -literal  literal evaluation of mountpoints and symlinks
2009-07-01 21:25:28 +00:00
Jeffrey Altman
ad6a8942db windows-cellconfig-20090630
LICENSE MIT

nul terminate the correct variable
2009-07-01 02:44:05 +00:00
Jeffrey Altman
efdf78ae08 windows-dfs-file-set-warning-20090630
LICENSE MIT

Add a debug log warning if the target volume is a DFS File Set.
If so, the client will not properly protect against information
leakage or properly deal with directory name caching, symlinks,
and other behavioral differences between AFS and DFS.
2009-06-30 19:11:28 +00:00
Jeffrey Altman
49d6a0992c windows-smb-20090630
LICENSE MIT

Be sure to call smb_ReleaseVCNoLock before we drop the smb_rctLock.
2009-06-30 18:59:43 +00:00
christof.hanke@rzg.mpg.de
58024c1684 rpmlint-try2-20090629
LICENSE IPL10
FIXES 124951

remove unneeded return; fix iob initialization for curpag pioctl
2009-06-29 21:24:23 +00:00
Jeffrey Altman
a50fa631ca windows-dcache-prefer-xdata-error-20090629
LICENSE MIT
FIXES 125018

Fix issue reported by Marc Dionne.  RXAFS_FetchData and RXAFS_StoreData
return access denied errors that are not reported by the subsequent
call to rx_EndCall which should be preferred.
2009-06-29 20:38:17 +00:00
Derrick Brashear
f202b9778e revert-voldump-v-tag-generation-20090629
LICENSE IPL10
FIXES 18349

generating v tags is currently incompatible. revert this for now
2009-06-29 16:19:59 +00:00
Marc Dionne
3d5415922e rcu-patch-fallout-20090629
LICENSE IPL10
FIXES 124996

massaging this for 1.5.x/head caused some fallout. fix doubled endif, and
install_session_keyring arguments
2009-06-29 14:58:58 +00:00
Jeffrey Hutzelman
4a09cd4976 cellservdb-20090629
CellServDB from central.org dated 29 Jun 2009
2009-06-29 07:03:09 +00:00
Jeffrey Altman
307e077b23 windows-shutdown-20090628
LICENSE MIT

short circuit on-going offline volume checks once a shutdown has begun.
2009-06-29 04:27:41 +00:00
Jeffrey Altman
b8a1dba293 windows-hard-link-count-20090628
LICENSE MIT

cm_Link() is used to create hard links.  It did not apply the updated
link target status info to the target cm_scache_t object.  As a result
the linkCount would be incorrect.

cm_Unlink() did not take linkCount into account.  It did not reduce the
locally known linkCount, nor did it invalidate any currently known
callback.  As a result the linkCount would be incorrect.
2009-06-29 04:25:16 +00:00
Jeffrey Altman
d54859c6ac windows-multi-homed-callbacks-20090627
LICENSE MIT

Properly handle callbacks from multi-homed file servers.
Comparing cm_server_t pointers is insufficient.  For a multi-homed
server there will be multiple entries.  The UUID for all of the
equivalent entries will be the same.  What matters is not that
the pointers are the same but whether in the case of UUID labeled
servers that the UUIDs match.

Add cm_ServerEqual() to perform the comparison.
2009-06-28 05:15:31 +00:00
Jeffrey Altman
100186ec2e windows-callback-server-tracking-for-readonly-vols-20090626
LICENSE MIT

Readonly volume callbacks apply to every cm_scache_t from the
same volume.  We were already tracking the cbExpires time in
the cm_volume_t.  We need to also track the cbServerp in the
cm_volume_t so that the cm_scache_t objects can be assigned
the correct server from which the callback was issued.

Add cbServerpRO field to the cm_volume_t.  Bump the memory
map version to force a rebuild of the cache data.
2009-06-26 15:11:10 +00:00
Jeffrey Altman
de37456523 windows-cell-config-clones-20090626
LICENSE MIT

Add support for parsing clones from the CellServDB file.
2009-06-26 14:14:47 +00:00
Derrick Brashear
e43342e377 allow-gcpags-disabling--at-compile-20090624
LICENSE IPL10

put this back as was for now; if we want to undef, we can do it later, completely
2009-06-25 13:13:14 +00:00
christof.hanke@rzg.mpg.de
4ac7d59d46 pag-get-lint-20090623
LICENSE IPL10
FIXES 124951

make things happy for rpmlint again (wrong initialization)
2009-06-25 00:14:43 +00:00
Marc Dionne
0e718b642c linux-rcu-read-lock-export-20090623
LICENSE IPL10
FIXES 124986

deal with rcu_read_lock() becoming GPLONLY
2009-06-24 22:53:40 +00:00
Harald Barth
a125b571a4 fbsd61-stdlib-proto-define-20090623
LICENSE IPL10
FIXES 124952

add define to make stdlib have malloc prototype
2009-06-24 22:44:56 +00:00
Andrew Deason
ee72f25104 osol-solookup-20090624
LICENSE IPL10
FIXES 124924

update for new opensolaris solookup function signature
2009-06-24 22:38:15 +00:00
Jeffrey Altman
b45838ca82 util-snprintf-replacement-20090624
LICENSE BSD

1. Add a test program for *printf functionality.  util/tests/snprintf_test.c

2. Replace OpenAFS implementation of afs_*printf() with Heimdal's version.

3. Add support to Heimdal's version to support:

 - floating point

 - OpenAFS %I ipv4 address formatting (dotted notation and hostname lookup)

 - Microsoft's I32 and I64 integer size modifiers

With these changes OpenAFS gains:

 - output that is compliant with standard *printf implementations.
   the previous implementation had justification, padding and case
   errors.

 - support for a NULL buffer which computes the required size based
   upon the input format and arguments.  the previous implementation
   would crash.

 - support for additional format types.

 - OpenAFS specific implementations of vasnprintf(), vasprintf(),
   asprintf(), and asnprintf().
2009-06-24 16:15:39 +00:00
Jeffrey Altman
74d49eb2c6 windows-config-amd64-20090624
LICENSE MIT

amd64 uses 64-bit pointers.  Define AFS_64BITPOINTER_ENV.
2009-06-24 15:47:29 +00:00
Marc Dionne
b02e22b5f0 linux-call-inode-setattr-op-20090622
LICENSE IPL10
FIXES 124942

call inode's setattr op instead of just inode_setattr, when one is available.
needed for xfs, notably also will cause truncates to be journalled for ext3,
which may solve some existing issues
2009-06-22 16:25:23 +00:00
Jeffrey Altman
0200a40061 cellconfig-gethostbyname-20090618
LICENSE MIT

The CellServDB processing in auth/cellconfig and WINNT/afsd/cm_config
differ in one important way.  cellconfig uses the IP addresses specified
in the CellServDB file and ignores the host name; whereas cm_config
calls gethostbyname() on the host name and falls back to the specified
address only if gethostbyname() fails.

This commit modifies cellconfig to use gethostbyname() calls on the
host names when the client CellServDB file is being used.   The server
CellServDB file is left alone because ubik servers need to be given
the exact list of ip addresses specified by the administrator and
there is no method of indicating clones to other servers using DNS.

This change permits a greater resilency to cell server configuration
changes due to IP address renumbering as the DNS names in the CellServDB
file can be CNAME or A records.

A host name can be resolved to multiple IP addresses and all of the
addresses will be added to the hostAddr list for the cell provided
that they do not exceed the maximum number of hosts.  If the same
host name is listed multiple times the duplicate IP addresses will
be ignored.

The behavior of all tools that use CellServDB files on Windows will now
be consistent.
2009-06-19 04:08:08 +00:00
Jeffrey Altman
cfe1f5676d windows-netidmgr-20090617
LICENSE MIT

permit building with a broader range of visual studio versions
2009-06-18 06:04:29 +00:00