* use new rx_GetConnection/rx_PutConnection functions to increment/
decrement the refCounts on the rx_connection objects so that the
objects are not invalidated during RXAFS_xxx calls when:
- the user tokens change
- the global cryptlevel changes
* import SysName from registry and parse along white space boundaries
since it looks like CheckHost is using a gc'd client conn, this more or less has to be it.
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
since it looks like CheckHost is using a gc'd client conn, this more or less has
to be it.
and don't deadlock.
====================
since it looks like CheckHost is using a gc'd client conn, this more or less has
to be it.
and don't deadlock.
====================
since it looks like CheckHost is using a gc'd client conn, this more or less has
to be it.
* fix the Windows cache manager to prevent it from replacing the
rx_connection object associated with the cm_conn_t object on each
and every operation if "fs crypt" was set. This explains the
dramatic performance difference when crypt is used vs clear.
The problem: 'cryptall', a boolean flag indicating whether or not
"fs crypt" is set, was being compared to the rx_connection
cryptlevel which is either rxkad_clear:0 or rxkad_crypt:2.
1 != 2 and therefore the rx_connection was always destroyed
and replaced on each and every operation.
Lock the cm_conn_t object around every call to RXAFS_xxxx functions.
It is not safe for the cm_conn_t object to not be locked because
rx_DestroyConnection might be called from another thread if:
- the user's tokens have changed or expired
- the crypt mode has changed
* Modify cm_Lookup to evaluate a list of possible values for @sys
instead of just a single entry. Re-write cm_ExpandSysname and
add cm_LookupInternal.
Add a new registry value HKLM/SOFTWARE/OpenAFS/Client "IoctlDebug" DWORD
which when set to a non-zero value will output error messages to stderr.
This is to assist in debugging ioctl failures when fs.exe, tokens.exe,
etc. fail because of an inability to open the ioctl file name.
One more fix for the symlink problem. Access control checks cannot be
performed until after we have walked all of the symlinks. Otherwise,
we are checking access to the symlink itself and not to the file.
The windows power management code responds to a request to suspend or
hibernate by performing a "fs flushvol" as the logged in user on each
of the SMB/CIFS mounted shares. This can be very time consuming if
the cell servers cannot be reached.
This patch adds a test to ensure that there is at least one network
adapter in the machine which is not a loopback adapter.
While developing this patch other areas of concern have been raised.
The power management code waits a fixed period of time based upon
the hard dead timeout before allowing the suspend/hibernate to continue.
This allows the machine to shutdown even if there are active flush
operations being performed. This defeats the benefit of performing
the flush at all.
A better mechanism could be developed if the functions called via
cm_IoctlFlushVolume returned and checked error codes. Then it might
be possible to abandon the flush operation if a Server Not Reachable
state was obtained.
The power management flush operations will also not work on Terminal
Server. This would be important in the case where a terminal server
is shutting down due to a switch over to a UPS. The reason it does
not work on Terminal Server is that there is that it is not possible
for afsd_service.exe to enumerate the SMB/CIFS shares and impersonate
the individual logged in users.
It would be preferred for there to be a new cm_FlushAll() function
implemented which was not dependent on the use of the ioctl mechanism
for the purpose of identifying a volume ID or a user ID.
Provide mechanisms to force the use of krb524 via afscreds, afslogon,
and aklog. afslogon and afscreds rely on a new "Use524" registry value
(see registry.txt) and aklog has a new "-m" command line option.
The pattern matching algorithm was failing to match strings when the
pattern terminated in a '*'. The logic was also too complex because
it failed to simply the patterns prior to processing. Any combination
of '*' and '?' == '*' according to the Windows file name pattern
matching rules.
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
FIXES 15365
The pattern matching algorithm was failing to match strings when the
pattern terminated in a '*'. The logic was also too complex because
it failed to simply the patterns prior to processing. Any combination
of '*' and '?' == '*' according to the Windows file name pattern
matching rules.
* smb_ReceiveCoreRename() was factored to produce smb_Rename()
which is used by both the original function and the new
smb_ReceiveNTRename(). smb_ReceiveNTRename() supports the
creation of HardLinks in addition to Renaming. smb_Link()
is a new function which creates HardLinks via cm_Link().
cm_Link() is a new vnodeops function which creates links
using RXAFS_Link().
smb_ReceiveNTRename() does not support the File Copy and
Move Cluster Information operations described in its interface.
ReceiveNTRename is under documented in CIFS-TR-1p00_FINAL.pdf.
* When opening files via symlinks, we should follow the symlinks
until we reach the actual file stat cache entry. The stat cache
entry of the file should then be stored in the FID instead of
stat scache entry of the symlink.
* return bad operation errors for all unimplemented functions
even if we do not know the functions exist.
* Log bad packets and unknown operation packets to the trace log
* Map CM_ERROR_BADOP to STATUS_NOT_SUPPORTED instead of
0xC09820FF
* Update list of known CIFS operations to include all those listed
in CIFS-TR-1p00_FINAL.pdf.
Modify all parameters to functions which take a pointer to time_t
to actually provide a pointer to time_t instead of pointers to long,
afs_int32, afs_uint32, etc.
This is to provide compatibility with systems that use 64-bit time_t
typedefs such as the IBM compilers for AIX and the Microsoft Visual
Studio 2005 compiler.
This patch does not address any of the issues of data loss caused
by converting 64-bit time_t to 32-bit signed or unsigned values.
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
netbsd's cc doesn't like multiple semicolons in variable declarations,
so let's adjust the XSTATS_DECLS macro appropriately.
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
netbsd's cc doesn't like multiple semicolons in variable declarations,
so move OSI_VC_CONVERT down to the last statement
some software network adapters use instances of lo but are real network adapters. allow them to be advertised. the modified functions are called only in the process of collecting a list to advertise.
at the same time, make sure we mask 127.0.0.1.
i wonder if that's a mistake.
Update text files for 1.3.71 and describe the new Windows Authorization
Group "AFS Client Admins"
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
Add support for "AFS Client Admins" windows authortization group
- Support administrative installations ( 'msiexec /a openafs-en_US.msi')
- Register services as interactive
- Move product code into NTMakefile.i386_nt40
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
- It resolves all IP addresses to names unless the "-numeric"
parameter is used.
This is the same behavior as "fs listcells [-numeric]"
- If the "-numeric" parameter is used, IP address will be printed
in dotted decimal form instead of a 8 digit hex string.
- A new parameter "-long" allows to print all information for all
entries in the log.
This is the same info you get for entry XYZ when called with
"-key XYZ" only you get this for _all_ keys.
The output is slow if not also called together with "-numeric
Noone seems to be using this code anyway, as it's been non-compilable
for 2 years now. But indent noticed that we have too many close-parens
in there, so might as well fix it...
Add trailing semicolons to _LOCK and _UNLOCK macros and re-indent.
This should've been in fix-indent-bug-with-lock-macros-20030729
but somehow it slipped by and I've only found it now.
time values in the cache manager and smb engine which are passed to
the run time library must be of type time_t and not long or int or
unsigned long or unsigned int or ...
When the callback expires on an scache item, if there is an smb client
listening for updates send it is a notification of change. This will
force the smb client to refresh its listener which will in turn cause
a new callback to be registered.
Also, remove debugging statements from GetServer/PutServer
* Fix aklog.exe to not add the AFS ID to the username
* PTS registration of new users to foreign cells has been added to
afscreds.exe
* The cm_Daemon thread is used to perform checks for
down servers, up servers, volumes, callback expirations,
lock maintenance and token expiration. Due to a gaff in
larger integer division the thread never performed any
work. Instead the current time computation would always
be less then the trigger times. This had an adverse affect
on the client's ability to maintain communication with servers,
keep volumes up to date, and flush user tokens and acls
when they have expired. This was broken when the 1.3 branch
was modified to support VC7 which no longer included
largeint.lib
* An initialization problem with the Freelance code was
detected while fixing the callbackRequest. The cm_rootSCachep
object is obtained during afsd_InitDaemons() but the callback
information is incomplete. The callback information will not
be obtained until cm_MergeStatus is called from within
cm_GetCallback. Unfortunately, cm_SyncOp did not properly
test for the conditions under which the callback information
must be obtained.
* Reports have been filed indicating that callbacks were
being lost. An examination of the code indicated that the
cm_server_t objects were not being properly reference
counted by the cm_scache_t and cm_callbackRequest_t objects.
In particular, the cm_server_t objects may have been freed
from beneath the cm_conn_t objects.
All of the reference counting is now done via the functions:
cm_GetServer
cm_GetServerNoLock
cm_PutServer
cm_PutServerNoLock
this improves the ability to track the referrals.
Each cm_BeginCallbackGranting Call now allocates a reference
to the cm_server_t. The cm_EndCallbackGrantingCall either
frees the reference or transfers it to the cm_scache_t
cbServerp field. These are then appropriately tracked
through the cm_Analyze call.
* Ensure that the dnlc hash table is the same size as the
dir name hash table (as per original author's note).
Increase the dnlc CM_AFSNCNAMESIZE to a multiple of 8
for compatibility with 64-bit systems.
* fix smb_ApplyV3DirListPatches to properly apply the hidden
attribute to dotfiles when the infoLevel < 0x101 and
cm_SyncOp has failed.
* Fix the Freelance registry initialization code. There
was a possibility that some systems could end up with
garbage in the registry during a clean install.
Restore the installation of afslogon.dll as a winlogon event handler.
Microsoft identified the problem as being a newly added restriction
on the behavior of DllMain entry points. Network operations such
as bind() may no longer be called. The ICF blocks them but does not
cause an error to be returned.
The XP SP2 problem was caused by attempting to call bind() from
within DllMain which is no longer permitted. Added a new function
AfsLogonInit() which is called from every entry point to ensure
that the necessary initializaton is performed.
Cleaned up the prior fix to smb3.c to better test the invalid
conditions.
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
unget configure scripts ready for 1.3.70. not what i meant to do