Commit Graph

5898 Commits

Author SHA1 Message Date
Jeffrey Altman
73cef96bb3 afs/vol_prototypes.h is a new public header file.
Add afs/vol_prototypes.h to src/vol/NTMakefile so
it will be installed in the public include directory.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/42
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-10 14:14:07 -06:00
Russ Allbery
8978e035ba Clean up uses of strcpy and strcat in src/vol/namei_ops.c
Replace all uses of strcpy and strcat in src/vol/namei_ops.c with either
strlcpy/strlcat or afs_snprintf as appropriate.

Reviewed-on: http://gerrit.openafs.org/29
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Derrick Brashear <shadow@dementia.org>
2009-07-10 13:49:17 -06:00
Simon Wilkinson
c244091b19 Add prototypes for butc
Prototype, fix warnings, and ansify the butc directory

Reviewed-on: http://gerrit.openafs.org/39
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-10 13:34:48 -06:00
Simon Wilkinson
586d32c533 Don't remove ccode, just conditionalise it
The change in b210152420 broke
systems without posix regexes by removing, rather than
conditionalising the 'ccode' variable

Reviewed-on: http://gerrit.openafs.org/40
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-10 13:31:32 -06:00
Jeffrey Altman
740d923f45 Add rx_headers build rule on Windows
src/util/netutils.c must include rx/rx.h in order to avoid
warnings due to the lack of prototypes for rx functions.
src/rx depends on src/util being built in order to properly
compile.  Add a rx_headers build rule to the top level
NTMakefile to permit rx headers to be installed before
src/util is built.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/38
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-10 13:12:16 -06:00
Simon Wilkinson
3c6ce91e5a Roughly prototype the kauth directory
A first pass at prototyping and warning reduction for the kauth
directory. kauth is plagued by the des key type problems, and
no attempt to remedy this has been made. Some other complex
warnings remain - it didn't seem worth the effort to do this
in too much detail, as it's dying soon.

Reviewed-on: http://gerrit.openafs.org/23
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-10 12:48:07 -06:00
Simon Wilkinson
32e107317c Rework bucoord prototypes for external dlq use
Rework prototyping in the bucoord directory so that bucoord_prototypes.h
can be used by others who need definitions of the dlq_* types.
Add additional prototyping and header includes so these types work correctly

No Windows specific changes are required, as the NTMakefile doesn't have
header dependencies

Reviewed-on: http://gerrit.openafs.org/35
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
2009-07-10 12:35:58 -06:00
Simon Wilkinson
b210152420 Prototyping for the volser directory
Prototyping and warning message reduction for the volser directory.
Adds physio.h and dumpstuff.h as internal header files,
Many error code variables are changed from being afs_int32, to the
'Error' typedef, to remove signed comparison errors.

Reviewed-on: http://gerrit.openafs.org/19
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-10 12:06:52 -06:00
Simon Wilkinson
e712cae20e Prototype viced
Add prototypes, remove warnings, and ANSIfy code in the viced/ directory

Reviewed-on: http://gerrit.openafs.org/33
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
2009-07-10 11:34:46 -06:00
Simon Wilkinson
8d546dcc90 Remove pr_PrintEntry from public headers
pr_PrintEntry isn't used outside of the ptserver directory, and requires
struct prentry, which is defined internally, so remove it from ptuser.h,
and create a new internal header to hold it.

Also, tidy up some type mismatch warnings by making static strings const
char *

Reviewed-on: http://gerrit.openafs.org/22
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Russ Allbery <rra@stanford.edu>
2009-07-10 10:59:52 -06:00
Simon Wilkinson
3bf2e90f25 ANSIfy ptclient
Change all the function definitions in ptclient to ANSI form

Reviewed-on: http://gerrit.openafs.org/32
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Russ Allbery <rra@stanford.edu>
2009-07-10 10:48:30 -06:00
Simon Wilkinson
a151529de6 Tidy up util
Resolve a number of minor warnings
Prototype the stolower function for use elsewhere

Reviewed-on: http://gerrit.openafs.org/21
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
2009-07-10 10:43:43 -06:00
Simon Wilkinson
095ad16a31 Fix return type defaults to int warnings in ubik
Fix "return type defaults to int" warnings in ubik/beacon.c

Reviewed-on: http://gerrit.openafs.org/24
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Russ Allbery <rra@stanford.edu>
2009-07-10 10:36:40 -06:00
Simon Wilkinson
4087484fb4 Tidy up libacl
Very small amount of prototyping
Rewrite comment block so it wraps at 80 lines
Make sure there are no implicit ints

Reviewed-on: http://gerrit.openafs.org/18
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Russ Allbery <rra@stanford.edu>
2009-07-10 10:34:35 -06:00
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