Commit Graph

6067 Commits

Author SHA1 Message Date
Asanka Herath
9f2eb69899 rand_s isn't supported on older Visual C compilers
We still support building on Visual Studio 2003 where rand_s() is
not available.  If we are building on a Visual C compiler prior
to version 15.00, failover to srand()/rand() instead of using
rand_s().

Reviewed-on: http://gerrit.openafs.org/306
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-08-12 11:20:49 -07:00
Felix Frank
a1d46036fe Remove CacheStoreProcs and CacheFetchProcs from the afs_cacheOps.
The entries are no longer used, as the macros from afs_chunkops.h
are no longer necessary and afs_StoreAllSegments calls the
CacheStoreProc proper.

Reviewed-on: http://gerrit.openafs.org/110
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-08-12 08:13:53 -07:00
Claudio Bisegni
ce174b9ef1 OSX AFSBackgrounder fix minor bug
Has been fixed the status menu icon width, now i keeped from icon image.
Fixed the status item icon view redraw.

Reviewed-on: http://gerrit.openafs.org/305
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-08-12 04:35:50 -07:00
Jeffrey Altman
1024c4cd71 Windows: Dfs Referrals Processing. Not all errors are errors.
When processing a Dfs Referral request, not all lookup errors
should be treated as if the path does not exist.  Servers being
down or busy, volumes offline, cell vldb servers not found, etc.
do not mean that the client should go searching elsewhere to
evaluate the path.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/304
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2009-08-11 08:39:01 -07:00
Jeffrey Altman
d6071aa6e5 Windows: Avoid unnecessary DNS lookups
Windows will attempt to open connections to a broad
range of pipe service (share) names which do not contain
a dot in them.  Attempts to search for these names as
cell names in DNS result in timeouts and sluggish behavior
when browsing \\AFS in the Explorer Shell.

To avoid this problem, do not perform a DNS lookup for a
cellname that doesn't not contain a dot in it.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/302
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2009-08-11 08:37:04 -07:00
Jeffrey Altman
8cd1dc27dc Windows: Setting Server Preferences
The Windows cache manager can apply administrator specified
server preferences as specified in the registry.   When these
rankings are applied the CM_SERVERFLAG_PREF_SET flag was not
set on the cm_server_t object.  In addition, appropriate locking
was not being used in the places where the flag was set.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/303
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-08-11 08:08:35 -07:00
Felix Frank
61ae8792f6 Unite CacheFetchProcs and add abstraction calls.
The cache type specific differencies among afs_MemCacheFetchProc
and afs_UFSCacheFetchProc are divided into two sets of "fetchOps".
Upon rxfs_fetchInit, the appropriate set is chosen.

Reviewed-on: http://gerrit.openafs.org/109
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-08-11 04:56:18 -07:00
Asanka Herath
d8c70aa2c3 Windows: Implement SRVSVC and WKSSVC RPC interfaces
Windows uses RPC over SMB to communicate with file servers for
administrative tasks including enumeration and queries of file
server shares.  This patch implements support for RPC over SMB
and partially implements the SRVSVC and WKSSVC RPC interfaces.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/301
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-08-10 15:35:15 -07:00
Andrew Deason
b4975a6a7c Restore util des dependency
Commit c3c8a3e2f9 removed 'des' as a
dependency of the 'util' target, but util still depends on des since
rxkstats.c includes des.h. So, put the des dep back in.

Reviewed-on: http://gerrit.openafs.org/278
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-08-10 12:57:46 -07:00
matt@linuxbox.com
6ec3db1bb9 MCAS changes from Matt
Change static max allocators to 30.  Add atomic add/sub macros returning
original value, based on CASIO.  Add interfaces to add and remove generic
allocator caches.  Add atomic inc/dec/sub macros using MCAS primitives.
Add inline assembly for x86_64 and shim for Solaris (9+) atomic operations,
providing Solaris x86 and alternate shim for Solaris Sparc.  Set interface
adapted for iteration and generalized for use with opaque key, value
pointers.  File cas_skip_func.c provides kv interface, cas_skip_adt.c
provides kv interface, plus iteration on skip lists.  Casual dependencies
on stdio and exit() defined out.

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/214
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-08-10 07:01:40 -07:00
Derrick Brashear
160aff88be fileserver should actually retry VL_RegisterAddrs on failure
currently the background daemon logic for retrying was never triggered.
easy enough fix: set FS_registered to 1 so the loop retries

Reviewed-on: http://gerrit.openafs.org/266
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-08-10 04:40:06 -07:00
Jeffrey Altman
ec83174608 add xdr_alloc
applications can allocate memory that must be deallocated by
the XDR package.  Add xdr_alloc to permit that.

Export from libafsrpc.

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/269
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-08-06 05:15:53 -07:00
Jeffrey Altman
be1a675dcc Make Windows pioctl prototypes consistent with Unix
The Windows pioctl prototypes differed from those now exported
by sys/sys_prototypes.h.  This produced undesirable warnings.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/260
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-08-05 21:48:52 -07:00
Jeffrey Altman
1c5dc25c0d Windows: Preserve GetLastError during WinTorture testing
When an error occurs during the WinTorture scripts the
actual error was not always being preserved because
subsequent Win32 calls were executed before the value
was logged.

In at least one case, the variable used to store the
last error was not initialized nor assigned in all data
paths.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/270
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-08-05 21:02:10 -07:00
Marc Dionne
c3c8a3e2f9 kauth warning reduction
Warning removal for various functions that manipulates keys and use
several data types interchangeably.
Inline helpers are introduced to convert between the types and are
used when making function calls to target the appropriate type:

des_prototypes.h
cblockptr_to_cblock:  des_cblock *  to des_cblock
charptr_to_cblock:  char *  to des_cblock
charptr_to_cblockptr:  char *  to des_cblock *

rxkad_prototypes.h
ktc_to_cblock:  struct ktc_encryptionKey *  to des_cblock
ktc_to_cblockptr:  struct ktc_encryptionKey *  to des_cblock *

kauth_internal.h
EncryptionKey_to_cblock:  EncryptionKey *  to des_cblock
EncryptionKey_to_ktc:  EncryptionKey *  to struct ktc_encryptionKey *
ktc_to_EncryptionKey:  struct ktc_encryptionKey *  to EncryptionKey *

- parameters are adjusted for tkt_DecodeTicket(5), replacing the char *
key with struct ktc_encryptionKey, to match usage
- the get_key function is changed to have a void * parameter, to match
usage
- rxkad_prototypes.h includes des.h to get the des_cblock definition.
This causes conflicts for a few files where the kerberos headers are
also included - aklog/aklog_main.c and WINNT/afsd/afskfw.c
Use NO_DES_H_INCLUDE in thoses cases to skip the new parts of
rxkad_prototypes.h

Reviewed-on: http://gerrit.openafs.org/234
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-08-05 21:00:46 -07:00
Claudio Bisegni
20243612a1 Removed user perspectivev3 file in xcode project and update the gitconfig
gitconfig in src/platform/DARWIN/AFSPreference has been modified to ignore the perspectivev3 that is created by xcode for window layout.Has been also delete the file created for the user

Reviewed-on: http://gerrit.openafs.org/267
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-08-03 10:24:00 -07:00
Claudio Bisegni
b0818fcdb2 Cleaned most warning OSX OpenAFS preference and completed the AFSBackgrounder implementation
At startup the preference pane check for the presence in ~/Library/LaunchAgents of the file  it.infn.lnf.network.AFSBackgrounder.plist that. The agent could be started in OpenAFS preference pane view.
AFSBackgrounder has replaced the NSMenuExtra, when it doesn't quit well launchd restart it. AFSBackgrounder can be used also for other work, for now, at login it check the user preference for get token.
Has been made some refactoring in code for remove most warning.
The unused think are been delete from project.

Reviewed-on: http://gerrit.openafs.org/263
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-08-03 09:44:00 -07:00
Felix Frank
b3d9dcb855 Storeops beautifications.
Things can be made a lot more readable in storeOps than in the
monolithic StoreProc.
Also shorten a panic message that is a bit gratuitous.

Reviewed-on: http://gerrit.openafs.org/108
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-08-03 07:58:19 -07:00
Claudio Bisegni
7868e19610 AFS Backgrounder implementation & warirng clean
Replaced the NSMenuExtra and created the AFSBackgrounder that will do all work for aklog at login and manage the Status menu in menu bar

Reviewed-on: http://gerrit.openafs.org/262
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-08-03 04:51:26 -07:00
Claudio Bisegni
f52f509962 Start coding OSX Backgrounder Application, for OpenAFS Preference Pane, that user NSStatusItem
To prevent future compatibility with osx we must use NSStatusItem instead NSMenuExtra that is not documented api.
For this has been created a background only application that will manage all function managed by current NSMenuExtra

Reviewed-on: http://gerrit.openafs.org/261
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-08-03 04:48:36 -07:00
Jeffrey Altman
a13d8146a3 Add generated files to doc/xml/AdminGuide .gitignore
Add htmlhelp.hhp, index.hhk, and toc.hhc

Reviewed-on: http://gerrit.openafs.org/259
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-08-02 05:41:53 -07:00
Derrick Brashear
175774acab version update for 1.5.61
make configure version strings be 1.5.61

Reviewed-on: http://gerrit.openafs.org/258
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-31 15:32:05 -07:00
Russ Allbery
5a4f31090f Restore permission documentation in bosserver man page
The original IBM HTML documentation had a table showing the permissions
that bosserver expects and sets when it creates the directory structure
for AFS.  That table was accidentally dropped in the conversion to POD.
Restore it from the HTML shipped with an older version of OpenAFS.

Reviewed-on: http://gerrit.openafs.org/210
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
2009-07-31 15:07:49 -07:00
Jeffrey Altman
5d8c3f6758 Windows: Version and ChangeLog updates for 1.5.61
1.5.61 == 1.5.6100.0

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/255
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-31 14:48:34 -07:00
Marc Dionne
147aeeb6c5 Eliminate some multiple targets in Makefile rules
Rules with multiple targets can cause problems with parallel builds.
This patch fixes two cases that have caused occasional build errors.

Reviewed-on: http://gerrit.openafs.org/257
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-30 20:11:18 -07:00
Andrew Deason
152e9152ff Fix UKERNEL afs_mount arguments
Change 73 (commit dc6299f5) changed the order of arguments for the
UKERNEL implementation of afs_mount, causing uafs_mount to segfault
whenever called. This changes them back to what they were before.

Reviewed-on: http://gerrit.openafs.org/256
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-30 11:32:23 -07:00
Jeffrey Altman
8b86acea67 Windows: Rename README-NT to README-WINDOWS
Windows has not been referred to as NT in a long time.
We do not support Windows 9x any longer.  Rename
README-NT to README-WINDOWS.

Reviewed-on: http://gerrit.openafs.org/254
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-30 07:26:40 -07:00
Jeffrey Altman
21e7b0d0c1 Windows: Update the README-NT file
Update the README-NT to be more up to date.
It still requires a lot of work.

Reviewed-on: http://gerrit.openafs.org/253
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-30 07:26:14 -07:00
Andrew Deason
ef7e0d64e7 Add additional vlprocs safety checks
This adds additional safety checks to the vlserver's implementation of
the VL_CreateEntry, VL_ReplaceEntry, and VL_UpdateEntry RPCs. Now in all
three of these, any new volume ID that would be added to the VLDB or
that would be newly referenced in a VLDB entry is checked against
duplication in other entries. Additionally, any new volume names added
to the VLDB (either by creation, or modifying an existing volume) are
checked against duplication. This should make it impossible for clients
to make a volume ID or volume name correspond to multiple volume groups
(either conceptually or literally in the vldb).

This also alters the vlserver's implementation of the VL_GetNewVolumeId
RPC such that the vlserver increments maxvolid until the range of volume
IDs [*newvolumeid, *newvolumeid+bumpcount) is unused. 'vos' is modified
to only allocate one new volume id at a time, so we don't skip over
potentially-usable vol ids.

Reviewed-on: http://gerrit.openafs.org/158
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-29 20:55:25 -07:00
Derrick Brashear
e18216b91f macos 10.6 package naming
call the dmg Snowleopard for 10.6.

Reviewed-on: http://gerrit.openafs.org/252
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-29 20:45:00 -07:00
Derrick Brashear
6bec05a874 macos 10.6 amd64 kmod build fix
make the ARCHFLAGS support for amd64 work correctly by grepping for the correct thing

Reviewed-on: http://gerrit.openafs.org/250
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-29 20:44:47 -07:00
Derrick Brashear
5593ff360c macos 10.6 pam support
Make pam module compile on 10.6. Not tested yet.

Reviewed-on: http://gerrit.openafs.org/249
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-29 20:44:32 -07:00
Marc Dionne
e2dcd47f35 afs_pag_call.c needs rx/rxstat.h for RXSTATS_ExecuteRequest
This fixes a build error introduced by change 247 (commit 967abaf2).

Reviewed-on: http://gerrit.openafs.org/251
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-29 19:54:36 -07:00
Simon Wilkinson
967abaf29b Make rxgen emit prototype for ExecuteRequest
Make rxgen provide a prototype in its header file for _ExecuteRequest, and
remove all of the adhoc prototypes from the tree.

Reviewed-on: http://gerrit.openafs.org/247
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-29 18:42:47 -07:00
Jeffrey Altman
2ade93993a Windows: test for and react to SMB Extended Session Timeout support
SMB Extended Session Timeout Support is available only on
Windows systems with specific versions of the mrxsmb.sys driver.
Add a test for those driver versions.  If a supporting version
is present use the extended session timeout value instead of the
standard timeout value for the redirector timeout.  Adjust the
rx hard, conn, and idle timeouts accordingly.

The SMB module will define the ExtendedSessTimeout registry
value if it does not exist.  We rely on the fact that this is
done after the rx timeout values are calculated.  The mrxsmb
driver only reads the value at boot.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/248
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-29 13:59:53 -07:00
Simon Wilkinson
7a333523ea Fix signed vs unsigned pointers in volser
Cast iod_Read returns to (char *)
Fix signed vs unsigned pointer argument issues

Reviewed-on: http://gerrit.openafs.org/236
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-29 04:15:38 -07:00
Simon Wilkinson
6ae0c53d93 Code cleanup for vlserver
Move the cnvldb.h include so it's after vlserver.h
Don't define MAXSERVERS in cnvldb.h (it's already defined elsewhere)
Cast nvldbentry(s) to vldbentry to avoid warnings from display_entry
Volume IDs are unsigned
Use var[0]='\0' rather than sprintf(var, "");

Reviewed-on: http://gerrit.openafs.org/237
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-29 04:14:38 -07:00
Simon Wilkinson
5eae1c8062 Warnings work in util/
Make afs_ctime an inline function, instead of a complex macro.
This both improves our type safety, and suppreses warnings about
unused results.

Add bracing to clarify operator precedence in if (a && b || c)
statement

AFS_DARwiN60_ENV != AFS_DARWIN60_ENV

Use (void) rather than () in function prototypes

Reviewed-on: http://gerrit.openafs.org/240
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-29 04:13:08 -07:00
Simon Wilkinson
fb96e13d6f Cleanup for the USS directory
Add additional header files for prototypes
Add additional prototypes to header files
yyerror() is internal, not external. Make it static while we're at it.
ANSIfy various function definitions
Unsigned vs signed cleanup

Reviewed-on: http://gerrit.openafs.org/239
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-29 04:09:38 -07:00
Derrick Brashear
6640b8b064 install AFSCommander in prefpane dir
make the AFSCommander prefPane be installed, in /Library (as
are growl, macfuse, etc)

Reviewed-on: http://gerrit.openafs.org/243
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-28 17:36:46 -07:00
Jeffrey Altman
4dadd24ba8 Protect rx_call iovq from simultaneous attempts to empty it
The iovq queue is not safe to clear without holding the call lock.

FIXES 125110

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/242
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Hans-Werner Paulsen <hans@MPA-Garching.MPG.DE>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-28 08:06:42 -07:00
Simon Wilkinson
e6d321fcd4 Use an anonymous pointer for lpioctl
The block passed to lpioctl as cmarg is an anonymous chunk of
memory, so use a type that represents it as such.

Reviewed-on: http://gerrit.openafs.org/238
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-28 07:24:10 -07:00
Simon Wilkinson
c861bb0d77 Additional UKERNEL headers, prototyping and other fixes
Add additonal headers to include prototypes for UKERNEL builds
Add some more prototypes
Remove some unused variables

Reviewed-on: http://gerrit.openafs.org/241
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
2009-07-28 06:08:25 -07:00
Simon Wilkinson
02f0837307 More warnings cleanup for vol/
Prototype a number of functions
Add additional includes as required
Make some existing prototypes match the actual declarations
Volume IDs are unsigned in most of the code, change this bit to match
Make various Procs take an anonymous pointer, so they can be type checked
Add vol_internal.h for prototypes internal to this package

Reviewed-on: http://gerrit.openafs.org/235
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-28 05:32:31 -07:00
Simon Wilkinson
479ce49e9c Further warning cleanup for the libadmin directory
More code cleanup for libadmin, including additional header inclusion,
better prototyping, and signed/unsigned and const fixes

Reviewed-on: http://gerrit.openafs.org/228
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-27 15:16:31 -07:00
Simon Wilkinson
4c2e426d2d Move end label into correct position
The end label was in the wrong #ifdef block in order to actually be referenced
in the case where USEIFADDR is unset

Reviewed-on: http://gerrit.openafs.org/226
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-27 11:29:56 -07:00
Simon Wilkinson
d48b1e83bf Additional prototyping in dir.h
Add prototypes for functions used by the file and volservers

Reviewed-on: http://gerrit.openafs.org/227
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-27 10:59:00 -07:00
Marc Dionne
581ec9f06a Eliminate some "implicit function declaration" warnings
Include appropriate header files to eliminate some warnings for
implicit function declarations.  These are simple cases that don't
generate new warnings because of the prototypes.
Use grp.h if it exists to get setgroups() definition.

Reviewed-on: http://gerrit.openafs.org/233
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-27 10:55:35 -07:00
Adam Megacz
1ddc7fa920 In rxi_SendPacket[List], down hosts if ENETUNREACH or equivalent
This patch causes rxi_SendPacket[List] to "down" a host if
rxi_Sendmsg() returns -ENETUNREACH (or equivalent).  Previous behavior
only did this check if defined(KERNEL) becauase non-defined(KERNEL)
implementations did not return meaningful error codes from
rxi_Sendmsg().

Jeff Altman <jaltman@openafs.org> supplied the logic for the
AFS_NT40_ENV case; I was not able to test this (I do not own a
Windows license) and took him on his word.

Reviewed-on: http://gerrit.openafs.org/59
Reviewed-by: Adam Megacz <megacz@gmail.com>
Tested-by: Adam Megacz <megacz@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-07-27 08:39:01 -07:00
Marc Dionne
d82e9c851c Unused variable cleanup
Eliminate some warnings for unused variables.  In most cases the
variables are not used at all and are removed; in a few cases the
declarations need to be ifdef'ed to follow the code that uses them.
For a typical build here this removes 24 warnings.

Reviewed-on: http://gerrit.openafs.org/232
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-27 07:56:07 -07:00