Filling with zeroes is done within a storeop of its own. This raises
consistency and readability.
Also, the formerly copy-pasted (to afs_dcache and afs_segments respectively)
statistics code is now in a seperate function of its own.
Reviewed-on: http://gerrit.openafs.org/122
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
In MSRPC_WriteMessage, call MSRPC_NewCall after checking for
MAX_RPC_MSG_SIZE and return an error if MSRPC_NewCall fails.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/339
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
The loop over the dcaches is performed in afs_fetchstore now as well,
in a new routine afs_CacheStoreVCache that is called in afs_CacheStoreProc's
stead. The original afs_CacheStoreProc has largely moved to
afs_CacheStoreDCaches in afs_fetchstore.c.
Enhances readability of afs_StoreAllSegments. rxfs_storeInit() can be
performed earlier now, which is instrumental for the inclusion of
alternative protocols (which will call other storeInit() functions).
Reviewed-on: http://gerrit.openafs.org/120
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
The respective snippets are moved from afs_StoreAllSegments to
rxfs_storeDestroy and rxfs_storeInit respectively. This makes sense
and enhances readability.
Reviewed-on: http://gerrit.openafs.org/118
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
PAG numbers are represented by afs_uint32. Fix assorted call sites to
reflect this.
While we're here, prototype ktc_newpag, and fix the casts used by
the ktc_curpag() call.
Reviewed-on: http://gerrit.openafs.org/167
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
The lockIDSet function was a sprawling mess of #ifdefs. This change
consolidates it so there is completely different function for each
platform, with some internal #ifdefs remaining for platform-specific
variations. The side effect of this is that the function is now readable.
Reviewed-on: http://gerrit.openafs.org/164
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Darwin uses a fancy type for tv_sec, which needs to be cast to long
before it can be printed.
Reviewed-on: http://gerrit.openafs.org/165
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Rather than in afs_StoreAllSegments, do statistics in afs_CacheStoreProc,
further boosting the former's readability. Calls are closed in a new
storeOp now, rxfs_storeClose, and have been moved there from
afs_StoreAllSegments as well.
Reviewed-on: http://gerrit.openafs.org/117
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
buf_Write has two errors in it. First, if offset at which the
write is supposed to begin does not align with the cm_data.blockSize,
then (offset %blockSize) octets at the end of the write will fail
to be written to the file server. Second, if there is no knowledge
of the file server's ability to handle RXAFS_StoreData64 calls
and the file server does not support StoreData64 calls, then the
first chunkSize of data will be written to the file server before
the RXGEN_OPCODE error is detected. In this case a retry using
RXAFS_StoreData is performed but the values of 'nbytes' and 'qdp'
were not reset before the retry. As a result, the first chunkSize
of data would fail to be written to the file server.
The second problem can reliably occur when connectivity between the
cache manager and the file server is interrupted due to firewall
port mapping closures. Upon establishing a new rx connection, a
SRXAFSCB_InitCallBackState3 RPC will be issued by the file server
erasing any prior knowledge of the file server's ability to process
64-bit data operations. If the first 64-bit operation is a
StoreData64, then data loss will occur.
LICENSE MIT
FIXES 125220
FIXES 108199
Reviewed-on: http://gerrit.openafs.org/332
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
There are a variety of functions that are declared in smb modules
that are used within non-smb modules. In order to reduce some of
the polution, several time conversion functions and the thread
priority operations are migrated to cm_utils. As part of this
migration the unused !USE_NUMERIC_TIME_CONV time implementations
are removed.
In addition, an unnecessary use of an SMB preprocessor symbols
is removed from cm_freelance.c and smb_ioctls.h is no longer
included within afsd.h.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/330
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
It is not safe to initialize the root.afs cm_scache object
after the SMB package. Break it out of afsd_InitDaemon()
into its own afsd_InitRoot() and call from afsd_InitCM().
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/331
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
PTS groups with 's' access permissions can be examined by members of the
group and the owner of the group in addition to system:administrators.
State this in the manual page.
Reviewed-on: http://gerrit.openafs.org/327
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
For Windows, the error mapping table used throughout the system
is located in util/errmap_nt.h. This table was incomplete and
WINNT/afsd/cm_utils.c added additional mapping locally. Move
said error mapping to util/errmap_nt.h.
When including afs/unified_afs.h it must be done after including
afs/errmap_nt.h. Otherwise, undefined errors are mapped to EIO
which should not be.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/328
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Add prototype for osi_SetLockOrderValidation() defined
in osibasel.c
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/329
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
The innermost loop in afs_StoreAllSegments (looping over chunks) is now
inlined in afs_CachStoreProc. This is step one in a series of such
inlinings.
Reviewed-on: http://gerrit.openafs.org/116
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
More context of the afs_CacheFetchProc() call in GetDCache is now inlined
in the afs_CacheFetchProc. Boosts readability of GetDCache and saves
stack, as counter pointers need not be passed anymore. The statistics
code is more readable due to lesser indentation.
Reviewed-on: http://gerrit.openafs.org/115
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
The 64-bit Large File Support added a reference to the cm_conn_t
object after cm_Analyze() is called and releases the hold. This
permits the object to be freed if it is appropriate to do so
which can result in an invalid memory reference.
This change removes the improper reference.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/326
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Microsoft Debugging Tools for Windows, Visual Studio Debugger,
and SysInternals tools can all make use of a Symbol Server.
http://msdn.microsoft.com/en-us/magazine/cc163563.aspx
The commit adds functionality to the build system to automatically
add binaries and symbols to a symbol store during the build.
This functionality is only enabled if two environment variables
are defined:
SYMSTORE_EXE - specifies the location of symstore.exe
SYMSTORE_ROOT - specifies the location of the symbol store
an optional environment variable permits an arbitrary comment
to be added to the symbol store history file.
SYMSTORE_COMMENT - arbitrary text to be added to the history
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/324
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
1.5.60 and 1.5.61 shipped without resource information
linked to the threaded version of the volserver.exe
executable. Correct that oversight.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/325
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
The MacOS installer only permits characters in [0-9A-Za-z] in cellnames.
However, OpenAFS itself will also allow dashes, and they're in use by some
sites.
This trivially amends the installer pane to permit dashes.
FIXES 125211
Reviewed-on: http://gerrit.openafs.org/323
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Fix a stack overflow on 64 bit linux which corrupts the stack
saved arguments and causes a kernel panic. This bug is seen
on platforms where ino_t is 64 bits and the md5inum sysctl
option is enabled.
Reviewed-on: http://gerrit.openafs.org/322
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
It has been reported that winlogon.exe is crashing on some
systems. The reports indicate that the failure is somewhere
in GetLogonDomainOptions. This commit ensures that we are
more conservative about the assumptions that are made regarding
which Lsa operations can fail.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/321
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Update the "clean" rule to remove the files generated from
ms-srvsvc.idl and ms-wkssvc.idl.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/320
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
The smb_StartedLock osi_mutex can be obtained before
initialization due to a race if the IP address configuration
is in a state of flux as afsd_service is starting up.
To avoid the problem call cm_InitDaemons() after smb_Init().
This race is the cause of the periodic assertions in some
environments when lock order validation is enabled.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/318
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Remove the check for powerStateSuspend that caused the cm_daemon
thread to terminate when the machine enters suspend mode. When
the machine awakens there is no thread to check the down server
state, new IP address bindings, etc.
LICENSE MIT
Reviewed-on: http://gerrit.openafs.org/315
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
GetDCache() is quite bloated. This inlinining makes code more
readable. For protocols to come besides rxfs (such as rxosd), some
initializations may need to be performed differently. Thus, much
has to be moved to the specific rxfs_fetchInit() function rather than
afs_CacheFetchProc() proper.
Reviewed-on: http://gerrit.openafs.org/112
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
All of the different _create calls need to share a prototype, so
function pointers can be stuffed into a structure. Use an anonymous
pointer so that we can acheive this.
Reviewed-on: http://gerrit.openafs.org/187
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
While the Windows client only implements support for WKSSVC and
SRVSVC RPC services, it should be aware of and handle requests
for other well known service names.
This patch refactors service name checks to a separate
MSRPC_IsWellKnownService() function. In addition, it separates
the tests for IPC TIDs from the test for well known service
names. An IPC TID may be used for generic pipe operations as
well as for RPC message pipe operations. Therefore the fact that
a TID was opened for IPC doesn't necessarily mean that it will
only be used for RPC.
Reviewed-on: http://gerrit.openafs.org/307
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>