we don't check here that no one else is working the tq *after* getting the
lock. do so.
Change-Id: I91d1ac020334b038a6a045734911335299613875
Reviewed-on: http://gerrit.openafs.org/1159
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
if we get an error reading data, don't subtract it from the length
stored statistic
Change-Id: I2fec260a9f677c0747ff2c6f975745ccb1e58447
Reviewed-on: http://gerrit.openafs.org/1165
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
fix the indirection here to be correct.
ifnet_list_get needs a pointer to a pointer for the ifnet structure
Change-Id: I81bd7c383c63cc1e312fcfd482d7162d50f6f1d3
Reviewed-on: http://gerrit.openafs.org/1158
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
link kernel to correct ifaddr symbol for withnet
Change-Id: I384974bef73b9cc44eba7ddba43f28f65c03f39b
Reviewed-on: http://gerrit.openafs.org/1157
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
we'll never be able to "build" -lresolv
revert this part
Change-Id: I2b1caa5bffc3d826412967fb70d9eadf8223f1f8
Reviewed-on: http://gerrit.openafs.org/1154
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
If llseek fails, then we return immediately, potentially leaving the
wrong address space configured for this process, and without resetting
the processes saved limits.
Fix this by creating a common exit point for osi_rdwr, and using it.
Change-Id: Ifff8cb0155f92a4130d21828d5ee2d2a55c09195
Reviewed-on: http://gerrit.openafs.org/1155
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Creating a session keyring can fail, for instance if the user's
keyring quotas are reached (number of keys/keyrings or data size).
Instead of ignoring errors, return them so they can be passed back
to the caller.
FIXES 126230
Change-Id: I745abeef4b3b8e4c3ab1b90667c6a5478c1e0ad2
Change-Id: I4b0ce6423ee493fbbcbdac1c580e3a157d3c11f4
Reviewed-on: http://gerrit.openafs.org/1151
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Make pagsh and pagsh.krb depend on the libraries that are used to
link them, and on the source file pagsh.c
Without this dependency, modifying pagsh.c would not trigger a
rebuild of the executable.
Change-Id: I9ed20ce69f10916f97d6c335be9bb8374fb9ecd1
Reviewed-on: http://gerrit.openafs.org/1150
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
afs_StoreMini had some interesting error handling. Instead of returning
the error code from StoreData, it would return the error from EndCall,
potentially masking the StoreData error. When it encountered an error
it would discard all of the cached data.
StoreMini's only caller is afs_StoreAllSegments. If StoreAllSegments is
called from DoPartialWrite, then it squashes the error code. This
combination could lead to the user's data being disposed of, without an
error being reported.
Fix all of this by not invalidating segments in StoreMini. Make
StoreMini static to make it clear its only used by StoreAllSegments, and
fix the error handling in StoreMini so that StoreData errors always take
priority.
Change-Id: I41f0c753655fac343485d2a473ad70b6ae96bb78
Reviewed-on: http://gerrit.openafs.org/1147
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This reverts commit 3f89c0feae.
That change broke the expected semantics of a drop box, by
opening up read() access to users to whom it would usually be
denied. The expected dropbox behaviour is that whilst anyone
can write a file there, only those who are specifically given
r permissions may read it.
Change-Id: I025cef7cad1031fbed1e914d58a0a515561f3f78
Reviewed-on: http://gerrit.openafs.org/1149
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
change things to use accessor macros styled after the mac KPI
where feasible, and make access consistent.
Change-Id: I284101b370666e1aeb8e42bc1a651a2781a9af78
Reviewed-on: http://gerrit.openafs.org/1101
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The same as cb4b62a403, but for klog.krb5.
Current versions of both MIT Kerberos and Heimdal disable DES enctypes
by default, but DES enctypes are still required for AFS service tickets.
Probe for either krb5_allow_weak_crypto() (MIT Kerberos 1.8) or
krb5_enctype_enable() (Heimdal) and, if found, call them to enable DES
enctypes. If neither is found, assume that the Kerberos libraries are
old enough that DES is enabled by default.
Change-Id: I99c93621c847f6edcc485207f5b6b99b2370b347
Reviewed-on: http://gerrit.openafs.org/1144
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
afs_AccessOK did not check for if we have 'i' rights on a directory, nor
if we were the owner of a file, if we were only checking PRSFS_READ or
PRSFS_WRITE. Thus, it does not correctly address the 'dropbox'
permissions case (if you are the owner of a file and have insert
permissions, you get implicit 'r' and 'w').
Fix this to check for 'i' and ownership when we need to, so the dropbox
special-case check works as intended.
FIXES 126216
Change-Id: Ib629bc30b73bc3965e777747067259451f0adff6
Reviewed-on: http://gerrit.openafs.org/1143
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Current versions of both MIT Kerberos and Heimdal disable DES enctypes
by default, but DES enctypes are still required for AFS service tickets.
Probe for either krb5_allow_weak_crypto() (MIT Kerberos 1.8) or
krb5_enctype_enable() (Heimdal) and, if found, call them to enable DES
enctypes. If neither is found, assume that the Kerberos libraries are
old enough that DES is enabled by default.
Change-Id: Ib5231bb7c2fe88f4c424628394ed08122d5710a1
Reviewed-on: http://gerrit.openafs.org/1141
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add a missing && in a 2-line condition.
Not sure how this could have compiled successfully on the affected
platforms.
Change-Id: I2e8b791c6d8cd09795be1ef52c078ebfa5a3e53b
Reviewed-on: http://gerrit.openafs.org/1140
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The decision to add AFS_AFSDB_ENV to make code consistent was
a mistake. The preprocessor symbol no longer exists. AFSDB
is broken in 1.5.69.
Change-Id: I7ea147b824f3a67e2039abee8b2513af175fcc5d
Reviewed-on: http://gerrit.openafs.org/1142
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Add a dependency rule to build bc.h before it is installed
Add cleanup rules to delete bc.h and other installed files.
Change-Id: I9a40fd64aff048bfc87b9fd823ae7499816cb3e5
Reviewed-on: http://gerrit.openafs.org/1139
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
The Windows v6.0 SDK does not define __RPC__out in the rpcsal.h
header file. The preprocessor symbol was added in the v6.0A SDK
update. In case the v6.0 SDK is used with the 6000 WDK, add a
symbol declaration.
Change-Id: Iecce566e906977f41be00efb458753acd09f7949
Reviewed-on: http://gerrit.openafs.org/1138
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Change I006bbbdb8923dbb72a97fde931a1b23e303375c2 broke
the Windows build. Restore the unlabled assignments for
Windows since Windows always uses the AFS xdr implementation.
Change-Id: I2eadc624d84f4100281424993b7287a330d6c753
Reviewed-on: http://gerrit.openafs.org/1136
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Cleanup some prototype related warnings under bucoord and butc:
- Copy a few prototypes from bucoord_internal.h to bucoord_prototypes.h,
since they are used in other source directories
- Install bc.h under include/afs, and include it in tcmain.c
- Include bucoord_prototypes.h in tcmain.c
- Add a prototype for GetResponseKey
- Remove warning inhibition for tcmain.c, and entry in README.WARNINGS
- Remove warning inhibition for bucoord/dump.c (no entry in README)
Change-Id: I0a0ae92d3c7ba75e4a331bf59ea9c031763cc704
Reviewed-on: http://gerrit.openafs.org/1134
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
instead of having use_fh for linux, vnode_path for solaris and darwin,
use the same mechanism for both. for darwin/solaris we cache the path
(tested via gop_lookupname) instead of an fh, freeing the path at
shutdown.
Change-Id: Id22052db0803264bdaba6b870d9e511953e348bc
Reviewed-on: http://gerrit.openafs.org/1132
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
add support for decoding (nominally) any panic for MacOS. Limited testing.
Requires hdutil from http://www.dementia.org/~shadow/dmgutil-0.1.tar.gz
to extract files from DMGs.
now with support for cross-version debugging, when run on 10.6 (e.g. with kextutil)
Change-Id: I5d9db005e3014e22f916070f8af25271a28615ea
Reviewed-on: http://gerrit.openafs.org/1125
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
hint to time machine that cache files should not be backed up
Change-Id: I098c9231139b91ff093be74d8a39f94c185d478c
Reviewed-on: http://gerrit.openafs.org/1122
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This fix modifies the way that the RX XDR operations are declared
so that UKERNEL can continue using the system provided XDR glue,
rather than using our own (as is the case in userspace, and in
normal kernel modules)
Change-Id: Ib6abad376c7f7a7f0f5c2314efe80f5b7b44f842
Reviewed-on: http://gerrit.openafs.org/1131
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Label all of the assignments to the xdr_ops structure. This allows
the rec, stdio and mem variants to continue to function, even when
the ordering of the elements has changed in the header.
Change-Id: I006bbbdb8923dbb72a97fde931a1b23e303375c2
Reviewed-on: http://gerrit.openafs.org/1126
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
sys_prototypes.h, afs_AdminErrors.h, and afs_Admin.h were being installed
into include/ in the build tree via ${INSTALL} instead of ${INSTALL_DATA}.
rx_prototypes.h was executable in the repository. Install header files
non-executable and make rx_prototypes.h non-executable for cleanliness.
Discovered by Lintian because the executable permissions were duplicated
by make libafs_tree.
Change-Id: I609b62f69d1fecc2cdbba7e7442d93e9675c2fa0
Reviewed-on: http://gerrit.openafs.org/1129
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Update the NetIdMgr provider help text to better describe its
functionality. (Or at least not be incorrect.)
Change-Id: I5d6b18f15cab7c48751666e754223ee68fb18d11
Reviewed-on: http://gerrit.openafs.org/1124
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
The OpenAFS plug-in for Network Identity Manager displays an icon
in the notification area that displays status information about
the AFS service and tokens. Add a context menu to the icon so
that users can open the NIM application and get help for the
plug-in from the notification icon.
Change-Id: I704934b4f4eab72a18c54ef2a7a7dc3ca248ba78
Reviewed-on: http://gerrit.openafs.org/1121
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
set version number for unix
Change-Id: I2273e97ec43fd172e6f486ab6226cc6376885163
Reviewed-on: http://gerrit.openafs.org/1123
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
this creates and installs a debugging kext package for macos. it also
always installs the decode-panic script (which can be used even without
the debug kext)
Change-Id: Iff03de66cd3df2690f03333e6629d21660364cd1
Reviewed-on: http://gerrit.openafs.org/1120
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Clear up a few more warnings in the pam code. The changes here
are very similar to the ones in the previous patch and use
the same configure test:
- use PAM_CONST to conditionally declare pam_message as const
- cast a few arguments to putenv, which expects a non-const pointer
Change-Id: I6c98623c35f4453f34c1d48b8b7d6ff1bfbc1e0c
Reviewed-on: http://gerrit.openafs.org/1116
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Variable pageSize is declared and set to the system page size
using getpagesize(), but the value is not used anywhere.
getpagesize() doesn't necessarily have a prototype declared in
unistd.h with recent glibc, which can generate a new warning and
trip up an enabled-checking build.
Instead of trying to put in a workaround, just remove the unused variable.
Change-Id: I6a9519eb2642bb0479edd1cf1195ce3f751c72bb
Reviewed-on: http://gerrit.openafs.org/1117
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
In uss_vol_GetServer(), the IP address octets are scanned into "char"
variables, and later cast to afs_int32 to build the address.
sscanf gives warnings because it's expecting an int pointer, and
testing shows that this code doesn't work as expected - the first
3 octets are always parsed as 0.
Use afs_int32 variables instead, which works, eliminates warnings and
simplifies the code.
Note that this code does not seem to be reachable currently.
It was probably meant to be used by planned additional uss commands.
Change-Id: I646d4cbfa8ac0d0c50f98a334ac3fe387d6d361b
Reviewed-on: http://gerrit.openafs.org/1119
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The syscfg_GetIFInfo() call uses the interface info returned by
GetAdaptersAddresses(). Also manually query the MTU value in the
registry for any interfaces bound to the same adapter and use the
smallest such MTU as the value returned by syscfg_GetIFInfo().
Change-Id: I8a1d487b51f6674ff6ebbf6b1f20d37b1e278279
Reviewed-on: http://gerrit.openafs.org/1105
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
If the rx_Read() of the number of bytes in the FetchData64 response
fails, then it sets code, and disposes of the call structure. However,
the length safety check that was added in
c7b92a3018 executes regardless of whether
code is set, and the call has already been freed. So we end up calling
rx_Error with a NULL call structure, and panic.
Change-Id: Ia2e341b7a9a2ddc1d656e8b8a31698c0d1771d5e
Reviewed-on: http://gerrit.openafs.org/1112
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
6e65ffbb6c added osi_get_group_pag.
On most platforms this is static, but on Linux it's provided by
the OSI layer. Add a prototype so the compiler doesn't go boom.
Change-Id: I106fa5d5299f8ed486e70cea2ea8681b43a81a33
Reviewed-on: http://gerrit.openafs.org/1110
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
As originally noted in f6f9ee5402
some fileservers return a negative length, typically when a client
is attempting to fetch data that is past the extents of the file,
the CM needs to retain this negative length, and handle it correctly.
c7b92a3018 added safety checks for
the fileserver returning a length larger than that asked for by
the client. Sadly, this check does a comparison between a
signed, and an unsigned, variable. This leads to it incorrectly
classifying negative responses as being too large.
Add a cast, and a comment, to fix this.
Change-Id: I2ca67f55204c565667d5cd91cde3d520f8d9b10c
Reviewed-on: http://gerrit.openafs.org/1109
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
On UNIX, the rx library values for rx_maxReceiveSize and
rx_MyMaxSendSize are sent by the cache manager directly.
In Windows, they are set by rx_GetIFInfo() which had two
errors.
(1) The comparison of rx_maxReceiveSize and maxsize were
reversed which prevented rx_maxReceiveSize from ever
being set to the interface MTU.
(2) rx_MyMaxSendSize was never assigned a value.
As a result, two problems occurred.
(1) The remote peer was never told about the local MTU.
(2) The local peer ignores the MTU.
From 1.3.60 to 1.5.33, OpenAFS for Windows installers
provided a registry default RxMaxMTU of 1260. This caused
the cache manager to call rx_SetMaxMTU() which in turn set
both rx_maxReceiveSize and rx_MyMaxSendSize in effect
masking these errors.
Change-Id: Ib05927d7985052e233ff6f4bd170a939eb05c320
Reviewed-on: http://gerrit.openafs.org/1107
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
rx_WriteProc and rx_ReadProc has special fast logic that
handles the most frequent case. This code was called
without obtaining the call lock. However, each of these functions
must obtain the call lock for the queue_IsNotEmpty() test and
must re-obtain the call lock if the rxi_XXX variant is required.
Dropping the lock and re-obtaining it is more expensive than
holding it across the memcpy. Therefore, we shouldn't drop the
lock until we are done.
Change-Id: Icca679567994e91bbbf3afec72b863d986f86582
Reviewed-on: http://gerrit.openafs.org/1108
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
DJGPP code just clutters the AFS_NT40_ENV specific code
but is never built.
Change-Id: I90192bb5cf35239fdbbeaa28f85d1381162f3bae
Reviewed-on: http://gerrit.openafs.org/1106
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The second parameter to pam_conv() should be a const pointer on
recent systems. Make it so to eliminate a couple of warnings.
A configure test is added to deal with some systems where pam_conv()
might not be const.
Cast a few assignments to cell_ptr in afs_auth.c and afs_setcred.c
since the argv parameter is const.
Change-Id: I5757310c94a6f26ca7dab656edaa416d16e32e2a
Reviewed-on: http://gerrit.openafs.org/847
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
VolMonitor must maintain the VTRANS lock the whole time it is walking
the allTrans list. Failure to do so can cause core dumps trying to
access memory that has already been free'd.
Two versions of this change were coded and tested. The other version
used the VTRANS lock only around a THOLD, but needed a TRELE, too.
Timing tests were run counting the number of vos status, vos listvol,
and vos backupsys operations that could be performed during a fixed
number of vos status operations. The THOLD/TRELE version caused other
vos operations to run about 5% slower.
FIXES 126110
Change-Id: I7e749d30c955867faacafa978d7d643dee648ca3
Reviewed-on: http://gerrit.openafs.org/1098
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
When we build the kernel module, either in the real or the ukernel
case, KERNEL is defined. So, remove the #ifdefs around our locking
primitives, so that things are a little bit clearer.
Change-Id: I60893cc630d8cd4dd6cb11cdc44e8bf4f2f9f863
Reviewed-on: http://gerrit.openafs.org/838
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Rework the GLOCK initialisation code so that it's moved out into
platform directories, rather than all being done in osi_Init.
Change-Id: I1aae76ba12cd4e45f54881f5573ed1713159b64b
Reviewed-on: http://gerrit.openafs.org/837
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>