openafs.git
13 years agotubik: Link with libafsauthent
Andrew Deason [Mon, 6 Dec 2010 21:41:33 +0000]
tubik: Link with libafsauthent

libubik_pthread.a requires libafsauthent.a, since we make use of
afsconf_* functions. Add libafsauthent to LIBS and make tubik depend
on it.

Remove linking to liblwp while we're here, as we should not be using
any LWP code.

Change-Id: Ie028fedfbc3e7a8a78dc69a2c38be99eb72602da
Reviewed-on: http://gerrit.openafs.org/3464
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoroken: Export rk_daemon, not daemon
Andrew Deason [Mon, 6 Dec 2010 19:29:31 +0000]
roken: Export rk_daemon, not daemon

We never export a function called 'daemon'. We only export a function
called rk_daemon, and the define daemon to rk_daemon. So, only include
rk_daemon in the map file, since that is the only symbol that will
appear.

Change-Id: Ib0f5ba88ba6d8bdefe3191050bc9e9e36f1b9134
Reviewed-on: http://gerrit.openafs.org/3463
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoSOLARIS: Fix some rx_atomic.h warnings
Andrew Deason [Mon, 6 Dec 2010 18:46:06 +0000]
SOLARIS: Fix some rx_atomic.h warnings

Include atomic.h so we get atomic_* prototypes, pass atomic->var in
rx_atomic_sub, and pass unsigned int*s to  the atomic_* functions.

Change-Id: Ic8d745bc1726c850bd15d38702163e92587bb0a5
Reviewed-on: http://gerrit.openafs.org/3462
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agolibafs: Set tvcp->callback before BulkStatus
Andrew Deason [Thu, 12 Aug 2010 19:38:55 +0000]
libafs: Set tvcp->callback before BulkStatus

When we call InlineBulkStatus or BulkStatus, we currently do not touch
tvcp->callback for any of the vcaches before making the call. This can
cause us to not notice an InitCallBackState issued by the fileserver
before the BulkStatus call returns, since the InitCallBackState
handler looks at tvcp->callback to determine what vcaches to clear
callbacks for. In turn, this can cause us to think we have a callback
agreement with the fileserver on one of the BulkStatus'd files, when
the fileserver does not actually have such a callback agreement.

So, set tvcp->callback to the server we are contacting, so if we get
an InitCallBackState call from that fileserver, the CBulkFetching
state will be cleared, and we will correctly discard the callback
information for that vcache.

Change-Id: Ib8790c8f9621d7a9da12588ea6115f9cb3ff9022
Reviewed-on: http://gerrit.openafs.org/2548
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agolinux: avoid leaking parent when revalidating and it is /afs
Chaskiel Grundman [Mon, 6 Dec 2010 17:43:12 +0000]
linux: avoid leaking parent when revalidating and it is /afs

we happily go to the "good dentry" path and exit, leaking the
result of dget_parent, if parent is globalVp. Let's not

Change-Id: I3848a1aa2611d17ba08e04b3f33f22623645d233
Reviewed-on: http://gerrit.openafs.org/3448
Reviewed-by: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoWindows: fix checked UNICODE build of talocale
Stefan Kueng [Sun, 5 Dec 2010 17:48:56 +0000]
Windows: fix checked UNICODE build of talocale

src/WINNT/talocale failed to build/link for checked builds. Fix it.

Change-Id: I39eb1605f67afdbd0f4ad04bb7ec560501410fbe
Reviewed-on: http://gerrit.openafs.org/3446
Tested-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: Build afs_shl_ext.dll with talocaleU.lib
Jeffrey Altman [Sat, 4 Dec 2010 23:03:21 +0000]
Windows: Build afs_shl_ext.dll with talocaleU.lib

Use the Unicode version of talocale to properly read
resource strings.

Change-Id: Ifb373a3b405922ecbdce4edb2ec86c31551d4dfa
Reviewed-on: http://gerrit.openafs.org/3442
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: install afs_shl_ext icon files
Jeffrey Altman [Sat, 4 Dec 2010 23:02:38 +0000]
Windows: install afs_shl_ext icon files

mount.ico and link.ico to dest\root.client\usr\vice\etc

Change-Id: Ic66f3cef73170d9101b12695a12ec41cdca6c89a
Reviewed-on: http://gerrit.openafs.org/3441
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: build a UNICODE version of talocale.lib
Jeffrey Altman [Sat, 4 Dec 2010 22:59:36 +0000]
Windows: build a UNICODE version of talocale.lib

Add src/WINNT/talocale_unicode that builds a UNICODE version
of talocale, talocaleU.lib

Change-Id: Iec343adbbab23fefa2dd9f474d23e593810552e9
Reviewed-on: http://gerrit.openafs.org/3440
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: fix UNICODE build for talocale
Jeffrey Altman [Sat, 4 Dec 2010 22:56:44 +0000]
Windows: fix UNICODE build for talocale

src/WINNT/talocale has not been built for UNICODE in a long time.
Fix it.

Change-Id: Ia8b182b711838e2d6592f9040d2173f5977f9cfd
Reviewed-on: http://gerrit.openafs.org/3439
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: afs_shl_ext improve overlay handlers
Stefan Kueng [Sat, 4 Dec 2010 09:56:01 +0000]
Windows: afs_shl_ext improve overlay handlers

Add link.ico and mount.ico Windows icon files.
Use these images as overlays instead of extracting an image
from shell32.dll which is a bad idea.  See

Change-Id: I624f959229a91329507aec5ff61045c49d296401
http://blogs.msdn.com/b/oldnewthing/archive/2005/10/26/485133.aspx
Reviewed-on: http://gerrit.openafs.org/3445
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: afs_shl_ext Show icon mount point overlay
Stefan Kueng [Fri, 3 Dec 2010 21:58:54 +0000]
Windows: afs_shl_ext Show icon mount point overlay

Change-Id: I8feb71e41e423c5e7484998bdac8a913595db9c4
Reviewed-on: http://gerrit.openafs.org/3444
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: afs_shl_ext folder bkgrnd context menu
Stefan Kueng [Fri, 3 Dec 2010 20:24:33 +0000]
Windows: afs_shl_ext folder bkgrnd context menu

Make the context menu handler also work for folder backgrounds
and on Win7 for library folder backgrounds

For folder backgrounds, the shell passes the PIDL of the folder
instead of a data object.  Extract the path from that PIDL. Also
extended the register function of the dll to add the required
registry keys.

Change-Id: I8928efd25058dced3820478a2858ce20336b4301
Reviewed-on: http://gerrit.openafs.org/3443
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Stefan Kueng <tortoisesvn@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: Remove fallback from GetCaps to GetTime
Jeffrey Altman [Wed, 1 Dec 2010 23:47:29 +0000]
Windows: Remove fallback from GetCaps to GetTime

If the file server responds to RXAFS_GetCapabilities with
RXGEN_OPCODE the server is up and there is no need to fallback to
RXAFS_GetTime.  Remove the code that performs the extra work.

Change-Id: Ieb0d1cce6f356a8988f2464227dec9b6cd9e6fcf
Reviewed-on: http://gerrit.openafs.org/3419
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>

13 years agoAdd .gitignore for tsm41
Christof Hanke [Sat, 4 Dec 2010 10:03:13 +0000]
Add .gitignore for tsm41

Just ignore some files created during the build.

Change-Id: Ifb276b2a71fe8e58517605584e918d990b8f2f5d
Reviewed-on: http://gerrit.openafs.org/3435
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoLINUX: Define zero_user_segment
Andrew Deason [Fri, 3 Dec 2010 22:39:57 +0000]
LINUX: Define zero_user_segment

When the kernel does not have the zero_user_segments function, we
define it ourselves. Also define the zero_user_segment function, since
we use it, and a kernel lacking zero_user_segments will also lack
zero_user_segment.

Change-Id: I5c786d2af27227793a7a2768d1af76ccd2d6a415
Reviewed-on: http://gerrit.openafs.org/3432
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoOpenBSD: Remove duplicate assignment of COMMON_INCLUDE in libafs
Antoine Verheijen [Fri, 3 Dec 2010 07:30:20 +0000]
OpenBSD: Remove duplicate assignment of COMMON_INCLUDE in libafs

When building libafs, the make file variable COMMON_INCLUDE is
assigned a value in two places: Makefile.common.in and
MakefileProto.OBSD.in. The assignment in the latter place is both
wrong and unnecessary. Remove it.

Change-Id: Ie322f01b023898d4f246243ee3d196aa714147df
Reviewed-on: http://gerrit.openafs.org/3430
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoMove include of sys/types.h in kopenafs.c
Antoine Verheijen [Fri, 3 Dec 2010 07:26:24 +0000]
Move include of sys/types.h in kopenafs.c

The netinet/in.h header file requires the inclusion of sys/types.h
(or some portion thereof). Most systems include it implicitly
within netinet/in.h. Some, such as OpenBSD, do not. In kopenafs.c,
sys/types.h is included after netinet/in.h which is fine in most
cases but means that, as a result, it will not compile on OpenBSD.
Moving sys/types.h before netinet/in.h solves this problem (and
should cause no problems on any other system).

Change-Id: Ifc3295f3eb4f0b2b4718d0b2aa6dcbb2b06da8df
Reviewed-on: http://gerrit.openafs.org/3429
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoproperly mark servers down for rx errors except OPCODE
Derrick Brashear [Thu, 2 Dec 2010 18:11:33 +0000]
properly mark servers down for rx errors except OPCODE

if we get a negative (rx) error, it means the server is down,
*except* for RXGEN_OPCODE. make this handling consistent

Change-Id: I8459ec49ca311dc336aed8da7b106fe0f647fc32
Reviewed-on: http://gerrit.openafs.org/3407
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agounix cm rx-oblivious connection pooling
Matt Benjamin [Wed, 3 Nov 2010 21:02:19 +0000]
unix cm  rx-oblivious connection pooling

Implements a connection pool for Rx client connections with the
same credentials.  The code trivially avoids the limit on Rx
call channels, without touching Rx directly.  The conn call limit
is known to be hit in cache-bypass, and probably other use cases,
so there is an incentive to address it potentially sooner than
larger Rx changes are ready to merge.

Upgrade to exclusive lock before calling find_preferred_connection.
Unset trace option.  Fix a warning around modular increment of
select_index, we'll go with the change suggested by Marc, I don't
see a real need to save the value mod CVEC_LEN.

Change-Id: I956aa22cd52b1c43187c7e03230e36820ba11c4d
Change-Id: Ie5f936ba912bcfe0544dbc1d035bb74e5ddc50f8
Reviewed-on: http://gerrit.openafs.org/2216
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agobalance afs_vcount in non-linux CM
Derrick Brashear [Thu, 2 Dec 2010 06:48:53 +0000]
balance afs_vcount in non-linux CM

when we dole out a vcache, count it.

Change-Id: Id0f9e20b4b8a9de6ee83dcb383c3a152f6b733e6
Reviewed-on: http://gerrit.openafs.org/3423
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agofreebsd: properly track vcache references
Derrick Brashear [Thu, 2 Dec 2010 06:55:34 +0000]
freebsd: properly track vcache references

previously both root and reclaim could end up leaking refs. fix it.

Change-Id: Ib3c9dab2f31b988a2887821f5192ff1fad0e732c
Reviewed-on: http://gerrit.openafs.org/3424
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoosconf quoting for macros
Derrick Brashear [Thu, 2 Dec 2010 06:02:04 +0000]
osconf quoting for macros

fix quoting to avoid substing during configure, instead let it happen in make

Change-Id: I31ec2e7f15ca14f337b4f3f43dd1ef5c0b423756
Reviewed-on: http://gerrit.openafs.org/3420
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoconfigure: add lresolv to MT_LIBS
Derrick Brashear [Wed, 1 Dec 2010 21:18:25 +0000]
configure: add lresolv to MT_LIBS

because of how we configure afsdb, we can end up needing libresolv
but not configuring it for threaded code. link it in. at the same time,
make sure the link can succeed on e.g. macos

Change-Id: Ibf2445638f36d543a0df8be1eaccfc0c31b72ae1
Reviewed-on: http://gerrit.openafs.org/3408
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoOpenBSD: Fix variable name typo in osi_vcache.c
Antoine Verheijen [Wed, 1 Dec 2010 22:40:04 +0000]
OpenBSD: Fix variable name typo in osi_vcache.c

The osi_PostPopulateVCache() routine in the OpenBSD version of
osi_vcache.c tries to use the non-existent variable "vc" instead
of "avc". This fixes it.

Change-Id: Idac09739d36e253518fbdbd600ab43c9ea87da3a
Reviewed-on: http://gerrit.openafs.org/3418
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoImport of code from heimdal
Heimdal Developers [Thu, 2 Dec 2010 05:27:55 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
42f9c644cf00be752f09d85a9664bf2e3502101c (switch-from-svn-to-git-1962-g42f9c64)

New files are:
roken/write_pid.c

Change-Id: I7b48eae393b26c6afe9e9b7dd9f26d8db2d1c6fc
Reviewed-on: http://gerrit.openafs.org/3421
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoOpenBSD: Fix use of mstat Length field in osi_vm.c
Antoine Verheijen [Wed, 1 Dec 2010 21:24:26 +0000]
OpenBSD: Fix use of mstat Length field in osi_vm.c

The code for osi_VM_FlushPages() in osi_vm.c for OpenBSD incorrectly
tries to access field "m.Length" in the vcache structure "avc"
instead of "f.m.Length".

Change-Id: I44ac0bbbd0e6279c54be185fbf9514b23c65017b
Reviewed-on: http://gerrit.openafs.org/3417
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoFBSD: clean up rx_socket teardown
Ben Kaduk [Sun, 28 Nov 2010 04:25:03 +0000]
FBSD: clean up rx_socket teardown

We had previously been waiting for the SO_ISDISCONNECTED flag
to show up in the so_state field, but the flags are not really
used for stateless protocols such as UDP, and that flag never
shows up.  Even with a full three-second wait, the rxk_Listener
sometimes still failed to fully terminate, preventing the reuse
of the rx port for a restarted afsd.
Copy from Solaris and loop until rxk_ListenerPid is zero, doing
bogus one-byte NetSends in the body of the loop.

Change-Id: I6a5ad4509549fa64c551af642ef5867602b182c0
Reviewed-on: http://gerrit.openafs.org/3391
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoImport of code from heimdal
Heimdal Developers [Wed, 1 Dec 2010 18:02:30 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
42f9c644cf00be752f09d85a9664bf2e3502101c (switch-from-svn-to-git-1962-g42f9c64)

Upstream changes are:

Asanka C. Herath (9):
      Windows: Registry based configuration
      Rename get_entry() -> _krb5_config_get_entry()
      Deal with quoted strings when reading lists of config strings
      Add missing export and calling convention annotations
      Windows: Build and export localtime_r
      Windows: Older Windows SDKs need <winsock2.h>
      More compatibility macros
      Increase KBR5_BUFSIZ to 2048 and use it in config_file.c
      Deal with backslash escaped quotes

Love Hornquist Astrand (3):
      provide symbol renameing for sha512 and sha384
      less exit with failures
      add random abstraction

Change-Id: I495fa8e9c1c037d6dee191279c1155a4ec6be945
Reviewed-on: http://gerrit.openafs.org/3400
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoutil: Add definition of KRB5_BUFSIZ
Simon Wilkinson [Wed, 1 Dec 2010 18:07:24 +0000]
util: Add definition of KRB5_BUFSIZ

A forthcoming Heimdal update will require that KRB5_BUFSIZ be
defined in order to use its config parsing code. Define it in
our hacky krb5_locl.h

Change-Id: Ieda8df8f31a759927fade44f9196e7411f4a0a59
Reviewed-on: http://gerrit.openafs.org/3399
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoBuild and use roken's mkstemp
Simon Wilkinson [Wed, 1 Dec 2010 17:42:23 +0000]
Build and use roken's mkstemp

Add roken's mkstemp to the build on all platforms, either through
configure (Unix) or explicitly (Windows). Change all callers so
that mkstemp is used unconditionally, rather than falling back
to more risky alternatives.

This is based on original change from Russ Allbery submitted as
http://gerrit.openafs.org/2146

Change-Id: Ia1def41e438e6517b3e7cd5790df3c99eddb8ef6
Reviewed-on: http://gerrit.openafs.org/3398
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoImport of code from heimdal
Heimdal Developers [Wed, 1 Dec 2010 17:35:50 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
5b91f58f350c92fb9eacd1ebac558381b0b8deac (switch-from-svn-to-git-1705-g5b91f58)

New files are:
roken/mkstemp.c

Change-Id: I42cf73fd2943e2d5cfa629d3ce05f20a065428a1
Reviewed-on: http://gerrit.openafs.org/3397
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoImport mkstemp.c from libroken
Simon Wilkinson [Wed, 1 Dec 2010 17:27:46 +0000]
Import mkstemp.c from libroken

Change-Id: Idd8688cc731436ff1fe5708e273045b96085e986
Reviewed-on: http://gerrit.openafs.org/3396
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoOpenBSD: Use Darwin version of afsi_SetServerIPRank() for OpenBSD 4.7 and above.
Antoine Verheijen [Wed, 1 Dec 2010 20:22:45 +0000]
OpenBSD: Use Darwin version of afsi_SetServerIPRank() for OpenBSD 4.7 and above.

With OpenBSD 4.7, the ia_subnet and ia_subnetmask fields have been removed
from the in_ifaddr structure as part of a cleanup that considers them
unnecessary. Thus, the version of afsi_SetServerIPRank() that OpenBSD was
using no longer compiles. On the other hand, the Darwin version of this
routine seems suited to OpenBSD's needs since it doesn't use those fields
so we'll use that version for OpenBSD 4.7 and above instead.

Change-Id: I27333056378a023e175bddeb637288fc6d1b6e88
Reviewed-on: http://gerrit.openafs.org/3405
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoDarwin: Assign correct value to myDstaddr in afsi_SetServerIPRank()
Antoine Verheijen [Wed, 1 Dec 2010 18:54:23 +0000]
Darwin: Assign correct value to myDstaddr in afsi_SetServerIPRank()

The value in sin->sin_addr.s_addr that's assigned to myDstaddr in the
Darwin version of afsi_SetServerIPRank() is in network byte order but
really needs to be in host byte order.

Note: This patch assumes that change I66f5c790d8c55b359e3550b6d71f3abe040a2820
      has been previously installed. The patch fails otherwise.
Change-Id: I3078da1efb94f87f84dbe357f3272d908818256b
Reviewed-on: http://gerrit.openafs.org/3402
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoDARWIN: Fix processing using rx_ifaddr_* macros in afsi_SetServerIPRank()
Antoine Verheijen [Wed, 1 Dec 2010 18:37:02 +0000]
DARWIN: Fix processing using rx_ifaddr_* macros in afsi_SetServerIPRank()

The macros rx_ifaddr_address, rx_ifaddr_netmask, and rx_ifaddr_dstaddress
all expand to a call to memcpy() which returns the destination address as
its return value. The test in the DARWIN version of afsi_SetServerIPRank()
for completion when using this macro, however, seems to assume that success
returns zero, which is wrong and results in myAddr, subnetmask, and
myDstaddr always being set to zero. This patch corrects this behaviour.

Change-Id: I66f5c790d8c55b359e3550b6d71f3abe040a2820
Reviewed-on: http://gerrit.openafs.org/3401
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoWindows: permit code signing without timestamps
Jeffrey Altman [Mon, 29 Nov 2010 22:47:10 +0000]
Windows: permit code signing without timestamps

If CODESIGN_TIMESTAMP is not defined, permit code signing
to occur but do not ask signtool to contact a timestamp
server.

Change-Id: I801264192caaf871225b001c6f96c0317e115578
Reviewed-on: http://gerrit.openafs.org/3393
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoUnix afsd: Check for mountpoint /afs first
Christof Hanke [Sun, 28 Nov 2010 12:01:12 +0000]
Unix afsd: Check for mountpoint /afs first

Check for the existance of the mountpoint before trying to
start.

Change-Id: I56c7a69b2b24c465f987e33c3f88c6ac37e40dd0
Reviewed-on: http://gerrit.openafs.org/3392
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoCache bypass: switch to rx_Readv
Marc Dionne [Wed, 24 Nov 2010 00:08:24 +0000]
Cache bypass: switch to rx_Readv

Tests show that cache bypass doesn't scale very well past a few
concurrent processes, with a lot of lock contention in the RX
layer.  Switching the implementation to the iovec based rx_Readv
alleviates much of this.

Also take advantage of the fact that the upper layer readpages
only sends down contiguous lists of pages, and issue larger read
requests and populate the pagecache pages from the iovecs we
get back.  The loop logic is changed significantly to accomodate
the new pattern.

Read throughput is improved by about 30-40% for some parallel read
benchmarks I use.  Along with some other tweaks, it can allow the
throughput to be more than doubled.

Change-Id: I56877ec15eba035429bd4ea32731687c862f151f
Reviewed-on: http://gerrit.openafs.org/3375
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoMore deprecations noted.
Steve Simmons [Tue, 31 Aug 2010 17:16:15 +0000]
More deprecations noted.

Change-Id: Id0d15f0f065dbbd82287258175530527e7cde36f
Reviewed-on: http://gerrit.openafs.org/2633
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

13 years agoexternal import script should rebase away whitespace
Derrick Brashear [Tue, 16 Nov 2010 17:38:06 +0000]
external import script should rebase away whitespace

and provide an option not to.

Change-Id: I3a81de0c4786cfc9e5d4b92bb175528ed1334b90
Reviewed-on: http://gerrit.openafs.org/3315
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years ago.gitignore update
Simon Wilkinson [Mon, 1 Nov 2010 19:19:55 +0000]
.gitignore update

Update assorted .gitignore files with missing build products

Change-Id: Ibeb928b9c2f6abab6f35ed450c5110aee1fc4905
Reviewed-on: http://gerrit.openafs.org/3212
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agovos: Improve release recovery on timed-out trans
Andrew Deason [Thu, 9 Sep 2010 14:41:40 +0000]
vos: Improve release recovery on timed-out trans

When a portion of 'vos release' takes long enough that a transaction
on one or more RO sites times out, it retries to release to those
sites. However, it does not take into account the situation where the
transaction on the original RO clone has also timed out, which it
usually will have if we took a long time to get to the ForwardMulti
stage for any reason.

Add a check to see if the clone RO transaction has timed out, and if
so, recreate the transaction on it. Check if the volume appears to
have changed at all, and if it has, bail out.

Change-Id: I7dd69c83e41216246e40159e8d9c1417e15355f4
Reviewed-on: http://gerrit.openafs.org/2726
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoubik sync client error recovery
Derrick Brashear [Tue, 16 Feb 2010 06:13:57 +0000]
ubik sync client error recovery

give ubik server "client mode' error recovery for token errors

Change-Id: Ibd6cad6ecf067da7da5724491756576d1ffedb03
Reviewed-on: http://gerrit.openafs.org/3150
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

13 years agoWindows: NSIS installer requires the architecture for CL=1400
Jeffrey Altman [Fri, 26 Nov 2010 07:55:03 +0000]
Windows: NSIS installer requires the architecture for CL=1400

The NSIS installer at present is 32-bit only.  Production releases
of OpenAFS have always been performed using the CL=1310 compiler
so it wasn't noticed that src/WINNT/install/NSIS/NTMakefile did
not define the ARCH (architecture) for the purpose of identifying
which redistributable runtime library installer should be
integrated into the build.  For the CL=1310 compiler there are
not prebuilt installers for OpenAFS to integrate.

Change-Id: Ide80d5013f55dbcd97b7b099de7066c5afd0df14
Reviewed-on: http://gerrit.openafs.org/3388
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoWindows: make use of AFSDEV_BIN and set the PATH
Jeffrey Altman [Fri, 26 Nov 2010 07:51:16 +0000]
Windows: make use of AFSDEV_BIN and set the PATH

ntbuild.bat defines AFSDEV_BIN which is set to the list of
directories from which executables required for the build
process will be executed.  However, this value was never used
to modify the PATH environment variable.  Make it do so.

Change-Id: I3ac65a7ceea54cbcf1d2c41f6b0e7af9de960224
Reviewed-on: http://gerrit.openafs.org/3387
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agocheck curses-libs by configure
Christof Hanke [Sun, 21 Nov 2010 22:01:53 +0000]
check curses-libs by configure

Presently, the used curses-library are determined by OS.
The leads to a build error when no curses-headers are installed.
Use configure to test if curses.h or ncurses.h is present.
ncurses takes precedence over curses.h.
If neither the curses- nor ncurses-libs are available, do not build
afsmonitor and scout.
A summary at the end of the configure should make this clear to
everyone.
The variable TXLIBS has been renamed to LIB_curses.

Change-Id: I3f661e0b6199be41818dc22149b061e3d599b77f
Reviewed-on: http://gerrit.openafs.org/3345
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoAdd output-table to libafsutil
Christof Hanke [Sun, 17 Oct 2010 06:54:06 +0000]
Add output-table to libafsutil

This adds the complex structure Table to libafsutil.
All binaries linking to libafsutil can use this to store their output
in the table. This table can be sorted by a predefined column.
The available output formats are ASCII, CSV and HTML.

Change-Id: Id0a00d996a94fee08538226317c60e5bf5082051
Reviewed-on: http://gerrit.openafs.org/1970
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoFix FBSD build after warning cleanups
Ben Kaduk [Sat, 27 Nov 2010 05:45:26 +0000]
Fix FBSD build after warning cleanups

The preprocessor if directive needs a matching endif, not plain end.

Change-Id: I423b32326cae60073d110165f94ba278521634ee
Reviewed-on: http://gerrit.openafs.org/3390
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoCatch up on FBSD releases
Ben Kaduk [Sat, 27 Nov 2010 04:28:50 +0000]
Catch up on FBSD releases

Add param.foo.h and sysname entries for the past and forthcoming
FreeBSD 7.2, 7.3, 7.4, and 8.2 releases.  Also update the
MakefileProto.FBSD.ins that need touching, simplifying the libuafs
one in the process.

Change-Id: I6a7ff217572daac96f6fa6eb104eb7b1305c5ff6
Reviewed-on: http://gerrit.openafs.org/3389
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoFBSD: warning cleanups
Ben Kaduk [Sat, 30 Oct 2010 06:23:24 +0000]
FBSD: warning cleanups

Only declare 'p' if it will be used; other unused variables;
signedness mismatches.

Kill spl with fire.

Change-Id: I03ada8b358f64342bc61bdef03df9dfecc550a6b
Reviewed-on: http://gerrit.openafs.org/3200
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoUtilize --enable-warnings for SUNWspro
Andrew Deason [Mon, 22 Nov 2010 02:20:42 +0000]
Utilize --enable-warnings for SUNWspro

Add the necessary options for the Solaris Studio compiler to enable
more warnings, when specified in the ./configure invocation.

Change-Id: I30e2a4a4bddad6beb4c50c3e10775c09916bf0df
Reviewed-on: http://gerrit.openafs.org/3367
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

13 years agoOnly specify CFLAGS_NO* with --enable-checking
Andrew Deason [Tue, 23 Nov 2010 03:54:32 +0000]
Only specify CFLAGS_NO* with --enable-checking

Currently we are always specifying e.g. CFLAGS_NOUNUSED as -Wno-unused
when we think we are compiling with gcc. Since autoconf always tries
to use gcc when possible, this breaks the build if we have a gcc
available but we use another cc for building.

This should be fixed otherwise, but in the meantime at least make this
only happen if warnings are actually turned on, so the build is less
likely to break with a default ./configure invocation.

Change-Id: I65d859db1fc0bb0930092fa8cfd6a0577d1c6ce2
Reviewed-on: http://gerrit.openafs.org/3366
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

13 years agoSolaris: Support -i in shlib-build
Andrew Deason [Sun, 21 Nov 2010 23:57:22 +0000]
Solaris: Support -i in shlib-build

Our librokenafs.map file contains symbols that we may not actually
define, since the list of exported symbols varies depending on the
platform's capabilities. This causes errors during linking, which can
be suppressed by marking all symbols as "= EXTERN". Do so by having
shlib-build modify the mapfile at link-time, when -i is specified to
indicate ignoring undefined symbols.

Change-Id: I043fca6c8206a19fb7bddbc8e624baeaaff3ab00
Reviewed-on: http://gerrit.openafs.org/3365
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

13 years agoafsd: Remove unused definitions
Andrew Deason [Mon, 22 Nov 2010 02:40:28 +0000]
afsd: Remove unused definitions

Remove some #defines for s_host and similar things. They are not used
anywhere, and they can cause warnings for e.g. s_host being redefined.

Change-Id: Ibb549bde4428304c39a67fbfee507e5234a21546
Reviewed-on: http://gerrit.openafs.org/3364
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

13 years agovol: Move VOL_CV_TIMEDWAIT to volume_inline.h
Andrew Deason [Tue, 23 Nov 2010 03:23:02 +0000]
vol: Move VOL_CV_TIMEDWAIT to volume_inline.h

Some platforms will give errors for the vol package glock not being
defined in VOL_CV_TIMEDWAIT, since some utilities include volume.h
(with pthreaded ubik enabled) but do not have the vol glock. This
isn't a problem for the other CV_WAIT (et al) macros, since, being
macros, they are not expanded if never referenced. Since
VOL_CV_TIMEDWAIT is a static inline function, however, and at least
some platforms try to compile/link it even if it's not referenced.

So, move it to volume_inline.h, which is only used by the volume
package itself, where we will have the vol glock.

Change-Id: I3e1513869c03d16d274c23e0bbb075df85d6d3a3
Reviewed-on: http://gerrit.openafs.org/3363
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

13 years agoFUSE: Link to afshcrypto and crypt
Andrew Deason [Tue, 23 Nov 2010 18:24:16 +0000]
FUSE: Link to afshcrypto and crypt

afsd.fuse requires -lafshcrypto and -lcrypt, so link to them when
linking.

Change-Id: Id4bd4caf5e187a1394a62761a1c19caeeeb041cc
Reviewed-on: http://gerrit.openafs.org/3362
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

13 years agoFix build for archs with -lcrypt
Ben Kaduk [Wed, 24 Nov 2010 02:10:16 +0000]
Fix build for archs with -lcrypt

The linktest utility calls crypt(3), and needs -lcrypt on some
architectures.  Provide the $(LIB_crypt) argument in the makefile
as appropriate.

Change-Id: I47b54fa80839062908df2d0a423ad72a628c1e76
Reviewed-on: http://gerrit.openafs.org/3376
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoaklog: Build a pthreaded, rather than lwp, version
Simon Wilkinson [Mon, 6 Sep 2010 08:39:59 +0000]
aklog: Build a pthreaded, rather than lwp, version

Make aklog (and friends) use pthreads, rather than lwp.

Change-Id: I49114caa74357b3b35626db6a7439128aec0acb6
Reviewed-on: http://gerrit.openafs.org/3356
Tested-by: Chaz Chandler <clc31@inbox.com>
Reviewed-by: Chaz Chandler <clc31@inbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoAdd explicit libafsauthent dependency for aklog
Chaz Chandler [Thu, 25 Nov 2010 05:43:28 +0000]
Add explicit libafsauthent dependency for aklog

Prevents occasional failures with parallel builds by ensuring
libafsauthent is built before aklog, which needs it.

Change-Id: Ibb0bdda3ce1fa306dfee1343e0b8b97486ee5efb
Reviewed-on: http://gerrit.openafs.org/3386
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chaz Chandler <clc31@inbox.com>
Tested-by: Chaz Chandler <clc31@inbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoaklog weak warning
Derrick Brashear [Mon, 1 Nov 2010 02:21:19 +0000]
aklog weak warning

make aklog guess when you need to enable weak crypto

Change-Id: I5f79e654d2ebcd8500d66d20f00edb49b9d62323
Reviewed-on: http://gerrit.openafs.org/3209
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoubik: Log a message when we replay the trans log
Andrew Deason [Wed, 24 Nov 2010 15:03:19 +0000]
ubik: Log a message when we replay the trans log

It can be helpful to know that an interrupted transaction was replayed
on startup, and this should be rare. So log a message when that
happens, indicating what db version we replayed to.

Change-Id: I8b2562dea2811190d1a45ba47f362a2441f39dfa
Reviewed-on: http://gerrit.openafs.org/3385
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoubik: Replay the transaction log label correctly
Andrew Deason [Wed, 24 Nov 2010 14:36:05 +0000]
ubik: Replay the transaction log label correctly

Commit eec0d94f519b3e27f255b9b7a637df043951424e fixed the transaction
replay log code to correctly identify valid transaction logs on
little-endian systems, but missed ntohl'ing the database label read in
a LOGEND opcode. Fix that, so the database is labelled correctly when
replayed from a transaction log.

And while we're here, actually pass a struct ubik_version* to
adbase->setlabel, to make it a little more clear what's happening.

Change-Id: I7edc33a4539f3b2fa342335c08f958b5dfb97f57
Reviewed-on: http://gerrit.openafs.org/3384
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoauth: Allow identities in the UserList
Simon Wilkinson [Wed, 15 Sep 2010 10:17:14 +0000]
auth: Allow identities in the UserList

Extend the userok interface provided by the auth library to permit the
addition, deletion and inspection of identities within the UserList.

A number of additional functions are added, as direct replacements for
their Kerberos v4 only counterparts - these are:
 *) afsconf_DeleteIdentity
 *) afsconf_GetNthIdentity
 *) afsconf_AddIdentity
 *) afsconf_SuperIdentity

In addition, a new function is added to allow the status of any given
identity to be queried
 *) afsconf_IsSuperIdentity

New form identities are stored within the same UserList file as
Kerberos v4 identities. We take advantage of the fact that the current
code skips any entry with a leading whitespace. Identities are stored as
a single line, with a leading space, followed by the integer
representation of their type (0 for Kerberos 4, 1 for GSSAPI), followed
by the base64 encoded representation of their exported name, followed by
the display name of the identity. Each field is whitespace separated.

For example:
 1 BAEACwYJKoZIhvcSAQICAAAAEHN4d0BJTkYuRUQuQUMuVUs= sxw@INF.ED.AC.UK
is the representation of the GSSAPI identity "sxw@INF.ED.AC.UK"

An addition to the test suite is also provided which will test all of
the existing, and new super user manipulation functions.

Change-Id: I50648bb1ecc3037a90d623c87a60193be4f122ff
Reviewed-on: http://gerrit.openafs.org/3355
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoCache bypass: Only compile bypass code for the Linux kernel
Marc Dionne [Tue, 23 Nov 2010 23:39:33 +0000]
Cache bypass: Only compile bypass code for the Linux kernel

Only compile the afs_bypasscache.c code if AFS_LINUX24_ENV is set,
since it's currently the only case where the code is actually used.
Only sections that caused problems for UKERNEL were previously
ifdef'ed.

Besides making the code cleaner, the main effect of this change
is to prevent compiling most of the bypass code for UKERNEL where
it isn't currently used.

If support for bypass is added for other platforms eventually, the
code here would need to be reworked anyway, ideally abstracting out
and moving any OS specific bits into the platform subdirectories.

Change-Id: If39294926ea38896ce2dedd1e46b2da0d622cae5
Reviewed-on: http://gerrit.openafs.org/3374
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoCache bypass: remove ifdefs under src/afs/LINUX
Marc Dionne [Tue, 23 Nov 2010 23:21:16 +0000]
Cache bypass: remove ifdefs under src/afs/LINUX

Compile cache bypass code unconditionally under src/afs/LINUX
since it is now always enabled.  Also remove syslog messages
about a "cache bypass patched module" when loading and unloading
the module.

Change-Id: Id83487fe9704c5be8a70fc7c60dfe4d864ab27cf
Reviewed-on: http://gerrit.openafs.org/3373
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoCache bypass: Remove AFS_KMAP_ATOMIC
Marc Dionne [Tue, 23 Nov 2010 22:50:25 +0000]
Cache bypass: Remove AFS_KMAP_ATOMIC

Since AFS_KMAP_ATOMIC is defined unconditionally, remove the ifdefs
and the code for the !AFS_KMAP_ATOMIC case.  We probably don't want
to support this feature on a kernel old enough not to have kmap_atomic.
This should exist on all 2.6 and even 2.4 linux kernels.

This simplifies the code for maintenance and later changes.

Change-Id: I5d111d65066990123db917ac105a5a14db3b305f
Reviewed-on: http://gerrit.openafs.org/3372
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agorx: add rx_opaque and rx_identity exports
Jeffrey Altman [Wed, 24 Nov 2010 12:29:12 +0000]
rx: add rx_opaque and rx_identity exports

rx_opaque_new                           @289
rx_opaque_alloc                         @290
rx_opaque_populate                      @291
rx_opaque_copy                          @292
rx_opaque_freeContents                  @293
rx_opaque_zeroFreeContents              @294
rx_opaque_free                          @295
rx_opaque_zeroFree                      @296
rx_identity_match                       @297
rx_identity_populate                    @298
rx_identity_copy                        @299
rx_identity_copyContents                @300
rx_identity_new                         @301
rx_identity_freeContents                @302
rx_identity_free                        @303

Change-Id: Iaf52fdc65178db64c373b2f747ac133fdb713364
Reviewed-on: http://gerrit.openafs.org/3383
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoUpdate the man pages pod source adding text to discourage use of
Steve Simmons [Tue, 31 Aug 2010 23:21:50 +0000]
Update the man pages pod source adding text to discourage use of
uss.  Usually the text added was a copy of a CAUTION section that
had already been added in a few places. This change applies it
consistently across all uss-related man pages. In pod1/afs.pod that
text would be excessively wordy; a briefer note is used there to
direct the reader to the full text.

This is a partial fix for RT bug #128018. It does not fully close
the bug; the AFS Administrators Guide needs to be updated as well.

Change-Id: Id64646d20a9b22c0e11c9654842fa255fb4258ea
Reviewed-on: http://gerrit.openafs.org/2637
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoImport of code from heimdal
Heimdal Developers [Wed, 24 Nov 2010 10:59:06 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
5b91f58f350c92fb9eacd1ebac558381b0b8deac (switch-from-svn-to-git-1705-g5b91f58)

Upstream changes are:

Simon Wilkinson (1):
      hcrypto: Remove getarg.h include from validate.c

Change-Id: Id59ef59c0f521d1266789afb6ee9555319472770
Reviewed-on: http://gerrit.openafs.org/3382
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: build src/rx/tests
Jeffrey Altman [Thu, 18 Nov 2010 03:39:12 +0000]
Windows: build src/rx/tests

Now that we have roken integrated build src/rx/tests as a
standard part of the build.

Change-Id: Ic2e6e9229f92c302bd4cfaa173c6d1b5e15d9b55
Reviewed-on: http://gerrit.openafs.org/3324
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoImport of code from heimdal
Heimdal Developers [Wed, 24 Nov 2010 10:35:48 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
9fc90e01b55966b6a3e5a161b4806a5171af789d (switch-from-svn-to-git-1704-g9fc90e0)

Upstream changes are:

Simon Wilkinson (1):
      roken: Remove multiple prototype for hstrerror

Change-Id: I74c269b37f1b4c39db7de770d56247198c295dfe
Reviewed-on: http://gerrit.openafs.org/3381
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: indicate that roken is a dynamic library for roken.h
Jeffrey Altman [Wed, 24 Nov 2010 10:24:43 +0000]
Windows: indicate that roken is a dynamic library for roken.h

Since the windows build of roken is a dynamic library we must
define ROKEN_LIB_DYNAMIC so that roken.h will specific the
correct values of ROKEN_LIB_VARIABLE, ROKEN_LIB_CALL, and
ROKEN_LIB_FUNCTION.

Change-Id: I93a14f355d2f1984722d64fcca14336e1c1ec4d9
Reviewed-on: http://gerrit.openafs.org/3380
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: roken getopt renamed to rk_getopt, vars exported
Jeffrey Altman [Wed, 24 Nov 2010 05:44:52 +0000]
Windows: roken getopt renamed to rk_getopt, vars exported

Since the function was renamed, modify the export list
Add rk_optarg, rk_optind, rk_opterr.

Change-Id: I19ffdba5df79293d6a07c9ae6ba476dd77027843
Reviewed-on: http://gerrit.openafs.org/3377
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoImport of code from heimdal
Heimdal Developers [Wed, 24 Nov 2010 09:45:03 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
f317b91b1b4b8d030fc2ab188b6aa526e9e7cb84 (switch-from-svn-to-git-1703-gf317b91)

Upstream changes are:

Jeffrey Altman (1):
      roken: Prototype getopt

Change-Id: I766ff1c19d4dcb74be18ea96d0ea1f24898eb6e9
Reviewed-on: http://gerrit.openafs.org/3379
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoImport of code from heimdal
Heimdal Developers [Wed, 24 Nov 2010 08:14:40 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
0cc7b890e2632a7cb26517825deb802f79e838f8 (switch-from-svn-to-git-1702-g0cc7b89)

Upstream changes are:

Asanka C. Herath (3):
      Annotate exported variables in getopt.c
      Windows: Support building roken as a DLL
      Declarations for getopt externs

Simon Wilkinson (1):
      roken: getopt should include roken.h

Change-Id: I5ef850bcac7dace3a8206958783ed6fd5830492e
Reviewed-on: http://gerrit.openafs.org/3378
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoroken: modify build configuration to permit Windows to work
Jeffrey Altman [Wed, 24 Nov 2010 05:44:02 +0000]
roken: modify build configuration to permit Windows to work

When building roken the library must be built with different
ROKEN_LIB_xxx macro values than when the library is being
linked against.   In particular, ROKEN_LIB_VARIABLE needs to
be exported when building and imported when linking.

Change-Id: I353c796a81fb92e5066d76a269d8371150d4756c
Reviewed-on: http://gerrit.openafs.org/3330
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agorxkad: rename bswap32 to octetswap32
Jeffrey Altman [Tue, 23 Nov 2010 17:18:38 +0000]
rxkad: rename bswap32 to octetswap32

In bg-fcrypt.c the bswap32 macro has a name conflict with roken.
Rename it to octetswap32.

Change-Id: I1466c2abb4883c8856962b232859e49014a04796
Reviewed-on: http://gerrit.openafs.org/3361
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agorxkad: fix bg-fcrypt to work with roken
Jeffrey Altman [Tue, 23 Nov 2010 17:11:46 +0000]
rxkad: fix bg-fcrypt to work with roken

On Windows, roken.h defines iov_len as len and iov_base as buf
so that it can use _WSABUF as the iovec structure.  This has negative
consequences when there are local variables iov_len and iov_base
as the same time as there are variables len and buf.  This was the
case in bg-fcrypt rxkad_EncryptPacket and rxkad_DecryptPacket.
As a result, rxkad compiled cleanly but did the wrong thing.
This patchset renames iov_len to ilen and iov_base to ibase in order
to avoid this issue.

Change-Id: Iede2d249b6399fed3e718e782b9bf1315fada93b
Reviewed-on: http://gerrit.openafs.org/3350
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoroken: Add the strsep function
Simon Wilkinson [Tue, 23 Nov 2010 11:31:27 +0000]
roken: Add the strsep function

Add the strsep function (as rk_strsep) to the OpenAFS roken build.
This function is required by Windows, and is now checked for on Unix.

Change-Id: I71d8e11a30c34aaa89d85d1e6e527d594d5734af
Reviewed-on: http://gerrit.openafs.org/3371
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoImport of code from heimdal
Heimdal Developers [Tue, 23 Nov 2010 11:22:51 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
bd78baf668eca011257f05fef8334e0967500456 (switch-from-svn-to-git-1696-gbd78baf)

New files are:
roken/strsep.c

Change-Id: I10c99e408db40f6bcdb0e2c243c3016cd2bf1faa
Reviewed-on: http://gerrit.openafs.org/3370
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoImports: Import heimdal:lib/roken/strsep.c
Simon Wilkinson [Tue, 23 Nov 2010 11:10:32 +0000]
Imports: Import heimdal:lib/roken/strsep.c

Add Heimdal's roken strsep implementation to the list of files
to import into our repository.

Change-Id: I27a5f6b95e434a630c0278fc0362dbda6af1321a
Reviewed-on: http://gerrit.openafs.org/3369
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoroken: Add base64 functions to libroken
Simon Wilkinson [Sun, 21 Nov 2010 10:09:42 +0000]
roken: Add base64 functions to libroken

Install the base64.h header, and add the base64_encode and
base64_decode functions to the library

Change-Id: If0ed8fb13cecb6f4a48b4208fbef8c800a5284d5
Reviewed-on: http://gerrit.openafs.org/3354
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agorx: Store identity type in rx_identity_new
Simon Wilkinson [Mon, 22 Nov 2010 14:21:28 +0000]
rx: Store identity type in rx_identity_new

rx_identity_new was failing to record the type of the identity,
resulting in all identities being marked as Kerberos v4.

Change-Id: I35058a3db14874b64d3cad2ffd43db371c34aebe
Reviewed-on: http://gerrit.openafs.org/3353
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agorx: Rework identity copying
Simon Wilkinson [Sun, 21 Nov 2010 10:16:26 +0000]
rx: Rework identity copying

Change the behaviour of the rx_identity_copy function so that it
copies the whole identity, not just the contents. Add a new function
rx_identity_copyContents which just copies the contents of an identity
into an existing identity structure.

This restores symmetry with the free and freeContents functions.

Change-Id: I692ac8434b1538c283a8ae713956be8ae67cccfd
Reviewed-on: http://gerrit.openafs.org/3352
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoFBSD: close race in afs_root
Ben Kaduk [Sat, 6 Nov 2010 04:02:31 +0000]
FBSD: close race in afs_root

Previously, we called afs_PutVCache(afs_globalVp) directly.  This
is unsafe because PutVCache acquires locks which can sleep, losing
the serialization of the GLOCK.  In rare circumstances, this can
result in two threads simultaneously making that call, and the
second one would panic in vputx() with a negative refcount.
Close the race by using a local variable for the afs_PutVCache()
calls, applying the change to afs_globalVp before dropping the GLOCK.
While here, fix up other race conditions.

Change-Id: Id62f27d4469a96c9becd9b031125bd6c910c3e9b
Reviewed-on: http://gerrit.openafs.org/3275
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoImport of code from heimdal
Heimdal Developers [Mon, 22 Nov 2010 23:17:18 +0000]
Import of code from heimdal

This commit updates the code imported from heimdal to
bd78baf668eca011257f05fef8334e0967500456 (switch-from-svn-to-git-1696-gbd78baf)

Upstream changes are:

Jeffrey Altman (1):
      Windows: Include winsock2.h before ws2tcpip.h

Change-Id: I7eca90ad36d84ccec6ac416d82246f6b28f06948
Reviewed-on: http://gerrit.openafs.org/3360
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoredhat init script fix missing space
Derrick Brashear [Mon, 22 Nov 2010 16:36:55 +0000]
redhat init script fix missing space

the if [] needed a space before the ]. fix it.

Change-Id: If53524e0c70cccf64b9a53d11a81deebf2c972ec
Reviewed-on: http://gerrit.openafs.org/3357
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agouserok: Allow NULL components in kerberosSuperUser
Simon Wilkinson [Mon, 13 Sep 2010 07:24:12 +0000]
userok: Allow NULL components in kerberosSuperUser

Modify kerberosSuperUser so that it can support callers passing NULL,
rather than just empty, instance and cell strings

Change-Id: Ifc21eb0c4f562d65519e31db32723c3a2d19b363
Reviewed-on: http://gerrit.openafs.org/3351
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

13 years agoWindows: update nsis installer for hcrypto and roken
Jeffrey Altman [Mon, 22 Nov 2010 05:05:00 +0000]
Windows: update nsis installer for hcrypto and roken

Change-Id: I669653fa610908beb33f9a64f05b4d1aa5d28751
Reviewed-on: http://gerrit.openafs.org/3349
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>

13 years agoWindows: update wix installer for afsroken.dll
Jeffrey Altman [Mon, 22 Nov 2010 05:04:23 +0000]
Windows: update wix installer for afsroken.dll

Change-Id: Ice566d3fe53c2c97bd2703165d8701f34a09cba7
Reviewed-on: http://gerrit.openafs.org/3348
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>

13 years agouse intptr_t instead of ifdef
Christof Hanke [Mon, 22 Nov 2010 07:39:11 +0000]
use intptr_t instead of ifdef

Remove another ifdef AFS_64BITUSERPOINTER_ENV from the code.

Change-Id: I1b932b892b39b824ba6ef521f0621fd3e7a51c74
Reviewed-on: http://gerrit.openafs.org/3343
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

13 years agouse computed values in src/gtx/curseswindows.c
Christof Hanke [Sun, 21 Nov 2010 19:09:23 +0000]
use computed values in src/gtx/curseswindows.c

compiling failed, because of -Wunused-value.
Use the return code of wstandout and wstandend and pass
it upwards.

Change-Id: I6ae101edb36e31247ff772f5dc59104eb7856138
Reviewed-on: http://gerrit.openafs.org/3344
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoImports: Add reporting of new and removed files
Simon Wilkinson [Sat, 20 Nov 2010 10:25:06 +0000]
Imports: Add reporting of new and removed files

Make the commit message produced by import-external-git.pl also report
which files the script added and removed. Whilst this information is
available from the patch itself, having it in the commit message makes
it much easier to tell what happened when reviewing history through
git log.

Change-Id: I59e7deb0f4f1e8c22d07222e1789c66c65612992
Reviewed-on: http://gerrit.openafs.org/3334
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agohcrypto: Cleanup all build products
Simon Wilkinson [Tue, 2 Nov 2010 09:46:05 +0000]
hcrypto: Cleanup all build products

make clean in hcrypto was missing rand-fortuna_lwp.o. Fix that.

Change-Id: I137218ebd8d863fe653ac41aa4de9b71e4ebd76d
Reviewed-on: http://gerrit.openafs.org/3218
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agouse proper 64bit casting for pointer-math
Christof Hanke [Fri, 19 Nov 2010 20:30:21 +0000]
use proper 64bit casting for pointer-math

building with "./configure --enable-checking --enable-supergroups"
fails, because on 64bit, the casting in map.c gives a warning.
Just add another ifdef and cast according to the size of a pointer.

Change-Id: Icb35d79f56cf8fec48c863061a524f9e29e6acd8
Reviewed-on: http://gerrit.openafs.org/3341
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoremove unnecessary dependency
Christof Hanke [Sun, 21 Nov 2010 11:13:34 +0000]
remove unnecessary dependency

fms in bu_utils is not using curses at all.
Just remove the dependency from the Makfile

Change-Id: I6d02e60508a2c9b5eb2290c3bf2f9e4ee164fde0
Reviewed-on: http://gerrit.openafs.org/3342
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 years agoadd src/roken/roken.h to src/roken/.gitignore
Jeffrey Altman [Sat, 20 Nov 2010 21:53:31 +0000]
add src/roken/roken.h to src/roken/.gitignore

roken.h is a generated file.  Add it to .gitignore

Change-Id: I330d08da951efdef01d9751b8ce9bb062dc235f5
Reviewed-on: http://gerrit.openafs.org/3338
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: permit aklog to build with krb4 support and roken
Jeffrey Altman [Sat, 20 Nov 2010 21:26:22 +0000]
Windows: permit aklog to build with krb4 support and roken

aklog.c defined S_ISDIR() which is now defined by roken.h

krb4 declared the types uid_t and gid_t which are defined by roken.h.
There is no mechanism to disable the declarations within the krb4
header (conf-pc.h) even those the declarations were never required
by the Kerberos v4 DLL.  The patchset hacks the in tree local copy
of the kfw\inc\krb4\conf-pc.h header to avoid the conflict.

There is still an annoying warning due to kfw\inc\krb4\krb.h
providing a conflicting prototype for gettimeofday() but the
function is not used within aklog so there is no harm from it.

Change-Id: Icbb326bf8e703957cf4ce9bc991075b90aff6f08
Reviewed-on: http://gerrit.openafs.org/3337
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

13 years agoWindows: Have get/free addrinfo and nameinfo functions
Jeffrey Altman [Sat, 20 Nov 2010 21:03:31 +0000]
Windows: Have get/free addrinfo and nameinfo functions

roken defines replacements for getaddrinfo, freeaddrinfo,
getnameinfo, and freenameinfo which are provided by winsock.
Add HAVE_xxxx macros as required to prevent roken substitution
from taking place.

Change-Id: I2308f63d78234893a8d5031bf6237cabd5d46bd9
Reviewed-on: http://gerrit.openafs.org/3336
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>