Commit Graph

5932 Commits

Author SHA1 Message Date
Jeffrey Altman
650a8025bf DEVEL15-windows-optimizations-20090703
LICENSE MIT

when performing offline volume checks, do so in most recently used order

if the system is entering suspend state, short circuit the background
daemon operations to avoid extra work that is going to fail when the
network is shutdown behind the back of the service.


(cherry picked from commit 46287f6790)
2009-07-04 04:45:46 +00:00
Simon Wilkinson
61aabcf11f DEVEL15-linux-vnop-return-value-cleanup-20090703
LICENSE IPL10

rework all linux vnode ops so the vulnerability we previously had can't
recur later just because someone makes a change that would leak a negative
error


(cherry picked from commit ebc4f737ae)
2009-07-03 14:17:28 +00:00
Andrew Deason
3866da1c89 DEVEL15-viced-ubik-clientdestroy-null-20090703
LICENSE IPL10
FIXES 125020

null ubik client point when it's freed in hpr_End to avoid a null deref later


(cherry picked from commit 6ef1234402)
2009-07-03 14:04:07 +00:00
Derrick Brashear
c46e5e8480 DEVEL15-redhat-spec-manpage-updates-20090703
LICENSE IPL10

add missing manpages to srpm


(cherry picked from commit 22196a7fd7)
2009-07-03 13:57:07 +00:00
Jeffrey Altman
7aa39763f2 DEVEL15-wix-manpages-chgrp-chown-20090701
LICENSE MIT

add fs_chgrp.html and fs_chown.html man pages


(cherry picked from commit 8a6bd63035)
2009-07-01 22:14:51 +00:00
Jeffrey Altman
35d46ce879 DEVEL15-manpages-fs-chown-chgrp-20090701
LICENSE BSD

Add new man pages for fs chown and chgrp on Windows.

Update titles for Windows only commands to indicate they are Windows only.


(cherry picked from commit 4db337f87c)
2009-07-01 22:13:29 +00:00
Marc Dionne
8f71815c74 DEVEL15-linux-keyring-export-check-20090701
LICENSE IPL10
FIXES 125001

check for key_type_keyring being exported; only use it if so


(cherry picked from commit 4ca66112c2)
2009-07-01 21:57:00 +00:00
Jeffrey Altman
c02f9d1d30 DEVEL15-windows-fs-chown-chgrp-20090701
LICENSE MIT

On Windows there is no chown or chgrp command that can be used to
change the owner or group of an object in AFS.   Therefore we
add them to the fs command.

Usage: fs chown -owner <user name or id> [-path <dir/file path>+] [-literal] [-help]
Where: -literal  literal evaluation of mountpoints and symlinks

Usage: fs chgrp -group <user/group name or id> [-path <dir/file path>+] [-literal] [-help]
Where: -literal  literal evaluation of mountpoints and symlinks


(cherry picked from commit ffd065a695)
2009-07-01 21:25:51 +00:00
Jeffrey Altman
5e61d215ae DEVEL15-windows-cellconfig-20090630
LICENSE MIT

nul terminate the correct variable


(cherry picked from commit ad6a8942db)
2009-07-01 02:44:29 +00:00
Jeffrey Altman
3d2baea9ee DEVEL15-windows-dfs-file-set-warning-20090630
LICENSE MIT

Add a debug log warning if the target volume is a DFS File Set.
If so, the client will not properly protect against information
leakage or properly deal with directory name caching, symlinks,
and other behavioral differences between AFS and DFS.


(cherry picked from commit efdf78ae08)
2009-06-30 19:11:40 +00:00
Jeffrey Altman
5c8a0a9da0 DEVEL15-windows-smb-20090630
LICENSE MIT

Be sure to call smb_ReleaseVCNoLock before we drop the smb_rctLock.


(cherry picked from commit 49d6a0992c)
2009-06-30 19:00:13 +00:00
christof.hanke@rzg.mpg.de
922ab14baf DEVEL15-rpmlint-try2-20090629
LICENSE IPL10
FIXES 124951

remove unneeded return; fix iob initialization for curpag pioctl


(cherry picked from commit 58024c1684)
2009-06-29 21:24:37 +00:00
Jeffrey Altman
74bdef579c DEVEL15-windows-dcache-prefer-xdata-error-20090629
LICENSE MIT
FIXES 125018

Fix issue reported by Marc Dionne.  RXAFS_FetchData and RXAFS_StoreData
return access denied errors that are not reported by the subsequent
call to rx_EndCall which should be preferred.


(cherry picked from commit a50fa631ca)
2009-06-29 20:38:34 +00:00
Derrick Brashear
3213d49325 DEVEL15-revert-voldump-v-tag-generation-20090629
LICENSE IPL10
FIXES 18349

generating v tags is currently incompatible. revert this for now


(cherry picked from commit f202b9778e)
2009-06-29 16:20:16 +00:00
Marc Dionne
6e25934482 DEVEL15-rcu-patch-fallout-20090629
LICENSE IPL10
FIXES 124996

massaging this for 1.5.x/head caused some fallout. fix doubled endif, and
install_session_keyring arguments


(cherry picked from commit 3d5415922e)
2009-06-29 14:59:31 +00:00
Jeffrey Hutzelman
3c36d66237 DEVEL15-cellservdb-20090629
CellServDB from central.org dated 29 Jun 2009


(cherry picked from commit 4a09cd4976)
2009-06-29 07:03:54 +00:00
Jeffrey Altman
e6742640e9 DEVEL15-windows-shutdown-20090628
LICENSE MIT

short circuit on-going offline volume checks once a shutdown has begun.


(cherry picked from commit 307e077b23)
2009-06-29 04:27:50 +00:00
Jeffrey Altman
6004181ec0 DEVEL15-windows-hard-link-count-20090628
LICENSE MIT

cm_Link() is used to create hard links.  It did not apply the updated
link target status info to the target cm_scache_t object.  As a result
the linkCount would be incorrect.

cm_Unlink() did not take linkCount into account.  It did not reduce the
locally known linkCount, nor did it invalidate any currently known
callback.  As a result the linkCount would be incorrect.


(cherry picked from commit b8a1dba293)
2009-06-29 04:25:45 +00:00
Jeffrey Altman
35830e7f1a DEVEL15-windows-multi-homed-callbacks-20090627
LICENSE MIT

Properly handle callbacks from multi-homed file servers.
Comparing cm_server_t pointers is insufficient.  For a multi-homed
server there will be multiple entries.  The UUID for all of the
equivalent entries will be the same.  What matters is not that
the pointers are the same but whether in the case of UUID labeled
servers that the UUIDs match.

Add cm_ServerEqual() to perform the comparison.


(cherry picked from commit d54859c6ac)
2009-06-28 05:15:51 +00:00
Jeffrey Altman
c80f6f0b33 DEVEL15-windows-callback-server-tracking-for-readonly-vols-20090626
LICENSE MIT

Readonly volume callbacks apply to every cm_scache_t from the
same volume.  We were already tracking the cbExpires time in
the cm_volume_t.  We need to also track the cbServerp in the
cm_volume_t so that the cm_scache_t objects can be assigned
the correct server from which the callback was issued.

Add cbServerpRO field to the cm_volume_t.  Bump the memory
map version to force a rebuild of the cache data.


(cherry picked from commit 100186ec2e)
2009-06-26 15:12:12 +00:00
Jeffrey Altman
df4404771a DEVEL15-windows-cell-config-clones-20090626
LICENSE MIT

Add support for parsing clones from the CellServDB file.


(cherry picked from commit de37456523)
2009-06-26 14:14:58 +00:00
Derrick Brashear
2d9307fe47 DEVEL15-allow-gcpags-disabling--at-compile-20090624
LICENSE IPL10

put this back as was for now; if we want to undef, we can do it later, completel
y


(cherry picked from commit e43342e377)
2009-06-25 13:13:24 +00:00
christof.hanke@rzg.mpg.de
2e5d784d89 DEVEL15-pag-get-lint-20090623
LICENSE IPL10
FIXES 124951

make things happy for rpmlint again (wrong initialization)


(cherry picked from commit 4ac7d59d46)
2009-06-25 00:14:55 +00:00
Marc Dionne
c5b8948ae7 DEVEL15-linux-rcu-read-lock-export-20090623
LICENSE IPL10
FIXES 124986

deal with rcu_read_lock() becoming GPLONLY


(cherry picked from commit 0e718b642c)
2009-06-24 22:54:04 +00:00
Harald Barth
a426099944 DEVEL15-fbsd61-stdlib-proto-define-20090623
LICENSE IPL10
FIXES 124952

add define to make stdlib have malloc prototype


(cherry picked from commit a125b571a4)
2009-06-24 22:45:05 +00:00
Andrew Deason
eb252cea4a DEVEL15-osol-solookup-20090624
LICENSE IPL10
FIXES 124924

update for new opensolaris solookup function signature


(cherry picked from commit ee72f25104)
2009-06-24 22:38:27 +00:00
Jeffrey Altman
fce2790725 DEVEL15-util-snprintf-replacement-20090624
LICENSE BSD

1. Add a test program for *printf functionality.  util/tests/snprintf_test.c

2. Replace OpenAFS implementation of afs_*printf() with Heimdal's version.

3. Add support to Heimdal's version to support:

 - floating point

 - OpenAFS %I ipv4 address formatting (dotted notation and hostname lookup)

 - Microsoft's I32 and I64 integer size modifiers

With these changes OpenAFS gains:

 - output that is compliant with standard *printf implementations.
   the previous implementation had justification, padding and case
   errors.

 - support for a NULL buffer which computes the required size based
   upon the input format and arguments.  the previous implementation
   would crash.

 - support for additional format types.

 - OpenAFS specific implementations of vasnprintf(), vasprintf(),
   asprintf(), and asnprintf().


(cherry picked from commit b45838ca82)
2009-06-24 16:15:54 +00:00
Jeffrey Altman
1a4dd2f546 DEVEL15-windows-config-amd64-20090624
LICENSE MIT

amd64 uses 64-bit pointers.  Define AFS_64BITPOINTER_ENV.


(cherry picked from commit 74d49eb2c6)
2009-06-24 15:47:41 +00:00
Marc Dionne
e52cc4fe54 DEVEL15-linux-call-inode-setattr-op-20090622
LICENSE IPL10
FIXES 124942

call inode's setattr op instead of just inode_setattr, when one is available.
needed for xfs, notably also will cause truncates to be journalled for ext3,
which may solve some existing issues


(cherry picked from commit b02e22b5f0)
2009-06-22 16:25:32 +00:00
Jeffrey Altman
a37d963043 DEVEL15-cellconfig-gethostbyname-20090618
LICENSE MIT

The CellServDB processing in auth/cellconfig and WINNT/afsd/cm_config
differ in one important way.  cellconfig uses the IP addresses specified
in the CellServDB file and ignores the host name; whereas cm_config
calls gethostbyname() on the host name and falls back to the specified
address only if gethostbyname() fails.

This commit modifies cellconfig to use gethostbyname() calls on the
host names when the client CellServDB file is being used.   The server
CellServDB file is left alone because ubik servers need to be given
the exact list of ip addresses specified by the administrator and
there is no method of indicating clones to other servers using DNS.

This change permits a greater resilency to cell server configuration
changes due to IP address renumbering as the DNS names in the CellServDB
file can be CNAME or A records.

A host name can be resolved to multiple IP addresses and all of the
addresses will be added to the hostAddr list for the cell provided
that they do not exceed the maximum number of hosts.  If the same
host name is listed multiple times the duplicate IP addresses will
be ignored.

The behavior of all tools that use CellServDB files on Windows will now
be consistent.


(cherry picked from commit 0200a40061)
2009-06-19 04:48:28 +00:00
Jeffrey Altman
dbb62996df DEVEL15-windows-conn-analyze-20090615
LICENSE MIT

When processing RX_CALL_TIMEOUT, if there is no fid specified its a vldb
rpc and we should retry.  If there is a fid and the volume is a readonly
volume then we should also retry.  Only fail if the request has no alternate
server to look at.

When processing RX_CALL_DEAD, log the fact that the call is dead.

When processing any other RX error between -2 and -64, do not force
a new connection to the same server.   Mark the server down and retry
with a new server if possible.


(cherry picked from commit 82d9807e22)
2009-06-19 04:38:50 +00:00
Jeffrey Altman
ec68ee4652 DEVEL15-windows-netidmgr-20090617
LICENSE MIT

permit building with a broader range of visual studio versions


(cherry picked from commit cfe1f5676d)
2009-06-19 04:16:23 +00:00
Jeffrey Altman
bbf8292eec DEVEL15-windows-testcellconf-20090617
LICENSE MIT

make testcellconf work on Windows


(cherry picked from commit f310847d2d)
2009-06-19 04:16:13 +00:00
Jeffrey Altman
dc846c34ba DEVEL15-windows-client-config-cell-search-registry-20090616
LICENSE MIT

Add registry based cell search functionality to afs_config.exe
even though the tool is close to useless at this point.


(cherry picked from commit 377b8c176f)
2009-06-19 04:15:52 +00:00
Jeffrey Altman
1483c0e7a4 DEVEL15-windows-kauth-cell-search-registry-20090616
LICENSE MIT

add registry based cell search to ka_UserAuthenticateGeneral2()
which is used by klog() and afslogon.dll when no kerberos support
is available.


(cherry picked from commit 3af8eafae6)
2009-06-19 04:15:23 +00:00
Jeffrey Altman
f9a873a988 DEVEL15-windows-netidmgr-cell-search-registry-20090616
LICENSE MIT

Forgot to update the afs provider to support registry based cellservdb
lookups


(cherry picked from commit 4bf09a2ebf)
2009-06-19 04:15:10 +00:00
Jeffrey Altman
e6b33f7a8b DEVEL15-windows-installer-nsis-20090615
LICENSE MIT

reorder some operations and make sure that directories are created
before the installer attempts to generate files into them.


(cherry picked from commit 3e26e46b66)
2009-06-19 04:14:52 +00:00
Jeffrey Altman
a2cc53224c DEVEL15-windows-cellservdb-rank-20090615
LICENSE MIT

When inserting a new vldb server, if the rank is 0 (unknown), do not
override the default rank assigned by cm_NewServer().  Doing so erases
the randomized ranking.


(cherry picked from commit 81c9b8c0c4)
2009-06-19 04:14:39 +00:00
Jeffrey Altman
1367a1560e DEVEL15-windows-server-find-by-uuid-20090614
LICENSE MIT

Add cm_FindServerByUuid().  This function is similar to cm_FindServerByIP()
but uses the server's known uuid instead which is constant across multi-
homed systems.


(cherry picked from commit 88ef4fb720)
2009-06-19 04:13:56 +00:00
Jeffrey Altman
a8c5573104 DEVEL15-windows-server-xdr-free-20090614
LICENSE MIT

when releasing the capabilities memory allocation use xdr_free() not
the free() of the afsd_service.exe module.


(cherry picked from commit 571dc5edbe)
2009-06-19 04:13:43 +00:00
Jeffrey Altman
50370ca427 DEVEL15-windows-callback-handling-20090614
LICENSE MIT

Turn SRXAFSCB_InitCallBackState3() into the primary function for
processing InitCallBackStateX RPCs.  InitCallBackState3 accepts an
optional server uuid which can be used instead of the IP address
to locate a matching server object.  If the RPC comes from a server
that we know of, we can restrict the calback state initialization
to cm_scache_t objects on that file server.  If the request comes
from a server that we know nothing about and a uuid was specified,
we can ignore it.

During callback revocation, make use of the cell associated with
the server to restrict the revocation to cm_scache_t objects in
the one cell.  This is especially important for readonly volume
callbacks since volume ids are shared across multiple cells.

Add a missing case where the cm_volume_t cbExpiresRO time should
be set to the cm_scache_t cbExpires time.


(cherry picked from commit a79ce67d7a)
2009-06-19 04:13:30 +00:00
Jeffrey Altman
8563051729 DEVEL15-windows-cache-validation-20090610
LICENSE MIT

correct cell validation to avoid false detection of infinite loops
if a cm_cell_t object had to be freed.

add newlines to output of volumeHashTableSize and cellHashTableSize


(cherry picked from commit ae1923e362)
2009-06-19 04:13:14 +00:00
Jeffrey Altman
6e34d59a41 DEVEL15-windows-freelance-default-cell-20090609
LICENSE MIT

If a freelance mount point does not specify a cell name, default to
the workstation cell.


(cherry picked from commit 37e1cd2319)
2009-06-19 04:12:53 +00:00
Jeffrey Altman
818c3dc66f DEVEL15-windows-dirty-buffers-20090608
LICENSE MIT

In the buf_IncrSync thread, if the volume is known to be unavailable
do not attempt to write the buffer.  Just skip it.

In buf_Sync(), if we are shutting down and a buffer is left dirty,
log a message to the Windows Event Log indicating that the dirty buffer
was lost.


(cherry picked from commit 2033fa9ec6)
2009-06-19 04:12:34 +00:00
Jeffrey Altman
84c772697d DEVEL15-windows-cell-locking-20090608
LICENSE MIT
FIXES 124910

cm_cellLock protects the cm_cell_t fields allNextp, nameNextp, idNextp,
and freeNextp.  Therefore, a write lock must be obtained whenever those
items may change.  This patch makes that consistent.

This patch also fixes an out of order lock acquisition and removes
cm_cell_t objects from the id and name hash tables before freeing them.


(cherry picked from commit f5b74d9fbc)
2009-06-19 04:12:21 +00:00
Jeffrey Altman
f525fda488 DEVEL15-windows-search-cell-registry-20090608
LICENSE MIT

do not clear the newCellNamep buffer on error.
that is inconsistent with the other SearchCell functions
and breaks "fs newcell".


(cherry picked from commit 7bf6fd6bcb)
2009-06-19 04:12:09 +00:00
Jeffrey Altman
c6d246b6dc DEVEL15-windows-buf-infinite-looping-on-dirty-buffers-20090607
LICENSE MIT

If there are dirty buffers when the file server becomes unresponsive,
the cache manager will attempt to write them repeatedly resulting in
use of 100% of the cpu of the machine until the file server becomes
responsive.

This patch reduces the cpu utilization by ensuring that only the first
in a list of buffers on the same file needs to fail with timed out,
all down, all busy, all offline, or clock skew.  The other dirty buffers
will just be skipped.  A small delay is enforced in the buf_IncrSync
thread between invocation.

This patch is not a complete fix for the problem.  The buf_IncrSync
thread needs to become more intelligent in order to avoid attempts to
write to volumes that are known to be inaccessible.


(cherry picked from commit bada49cff9)
2009-06-19 04:11:22 +00:00
Andrew Deason
4b3d2b109b DEVEL15-ubik-fix-allbetter-loglevels-20090616
LICENSE IPL10
FIXES 124938

make allBetter log more sensibly; right now it's very loud. move it to level 25


(cherry picked from commit e44c38c423)
2009-06-16 19:09:52 +00:00
Derrick Brashear
9738086c33 DEVEL15-afs-snrpintf-support-percentp-for-ptrs-20090616
LICENSE IPL10

so we can portably log pointers


(cherry picked from commit a44bee5615)
2009-06-16 19:08:25 +00:00
Simon Wilkinson
46aef324c2 DEVEL15-gitignore-20090615
LICENSE IPL10

make gitignore files


(cherry picked from commit c41a467741)
2009-06-15 23:33:13 +00:00