commit 3994c23187d42164a1f3d3b5ddedd59525417864 Author: Jeffrey Altman Date: Wed Oct 28 09:06:44 2015 -0400 VERSION: 1.6.15 Update configure version strings for 1.6.15. Change-Id: I1b730216b982b7c327730b1d0cf4061666f0fa8d commit d12f72f1afcdee1076287a7fc41f8abcaae4ddc4 Author: Jeffrey Altman Date: Wed Oct 28 08:49:20 2015 -0400 NEWS: Update for 1.6.15 Security vulnerability release. Document OPENAFS-SA-2015-007. Change-Id: Id36480024fbdac7d3478bec7f3026b2c05bc37f0 commit 9191cdfc9b2f00d320e775031bb3be1173302e5b Author: Jeffrey Altman Date: Thu Oct 8 22:22:12 2015 -0400 rx: OPENAFS-SA-2015-007 "Tattletale" CVE-2015-7762: The CMU/Transarc/IBM definition of rx_AckDataSize(nAcks) was mistakenly computed from sizeof(struct rx_ackPacket) and inadvertently added three octets to the computed ack data size due to C language alignment rules. When constructing ack packets these three octets are not assigned a value before writing them to the network. Beginning with AFS 3.3, IBM extended the ACK packet with the "maxMTU" ack trailer value which was appended to the packet according to the rx_AckDataSize() computation. As a result the three unassigned octets were unintentionally cemented into the ACK packet format. In OpenAFS commit 4916d4b4221213bb6950e76dbe464a09d7a51cc3 Nickolai Zeldovich noticed that the size produced by the rx_AckDataSize(nAcks) macro was dependent upon the compiler and processor architecture. The rx_AckDataSize() macro was altered to explicitly expose the three octets that are included in the computation. Unfortunately, the failure to initialize the three octets went unnoticed. The Rx implementation maintains a pool of packet buffers that are reused during the lifetime of the process. When an ACK packet is constructed three octets from a previously received or transmitted packets will be leaked onto the network. These octets can include data from a received packet that was encrypted on the wire and then decrypted. If the received encrypted packet is a duplicate or if it is outside the valid window, the decrypted packet will be used immediately to construct an ACK packet. CVE-2015-7763: In OpenAFS commit c7f9307c35c0c89f7ec8ada315c81ebc47517f86 the ACK packet was further extended in an attempt to detect the path MTU between two peers. When the ACK reason is RX_ACK_PING a variable number of octets is appended to the ACK following the ACK trailers. The implementation failed to initialize all of the padding region. A variable amount of data from previous packets can be leaked onto the network. The padding region can include data from a received packet that was encrypted on the wire and then decrypted. OpenAFS 1.5.75 through 1.5.78 and all 1.6.x releases (including release candidates) are vulnerable. Credits: Thanks to John Stumpo for identifying both vulnerabilities. Thanks to Simon Wilkinson for patch development. Thanks to Ben Kaduk for managing the security release cycle. Change-Id: I29e47610e497c0ea94033450f434da11c367027c commit 42c8b109f8f550e6ba3383809b7e3d8f770af6e9 Author: Stephan Wiesand Date: Fri Aug 14 08:46:36 2015 +0200 Make OpenAFS 1.6.14.1 Update configure version strings for 1.6.14.1. Note that macos kext can be of form XXXX.YY[.ZZ[(d|a|b|fc)NNN]] where d dev, a alpha, b beta, f final candidate so we have no way to represent 1.6.14.1. Switch to 1.6.15 dev 1 for macos. Change-Id: I733de0ef5d359bffdb7ffe6a7c12cf60f18618c0 Reviewed-on: http://gerrit.openafs.org/11982 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Michael Meffie Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit c453780953c423ed1a02918039092e93658fa2f7 Author: Stephan Wiesand Date: Mon Aug 31 21:48:19 2015 +0200 Update NEWS for 1.6.14.1 Release notes for OpenAFS 1.6.14.1 . Change-Id: I61fcb122eba98a3d5e2180b9de4bcdc611678cc6 Reviewed-on: http://gerrit.openafs.org/11993 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit feab09080ec050b3026eff966352b058e2c2295b Author: Marc Dionne Date: Wed Jul 29 09:03:14 2015 -0300 Linux: Only use automount for volume roots As long as we avoid using directory aliases when crossing a mount point (at the volume root), we should always get to a given non root directory with the same dentry. The mechanism added by commit de381aa0 ("Linux: Make dir dentry aliases act like symlinks") is therefore only really necessary for a volume root. With kernel 4.2 it is not possible to tweak the "total link count", resulting in ELOOP errors when looking up a path with 40 or more directories that are being looked up for the first time. With this change, only mountpoints will count against the limit. Reviewed-on: http://gerrit.openafs.org/11945 Reviewed-by: Benjamin Kaduk Reviewed-by: Daria Brashear Tested-by: BuildBot (cherry picked from commit 05f64de7d723a8d5430d9b5928c2025838a6fa52) Change-Id: I16e855c8322174604288b7d440b342951dd3a015 Reviewed-on: http://gerrit.openafs.org/11989 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit b93da6f3e99735ef2584fb172d028284bb581011 Author: Marc Dionne Date: Mon Jul 6 13:01:38 2015 -0300 Linux 4.2: Changes in link operation APIs The follow_link and put_link operations are revised. Test for the new signature and adapt the code. Reviewed-on: http://gerrit.openafs.org/11928 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 6c3ac6dc1ea865153a65b5c5c4f288617a3e6d0f) Change-Id: I779fe8a29ec75a5db545b5d370927b810c1165c9 Reviewed-on: http://gerrit.openafs.org/11951 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit dfcf0b348886b4a97d2c8a8b90eae98ad9e25834 Author: Marc Dionne Date: Mon Jul 6 12:00:10 2015 -0300 Linux: Add AC_CHECK_LINUX_OPERATION configure macro Add a new macro to check the signature of a particular operation against a provided typed argument list. One of the arguments is an arbitrary label that is used to construct the pre-processor define name. This will allow for testing of different forms for the same operation. This can be used to replace many of the remaining odd checks in src/cf/linux_test4.m4. Reviewed-on: http://gerrit.openafs.org/11927 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit c2c0b6bc86c6d67814d0f7fe14fa8eefc445b4a4) Change-Id: Id929412d87bb9fc38b2b599abbe3fddca3cda4b1 Reviewed-on: http://gerrit.openafs.org/11950 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 2e5ba7e16c6797a39323173ce17a1db698526c2c Author: Marc Dionne Date: Mon Jul 6 11:00:13 2015 -0300 Linux 4.2: total_link_count is no longer accessible The value is now stored in the nameidata structure which is private to fs/namei.c, so we can't modify it here. The effect is that using a path that contains 40+ directories may fail with ELOOP, depending on which directories in the path were previously used. After a directory is accessed once its D_AUTOMOUNT flag is reset and it will no longer count against the symlink limit in later path lookups. Reviewed-on: http://gerrit.openafs.org/11926 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 89aeb71a3e23c944f58cfa9572e9eae4d2130d37) Change-Id: Ib6282f3029c4112c510217eacf270a56d679fccd Reviewed-on: http://gerrit.openafs.org/11949 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 8d1e5a497635bf453c73525b9df2bcf9c13a5faf Author: Marc Dionne Date: Wed Jul 8 14:32:31 2015 -0300 Linux 4.2: Pass namespace to sock_create_kern sock_create_kern gains an additional network namespace argument. Pass in the default system namesapce. Reviewed-on: http://gerrit.openafs.org/11925 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman (cherry picked from commit e597b879677d023165298adadfb88db031883ff4) Change-Id: I8e4341a6b4c33c5226b9307827932f577e08d5b2 Reviewed-on: http://gerrit.openafs.org/11948 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 602130f1de65eefeb4e31e114070d544eb9edd40 Author: Simon Wilkinson Date: Sun Apr 17 23:43:51 2011 +0100 Linux CM: Use kernel allocator directly In another few locations within the Linux portion of the cache manager, directly use the kernel allocator. We can do so here because we can guarantee that the amount of memory being allocated is less than the page size, and there is a kfree() in all of the exit paths, so we don't need the magic freeing behaviour, either. Reviewed-on: http://gerrit.openafs.org/4752 Reviewed-by: Derrick Brashear Reviewed-by: Marc Dionne Tested-by: Derrick Brashear (cherry picked from commit 7a70c2907b0435653098a611a140fea1ac0b2fac) Change-Id: I72fd6a2109022af5e14d90ce147705da7ccec587 Reviewed-on: http://gerrit.openafs.org/11933 Tested-by: BuildBot Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Perry Ruiter Reviewed-by: Jeffrey Altman Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit d6b622833d0a5d679a8ed3f37b7e661d51a19188 Author: Stephan Wiesand Date: Tue Aug 4 14:13:38 2015 +0200 Make OpenAFS 1.6.14 Update version strings for release 1.6.14. Change-Id: I123d9f764a4b8496e0a85032ec8848e9a46a0428 Reviewed-on: http://gerrit.openafs.org/11974 Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit e47846dccbca3ef4118d8434786fafe7c99b5ae4 Author: Stephan Wiesand Date: Thu Aug 13 12:44:44 2015 +0200 Update NEWS for 1.6.14 Release notes for OpenAFS 1.6.14 Change-Id: I9caed2c8e8737deccbe72eae1d35e810c48a685a Reviewed-on: http://gerrit.openafs.org/11980 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 60be338c2de58f2a33c64bdb41c006574ba7fd0e Author: Jeffrey Altman Date: Sat Aug 1 09:32:35 2015 -0400 vlserver: ListAttributesN2 volume name safety The vlserver ListAttributesN2 RPC permits filtering the result set by volume name in addition by site or volume id. Two issues identified by Andrew Deason (Sine Nomine Associates) are addressed by this patch. First, the size of the volumename[] buffer is insufficient to store the valid input read over the network. The buffer needs to be able to store VL_MAXNAMELEN characters of the volume name, two characters for the regular expression '^' and '$', and the trailing NUL. Second, sprintf() is used to write to the buffer and even with valid input from the caller SVL_ListAttributesN2 can overflow the buffer when ".backup" and ".readonly" are appended to the volume name. If there is an overflow the search name is invalid and there can not be a valid match. This patch increases the size of volumename[] to VL_MAXNAMELEN+3. It also uses snprintf() instead of sprintf() and performs error checking. The error VL_BADNAME is returned when the network input is invalid. Reviewed-on: http://gerrit.openafs.org/11969 Reviewed-by: Mark Vitale Reviewed-by: Nathaniel Filardo Reviewed-by: Daria Brashear Tested-by: BuildBot (cherry picked from commit c9f430fd8f479bbfe28829f7032ecd325a4f833d) Change-Id: I1b48cc8ed1a52afc36465f2fbd5bfd5345e90c41 Reviewed-on: http://gerrit.openafs.org/11976 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Michael Meffie Reviewed-by: Benjamin Kaduk Tested-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 0b4cad31128623b1cf381384b8cf50336a86be9c Author: D Brashear Date: Fri Jul 18 16:00:12 2014 -0400 vlserver: limit use of regex to admins always allow regexes only if the querying user is a superuser. if the superuser uses up all the resources, well, they could just do whatever damage directly anyway. means even in unrestricted mode we are not vulnerable Reviewed-on: http://gerrit.openafs.org/11968 Reviewed-by: Daria Brashear Reviewed-by: Mark Vitale Tested-by: BuildBot Reviewed-by: Benjamin Kaduk (cherry picked from commit 049323e7e03c64f534a73ff452d218f19d5b8132) Change-Id: I1e3f11bd14b071be69eb6e00c26ea2209596c82a Reviewed-on: http://gerrit.openafs.org/11975 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Michael Meffie Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 3803e6acbe625c3b298dde7a6f9d0fd560cfe635 Author: Stephan Wiesand Date: Tue Aug 4 16:05:06 2015 +0200 Revert "vlserver: Disable regex volume name processing in ListAttributesN2" This reverts commit 63087b338e3d0fbbb26ee183a039052bf07aaaec. Change-Id: I4bb759893224b8c53a1deb50f34e8395ed44fb4a Reviewed-on: http://gerrit.openafs.org/11971 Reviewed-by: Daria Brashear Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit 4f9a7acec9fe892f864acd41af8523962ffe68b5 Author: Stephan Wiesand Date: Mon Jul 13 12:56:44 2015 +0200 Make OpenAFS 1.6.13 Update version strings and NEWS for release 1.6.13 Change-Id: I0383e39658420f710e6ab8c20e7ce080f51b1bc0 commit 63087b338e3d0fbbb26ee183a039052bf07aaaec Author: Andrew Deason Date: Wed Jul 8 14:37:16 2015 -0400 vlserver: Disable regex volume name processing in ListAttributesN2 For the interim and until it is needed, this is most prudently simply disabled. FIXES 131890 (cherry picked from commit 22481ab3705522ac1988b7de038c4dbc1e5009a9) Change-Id: I612ea4a1c85fdb895acc6a71801e659869e849c2 commit 5ec99156b08d13adbb4f74248c8743c81cc79295 Author: Mark Vitale Date: Wed Jul 8 14:28:50 2015 -0400 Solaris: setpag should verify that ngroups will not overflow Our ngroups management (since PAGs are still encoded as 2 groups) needs to ensure that we do not overflow what we are prepared to handle, and do not panic due to misheld mutexes if we have to return an error when handling it. FIXES 131878 (CVE-2015-3286) (cherry-picked from commit 8ce4a3905268385d3f5a0e11f20594875467cae6) Change-Id: I34a298ab776f69d52c8f621f79aafc79199f9cc4 commit 06a5b0bd91f3ec6efad8b21831b4d1ec1a0f5003 Author: Andrew Deason Date: Wed Jul 8 14:20:13 2015 -0400 afs: Use correct output buffer for FSCmd pioctl MRAFS added the FsCmd pioctl for passing messages to the fileserver; a bug causes it to write into the wrong memory and potentially panic clients. FIXES 131896 (CVE-2015-3285) (cherry picked from commit ef671f497e9161ec2759446d594789495d3346f1) Change-Id: I1ee1fa7dff1d2594cfe9fab5ae0b7fc9245803de commit d4cd57807660a6fd3b47bc83de14a78fa8292a5f Author: Daria Brashear Date: Wed Jul 8 14:16:41 2015 -0400 afs: Clear pioctl data interchange buffer before use Avoid leaking data in pioctl interchange buffers; clear the memory when one is allocated. FIXES 131892 (CVE-2015-3284) (cherry picked from commit 592a99d6e693bc640e2bdfc2e7e5243fcedc8f93) Change-Id: I90fef404978bd7aae3eb88836bcd4f95587fd45c commit eea466507af6320c35e3e8dc751da60a52b15a23 Author: Daria Brashear Date: Wed Jul 8 14:11:33 2015 -0400 bos: Use crypt for commands where spoofing could be a risk bos defaults to not requiring crypt in a lot of cases, instead using clear. As the simplest way to secure the channel is to enable crypt, do so. FIXES 131782 (CVE-2015-3283) (cherry picked from commit 62926630a82b8635d1cb1514b852f9f7a2609311) Change-Id: Ib9e2514c4d14a77eead69677da1dabf86e526ebc commit 14a4e5bf9ec05946f67123531d6c64a612919e8c Author: Daria Brashear Date: Wed Jul 8 13:51:47 2015 -0400 vos: Clear nvldbentry before sending on the wire Don't leak stack data onto the wire. Clear nvldbentry before use. FIXES 131907 (CVE-2015-3282) (cherry picked from commit 415a2aad4c1e9ab5d034b62989e4c16a37b5dcc7) Change-Id: Ic245a2b5ef5cc54a2a5fdfb5d458b6892c4bcf34 commit 5fb8b61d2337638a67d40e8566b541176cb7d937 Author: Stephan Wiesand Date: Thu Jun 4 11:11:31 2015 +0200 Make OpenAFS 1.6.12 Update version strings and NEWS for release 1.6.12 Change-Id: If3ecee369ad1fe1e5866e3ffccc233ad4085684a Reviewed-on: http://gerrit.openafs.org/11884 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Michael Meffie Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 46ecc7db4af6821da272d3ef6a28179ae5ddf342 Author: Stephan Wiesand Date: Thu May 7 09:57:50 2015 +0200 Make OpenAFS 1.6.12pre2 prerelease for 1.6.12 Change-Id: I139d2533e76b480b789eada9e049a1dbd2321d2c Reviewed-on: http://gerrit.openafs.org/11864 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit edfd7a255cfe9000c7a040ac1018e9227079cfe9 Author: Stephan Wiesand Date: Wed May 27 14:52:41 2015 +0200 Update NEWS for 1.6.12pre2 Preliminary release notes for 1.6.12. Change-Id: I12349fb2a8b29e031e33f7105aa66887ef460ff0 Reviewed-on: http://gerrit.openafs.org/11881 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Perry Ruiter Reviewed-by: Stephan Wiesand commit 2c95c104fd526f99db6237fc49534ad7dd6e92c0 Author: Marc Dionne Date: Wed Apr 22 15:06:12 2015 -0300 Linux: mmap: Apply recursion check only to recursion cases The CPageWrite flag was originally added to prevent a scenario where a thread doing "writepage" would realize that the cache was too full and that some of its contents need to be written back to the server. Before writing back it would ask the OS to flush any dirty VM associated with the vcache entries that are to be written, to make sure the data is not stale. This flush could itself trigger writeback, leading to deadly recursion. One such scenario is a process doing mmap writes to a file larger than the cache. With some kernel versions and some callers of writepage, this can cause the mapping to be marked as being in an error state, leading to EIO errors passed back to user space. Make the recursion check more specific to only bail when the calling thread is one that was originally seen writing. A list of current writers is maintained instead of a single state flag. This lets other threads (like the flusher thread) go on with writeback to the same file, and limits the WRITEPAGE_ACTIVATE return case to call sites that can deal with it. In testing this helps avoid EIO errors when writing large chunks of data through mmap. Thanks to Yadav Yadavendra for extensive analysis and testing. Reviewed-on: http://gerrit.openafs.org/11124 Reviewed-by: Daria Brashear Tested-by: BuildBot (cherry picked from commit 95b857399d71cb1f6619e625bff256f8c4c72c6a) Change-Id: I08ced97c4f58f95375fda2ed9c707cdf7657e493 Reviewed-on: http://gerrit.openafs.org/11877 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 080e73e2362233953e6771f58c2ab7b78c2ee76d Author: Marc Dionne Date: Mon Apr 20 10:41:53 2015 -0300 Linux 4.1: Don't define or use ->write directly We no longer have to define a ->write operation, and we can't expect the underlying disk cache filesystem to have one. Use the new __vfs_read/write helpers that will select the operation to use based on what's available for that particular filesystem. Reviewed-on: http://gerrit.openafs.org/11849 Tested-by: BuildBot Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman (cherry picked from commit 5c1237432edf4600111845d175c92252430d5f76) Change-Id: I21bca85637e07d0e03ef471896d0454eeef68a14 Reviewed-on: http://gerrit.openafs.org/11873 Tested-by: BuildBot Reviewed-by: Daria Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 015fe32c126cf850b919cdfa5587eeface1e9c2e Author: Marc Dionne Date: Mon Apr 20 10:37:40 2015 -0300 Linux 4.1: No need for do_sync_read Make the test here a bit more specific. do_sync_read no longer exists, but we don't use it for new kernels. Trying to define it here in terms of generic_file_read is not helpful as that doesn't exist anymore. Reviewed-on: http://gerrit.openafs.org/11848 Tested-by: BuildBot Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman (cherry picked from commit fcfa5ae2468d878db962a93d6013fcd3042e6c13) Change-Id: I87bf0fc856d244d15bdae300f0cd6b80ecb63797 Reviewed-on: http://gerrit.openafs.org/11872 Tested-by: BuildBot Reviewed-by: Daria Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 33a14ea9a205fe9d8ea2f5d6cf28e9cbc20aabeb Author: Benjamin Kaduk Date: Wed May 20 10:57:53 2015 -0400 afsio: switch BreakUpPath to strdup The current version of BreakUpPath is slightly broken, since commit 4e68282e26b0c4569d25d076d54274f0da47a691 -- it has two output parameters but takes only one length parameter for the size of the output buffers passed in. The callers ended up using the shorter of the buffer lengths in question, so there is not a risk of a buffer overrun, but long paths would not be properly handled. There is not really any need to pass in a length at all, since what is going on is conceptually strdup, and there is no real need to use strlcpy at all. Make the change from strlcpy to str(n)dup, and adjust callers to free the outputs as appropriate. While here, convert writeFile() to use goto and a cleanup handler to avoid leaks. Reviewed-on: http://gerrit.openafs.org/11874 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Daria Brashear (cherry picked from commit b8648dbefb3968329d20cad8976ce15947428678) Change-Id: I13d4ffd4ef46cbb7423d229cf6a6e85f7a42ecc1 Reviewed-on: http://gerrit.openafs.org/11879 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Perry Ruiter Reviewed-by: Stephan Wiesand commit 200f9c57927e988352491880bea70fa152d7cc61 Author: Jeffrey Altman Date: Sun Nov 11 22:00:07 2012 -0500 afsio: process windows file paths consistently Windows file paths can use either '\' or '/' as a path separator. libafscp on the other hand requires '/' and argv[0] will always use '\'. Introduce a new function ConvertAFSPath() which converts the input path to '/' and converts \\afs to /afs. A future commit should access the registry and make use of the NetbiosName and MountRoot values to perform the conversion correctly. Reviewed-on: http://gerrit.openafs.org/8430 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0bef3159d3698a941154bd21352eb35bd94edb8c) Change-Id: Id174313afae9c64a27133477e43e13731c0ac6b7 Reviewed-on: http://gerrit.openafs.org/11878 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit c2718d5ed7380f2c6d8b8621e5886b20de225c4c Author: Simon Wilkinson Date: Fri Mar 30 19:35:51 2012 +0100 venus: Make clang happy with strlcpy use clang now expects that strlcpy will always be used to prevent overflow of the destination string, and gives a warning if the size parameter is based solely on the length of the source string. Modify the BreakUpPath function so that it takes the size of the destination string as an argument, and uses this to limit the amount of data pasted into it. Reviewed-on: http://gerrit.openafs.org/7086 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4e68282e26b0c4569d25d076d54274f0da47a691) Change-Id: I31003fa06fc331a6313ca17840dcb46f61299921 Reviewed-on: http://gerrit.openafs.org/11845 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 9a324f14e7c98a302d7276d7c151ccef9242c9f9 Author: Simon Wilkinson Date: Fri Mar 30 19:18:47 2012 +0100 libafscp: Use strdup, rather than rolling our own A = malloc(strlen(B)+ 1); memset(A, 0, strlen(B) + 1); strlcpy(A, B, strlen(B) + 1); can be more simply written as A = strdup(B); Doing so also avoids a warning from clang that strlcpy isn't checking for A overflowing. Reviewed-on: http://gerrit.openafs.org/7077 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 1e30c00e7d9b45d65e819d39414939f2d5f7631b) Change-Id: I886bef77fdedb63d1c83e657c25d112e0a635db2 Reviewed-on: http://gerrit.openafs.org/11844 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 7dff0032992eac3c078f03e520aee5fed00f2b21 Author: Ben Kaduk Date: Wed Feb 11 17:47:10 2015 -0500 Remove spurious NULL checks clang 3.5 is more aggressive about these checks than the previous FreeBSD system compiler, so new warnings (which became errors) appeared on FreeBSD 11-CURRENT. In afs_dcache.c, checking &tdc->f for NULL-ness has no effect. The struct fcache f member of struct dcache is an ordinary structure element; its address will be the value of tdc plus the offset of f within struct dcache, which will not be NULL even if tdc is NULL. In ubik_db_if.c, udbHandle is a file-scope global and thus has allocated storage; the address of a member variable will never be NULL. The 0 it was compared against was spelled RX_SECIDX_NULL, which shows the intended check, which is for the value of the uh_scIndex member variable, not its address. In afscp_server.c, srv->conns can never be NULL since conns is a member variable of struct afscp_server (of array type, containing pointers to struct rx_connection). Comparing the array member variable against NULL is comparing the address of the array, which is never NULL since it is not allocated separately from struct afscp_server. In fssync-debug.c, state.vop->partName is never NULL because common_volop_prolog always allocates for state.vop, and the partName member variable of struct fssync_state is of array type, and thus is not separately allocated from the containing structure. Reviewed-on: http://gerrit.openafs.org/11739 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit fb499c2406450fa5dc423a0b038266d3b8e79e33) Change-Id: I13799a3362508672136f8c603eabdfc0f3ee072d Reviewed-on: http://gerrit.openafs.org/11843 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 264ac76af4e82b0a1e1b27f3f4482100fb1bde20 Author: Benjamin Kaduk Date: Wed Apr 22 13:43:43 2015 -0400 kauth: fix clock skew detection Commit 5b3c1042969daec38ccb260e61d665eda0c713ea changed/removed some uses of abs() on unsigned time values. While the previous use of abs() was indeed incorrect, the result wasn't necessarily much better, even though it built with recent compilers, since it only checked for skew in one direction. Define and use a macro to correctly evaluate the conditionals in 64-bit precision, avoiding C's integer promotion rules which prefer unsigned types (Date) to signed types of the same width (time_t on 32-bit systems). Reviewed-on: http://gerrit.openafs.org/11850 Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 810f0ccd0354dac30af024ca7b5acf3ebabf5f4b) Change-Id: I29337e1ecd410fcf7733408287930c50c055ff90 Reviewed-on: http://gerrit.openafs.org/11863 Tested-by: BuildBot Reviewed-by: Daria Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 3bd4e8f797ce9834ff128468b777d870a9ee3dae Author: Ben Kaduk Date: Fri Feb 13 09:47:20 2015 -0500 Fix incorrect uses of abs() abs(3) is a function of one variable of type int returning int. labs(3) is a function of one variable of type long returning long. labs(3) should be used when the input is of type long, as in kaprocs.c. Calling anything from the abs(3) family on a variable of unsigned type is a bogus type pun, and a logical operation which is a no-op. (Unsigned values are never negative and thus the absolute value function is the identity over the entire range of values representable in an unsigned type.) Just remove the use of abs() for unsigned values, as in kaprocs.c, krb_udp.c, and vldb_check.c While in kaprocs.c, wrap a long line that was touched for the conversion to labs(3), spell the argument to time(3) as NULL instead of 0, remove unneeded parentheses, and correct the spelling of "reserved". Reviewed-on: http://gerrit.openafs.org/11745 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk (cherry picked from commit 5b3c1042969daec38ccb260e61d665eda0c713ea) Change-Id: I82038e41346479dad39466907b95f2d7540f6258 Reviewed-on: http://gerrit.openafs.org/11842 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit d75ec582869afffc24f31b2acd115bd4a92a9b2d Author: Daria Brashear Date: Thu May 21 16:34:09 2015 -0400 Add defines for recent darwin sysctl constants These were accidentally omitted from commit ab9bb6363ca95f658764fbb9fb68ec88f89a5b3f. Reviewed-on: http://gerrit.openafs.org/11875 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk (cherry picked from commit 9076cbd58dd48801ad212f803f586fdc53d7b886) Change-Id: I5a2ff768e0faec955c6ed7dafb4231fd3885e5bd Reviewed-on: http://gerrit.openafs.org/11876 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Daria Brashear Reviewed-by: Stephan Wiesand commit 9e08b24100fc49126b4483279b331f7eb4e745ce Author: Daria Brashear Date: Thu Apr 16 13:12:05 2015 -0400 osx: update afssettings for yosemite handle deprecated functions Reviewed-on: http://gerrit.openafs.org/11836 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit ab9bb6363ca95f658764fbb9fb68ec88f89a5b3f) Change-Id: I2ffab98ee422fb9d98a592ccbe2f1efbef1d2197 Reviewed-on: http://gerrit.openafs.org/11859 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit c8d6d91dfca8c19f1c101ee6987141fd601ea2c3 Author: Stephan Wiesand Date: Thu Mar 5 11:17:46 2015 +0100 Make OpenAFS 1.6.12pre1 prerelease for 1.6.12 Change-Id: Id73f0d7daa82ea51e7e62a497b1604f5ee658cc0 Reviewed-on: http://gerrit.openafs.org/11796 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 20d07f1763c9d72c5d8eb5fde09fe540fd5fc7df Author: Stephan Wiesand Date: Mon Apr 13 13:01:51 2015 +0200 Update NEWS for 1.6.12pre1 Preliminary release notes for 1.6.12. Change-Id: Ic54f4720c85ca819680d91d5329acc7aaa0d1960 Reviewed-on: http://gerrit.openafs.org/11832 Tested-by: BuildBot Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Stephan Wiesand commit 6833be1e845c54edd9452b9e9e0fbd529cd1c8c3 Author: Nathan Dobson Date: Fri Mar 20 18:32:22 2015 -0400 aklog: Correct size used for strlcpy() When copying into the 'cell' array, use the size of cell, not the size of some other array that is copied into a few lines previously. (cherry picked from commit 777870da86e9ed66756e01e858a54e959959482d) Change-Id: Ib8b523901dd8008038c5a95a7c315b899cff8cee Reviewed-on: http://gerrit.openafs.org/11807 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-on: http://gerrit.openafs.org/11808 Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 539b0d759755145eb20c5fd2938d47aac7049480 Author: Jeffrey Altman Date: Wed Feb 11 01:25:04 2015 -0500 ubik: DISK_UpdateInterfaceAddr == server restart If a DISK_UpdateInterfaceAddr RPC is received the server that sent it restarted. Force the urecovery code to verify the server state. Change-Id: I465863dc3a52d844b56d576bd55229435556cfd6 Reviewed-on: http://gerrit.openafs.org/11738 Tested-by: BuildBot Reviewed-by: Daria Brashear Reviewed-by: Jeffrey Hutzelman Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman (cherry picked from commit 30667a5d7b86b29f9aafe2b490d89b8e01bfc541) Reviewed-on: http://gerrit.openafs.org/11774 Reviewed-by: Benjamin Kaduk Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Stephan Wiesand commit 09c1b9d5cf5aa9249b06b9312bb5e79eb3e06dca Author: Jeffrey Altman Date: Thu Jan 22 01:14:28 2015 -0500 ubik: SDISK_Begin no quorum, wrong db, no transaction When processing an DISK_Begin RPC verify that there is an active quorum and that the local database is current. Otherwise, fail the RPC with a UNOQUORUM error. The returned error must be UNOQUORUM instead of USYNC becase the returned error code will be returned by the coordinator's ContactQuorum_iterate() to the client that triggered the write transaction. Most ubik clients will only retry if the error is UNOQUORUM. FIXES 131997 Change-Id: Icaa30e6aca82e7e7d33e9171a4f023970aba61df Reviewed-on: http://gerrit.openafs.org/11689 Tested-by: BuildBot Reviewed-by: Daria Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Hutzelman Reviewed-by: Jeffrey Altman (cherry picked from commit d47beca13236c64ed935fabeff9d1001e8a8871f) Reviewed-on: http://gerrit.openafs.org/11773 Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Stephan Wiesand commit 3da7b78ea965e5e1c94cd922eab0ac1d4e3d1b61 Author: Michael Meffie Date: Thu Nov 13 22:28:08 2014 -0500 libafs: remove "Please install afsd with check server daemon" warning Apparently, ancient versions of afsd did not start the check server daemon (AFSOP_START_CS). The afs_Daemon tries to detect when the check server daemon is not running and issues a warning to upgrade afsd. The afs_Daemon waits for the cache initialization to complete (AFSOP_GO) before detecting if the cache server daemon is started. Unfortunately, when running with memcache, the cache initialization is fast enough to race with the start of the check server daemon, and the "Please install afsd with check server daemon" message is sometimes printed to the syslog. Since all modern versions of afsd do start the check server daemon, this error message is no longer needed, so just remove the message and the flag used to print it on only once. Reviewed-on: http://gerrit.openafs.org/11602 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman (cherry picked from commit 8ce37d0d4aa4e6107f79efaf5027f31ea5a17604) Change-Id: I292052c9ba629c85ddc4b76c4b3db7d54ce1d852 Reviewed-on: http://gerrit.openafs.org/11680 Reviewed-by: Perry Ruiter Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit a48e90ddf1de19e766a8cc5898f9ac0a340eddb4 Author: Andrew Deason Date: Tue Jun 10 14:47:31 2014 -0500 doc: Document fs listquota 2TB partition limit We have previously documented that volumes over 2TB can result in inaccuracies, but this documentation does not say how the 'partition' field in "fs listquota" can be inaccurate. It is confusing to see a usage of 0% for a partition that you know is being used, so try to briefly explain in what way this field is inaccurate. The reason we _under_-report the partition usage is that the fileserver actually gives back PartBlocksAvail and PartMaxBlocks (not "blocks used" and "blocks total"). So 1TB used and 4TB total is truncated to 2TB and given back as 2TB free and 2TB total. One we hit 3TB used we'll report it as 1TB free 2TB total (50%) when the actual usage is 75%. Reviewed-on: http://gerrit.openafs.org/11245 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit cd8f24d9a1ba8563c6bef2b8d30885a753e8d30c) Change-Id: I2bd72cca994414a88073d26d44bef49e9cac3be1 Reviewed-on: http://gerrit.openafs.org/11626 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Stephan Wiesand commit 1db8a1c134ed64730e6f6719caf2ba6c689ae31a Author: Stephan Wiesand Date: Wed Apr 1 15:52:46 2015 +0200 Make OpenAFS 1.6.11.1 Update configure version strings for 1.6.11.1. Note that macos kext can be of form XXXX.YY[.ZZ[(d|a|b|fc)NNN]] where d dev, a alpha, b beta, f final candidate so we have no way to represent 1.6.11.1. Switch to 1.6.12 dev 1 for macos. Change-Id: Id8975b3d0dfa17e5bc9357b2fb8090bcbd497a6e Reviewed-on: http://gerrit.openafs.org/11819 Reviewed-by: Daria Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 21a92d90612488c5259a964cb81c39bf60910107 Author: Stephan Wiesand Date: Wed Apr 1 15:58:32 2015 +0200 Update NEWS for 1.6.11.1 Release notes for 1.6.11.1. Change-Id: I48ea6881acb6d95dcedef7b23e4019e16f134e26 Reviewed-on: http://gerrit.openafs.org/11820 Tested-by: BuildBot Reviewed-by: Daria Brashear Reviewed-by: Stephan Wiesand commit 1b3a18f81b06f745ee87c3e89e0f995c269fd738 Author: Anders Kaseorg Date: Mon Feb 23 00:13:05 2015 -0500 Linux 4: struct address_space no longer has backing_dev_info The backing_dev_info is only stored in the super_block now. Reviewed-on: http://gerrit.openafs.org/11756 Reviewed-by: Marc Dionne Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 5cca05d1a1c9883e33c953b31c4cb32252474f77) Change-Id: Id6f2f2dcc111c46ce1339595e145891758c46bab Reviewed-on: http://gerrit.openafs.org/11761 Reviewed-by: Benjamin Kaduk Reviewed-by: Marc Dionne Reviewed-by: Daria Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 2b21f7aba6297b604e90db14c6c814a4074d7bbe Author: Anders Kaseorg Date: Sun Feb 22 23:43:49 2015 -0500 Treat Linux 4 (and greater) as Linux 2.6/3 In an age where Linux version numbers are determined by Google+ polls, it’s clear that they aren’t going to be very useful for marking major API compatibility boundaries like they were in the days of 2.2/2.4. Reviewed-on: http://gerrit.openafs.org/11755 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Marc Dionne Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman (cherry picked from commit a5b091e1ec69d4a43d6f1b1efc93134ef7ed2167) Change-Id: I5b0da6b43e3cbf5d9a6fa883a09deccb359e53e9 Reviewed-on: http://gerrit.openafs.org/11760 Reviewed-by: Benjamin Kaduk Reviewed-by: Marc Dionne Reviewed-by: Daria Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit da34992921819d068c36812d401cb69799ce61de Author: Benjamin Kaduk Date: Wed Mar 25 00:26:42 2015 -0400 FBSD: do not set -mno-align-long-strings The new clang imported for FreeBSD 10.1 has stopped accepting this argument as a no-op. Fix the kernel module build by stopping passing it on the compiler command line. Change-Id: I5557f88abafbfa825213003107830ceac98346ff Reviewed-on: http://gerrit.openafs.org/11809 Tested-by: BuildBot Reviewed-by: Daria Brashear Reviewed-by: Stephan Wiesand commit 9e1cf2688efc25ae10e17b3d3fb4c15d5907ecfb Author: Stephan Wiesand Date: Thu Feb 26 10:13:50 2015 +0100 Update CellServDB to 20150119 snapshot Update all remaining copies of CellServDB in the tree, and make the Red Hat packaging use it by default too. Reviewed-on: http://gerrit.openafs.org/11764 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk (cherry picked from commit 8cb4a42496f71c3d47ebe30a96ec33478e203c82) Change-Id: I77854bb86ae0d17c4094705e80586b53ba504956 Reviewed-on: http://gerrit.openafs.org/11767 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 8317f21bec74f9816a0dd757d60a6954e17f0946 Author: Stephan Wiesand Date: Wed Feb 25 16:35:12 2015 +0100 Make OpenAFS 1.6.11 Update version strings and NEWS for release 1.6.11 Change-Id: I43770a355adc551b1bbd42ac3abc6b649b600532 Reviewed-on: http://gerrit.openafs.org/11762 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 617d424c6ce451445e93962a59c4880edc8502b9 Author: Stephan Wiesand Date: Wed Feb 4 14:24:02 2015 +0100 Make OpenAFS 1.6.11pre2 prerelease for 1.6.11 Change-Id: I5418881f003b6cb1a74fad2397cd5d2c67613181 Reviewed-on: http://gerrit.openafs.org/11709 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 1fbe3cd4841aef35b7e2798769504ee85fc6851d Author: Stephan Wiesand Date: Tue Feb 17 15:34:33 2015 +0100 Document --enable-linux-d_splice_alias-extra-iput Even though we hope no one will actually ever need to use it, explain this configure switch in the same place as the others. Reviewed-on: http://gerrit.openafs.org/11749 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Perry Ruiter Reviewed-by: Daria Brashear (cherry picked from commit e02b852f05c0927d48b6467872378bae99df2760) Change-Id: I4f7e42730afab2387d343880acc81d28b70ef5e9 Reviewed-on: http://gerrit.openafs.org/11752 Reviewed-by: Daria Brashear Tested-by: Daria Brashear Reviewed-by: Stephan Wiesand commit 8f07914acee06c509eca3435635bf5247fe6bf33 Author: Stephan Wiesand Date: Fri Feb 13 14:50:44 2015 +0100 Update NEWS for 1.6.11pre2 Preliminary release notes for OpenAFS 1.6.11 Change-Id: I5f23fcbe3ba8520ca4789984c26f84f966f70ff9 Reviewed-on: http://gerrit.openafs.org/11744 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Perry Ruiter Reviewed-by: Stephan Wiesand commit 8f4823934bbad984c5cc2961e4f6fc410afb7535 Author: Andrew Deason Date: Wed Feb 4 10:25:38 2015 -0600 rx: Zero unitialized uio structs We use some uio structures that were allocated on the stack, but we only initialize them by initializing individual fields. On some platforms (Solaris is one known example, but probably not the only one), there are additional fields we do not initialize. Since we cannot be certain of what any additional fields there may be, just zero the whole thing. This is basically the same change as I0eae0b49a70aee19f3a9ec118b03cfb3a6bd03a3, but in the rx subtree. Reviewed-on: http://gerrit.openafs.org/11711 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Jeffrey Altman Reviewed-by: Daria Brashear (cherry picked from commit a762e6871ad6837ee126cec9e63d99388b4bf119) Change-Id: Ie6a2cce500d6a0a7a09c305296f4b34d122d3108 Reviewed-on: http://gerrit.openafs.org/11714 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit a2603d4dd02194a05a550a5759970515b9aa2f08 Author: Marc Dionne Date: Thu Dec 18 08:43:22 2014 -0500 Linux: d_splice_alias may drop inode reference on error d_splice_alias now drops the inode reference on error, so we need to grab an extra one to make sure that the inode doesn't go away, and release it when done if there was no error. For kernels that may not drop the reference, provide an additional iput() within an ifdef. This could be hooked up to a configure option to allow building a module for a kernel that is known not to drop the reference on error. That hook is not provided here. Affected kernels should be the early 3.17 ones (3.17 - 3.17.2); 3.16 and older kernels should not return errors here. [kaduk@mit.edu add configure option to control behavior, which is mandatory on non-buildbot linux systems] Reviewed-on: http://gerrit.openafs.org/11643 Tested-by: BuildBot Reviewed-by: Michael Laß Reviewed-by: Jeffrey Altman (cherry picked from commit 15260c7fdc5ac8fe9fb1797c8e383c665e9e0ccd) Change-Id: I288eb66c38386fcd6bae0da111d97e211cc5c995 Reviewed-on: http://gerrit.openafs.org/11694 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 3995ad443eca54542651003d4fc5a7e594833bad Author: Andrew Deason Date: Fri Jan 30 13:29:57 2015 -0600 afs: Zero uninitialized uio structs In several places in the code, we allocate a 'struct uio' on the stack, or allocate one from non-zeroed memory. In most of these places, we initialize the structure by assigning individual fields to certain values. However, this leaves any remaining fields assigned to random garbage, if there are any additional fields in the struct uio that we don't know about. One such platform is Solaris, which has a field called uio_extflg, which exists in Solaris 11, Solaris 10, and possibly further back. One of the flags defined for this field in Solaris 11 is UIO_XUIO, which indicates that the structure is actually an xuio_t, which is larger than a normal uio_t and contains additional fields. So when we allocate a uio on the stack without initializing it, it can randomly appear to be an xuio_t, depending on what garbage was on the stack at the time. An xuio_t is a kind of extensible structure, which is used for things like async I/O or DMA, that kind of thing. One of the places we make use of such a uio_t is in afs_ustrategy, which we go through for cache reads and writes on most Unix platforms (but not Linux). When handling a read (reading from the disk cache into a mapped page), a copy of our stack-allocated uio eventually gets passed to VOP_READ. So VOP_READ for the cache filesystem will randomly interpret our uio_t as an xuio_t. In many scenarios, this (amazingly) does not cause any problems, since generally, Solaris code will not notice if something is flagged as an xuio_t, unless it is specifically written to handle specific xuio_t types. ZFS is one of the apparent few filesystem implementations that can handle xuio_t's, and will detect and specially handle a UIOTYPE_ZEROCOPY xuio_t differently than a regular uio_t. If ZFS gets a UIOTYPE_ZEROCOPY xuio_t, it appears to ignore the uio buffers passed in, and supplies its own buffers from its cache. This means that our VOP_READ request will return success, and act like it serviced the read just fine. However, the actual buffer that we passed in will remain untouched, and so we will return the page to the VFS filled with garbage data. The way this typically manifests is that seemingly random pages will contain random data. This seems to happen very rarely, though it may not always be obvious what is going on when this occurs. It is also worth noting that the above description on Solaris only happens with Solaris 11 and newer, and only with a ZFS disk cache. Anything older than Solaris 11 does not have the xuio_t framework (though other uio_extflg values can cause performance degradations), and all known non-ZFS local disk filesystems do not interpret special xuio_t structures (networked filesystems might have xuio_t handling, but they shouldn't be used for a cache). Bugs similar to this may also exist on other Unix clients, but at least this specific scenario should not occur on Linux (since we don't use afs_ustrategy), and newer Darwin (since we get a uio allocated for us). To fix this, zero out the entire uio structure before we use it, for all instances where we allocate a uio from the stack or from non-zeroed memory. Also zero out the accompanying iovec in many places, just to be safe. Some of these may not actually need to be zeroed (since we do actually initialize the whole thing, or a platform doesn't have any additional unknown uio fields), but it seems worthwhile to err on the side of caution. Thanks to Oracle for their assistance on this issue, and thanks to the organization experiencing this issue for their patience and persistence. 1.6 note: This differs noticeably from the master commit in two places: - src/afs/NBSD/osi_vnodeops.c: On master there is no stack-allocated uio struct here. - src/afs/VNOPS/afs_vnop_write.c and afs_vnop_read.c: On master, these code paths are structured quite differently, and are handled in afs_osi_uio.c instead. Reviewed-on: http://gerrit.openafs.org/11705 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Daria Brashear (cherry picked from commit 5ef1de5eddccce0e7b135bb9ed4decaa62fc19ce) Change-Id: I8dbf60637774dff81ff839ccd78f58b3b1e85c5b Reviewed-on: http://gerrit.openafs.org/11713 Reviewed-by: Perry Ruiter Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 2108273154d0a90da4b754dfb9afb92168f40d94 Author: Andrew Deason Date: Fri Jan 30 13:08:19 2015 -0600 SOLARIS: Avoid uninitialized caller_context_t Currently we pass a caller_context_t* to some of Solaris' VFS functions (VOP_SETATTR, VOP_READ, VOP_WRITE, VOP_RWLOCK, VOP_RWUNLOCK), but the pointer we pass is to uninitialized memory. This code was added in commit 51d76681, and this particular argument is mentioned in , where the author doesn't really know what the argument is for. Over 10 years later, it's still not obvious what this argument does, since I cannot find any documentation for it. However, browsing publicly-available Illumos/OpenSolaris source suggests this is used for things like non-blocking operations for network filesystems, and is only interpreted by certain filesystems in certain codepaths. In any case, it's clear that we're not supposed to be passing in an uninitialized structure, since the struct has actual members that are sometimes interpreted by lower levels. Other callers in Illumos/OpenSolaris source seem to just pass NULL here if they don't need any special behavior. So, just pass NULL. I am not aware of any issues caused by passing in this uninitialized struct, and browsing Illumos source and discussing the issue with Oracle engineers suggest there would currently not be any issues with the cache filesystems we would be using. However, it's always possible that issues could arise from this in the future, or there are issues we don't know about. Any such issues would almost certainly appear to be non-deterministic and be a nightmare to track down. So just pass NULL, to avoid the potential issues. Reviewed-on: http://gerrit.openafs.org/11704 Reviewed-by: Perry Ruiter Tested-by: BuildBot Reviewed-by: Daria Brashear (cherry picked from commit b9647ac1062509d6a3997ca575ab1542d04677a2) Change-Id: I5d247cfa6ada3773d20e3938957dcc31c8664bb2 Reviewed-on: http://gerrit.openafs.org/11712 Reviewed-by: Perry Ruiter Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit c9cd05263b478d116e9c240953827e34fe2559b4 Author: Jeffrey Hutzelman Date: Wed Jun 12 16:22:36 2013 -0400 libafs/LINUX: avoid leaks due to corrupt dir When a corrupt directory is discovered, scanning stops immediately and readdir returns ENOENT. Currently, the vcache lock is unlocked and the dcache containing the directory is released, but that's not enough. It's also necessary to unlock the dcache, on which we hold a read lock, and to clear the vcache state which records an in-progress readdir. Reviewed-on: http://gerrit.openafs.org/9971 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a2bfa0e853fb4954fd06a00ea6fbc55c39e76b8a) Change-Id: Id648822cd45087e5c0d320e8cfdcd6659bb33559 Reviewed-on: http://gerrit.openafs.org/11707 Reviewed-by: Perry Ruiter Reviewed-by: Daria Brashear Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit c98fb960b9d9a4cab37bec7fa341f01dad60d14e Author: Andrew Deason Date: Mon Dec 1 10:23:23 2014 -0600 LINUX: Avoid mvid NULL deref in check_bad_parent check_bad_parent dereferences vcp->mvid, assuming it is not NULL (vcp is a root vcache here, so mvid refers to the parent fid). However, in some situations, vcp->mvid can be NULL. When we first afs_GetVCache the fid, we try to set mvid by setting mvid to the 'dotdot' structure in the volume struct. But we get that volume struct from afs_GetVolume, which can fail (at the very least, this can fail on network failure when looking up vldb information). If it fails, then we do not set the mvid parent. On future lookups for the fid, afs_GetVCache will return early for a fastpath, if the vcache is already in memory. So, mvid will never get set in such a situation. We also set the mvid parent fid in afs_lookup if we resolved a mountpoint to the root vcache. However, this is skipped if CMValid is not set on the vcache, so if CMValid is cleared right after resolving the mountpoint (say, perhaps done by some other thread e.g. a callback break or other reasons), then the mvid parent fid will not be set. To avoid crashing in these situations, if vcp->mvid is NULL in check_bad_parent, don't check the mvid, and assume it does not match (since we don't know what it is). This is a 1.6-only change. On the master branch, the problem is addressed by commit 69e84bd8a2ccc6065c3a06b7239c855207b92e4d . Change-Id: I3550cf5a01811ede17d74770161326667a6e8628 Reviewed-on: http://gerrit.openafs.org/11616 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Perry Ruiter Reviewed-by: Stephan Wiesand commit 50b28a4326f6f5868369b84dab431f96778787b6 Author: Antoine Verheijen Date: Wed May 7 14:57:26 2014 -0600 OpenBSD: Add support for OpenBSD 5.4 Add param header files and other config info to provide support for OpenBSD 5.4. Reviewed-on: http://gerrit.openafs.org/11130 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear (cherry picked from commit e1d0342326d11a14e1fb0075fb62cc6be9389b97) Change-Id: Ibdde973cf2a542fc89eba025b7210f8b0c843b95 Reviewed-on: http://gerrit.openafs.org/11700 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Tested-by: BuildBot commit 3da7b86c4ac998640b0b7ffd0e01613449d72e30 Author: Marc Dionne Date: Mon Jan 5 07:17:14 2015 -0500 Linux 3.19: struct nameidata becomes opaque With kernel 3.19 struct nameidata becomes opaque. As a result we cannot rely on STRUCT_NAMEIDATA_HAS_PATH being true for new kernels. Rework the conditions here so that STRUCT_NAMEIDATA_HAS_PATH is only tested when we're using a nameidata structure and the result matters. Also modify a configure test to use a nameidata pointer instead of an actual structure. Reviewed-on: http://gerrit.openafs.org/11648 Reviewed-by: Daria Brashear Tested-by: BuildBot (cherry picked from commit 72e22eb00f641f137f7dbe4195d6d82f4a8addc9) Change-Id: Ia794d9006a054d16a3b9e5b8ced55c798244d4c7 Reviewed-on: http://gerrit.openafs.org/11662 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Daria Brashear Reviewed-by: Stephan Wiesand commit 78e8cce68d11e895140b0b03894ffdd62699ffbc Author: Marc Dionne Date: Mon Jan 5 07:13:37 2015 -0500 Linux 3.19: Use mgs_iter in struct msghdr struct msghdr gets msg_iov replaced by msg_iter. Add a configure test and adjust the affected code. Reviewed-on: http://gerrit.openafs.org/11647 Reviewed-by: Daria Brashear Tested-by: BuildBot (cherry picked from commit ec9a7c2db833efacfd0692c658c2d38ed9f852ba) Change-Id: I9d873626d8997922aacf67a5a9ce7621ed904faa Reviewed-on: http://gerrit.openafs.org/11661 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Daria Brashear Reviewed-by: Stephan Wiesand commit 7ba61dfa6cedc4e6e106bd2079e564e554720d7e Author: Marc Dionne Date: Mon Jan 5 07:03:16 2015 -0500 Linux 3.19: No more f_dentry Back in kernel 2.6 .20 struct file lost its f_dentry field which was replaced by f_path.To ease transition f_dentry was defined as f_dpath.dentry in the same header.This define finally gets removed with kernel 3.19. Keep using f_dentry in the code, but add a configure test for the presence of f_path and the absence of the f_dentry macro so we can add it if its missing. Change - Id:I8e8a7e4d3ddd861018de50af1eb7315e730ad529 Reviewed-on: http://gerrit.openafs.org/11646 Reviewed-by: Daria Brashear Tested-by: BuildBot (cherry picked from commit f9ca302b7a10ffc36f2439e068333ab147791c5a) Change-Id: I179bf2fbc22e824e40c60c59e5d223d49343e7a5 Reviewed-on: http://gerrit.openafs.org/11660 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Daria Brashear Reviewed-by: Stephan Wiesand commit 860764da5ee2e48a2c3f7552fad1766e19eae47f Author: Marc Dionne Date: Thu Dec 18 07:13:46 2014 -0500 Linux: d_alias becomes d_u.d_alias The fields in struct dentry are re-arranged so that d_alias shares space wth d_rcu inside the d_u union. Some references need to change from d_alias to d_u.d_alias. The kernel change was introduced for 3.19 but was also backported to the 3.18 stable series in 3.18.1, so this commit is required for 3.19 and current 3.18 kernels. Reviewed-on: http://gerrit.openafs.org/11642 Reviewed-by: Anders Kaseorg Reviewed-by: Michael Laß Reviewed-by: Daria Brashear Tested-by: BuildBot (cherry picked from commit d6f29679098aff171e69511823b340ccf28e5c31) Change-Id: Ifb6199aa7fa922e64540d9fad1d2d79facbb9761 Reviewed-on: http://gerrit.openafs.org/11659 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Daria Brashear Reviewed-by: Stephan Wiesand commit a6013738362f4d1487ca57282b2428e3ba962720 Author: Marc Dionne Date: Thu Dec 18 06:57:22 2014 -0500 Linux: Move code to reset the root to afs/LINUX Move the Linux specific bit of code to reset the root to afs/LINUX platform specific files. Things that play with the Linux vfs internals should not be exposed here. No functional change, but this helps cleanup some ifdef mess. Reviewed-on: http://gerrit.openafs.org/11641 Tested-by: BuildBot Reviewed-by: Michael Laß Reviewed-by: Daria Brashear (cherry picked from commit 6ca324e565c34d9d04f3c553b7d0febe675ae538) Change-Id: I82803669dd34d7abeb29040fbb38ec2f000f2601 Reviewed-on: http://gerrit.openafs.org/11658 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Daria Brashear Reviewed-by: Stephan Wiesand commit fba39040435afe63b0737945e2269375107fc686 Author: Andrew Deason Date: Sun Sep 14 14:10:11 2014 -0500 afs: Fix some afs_conn overcounts The usual pattern of using afs_Conn looks like this: do { tc = afs_Conn(...); if (tc) { code = /* ... */ } else { code = -1; } } while (afs_Analyze(...)); The afs_Analyze call, amongst other things, puts back the reference to the connection obtained from afs_Conn. If anything inside the do/while block exits that block without calling afs_Analyze or afs_PutConn, we will leak a reference to the conn. A few places currently do this, by jumping out of the loop with 'goto's. Specifically, in afs_dcache.c and afs_bypasscache.c. These locations currently leak references to our connection object (and to the underlying Rx connection object), which can cause problems over time. Specifically, this can cause a panic when the refcount overflows and becomes negative, causing a panic message that looks like: afs_PutConn: refcount imbalance 0xd34db33f -32768 To avoid this, make sure we afs_PutConn in these cases where we 'goto' out of the afs_Conn/afs_Analyze loop. Perhaps ideally we should cause afs_Analyze itself to be called in these situations, but for now just fix the problem with the least amount of impact possible. FIXES 131885 Reviewed-on: http://gerrit.openafs.org/11464 Reviewed-by: Benjamin Kaduk Reviewed-by: Daria Brashear Tested-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman (cherry picked from commit 54c0ee608f4afd2b178c9b60eabfc3564293d996) Change-Id: Ic02ede4f8177863e8079b4a92c9bad492d6dc97b Reviewed-on: http://gerrit.openafs.org/11645 Reviewed-by: Benjamin Kaduk Reviewed-by: Daria Brashear Tested-by: BuildBot commit 013e8db33fbec8b5db4ac5a1ec94a7f5b2afbc45 Author: Marc Dionne Date: Fri Dec 19 10:11:53 2014 -0500 Unix CM: Avoid using stale DV in afs_StoreAllSegments It was reported in RT 131976 that on Linux some file corruption was observed when doing mmap writes to a file substantially larger than the cache size. osi_VM_StoreAllSegments drops locks and asks the OS to flush any dirty pages in the file 's mapping. This will trigger calls into our writepage op, and if the number of dirty cache chunks is too high (as will happen for a file larger than the cache size), afs_DoPartialWrite will recursively call afs_StoreAllSegments and some chunks will be written back to the server. After potentially doing this several times, control will return to the original afs_StoreAllSegments. At that point the data version that was stored before osi_VM_StoreAllSegments is no longer correct, leading to possible data corruption. Triggering this bug requires writing a file larger than the cache so that partial stores are done, and writing enough data to exceed the system's maximum dirty ratio and cause it to initiate writeback. To fix, just wait until after osi_VM_StoreAllSegments to look at and store the data version FIXES 131976 Reviewed-on: http://gerrit.openafs.org/11644 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit b22c586bcdf785c489009ab96cbb572181cb9b09) Change-Id: I32a2f6f32d432fe4a2e21ebd4bb278a9d7e5499f Reviewed-on: http://gerrit.openafs.org/11656 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 7308aab9d911d87bde8a0a8a1e6120b83ea9bde6 Author: Andrew Deason Date: Tue Apr 26 14:32:25 2011 -0500 Fix --without-krb5 Currently, specifying --without-krb5 causes the AM_CONDITIONAL KRB5_USES_COM_ERR to not be defined, which makes configure refuse to run successfully. Fix this by forcing KRB5_USES_COM_ERR to always be false if we are running explicitly without krb5. Reviewed-on: http://gerrit.openafs.org/4576 Reviewed-by: Russ Allbery Tested-by: BuildBot (cherry picked from commit 9b405a7b082a8498fb6e918df73482ad05e251ea) Change-Id: I4e706a828e205cf649f09d770986bdfb27f984aa Reviewed-on: http://gerrit.openafs.org/11636 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Daria Brashear commit 05f3c5254013b095c86a768c3107f475e99f9a56 Author: Stephan Wiesand Date: Thu Nov 6 14:40:17 2014 +0100 Make OpenAFS 1.6.11pre1 prerelease for 1.6.11 Change-Id: I2c8592ae5aa2d3d7e20283064305ce5b6fc74e60 Reviewed-on: http://gerrit.openafs.org/11593 Tested-by: BuildBot Reviewed-by: D Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 28c943d4a45ebb89623a1e1c91a11fd2ac1c8e6e Author: Stephan Wiesand Date: Mon Nov 24 11:26:04 2014 +0100 Update NEWS for 1.6.11pre1 Preliminary release notes for OpenAFS 1.6.11 Change-Id: Ibbc9948cd4d8cfc87300f7a7276076af779d37b4 Reviewed-on: http://gerrit.openafs.org/11612 Tested-by: BuildBot Reviewed-by: D Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 694721b13d14fdd29b3c1ac781121f0d67bdbbb9 Author: Anders Kaseorg Date: Wed Sep 3 18:26:36 2014 -0400 Linux: Refine openafs-client.service dependencies Make sure that openafs-client is started after the network is online, and before services that need remote-fs at startup. Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/11441 Reviewed-by: Chaskiel Grundman Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman (cherry picked from commit cadaea4f86427c4dc74f56fc66707e8cfb0166cb) Change-Id: I42aea5dff364e1005808b6ae926f6cf1bf2e0d61 Reviewed-on: http://gerrit.openafs.org/11534 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit cdb1bb0b29d1aa896a57619cf8f87aabbe798193 Author: Benjamin Kaduk Date: Wed Aug 27 12:23:20 2014 -0400 Appease compile_et for objdir builds The argument we pass to -p needs to be in the source tree, not the object tree -- compile_et will not find the input files it wants in the objdir tree. For tbudb we can do this as is done on master, by just including it in the local variable BUDB, but for tptserver and tvlserver that is a rather invasive change. This fixes the build with a separate objdir, which was broken by commit 7c451fab11b65dd5e2860715b939e5de33c7645e. Change-Id: If90f170ef3777a9987a0ba91747041abb89b2b65 Reviewed-on: http://gerrit.openafs.org/11435 Tested-by: BuildBot Reviewed-by: D Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit e51d3b13c2b208efe72b584b532a28444633feff Author: Benjamin Kaduk Date: Thu Oct 30 19:51:29 2014 -0400 Build fix for recent FreeBSD -current r273707 added a flags argument to syscall_register(), so add the appropriate version check in param.generic_fbsd.h and ues that in the main code. Reviewed-on: http://gerrit.openafs.org/11565 Tested-by: Benjamin Kaduk Reviewed-by: D Brashear (cherry picked from commit f39dd54e11dff5e2b4da3eec419ae7c0825c210f) Note that the 1.6 branch does not have param.generic_fbsd.h, so the patch was modified for backport to just use AFS_FBSD110_ENV as the conditional. Change-Id: Id2934d83940caff4f64c2a7f2187b0eca5881c8f Reviewed-on: http://gerrit.openafs.org/11610 Tested-by: BuildBot Reviewed-by: D Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 4e31fa4f6de614e07fbd5faf17d9639f42cab8cb Author: Benjamin Kaduk Date: Wed Nov 19 14:14:07 2014 -0500 Update CellServDB to 20141117 snapshot This should be all the locations we keep it in-tree. Reviewed-on: http://gerrit.openafs.org/11607 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ce0cad182cddd21ccdebbf05a3e2379c7fcbe8fe) Change-Id: If63c9540beb81485d3e0c2934096f4d0aaee12ad Reviewed-on: http://gerrit.openafs.org/11608 Tested-by: BuildBot Reviewed-by: D Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 610ed430a1a8dd8967f19273a7dcc0deaf016dd0 Author: Christer Grafström Date: Wed Oct 29 08:05:06 2014 +0100 Packaging support for MacOS X 10.10 "Yosemite" This is just the packaging part of the patch submitted in the RT ticket. The configuration part is in the preceding change. FIXES 131946 Reviewed-on: http://gerrit.openafs.org/11561 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: D Brashear (cherry picked from commit 8f630226f6f1f73a4d816b72caab3bb1e4620312) Change-Id: Iea5a295107350e7080278b914badb8b33a5cbc2b Reviewed-on: http://gerrit.openafs.org/11572 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 78bf372b9067f1ac12f2fd0dd9aac81aea9b2df2 Author: Michael Meffie Date: Fri Oct 31 23:45:13 2014 -0400 fix whitespace errors in acinclude.m4 Use tabs instead of spaces in the sysname lookup case statement for the macos cases. Reviewed-on: http://gerrit.openafs.org/11566 Reviewed-by: D Brashear Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 7ae5b73a90940fe693fd5a726aa31408bd7aec39) Change-Id: I2860cd835242f0972b8795f2f7fedcb012aa18ea Reviewed-on: http://gerrit.openafs.org/11611 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 2ef14c90aa68089acab98819c30f052cb982cf4b Author: Christer Grafström Date: Wed Oct 29 07:56:35 2014 +0100 Add support for configuration of MacOS 10.10 "Yosemite" This is just the configuration part of the patch submitted in the RT ticket. The packaging part will will follow in the next change. FIXES 131946 Reviewed-on: http://gerrit.openafs.org/11560 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: D Brashear (cherry picked from commit 4109785a891d802194ad11edb600a61de316d262) Change-Id: I5800a89ef06bfad31ee284637fc0685b82e9693f Reviewed-on: http://gerrit.openafs.org/11571 Reviewed-by: Andrew Deason Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand commit 9ff1cd92d023f9a949b499891f552b41cb0c52e4 Author: Andrew Deason Date: Wed Nov 5 10:22:00 2014 -0600 LINUX: Avoid check for key_type.match existence Commit b5de4a9f removed our key_type 'match' function for kernels that do not have such a 'match' function pointer. However, this added a configure test where we are supposed to fail for the "new" behavior, which is discouraged. This causes an actual problem, because this test will fail on at least RHEL5, due to arguably unrelated reasons (the header file for the relevant struct is in key.h instead of key-type.h). And so, in that situation we avoid defining a 'match' function callback, meaning our 'match' function callback is NULL, which causes a panic when we try to actually look up keys for a PAG. To fix this, transform the 'match' config test into one where we succeed for the "new" behavior. We do this by testing for the existence of the new functionality that replaced the old 'match' function, which is the match_preparse function (specifically, the 'cmp' field in the structure accepted by match_preparse). This should cause unrelated compilation errors to cause us to revert to the "old" behavior instead of the "new" behavior. At worst, this should cause build issues if we get the config test wrong (since we will try to use the 'match' function definition that does not exist), instead of panicing at runtime. Note that while we test for key_type.match_preparse, we don't actually use that function, since our 'match' functionality is the same as the default behavior (according to b5de4a9f). So, we can avoid defining any such function for newer kernels. Thanks to Stephan Wiesand for bisecting this issue. Reviewed-on: http://gerrit.openafs.org/11589 Reviewed-by: Marc Dionne Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit a9a3cb2efff7e6c020be4687b004d157bc070ac6) Change-Id: I59f40258c5ea35a59681f436095922d111e344f6 Reviewed-on: http://gerrit.openafs.org/11595 Tested-by: Anders Kaseorg Reviewed-by: Anders Kaseorg Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 9d653bd966b47223eaaf6f8a5d983b6634bdf0d5 Author: Marc Dionne Date: Thu Oct 23 11:27:55 2014 -0400 Linux 3.18: key_type no longer has a match op Structure key_type no longer has a match op, and overriding the default matching has to be done differently. Our current match op doesn't do anything special so there's no need to try to override the defaults; just remove the assignment of .match and the associated function. Reviewed-on: http://gerrit.openafs.org/11563 Tested-by: BuildBot Reviewed-by: D Brashear (cherry picked from commit b5de4a9f42bb83ae03f2f647b11a1200a502d013) Change-Id: I7baca4a7f02eac45671e1e9ebf48534cdd5830be Reviewed-on: http://gerrit.openafs.org/11570 Reviewed-by: Anders Kaseorg Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit b3527c802ad82cdecc0df6dfa42b228710ad5fd4 Author: Marc Dionne Date: Thu Oct 23 11:12:57 2014 -0400 Linux 3.18: d_invalidate can no longer return an error d_invalidate is now defined as void and does not have a return value to check. Reviewed-on: http://gerrit.openafs.org/11562 Tested-by: BuildBot Reviewed-by: D Brashear (cherry picked from commit a42f01d5ebb13da575b3123800ee6990743155ab) Change-Id: I8542404771c4a7962238efd9a53d7dfcf4011c96 Reviewed-on: http://gerrit.openafs.org/11569 Reviewed-by: Anders Kaseorg Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 2fd2c69257edff968ef24a1d903bd602817bbf01 Author: Andrew Deason Date: Tue Oct 28 00:10:56 2014 -0500 LINUX: Avoid d_revalidate failure on mtpt mismatch Currently, if afs_linux_dentry_revalidate is given an inode that corresponds to a mtpt vcache ('vcp'), it resolves the mtpt to its root dir if it's easy to do so (mvid and CMValid are set). Later on, we run afs_lookup to see if looking up our dentry's name returns the same vcache that we got; afs_lookup presumably will also resolve the mtpt if it's easy to do so. However, it is possible that afs_linux_dentry_revalidate and afs_lookup will make different decisions as to whether or not they resolve a mtpt to a dir. Specifically, if CMValid is cleared after afs_linux_dentry_revalidate checks for it, but before afs_lookup does, then afs_lookup will return a different vcache than afs_linux_dentry_revalidate is expecting, even though the relevant directory entry has not changed. That is, tvc is not equal to vcp, but tvc could be a mtpt that resolves to vcp, or vice versa. CMValid can be cleared by another thread at virtually any time, since this is cleared in some situations when we're not sure if the mtpt resolution is still valid (callbacks are broken, vldb cache entries expire, etc). afs_linux_dentry_revalidate interprets this situation to mean that the directory entry has changed, and so it eventually d_drop's the associated dentry. The way that this manifests to users is that a "fakestatted" mtpt can appear to be deleted effectively randomly, even when nothing has changed. This can be a problem because this causes the getcwd() syscall to return ENOENT when the working directory involves such an affected directory. To fix this situation, we just detect if afs_lookup returned either 'vcp' (our possibly-resolved vcache), or the original inode associated with the dentry we are revalidating. If the returned vcache matches either of these, then the entry is okay and we don't need to invalidate or drop anything. FIXES 131780 Reviewed-on: http://gerrit.openafs.org/11559 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Tested-by: Anders Kaseorg Reviewed-by: Anders Kaseorg Reviewed-by: D Brashear (cherry picked from commit ba1cc838ab4a80b7a7787c441a79aca31d84808c) Change-Id: I3273cc15ebe7fd94f3127840fdc5316bd7458e7c Reviewed-on: http://gerrit.openafs.org/11568 Reviewed-by: Anders Kaseorg Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit d3f0c37b796b02e05baf9d8270bd95d713d08b62 Author: Andrew Deason Date: Thu Jul 24 11:07:45 2014 -0500 LINUX: Check afs_lookup return code explicitly Checking if the returned vcache is NULL or not is a bit of an indirect way to check if an error occurred. Just check the return code itself, to make sure we notice if any kind of error is reported. Suggested by Chas Williams. Reviewed-on: http://gerrit.openafs.org/11321 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: D Brashear (cherry picked from commit 2edf5c0382385f898a017fd8e0e2429f8b2b3520) Change-Id: I7e123ab1cf88570a6b18e438e01409ed7804e014 Reviewed-on: http://gerrit.openafs.org/11558 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 663bdfcb16ab742ef12acca110f279b749f15586 Author: Marc Dionne Date: Thu Sep 25 07:52:12 2014 -0300 Linux 3.17: Deal with d_splice_alias errors In 3.17 the logic in d_splice_alias has changed. Of interest to us is the fact that it will now return an EIO error if it finds an existing connected directory for the dentry, where it would previously have added a new alias for it. As a result the end user can get EIO errors when accessing any file in a volume if the volume was first accessed through a different path (ex: RO path vs RW path). This commit just restores the old behaviour, adding the directory alias manually in the error case, which is what older versions of d_splice_alias used to do. Reviewed-on: http://gerrit.openafs.org/11492 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Andrew Deason Reviewed-by: D Brashear (cherry picked from commit 5815ee92a41cdcf105741d834042a5617dc4c219) Change-Id: Ie86009ede93255c85fcf640af14c598fe1e42ca9 Reviewed-on: http://gerrit.openafs.org/11550 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 75f36df74bb3c13aadb047163b93d6c24436f784 Author: Marc Dionne Date: Tue Sep 9 10:39:55 2014 -0300 Linux 3.17: No more typedef for ctl_table The typedef has been removed so we need to use the structure directly. Note that the API for register_sysctl_table has also changed with 3.17, but it reverted back to a form that existed before and the configure tests handle it correctly. Reviewed-on: http://gerrit.openafs.org/11455 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Andrew Deason Reviewed-by: D Brashear (cherry picked from commit 6a23ca5b6e8bcaf881be7a4c50bfba72d001e6cd) Change-Id: Ifb8fc0b9b01d2578c65407608f0e1b3f3b254459 Reviewed-on: http://gerrit.openafs.org/11549 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 198a4c970ee3cce9dcf3c49fd178d3e1fc3c6c9b Author: Jeffrey Altman Date: Mon Oct 13 17:48:05 2014 -0400 aklog 1.6: make krb5_524 non-fatal for native K5 tokens The krb5_524_conv_principal() function should fail whenever the Kerberos v5 principal cannot safely be mapped onto a Kerberos v4 principal, and does fail on some Kerberos v5 principals used in real-world AFS deployments. Prior to this patchset a failure was treated as a fatal error that in turn prevents an AFS token from being generated or set into the cache manager. Prior to b1f9b4cb5dd295162ae51704310e9d6058008f0a the krb5_524_conv_principal() function wasn't used and a local client mapping was created. b1f9b4cb5dd295162ae51704310e9d6058008f0a replaced the local mapping with the krb5 function because the local mapping could be wrong and confusing. The krb5_524_conv_principal() function as applied to AFS tokens is just a local guess. How the username in the token is interpreted by the AFS server is up to the server. krb5_524_conv_principal() is only used for Krb5 native tokens. For Krb4 tokens the krb5_524_convert_creds() function is used to obtain both the Kerberos v4 ticket and the converted names from the KDC. Many organizations used the krb524d service to perform name translation. When the krb524d service is used, the name translation is performed by the KDC, so there is no local call to krb5_524_conv_principal() which might fail. As a result, disallowing the use of a native Krb5 token due to a failed local name translation is a needless loss of functionality; the local name translation is not an essential part of obtaining a token. This patchset modifies the behavior such that krb5_524_conv_principal() errors are non-fatal. 1. If -noprdb is not specified the error message is generated and a NULL username is used. 2. If the username is NULL the prdb lookup is disabled. 3. If the username is NULL the informational messages do not include a username. 4. If the username is NULL the username info provided to the cache manager in the token description is the nul string. This patchset is an openafs-stable-1_6_x specific version of the patch. The master version was submitted to http://gerrit.openafs.org/#change,11542 Credit to Ben Kaduk for assistance with the wording of this commit message. Change-Id: If12ae69394321fa7b7a182c9db95716bc66e489c Reviewed-on: http://gerrit.openafs.org/11538 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit e64daf49eb8ac240b76c4fd8b9f2fb4111793cb9 Author: D Brashear Date: Sat Oct 18 13:24:46 2014 -0400 shlibafsrpc: correct double export in symbol map afs_xdr_pointer was exported twice. remove one. 1.6-only fix. Change-Id: I55c6663340d0b87331f18b3d120d5184b567f5e1 Reviewed-on: http://gerrit.openafs.org/11551 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 160d2a1b15bae4df7926e998fb83e1b874ce8800 Author: Stephan Wiesand Date: Wed Oct 8 16:47:13 2014 +0200 Update NEWS for 1.6.10 Add the change number of the late aklog fix. Also state that we support Linux clients up to 3.16 only, since we already know that 3.17 needs a few tweaks, probably to ship with 1.6.10.1 . Change-Id: I5904d366611e329dbf06e1b6f2ba3ebf366e7d05 Reviewed-on: http://gerrit.openafs.org/11531 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 50c5f3789cc61de7ddbfe07922027b6464caa4ae Author: Anders Kaseorg Date: Tue Sep 30 13:52:31 2014 -0400 aklog: Fix segfault on aklog -path Commit 2fac53522e7ef5b3a376e191bffdc1f6784e6995 “aklog: Fix improper use of readlink” inadvertently changed the meaning of int link from a boolean flag (length > 0) to just a length. This caused ‘aklog -path (anything)’ to segfault. Update the type of link and the condition of the while loop to account for this change. FIXES 131930 Reviewed-on: http://gerrit.openafs.org/11517 Reviewed-by: Anders Kaseorg Tested-by: Anders Kaseorg Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: D Brashear (cherry picked from commit fbea3265b3bc042b97be17229839ccf7d11a0bf9) Change-Id: I6eb0126c574665507be923102c3fa812c3716352 Reviewed-on: http://gerrit.openafs.org/11530 Tested-by: Anders Kaseorg Reviewed-by: Anders Kaseorg Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 38481450bba5f82b0eda072280737e438f9a11b5 Author: Stephan Wiesand Date: Wed Sep 24 13:48:54 2014 +0200 Make OpenAFS 1.6.10 Update version strings and NEWS for 1.6.10 Change-Id: Idc59095829a7b8a1f882b46d9228d524820fc6fc Reviewed-on: http://gerrit.openafs.org/11486 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 871c19fc168dec5d22da764ca64decbe19f3b1e5 Author: Ben Kaduk Date: Fri Jul 18 15:19:24 2014 -0400 FBSD: adhere to gop_lookupname() semantics The current semantics are that gop_lookupname() returns an unlocked vnode; the previous code was written to a different semantic that a locked vnode should be returned. This makes a disk cache more likely to work on FreeBSD, but such configurations remain not very tested. Reviewed-on: http://gerrit.openafs.org/11317 Tested-by: BuildBot Reviewed-by: D Brashear (cherry picked from commit 774d77e056515ae3e87c8f0be8e133c3cdb36bbb) Change-Id: I4ae9c269412c2ce6b9ec39a841ea87f27630591e Reviewed-on: http://gerrit.openafs.org/11448 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 396679c7cf78d0e35171d0e101c4ec17b8d6c858 Author: Garrett Wollman Date: Wed Aug 13 02:32:06 2014 -0400 viced: time_t might not be long Fix a couple of printf format errors that bite on FreeBSD 10 for i386. Since time_t might be an int, it can't be printed with a long format. Since time_t might be a long in general, cast to it to long when printing. Reviewed-on: http://gerrit.openafs.org/11385 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman (cherry picked from commit 9dd67783bb2bd9ef8a972a1aac47b1925069a655) Change-Id: Icda432863a36169857a20300ab936a1a72de7891 Reviewed-on: http://gerrit.openafs.org/11404 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit c5d09afecf985191050c00713d22d744dfeff401 Author: Garrett Wollman Date: Wed Aug 13 02:20:02 2014 -0400 afsd: correct printf format mismatch in debugging printf On platforms where size_t is unsigned int, the type of cacheFiles * sizeof(AFSD_INO_T) is not an unsigned long as the format string requires. Casting cacheFiles to unsigned long ensures that the result is at least unsigned long, although it will still be wrong if any architecture makes size_t be long long. Fixes build for FreeBSD 10 on i386. Reviewed-on: http://gerrit.openafs.org/11384 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman (cherry picked from commit f02beb8d644ec2a52bf21737a040321905a39e20) Change-Id: I1e874f7f049e2fdfdfbe9e6413d421a5e1a5b249 Reviewed-on: http://gerrit.openafs.org/11403 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 5b6286cdc5eadeb9575bcfb86685393b30cfa4d3 Author: Benjamin Kaduk Date: Thu Feb 6 16:22:49 2014 -0500 pointers are not castable to unsigned int When printing a pointer's value for debugging purposes, use the dedicated printf format specifier for pointers instead of assuming that unsigned int ('x') is good enough. Found by clang on FreeBSD 10.0. Reviewed-on: http://gerrit.openafs.org/10820 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Jeffrey Altman (cherry picked from commit 758ec15f9391c296f1caa042385148f1a5e0bc84) Change-Id: Ibe88c38d0563ac125486d0ae7f16882a7989ee98 Reviewed-on: http://gerrit.openafs.org/11402 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit e125205aca8248ca7aab8d027a337abef3fc1c56 Author: Andrew Deason Date: Fri Aug 15 01:34:03 2014 -0500 objdir build: Add objdir include paths In commits ff0644c4cf5a54747bf3af2cc9605163e1debcb7, 3be9a451b523cd955cd5b3e68ee3a44ab083c14f, and 7c451fab11b65dd5e2860715b939e5de33c7645e, some includes were changed from e.g. to "auth.h". This means that src/auth must be in the include path for that file. For a file like src/auth/ktc.c, that's usually fine, since '.' is added to the include path. However, several of these files are also compiled from different directories, such as src/libafsauthent. These need to also have the relevant include path added, or else we cannot include the relevant file. So, add the needed include paths. This commit is 1.6-specific. The build system on the master branch differs greatly, and these files are not build separately in these directories. Change-Id: I502b99b9411aff9660b50f0f4d9a4fb4f6a1106a Reviewed-on: http://gerrit.openafs.org/11392 Tested-by: BuildBot Tested-by: Stephan Wiesand Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit b0d95624e4790f173d40efadd3c64d58fafa0555 Author: Stephan Wiesand Date: Wed Aug 6 11:36:41 2014 +0200 Make OpenAFS 1.6.10pre1 prerelease for 1.6.10 Change-Id: I952c26f1a211fdb3f2055eafce15d93d943e28a5 Reviewed-on: http://gerrit.openafs.org/11354 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit e67124fea4d73a72736dbb71ae37ba980a941685 Author: Stephan Wiesand Date: Thu Jul 31 16:45:39 2014 +0200 Update NEWS for 1.6.10pre1 Release notes for OpenAFS 1.6.10 Change-Id: I1d5679e375ee442e364c7ee189a316424b7e5d1b Reviewed-on: http://gerrit.openafs.org/11343 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 9ed215017a7de26fff21b23c781816bed69d0ea6 Author: Stephan Wiesand Date: Fri Aug 8 17:13:09 2014 +0200 redhat: package volscan Add volscan and the manual page to the files in the server package. Reviewed-on: http://gerrit.openafs.org/11370 Tested-by: BuildBot Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand Reviewed-by: Jeffrey Altman (cherry picked from commit 80f4939a3b9e1d48c03d0797a21c9e77a844cf7f) Change-Id: I48012e78cb0155162677a44191fbc57c64b30a3c Reviewed-on: http://gerrit.openafs.org/11387 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit ca1efa55934ae4a3f37f69e6909df00ba748df97 Author: Michael Meffie Date: Wed Aug 6 15:08:33 2014 -0400 volscan: fix copyright and licence notice These are new files and new content; fix the copyright notice and license to reflect. Reviewed-on: http://gerrit.openafs.org/11362 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1283226ccb638be47ead6cc4d9a47381aa6b08d1) Change-Id: I4026bba6a10459ca0eb7b63666fe8e278949ca78 Reviewed-on: http://gerrit.openafs.org/11388 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 3f31a8f12f62c855cb77bbee5c052b40b71f20e3 Author: Michael Meffie Date: Thu Mar 13 12:40:17 2014 -0400 doc: volscan man page Provide a man page for the volscan utility Reviewed-on: http://gerrit.openafs.org/10905 Reviewed-by: D Brashear Tested-by: D Brashear (cherry picked from commit a30b98c97d6fbf87018bcb6943e09c1c75a3918d) Change-Id: I980dd7842bd1c606cb09ee838a584b83d004ccb1 Reviewed-on: http://gerrit.openafs.org/11280 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 22eddf1c63dea6267e8cd9ee9a0d90c5fd9978b3 Author: Benjamin Kaduk Date: Mon Apr 7 17:55:09 2014 -0400 vol: Fix build with separate objdir The volscan-main and volinfo-main source files are in the source tree, not the object tree; refer to the objects in the Makefile as dependencies, so that they will be picked up properly. The objects will be made just fine by the implicit .c.o rule. Reviewed-on: http://gerrit.openafs.org/10988 Reviewed-by: Michael Meffie Tested-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman (cherry picked from commit 074d745a02d80bfd2c16a4e2b7b4222022f8e641) Change-Id: I3f29fcfb0257e145e0aae62ba425ccd7df513a72 Reviewed-on: http://gerrit.openafs.org/11279 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit d43dd100149584d5a2ae1f2d8514a917b73ebf28 Author: Michael Meffie Date: Wed Mar 12 15:15:32 2014 -0400 volinfo: separate volscan binary Refactor vol-info.c into several files and change the makefile to build a separate volscan binary, instead of using the program name to determine if the user is running volinfo or volscan. This commit adds new source files for the volinfo and volscan main() function and a common header file. Reviewed-on: http://gerrit.openafs.org/10903 Reviewed-by: D Brashear Tested-by: D Brashear (cherry picked from commit af2e3d81cff39ed06e3bfbfcbfff52163c503c54) Change-Id: Ie261ac5a8bd6baea7d5d5110248611219ee1c175 Reviewed-on: http://gerrit.openafs.org/11278 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 5c944018cafac20f6d87b475bc239dbe5c80ddf7 Author: Michael Meffie Date: Wed Mar 12 09:37:59 2014 -0400 volinfo: refactor global options Move the global options to a structure and pass it to the vol-info functions. This is a precursor for creating separate volinfo and volscan programs. Reviewed-on: http://gerrit.openafs.org/10902 Reviewed-by: D Brashear Tested-by: D Brashear (cherry picked from commit 77e4d2146e166c5c70d4255408bde5e6499a06bf) Change-Id: Id97ba0bfecb8104288f904b5efe693a6e652d844 Reviewed-on: http://gerrit.openafs.org/11277 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit bbe8d75cc4ac02721dcb080170e17b7ce09ce0e9 Author: Michael Meffie Date: Sat Mar 15 11:04:31 2014 -0400 volscan: hide -mask option The -mask option is unneccessary and sets a bad precedent, so deprecate and hide this option. The vnodes of interest can be found can be found easily and much more flexibly with a simple command pipeline. Reviewed-on: http://gerrit.openafs.org/10901 Reviewed-by: D Brashear Tested-by: D Brashear (cherry picked from commit 8119636976de651ff0b8ccdca6a1a703643f7447) Change-Id: I21519d7c0e9b3e3900cf3cd4c561d1a5aed1ef90 Reviewed-on: http://gerrit.openafs.org/11276 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 833607e4119c308e229eb1b2735e64c82c6abd09 Author: Michael Meffie Date: Wed Sep 4 15:10:16 2013 -0400 volscan: avoid printing null mount-point cellname The 'mcell' field is null when there is no cell set in the mount point, so do not try to print it. Reviewed-on: http://gerrit.openafs.org/10226 Reviewed-by: D Brashear Tested-by: D Brashear (cherry picked from commit db2ed13359ce8e3cd6a4981f8ce8e10ba61f6463) Change-Id: I96ba7dec59cc6e0fc5663e8e037d76d1006905a7 Reviewed-on: http://gerrit.openafs.org/11275 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 10683bed85f209dd33d9c833125050e4fd207d8b Author: Michael Meffie Date: Wed Apr 11 15:34:29 2012 -0400 volinfo: show header filenames even if error When invoked with -header option, print the header inode number, and namei filename, even if the header file cannot be opened. Reviewed-on: http://gerrit.openafs.org/7190 Tested-by: BuildBot Reviewed-by: Tom Keiser Reviewed-by: Derrick Brashear (cherry picked from commit b71f4ffa7c58ef7b27eb6e28d00892906aec49ec) Change-Id: Ibd68433ea778d5359c873e3764800d60fa7ae95d Reviewed-on: http://gerrit.openafs.org/11274 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit baa20f13174dd4c2081aa9d9c470b519c7efcd6d Author: Michael Meffie Date: Tue Mar 27 00:33:26 2012 -0400 volscan: index offset output column Add index offset as a possible volscan output column. Reviewed-on: http://gerrit.openafs.org/6980 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 03ec768fa65dc5961e161517871f3035df70b643) Change-Id: I17cede564fde259e04b7f1cb78724798808fb881 Reviewed-on: http://gerrit.openafs.org/11273 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 4ddc47c71d342ab35dc6a5815a406f532468e07e Author: Michael Meffie Date: Mon Mar 26 20:20:28 2012 -0400 volscan: option to ignore dir vnode magic Option to ignore directory vnode magic when looking up the path names. Print which vnode failed when doing the checks. Reviewed-on: http://gerrit.openafs.org/6979 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from commit 22fbed08a6f23dbbc05fd567e6e8e21e4d1a9709) Change-Id: Ia9b61b8c0e812fbaa680f62b4b924d818135dc87 Reviewed-on: http://gerrit.openafs.org/11272 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit e7826e491d15ff334c8bb1d572a471d37d3284d2 Author: Paul Smeddle Date: Mon Mar 12 19:56:11 2012 +0000 Make volscan's column delimiter option work Currently, volscan ignores the -delim command-line option, using the hardcoded default. This patch adds processing for this option, allowing alternative characters. Corrects an error in a08c3207255756c825ab69a19e04f79dd879c646 Reviewed-on: http://gerrit.openafs.org/6894 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d62456255e13beef41770ad90ee6cb58068007b9) Change-Id: Ic5e253c2c1ae6fcdba79b70bf43ba16883389ccd Reviewed-on: http://gerrit.openafs.org/11271 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 52968010955bb7371ce43a91b5cc39872012511c Author: Michael Meffie Date: Thu Feb 16 10:58:50 2012 -0500 volinfo: initialize vnode details Clear the vnode details object. Fixes the path lookup in volscan. Reviewed-on: http://gerrit.openafs.org/6722 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e5e9260c7936ce0b4d51855291421679acccaed4) Change-Id: If9848191166a774e99e68410d7891564743975e5 Reviewed-on: http://gerrit.openafs.org/11270 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit dbe597d944716561f938906f66801dd0b8c0c2c3 Author: Derrick Brashear Date: Tue Jan 17 16:08:56 2012 -0500 volinfo: fix formating of placeholder printfs needed to placate gcc-llvm on lion Reviewed-on: http://gerrit.openafs.org/6565 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 60df98806b1aaf6ea4ba8f089faf8e9247b2fba5) Change-Id: I583cc194ad81b025f925ad56a74c4acd941b7ddf Reviewed-on: http://gerrit.openafs.org/11269 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 0467802384c0c8bfa735e6378a9b5326048c7e05 Author: Jeffrey Altman Date: Thu Dec 15 03:28:34 2011 -0500 vol: fix a08c3207255756c825ab69a19e04f79dd879c646 Patchset a08c3207255756c825ab69a19e04f79dd879c646 broke the suse and windows builds by relying on C99 language syntax. Fix it. Reviewed-on: http://gerrit.openafs.org/6337 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 37a0c3d00a6e2d072faf7c2958ef0c7224add161) Change-Id: I34963c4e941ee3d580494a87b244c67bc3806ac7 Reviewed-on: http://gerrit.openafs.org/11268 Tested-by: Andrew Deason Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 76bf8fefe21c33b14888e7999979b3b3518be943 Author: Michael Meffie Date: Tue Jul 26 09:18:44 2011 -0400 volscan: print vnode metadata information volscan program to print vnode meta-data in a grep/awk/perl friendly format. Optionally, find the paths of each vnode relative to the volume root. Access control list data can be reported, and are listed as one access entry per line. Mount point information can be shown to which volumes are mounted from given volumes. The path lookup code originally written by Tom Keiser. 1.6 note: The 1.6 libcmd lacks parameter offsets, so this commit instead splits the param enums into volinfo_parm_t and volscan_parm_t, and just uses the regular cmd_AddParm to put the parameters in the same place as the enums. In addition, rx queues are used instead of opr queues, since opr queues do not exist in 1.6. Reviewed-on: http://gerrit.openafs.org/5102 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit a08c3207255756c825ab69a19e04f79dd879c646) Change-Id: Icd7c572d09fd5a5e82bd8a1d09c6fbbe229b6b1c Reviewed-on: http://gerrit.openafs.org/11267 Tested-by: Andrew Deason Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 7f933a4584da0738aba9dff0312e719e260075ab Author: Michael Meffie Date: Mon Jul 25 22:02:04 2011 -0400 volinfo: implement -checkout option Implement the -checkout option using the FSSYNC communication channel with the fileserver. Reviewed-on: http://gerrit.openafs.org/5101 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 752daf71cd75aa707fabb1b4598dd8ef1f51f973) Change-Id: Ic6614d0a28b968e261c5916e607ac8fd9d00f4d1 Reviewed-on: http://gerrit.openafs.org/11266 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 56628f3ec8cb635c3dbd6fbbaa7a6649b6bdf5b1 Author: Derrick Brashear Date: Mon Oct 10 16:57:35 2011 -0400 volinfo: fix bad format string we need a format string; currently here we have none, which is no good Reviewed-on: http://gerrit.openafs.org/5591 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0676dc9e0c59e8aee3db5e0a7b4acf7229da7b88) Change-Id: I665eabadee79c358562b831bf15d513e4f945f75 Reviewed-on: http://gerrit.openafs.org/11265 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 96c95dee3185915de8aacde3104a2e76cbc57747 Author: Michael Meffie Date: Mon Jul 25 09:21:34 2011 -0400 volinfo: refactor vnode handling At program startup, register procedures to be called when scanning vnodes. Reviewed-on: http://gerrit.openafs.org/5100 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 11f54962f638c8ae48d5193f6b695c252fbb9937) Change-Id: Iafee77acb6b175c6ba3983889c8c4adad17aaf79 Reviewed-on: http://gerrit.openafs.org/11264 Tested-by: Andrew Deason Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 7e2734c6d79ff4f9d3d4af8aa597fd37e2356d89 Author: Michael Meffie Date: Sat Jul 23 14:55:57 2011 -0400 volinfo: release volume header ihandles when done After scanning the volume, release the header ihandles for the volume. Reviewed-on: http://gerrit.openafs.org/5099 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4aa72b4308bae8e1d789682e7ead83bcadded862) Change-Id: I7a24892fc5f6d77b4aaff4a280063bc13cf4d81e Reviewed-on: http://gerrit.openafs.org/11263 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit b5f3af865036dce44d6644aaea43c3755c769f78 Author: Andrew Deason Date: Wed Aug 10 10:23:40 2011 -0500 volinfo: Include nfs.h nfs.h is required for various types used in vol-info.c. Include it. On namei this header gets pulled in indirectly via other means, but on inode it does not (and we shouldn't be relying on such anyway). Reviewed-on: http://gerrit.openafs.org/5185 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 2cd9d0536b173bf8c983aecd8599de0a82610151) Change-Id: I8c4b1c096b617a3ed62b8e1c7b8677ee7de2a56e Reviewed-on: http://gerrit.openafs.org/11262 Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 042239d03e2952fb68ed3bf89814550d5186eeb9 Author: Michael Meffie Date: Fri Jul 22 23:38:36 2011 -0400 volinfo: clean up headers Remove unneeded includes. Reviewed-on: http://gerrit.openafs.org/5098 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit be152a00a7e4043592094be30f4a811c67a4ac32) Change-Id: Ieb59affdc63f47d0adb35c89a2fc9d2ea72ba462 Reviewed-on: http://gerrit.openafs.org/11261 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 1c739bf2986c2908a8ac674242e5ba32c3d59541 Author: Michael Meffie Date: Tue Jun 7 12:37:40 2011 -0400 volinfo: fix false good magic line Fix false report of good magic/version numbers in volume header file. Reviewed-on: http://gerrit.openafs.org/4817 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 36f6eed2b458995ab973102acf74375bf0a66931) Change-Id: Id5972430ae8e2fe374a854c3c33d2837aac48185 Reviewed-on: http://gerrit.openafs.org/11260 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 7914d83509959884d95b7a58f42fcaef965de7da Author: Andrew Deason Date: Wed Jun 8 23:06:58 2011 -0500 volinfo: PrintFileNames is namei-only PrintFileNames only exists on namei, so make sure it's inside a namei ifdef. Reviewed-on: http://gerrit.openafs.org/4830 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit fc087f187759398a2646480eca25c1195ed23d22) Change-Id: Id9cfacd35248389cb513a5470dd75ed5a2a30fb9 Reviewed-on: http://gerrit.openafs.org/11259 Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit eed61c2f865757074b55ae6ccfb91f50d7715f0e Author: Michael Meffie Date: Fri May 27 18:17:44 2011 -0400 volinfo: accept -sizeonly for -sizeOnly For consistency, allow -sizeonly (all lowercase letters) to request the size summary. The old option name, -sizeOnly is available as an alias. Define the command line option parameter positions and use those to set and look up the options. 1.6 note: The libcmd in 1.6 lacks parameter aliases and offsets. Instead we create params the normal way and make the offsets enum line up with the default offsets. To get an alias for -sizeonly, we create a new parameter that just does the same thing (P_SIZEONLY_COMPAT). Reviewed-on: http://gerrit.openafs.org/4741 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1a4262253e78aa7a4e8c58006abd3301f71bab89) Change-Id: Ic630a7c0b29bd62525dd2211a7771c647e1be8df Reviewed-on: http://gerrit.openafs.org/11258 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit dfaa6598236079478ac77b273aa49cacebca6029 Author: Michael Meffie Date: Fri May 27 12:22:34 2011 -0400 volinfo: accept vice partition id for -part option Accept a partition id for the -part option. For example, -part a is the same as -part /vicepa. Reviewed-on: http://gerrit.openafs.org/4739 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8fc3d6dfe196771a38f2bfe7275e90a73f742931) Change-Id: I9a52dc881e6b77526656ca94e4f175241a79551b Reviewed-on: http://gerrit.openafs.org/11257 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 5a1c61b955cfe295817f0033705ecc8e17a8fd86 Author: Michael Meffie Date: Fri May 27 11:29:33 2011 -0400 volinfo: comments Add doxygen style comment headers. Reviewed-on: http://gerrit.openafs.org/4738 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6b0ad5786d09446d6ecf723c892c11d6cce4493c) Change-Id: I69165f41bcfc5aa5fcb94bcaad8d31b7a0349179 Reviewed-on: http://gerrit.openafs.org/11256 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 0db20a591a067276f49f7a3347372c875e0b898f Author: Michael Meffie Date: Fri May 27 10:27:03 2011 -0400 volinfo: fix file size data type Use afs_sfsize_t for file size instead of int. Reviewed-on: http://gerrit.openafs.org/4737 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8eddff4b785a196b2aae8be2d3a0e75fa3b6c0cf) Change-Id: I670949abbb9ebfd652bb8baddcef47c7bad1b211 Reviewed-on: http://gerrit.openafs.org/11255 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit a7bc83f6779989e5c4c0efbdee8b7ae4121a1fe8 Author: Michael Meffie Date: Thu May 26 21:58:11 2011 -0400 volinfo: avoid exit on errors Instead of exiting on errors, try to carry on. Reviewed-on: http://gerrit.openafs.org/4736 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 59a1c40efbd3326a210776a0253f4f6c656a65ee) Change-Id: If5f461ac4c1d35ae27336eeab844e6706fcd5bbe Reviewed-on: http://gerrit.openafs.org/11254 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit d1ef6347e89d902e174a469dcb3f4f77c560c883 Author: Michael Meffie Date: Tue May 24 10:28:37 2011 -0400 volinfo: refactor mode variables Untangle the various global mode variables, which became muddled when dsizeOnly and saveinodes were introduced. DumpInfo now indicates the default mode and DumpVnodes means print the vnode entries, not scan but sometimes print. Remove unused globals. Reviewed-on: http://gerrit.openafs.org/4735 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 277a8ad658572b60e7e460c945adee78cc04038d) Change-Id: I9d5d9e9b2b65d703f5b35091f072b31072485d83 Reviewed-on: http://gerrit.openafs.org/11253 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit df53d451cb25451245c2e0c01f191b5f0c35d71e Author: Michael Meffie Date: Sun May 22 22:53:46 2011 -0400 volinfo: refactor volume and vnode handling code Refactor volume and vnode handling code for better maintainability. Move the code invoked by -saveinodes to a new function. Remove an unneeded else clause in HandleVolumes. Reviewed-on: http://gerrit.openafs.org/4734 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 56714e9a4d01d1718bbca9f3930c2993e4b7d094) Change-Id: I96da8a2824af7283fa2d3fb34622d06715c058cb Reviewed-on: http://gerrit.openafs.org/11252 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 54c61781e2a1e59e9bfbd5cc065d9fef0c6f83a0 Author: Andrew Deason Date: Thu Jul 17 10:33:23 2014 -0500 LINUX: Avoid premature RO volume lock error Commit 0fc27471e7da0c5de4addcdec1bfbca5208072cc avoids processing lock requests for RO volumes, but it did this both in afs_lockctl() and in the Linux-specific afs_linux_lock(). The changes in afs_linux_lock() are incorrect, since they also avoid F_GETLK requests (whereas afs_lockctl() just avoids F_SETLK* requests). Additionally, the section in afs_linux_lock() incorrectly reports an error, since it returns a positive EBADF error code, when we are supposed to return -EBADF. The result of all of this is that an F_GETLK F_WRLCK request for an RO volume always fails with fcntl() returning 9 (EBADF), which is an invalid return code for fcntl() F_GETLK (instead we should return -1 with an errno of 9). But if there are no locks, we should return success anyway. Just remove this section, since afs_lockctl() handles this case itself anyway. Thanks to Todd Lewis for reporting this issue. Reviewed-on: http://gerrit.openafs.org/11316 Reviewed-by: Marc Dionne Reviewed-by: D Brashear Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot (cherry picked from commit e0d0e6ffdbb11d5445b129ef0bd5030aec59d333) Change-Id: Ia5d03e55f7bad9f5678cdb82808b56d975865438 Reviewed-on: http://gerrit.openafs.org/11361 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 81f1814b566cb3b1cda97be4c48b9788cd7addd0 Author: Andrew Deason Date: Wed Jul 23 11:54:47 2014 -0500 LINUX: Drop dentry if lookup returns new file Background: when an entry is looked up after its parent changes, afs_linux_dentry_revalidate re-looks-up the entry name in its parent. If we get an ENOENT back, we d_drop the dentry, and in any other situation we just d_invalidate it. As discussed in prior commits 997f7fce437787a45ae0584beaae43affbd37cce and 389473032cf0b200c2c39fd5ace108bdc05c9d97, we cannot simply d_drop the dentry in all cases, because that would cause legitimate directories to be reported as "deleted" if we just failed to lookup the entry due to e.g. transient network errors (this causes, among other things, 'getcwd' to fail with ENOENT). However, this logic has problems if the dentry name still exists, but points to a different file; the case where 'tvc != vcp' in afs_linux_dentry_revalidate. If that case happens, and the dentry is still held open by some process, we will continue to try to reference the vcache pointed to by the 'old' dcache entry, which is incorrect. To maybe more clearly illustrate the issue, consider the following cases: $ sleep 9999 < /afs/localcell/testvol.ro/dir1/file1 & $ rm -rf /afs/localcell/testvol.rw/dir1 $ mkdir /afs/localcell/testvol.rw/dir1 $ vos release testvol $ ls -l /afs/localcell/testvol.ro ls: cannot access /afs/localcell/testvol.ro/dir1: No such file or directory total 0 d????????? ? ? ? ? ? dir1 Here, on the last 'ls', afs_linux_dentry_revalidate will afs_lookup 'dir1', and notice that it points to a different file (tvc != vcp), and will d_invalidate the dentry. But since the file is still held open, the dentry doesn't go away, and so we are still pointing to the vcache for the old, deleted 'dir1'. That file doesn't exist anymore on the fileserver, so we get an ENOENT when actually trying to stat() it (we get a VNOVNODE from the fileserver, whcih gets translated to an ENOENT). A possibly more serious case is when the file is just renamed: $ sleep 9999 < /afs/localcell/testvol.ro/dir1/file1 & $ mv /afs/localcell/testvol.rw/dir1 /afs/localcell/testvol.rw/dir1.moved $ mkdir /afs/localcell/testvol.rw/dir1 $ touch /afs/localcell/testvol.rw/dir1/file2 $ vos release testvol $ ls -l /afs/localcell/testvol.ro/dir1 total 0 -rw-rw-r--. 1 1235 adeason 0 Jul 23 11:09 file1 $ kill %1 $ ls -l /afs/localcell/testvol.ro/dir1 total 0 -rw-rw-r--. 1 1235 adeason 0 Jul 23 11:10 file2 In this situation, the same code path applies, but the old file still exists, so we will continue to use it without error. But since we are still pointing at the old file, of course the results are incorrect. Once we kill the process holding the file open, the bad dentry finally goes away and the results are valid again. To fix this behavior, d_drop the dentry in all cases, except when we encounter an error preventing the lookup from being done. This ensures that the dentry is unhashed from the parent directory in the scenarios above, and so cannot be used for a subsequent lookup. With this change, the only afs_lookup response that causes a simple d_invalidate is when we encounter actual errors during the lookup (such as transient network failures). This is correct, since in those cases we don't _know_ that the dentry is wrong. For all other cases, we do know that the dentry is wrong and so we must force it to be unhashed. Reviewed-on: http://gerrit.openafs.org/11320 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Andrew Deason Reviewed-by: D Brashear (cherry picked from commit a5866b3a7c21551a8aa40fc6141cca3a65fea563) Change-Id: I5dbde974e9166d120a5040e81696adfebf94194d Reviewed-on: http://gerrit.openafs.org/11358 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit a4483520eab87001353c9c309c4e7d65ffe6cc9a Author: Michael Meffie Date: Fri Aug 1 18:27:35 2014 -0400 libafs: fix error location code in LINUX/osi_export Fix the missing error location code introduced in commit 40fb2650b783fbafe51aefd3d0af7a6b0536c265 libafs: allocate vattrs in LINUX to reduce stack used Use location number 104, which is the next in the sequence. The code in this module is compiled when building the nfs translator, which is only built under linux when configure detects it is possible. Thanks to Andrew Deason for spotting this error. Reviewed-on: http://gerrit.openafs.org/11351 Reviewed-by: Andrew Deason Tested-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: D Brashear (cherry picked from commit 05dbea9fc4da02c6349d9e0b69656acb3254cfe8) Change-Id: I5bb69b68716f6a7147d24c0bd698c10488bca2d4 Reviewed-on: http://gerrit.openafs.org/11366 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 0dc4722d7e86bf289f8e287a01532d90dda803a8 Author: Michael Meffie Date: Sun May 18 19:28:16 2014 -0400 libafs: allocate vattrs in LINUX to reduce stack used Allocate temporary vattrs in LINUX to reduce the amount of stack space used. Reviewed-on: http://gerrit.openafs.org/11170 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Perry Ruiter Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear (cherry picked from commit 40fb2650b783fbafe51aefd3d0af7a6b0536c265) Change-Id: I1f19c07a2ad0f8cdddd88e4528584caccaa403e0 Reviewed-on: http://gerrit.openafs.org/11339 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit f1303a1f4fc710af286e12dae50ff44c93b7cb0b Author: Michael Meffie Date: Sun May 18 17:17:38 2014 -0400 libafs: api to create and free vattrs Add a pair of functions to allocate and free struct vattrs, to avoid having struct vattrs on the stack. Reviewed-on: http://gerrit.openafs.org/11169 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear (cherry picked from commit 9630c075409a262424805411ed473178814b412c) Change-Id: I7746ee69f7fde8760c066458ecfe44da46edbf81 Reviewed-on: http://gerrit.openafs.org/11338 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 38a4a13c32ce9373a7cbc23baa114b98e09bb42c Author: Michael Meffie Date: Mon Jul 28 17:27:40 2014 -0400 libafs: do not allow NULL creds for afs_CreateReq Do not allow callers to pass a NULL cred to afs_CreateReq. This avoids setting the uid of zero in the vrequest when no cred is passed. Update callers to pass afs_osi_credp for an anonymous cred when no cred is available. Thanks to Andrew Deason for pointing out afs_osi_credp should be used. Reviewed-on: http://gerrit.openafs.org/11336 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear (cherry picked from commit b7f1763652fb932ca5bd3f3351a48df11e58f2dc) Change-Id: I0a7f17a05decdd0a9ef1ff72d7bf73153db95bed Reviewed-on: http://gerrit.openafs.org/11365 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 7426a78d1a43a33b743b4f5b47dd98f0c00b152c Author: Michael Meffie Date: Wed Apr 9 08:40:21 2014 -0400 libafs: reduce stack space in LINUX Allocate temporary vrequests to reduce the amount of stack space used. Reviewed-on: http://gerrit.openafs.org/11005 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear (cherry picked from commit 1ac4eb1b84db2732b9c2645492daff9e25417475) Change-Id: I5d982afce489fbcf82cbcb69bd2677fcb0236237 Reviewed-on: http://gerrit.openafs.org/11167 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Gergely Madarasz Reviewed-by: Perry Ruiter Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit c87e0cd81cadd003ff84641b395092e0d28412f6 Author: Michael Meffie Date: Mon Jul 28 20:57:01 2014 -0400 libafs: fix vrequest leak in afs_lookup Fix vrequest leak introduced in commit 9930567bcf9655d3f562b210b2dc4b4a99226691. Thanks to Andrew Deason for finding this error. Reviewed-on: http://gerrit.openafs.org/11337 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman (cherry picked from commit 51c97beb3f3bb68704d33e126561b8c2866ddab3) Change-Id: If903c7863ac2ac6420a74e6bea1012c8cbf41913 Reviewed-on: http://gerrit.openafs.org/11364 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 6041ddf65c5a11725b800372fb1fbec8ba079cd1 Author: Andrew Deason Date: Tue Oct 2 15:04:47 2012 -0500 afs: Use common cleanup code for lockctl EINVAL afs_lockctl has common cleanup code in the 'done' label. Use it here, instead of trying to duplicate it. Currently this code path appears to not be dropping the discon lock, which this rectifies. Reviewed-on: http://gerrit.openafs.org/8196 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit eae608d99a5ae94624200f91af6ed818c9f6612b) This commit fixes a vrequest leak introduced by change I1c60701d4e4f85aedfea6be58a03468ab34edb96. On master, the corresponding changes appear in the opposite order. Change-Id: I1f7a5794f19abb1495bbab6014c3ccde99cf0e1d Reviewed-on: http://gerrit.openafs.org/11381 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 9f692e653bdc8e93aa4b308e4c6e42d394b03fe4 Author: Michael Meffie Date: Tue Apr 8 16:10:36 2014 -0400 libafs: reduce stack space in VNOPS Allocate temporary vrequests to reduce the amount of stack space used. Reviewed-on: http://gerrit.openafs.org/11004 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear (cherry picked from commit 9930567bcf9655d3f562b210b2dc4b4a99226691) Change-Id: I1c60701d4e4f85aedfea6be58a03468ab34edb96 Reviewed-on: http://gerrit.openafs.org/11166 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 8b201a35c638f3abc2574539a2bd9a60e8d5af9f Author: Andrew Deason Date: Mon Feb 21 14:56:48 2011 -0600 budb: Fix objdir builds Reviewed-on: http://gerrit.openafs.org/4030 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 153cb5a3ca34c07a899841ae917b7b882e7ae433) Change-Id: I46475c58265df9ec2b43241eb244b7d1164ad182 Reviewed-on: http://gerrit.openafs.org/11367 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 7c451fab11b65dd5e2860715b939e5de33c7645e Author: Michael Meffie Date: Sat Oct 26 23:35:14 2013 -0400 build: separate source and header compile_et rules Generate source and header files separately to support parallel make without contortions. Add a complete list of dependencies for each generated header file to avoid build errors during parallel make. Reviewed-on: http://gerrit.openafs.org/10370 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear (cherry picked from commit c01236beb5a6ad55cd424f0ccc3a836d737f78f3) Change-Id: Ib0e3c3b8e0a268f7db741243ce78fed9f6c342c7 Reviewed-on: http://gerrit.openafs.org/11242 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 73b6ed21c72d8ff218cee46d8e300f6c4b96fcd2 Author: Garrett Wollman Date: Sat Jul 26 00:43:10 2014 -0400 FBSD: 10.1 is coming out soon The 10.1 release cycle is starting in a month, so let's get ahead of the curve by adding the config bits now. Reviewed-on: http://gerrit.openafs.org/11328 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 2809bae58851ce9168ca8b18c94360392b8a609f) Change-Id: I71779d247725c48ee362e4ff8e9356ce060863d4 Reviewed-on: http://gerrit.openafs.org/11369 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 3d5eb8c4671f8c6ae86eaacc9e0fd753200feae2 Author: Garrett Wollman Date: Sat Jul 26 00:22:09 2014 -0400 FBSD: 9.3 has been released, so add config bits and sysname Reviewed-on: http://gerrit.openafs.org/11327 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 6667399aa426009a841cdd6459dbfa498e562646) Change-Id: I5eaa9316806da60699cdb194058613ff7671cb8a Reviewed-on: http://gerrit.openafs.org/11368 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Garrett Wollman Tested-by: Garrett Wollman Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 9b827a8bfac032fa284e7bb23cbed6cf00bc0d05 Author: D Brashear Date: Wed Apr 16 10:35:57 2014 -0400 auth: check for keytab before using in akimpersonate Heimdal 1.5.2 happily tries to dereference a keytab file even if none is there. if we have a FILE: type, stat it before use 1.6 only change: master uses KeyFileExt FIXES 131852 Change-Id: I939eb9e47d2dbbef75c2a64724fdb9111f600150 Reviewed-on: http://gerrit.openafs.org/11075 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 6871d2375d4ad82372c609367b1454210841d405 Author: Chas Williams (CONTRACTOR) Date: Thu Jul 3 11:02:40 2014 -0400 auth: Fix library dependencies so that tests build again Reviewed-on: http://gerrit.openafs.org/11311 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 668b1765478eb32b5d0895d25301773e412df7a0) Change-Id: I581a23201832bdfbe7d14eb15d09409936e91eb0 Reviewed-on: http://gerrit.openafs.org/11350 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand commit 3be9a451b523cd955cd5b3e68ee3a44ab083c14f Author: Michael Meffie Date: Sun Mar 2 14:54:00 2014 -0500 rxkad: fix include quotes for generated headers Reviewed-on: http://gerrit.openafs.org/10871 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear (cherry picked from commit 0408718b8108882d5fb70612e7e7e5d3184fb65f) Change-Id: I880f6f6b872f913e42b370c51a0b0e92962de803 Reviewed-on: http://gerrit.openafs.org/11241 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Perry Ruiter Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit ff0644c4cf5a54747bf3af2cc9605163e1debcb7 Author: Michael Meffie Date: Sun Mar 2 12:26:24 2014 -0500 auth: fix include quotes for generated headers Reviewed-on: http://gerrit.openafs.org/10870 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear (cherry picked from commit d3eed1e58a7605b320ec38d48ff1c185aa2d9806) Change-Id: Iadabd45547b671e346eec262c50f2e6aef917258 Reviewed-on: http://gerrit.openafs.org/11240 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Perry Ruiter Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 1c4dd27b89ad1e42234f0862abdd2e4ad35c2a3d Author: Michael Meffie Date: Sun Jan 19 17:04:08 2014 -0500 libafs: separate source and header compile_et rules Use the new compile_et -emit flag to generate source and header files separately to support parallel make. Export afs_trace.h since it is required to build libafs. Before the compile_et -emit flag was available, The afs_trace.h file was generated as a side-effect of creating afszcm.cat. Reviewed-on: http://gerrit.openafs.org/10729 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear (cherry picked from commit 4e6b7ab904d38d38da1b80a7342bd815668a8c09) Change-Id: Ic1474aff86e49d8df0ba151ed0e53932aa96d1ed Reviewed-on: http://gerrit.openafs.org/11239 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit fb3ab52be5eab9b14b50f13f9fd862340277c9bf Author: Michael Meffie Date: Tue Jan 21 13:45:32 2014 -0500 libadmin: separate source and header compile_et rules Use the new compile_et -emit option to generate source and header files separately for parallel make support. Remove unneed -h options, since there are no prolog files and the header names match the error table names. Reviewed-on: http://gerrit.openafs.org/10730 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear (cherry picked from commit e97198372a8ddbdba4b5a58c0659f2aa5d2b2d56) Change-Id: Ic8da7c3dea7953cb7ad33120df06ec1f7399bf2d Reviewed-on: http://gerrit.openafs.org/11238 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 2a5cb18789c6f78d74b4ba45a267755ab9254424 Author: Michael Meffie Date: Sat Mar 1 14:52:48 2014 -0500 compile_et macros to generate source and headers separately Common makefile macros to generate headers and source files separately using the new compile_et -emit option. Reviewed-on: http://gerrit.openafs.org/10869 Reviewed-by: D Brashear Tested-by: D Brashear (cherry picked from commit be36376b244d1d94b24cb8fce44810fb31b7b5ce) Change-Id: Ic9cf078f6a013e7529ae8f11b0378173e64ee680 Reviewed-on: http://gerrit.openafs.org/11237 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 1dd845f669402ec1661b1f9f4cbd27f3a33b699b Author: Michael Meffie Date: Sat Jan 18 23:03:44 2014 -0500 libadmin: add missing bubasics dependency bubasics is a dependency of libadmin. Add it to the top level makefile. This missing dependency was found by analyzing the libadmin header file includes. Reviewed-on: http://gerrit.openafs.org/10727 Reviewed-by: D Brashear Tested-by: D Brashear (cherry picked from commit b8589f1b59e520aae8d412170b663ff3bc214667) Change-Id: Ie879c29a72bbf194bf48dea73380521dc89c4c38 Reviewed-on: http://gerrit.openafs.org/11236 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit dd4abad371159712954c819b1032dffc03f6c276 Author: Michael Meffie Date: Sat Jan 18 22:40:12 2014 -0500 libadmin: add header file deps Add the missing header file dependencies to the library targets. This is needed for parallel make. Reviewed-on: http://gerrit.openafs.org/10726 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear (cherry picked from commit d2084563648cc1e8ec697c61f593935a0b5804a3) Change-Id: I47b3b184a3284b56c4047e27b58b6cb3a8e16cef Reviewed-on: http://gerrit.openafs.org/11235 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 82cf6654494b9b35ba4eac970e5f2bb466755f72 Author: Michael Meffie Date: Sat Jan 18 22:40:12 2014 -0500 libadmin: rework compilation rules Change I47b3b184a3284b56c4047e27b58b6cb3a8e16cef will add dependencies on the header files to the library targets. Before this can be done, we have to avoid the use of $? in compilation rules because on AIX and OS X this causes the headers to be added to the compilation command, making builds fail. This is a 1.6-only change. The corresponding commit on the master branch, f22ae5f7d8b3c143de21355f819ab872a0cf76fd, is no candidate for a backport to 1.6. Change-Id: Iefb432555c60bcfdf51436ebe76a267969280fe0 Reviewed-on: http://gerrit.openafs.org/11353 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit e8f5739ec4f190e6044f5e72074a01cb941aac06 Author: Michael Meffie Date: Fri Nov 22 13:36:54 2013 -0500 libadmin: use INSTALL_DATA to export headers Use the INSTALL_DATA macro instead of cp to export header files. Reviewed-on: http://gerrit.openafs.org/10515 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear (cherry picked from commit 66093e4a2db297afea755d164cca7a6080909bda) Change-Id: Icc1fb62fd68903fcf5a1f756800b0281669f59fa Reviewed-on: http://gerrit.openafs.org/11234 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit a49323a5a630eacc64ca0918fb4ae05cce1fac8d Author: Michael Meffie Date: Sat Jan 18 22:01:59 2014 -0500 libadmin: makefile rule for afs_AdminError.h Add a makefile rule to export the libadmin afs_AdminErrors.h header file, instead of exporting afs_AdminErrors.h as a side effect of generating the afs_AdminBosErrors error table. Add the missing afs_AdminErrors.h dependency to the afs_utilAdmin.o dependency list. Reviewed-on: http://gerrit.openafs.org/10369 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear (cherry picked from commit 9b1ffeeeb62cd9535dc2fc1522400abb428a0ac2) Change-Id: Ib526d18227a6c37eac08def5ab88eb1717a848f1 Reviewed-on: http://gerrit.openafs.org/11233 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit be7b6414644b2bb49598f60e822f4c73e5f0cd45 Author: Michael Meffie Date: Sat Jan 18 21:56:36 2014 -0500 libadmin: remove duplicate dependency afs_AdminPtsErrors.h was listed twice in the dependency afs_utilAdmin.o dependency list. Reviewed-on: http://gerrit.openafs.org/10725 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear (cherry picked from commit 9b105c5586a2e9c5c55dce7785e681f73ea0a759) Change-Id: Ibf01dd6c67ecb6a89e30bd93eef82afae5eb84c4 Reviewed-on: http://gerrit.openafs.org/11232 Reviewed-by: Perry Ruiter Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 9e51525995ebedc000939a08bf993059618e2397 Author: Michael Meffie Date: Sun Jan 19 14:15:13 2014 -0500 tvolser: fix makefile clean target Remove generated source files with the clean makefile target. Reviewed-on: http://gerrit.openafs.org/10724 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear (cherry picked from commit e39e226a13e38bfe0fb12b73633b6415c790c569) Change-Id: Ie1159d2bfb05e274623b0985660e05ed9ce78ccc Reviewed-on: http://gerrit.openafs.org/11231 Reviewed-by: Perry Ruiter Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit b1f177a920d7f700c34bb14b5038e052803c35b7 Author: Michael Meffie Date: Sun Jan 19 14:02:28 2014 -0500 config: use the standard INSTALL_DATA makefile macro Replace the custom INST makefile macro with the standard INSTALL_DATA macro for installing and exporting files. Reviewed-on: http://gerrit.openafs.org/10723 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear (cherry picked from commit 31d6467aa058a2b49c22188dfb0ca70b766d127f) Change-Id: I7b7cc1d74c84090c9042b624af1c4e4b5c61ac6d Reviewed-on: http://gerrit.openafs.org/11230 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 0f33b205b5f7c9ac8fa66511ef6be329b477532b Author: Michael Meffie Date: Fri Nov 22 12:23:17 2013 -0500 config: parallel-safe param.h makefile rule Generate the param.h.new temporary file in a parallel-safe way. The rule to generate the three copies of param.h can run at the the same time under a parallel make, clobbering the param.h.new temporary file. Instead of creating this file inline, create a common rule to generate the temporary file once. Reviewed-on: http://gerrit.openafs.org/10516 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear (cherry picked from commit c8e83f0e826bc0a56321408b1c7a2afa137bab05) Change-Id: I8a85c0e288f2231a3bf693319a8f5fcd618464e8 Reviewed-on: http://gerrit.openafs.org/11229 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit cf4e99a3a4f1062a4bc281bf1c576652efa2fc14 Author: Benjamin Kaduk Date: Wed May 21 15:58:17 2014 -0400 Install afscp.h from srcdir, not the build dir That header is not a generated file, and is not found in the object directory. make install would fail from a separate objdir prior to this change. Reviewed-on: http://gerrit.openafs.org/11160 Reviewed-by: D Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 7a701239d8327ae738124edb5e11f3bcbb08a76b) Change-Id: I738adc464aa36b68403b69912253faf17cb01621 Reviewed-on: http://gerrit.openafs.org/11342 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit e7e2cff64201ece5493c8fbe421604f620daebee Author: Michael Meffie Date: Fri Nov 22 11:50:11 2013 -0500 libafscp: makefile install rule update Change the makefile install rules to install the header file from the libafscp directory, and not the top level include directory to make the install rules consistent with the rest of the tree. Reviewed-on: http://gerrit.openafs.org/10514 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear (cherry picked from commit 52fe3f52de95b698c93ca5da3c1ed59447817610) Change-Id: I1ed7e92b8e27f3df8fc76ccaa6bac4199e40c180 Reviewed-on: http://gerrit.openafs.org/11228 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 45190b44dbc6573e6175b6da682c4a528846d1a0 Author: Michael Meffie Date: Wed Aug 1 17:26:33 2012 -0400 comerr: compile_et -emit option for parallel make Add the -emit option to the compile_et command to support parallel make. The -emit option allows make to generate the header and the source files independently, instead of building two files at the some time. This avoids the issue where one command creates two separate files, which is difficult to handle correctly for parallel makes. Reviewed-on: http://gerrit.openafs.org/7921 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear (cherry picked from commit 9df43aacab0f311c15837b230761a11750f8b9cb) Change-Id: Id560fcec356a4b36c0e311440f74a97a670c07d1 Reviewed-on: http://gerrit.openafs.org/11227 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 94f1d49af07a2f20b43bdc4e172e1b0aabc1b263 Author: Marc Dionne Date: Tue Apr 29 12:48:03 2014 -0400 libafs: Speed up afs_CheckTokenCache On systems with a large number of PAGs and files in use, the periodic daemon job that checks for expired credentials and cleans up the axs cache can run for a very long time. This can lead to kernel soft lockups and eventually hang processes and file access because of unavailable locks. Rework the scanning logic in afs_CheckTokenCache to make the scanning more efficient in most real world cases. On a test system accessing ~4000 files from processes in 1000 PAGs, this has been observed to reduce the runtime of afs_CheckTokenCache from a problematic ~70s down to about 0.7s. Additionally, this changes the conditions in which an axscache is discarded. uid+cell (rather than just uid) must now match, and if no matching unixuser is found, it will also be discarded. Adapted from code from Jeffrey Altman who provided the original loop algorithm and code. Reviewed-on: http://gerrit.openafs.org/11123 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear (cherry picked from commit de74227d9c925206cd6d46496ec4682569d3105b) Change-Id: I72e501cf1cb3e312d17a518666d2d638f1d52ead Reviewed-on: http://gerrit.openafs.org/11307 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: D Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit c1223f111908341b8be472fe3416fedea920613a Author: Andrew Deason Date: Wed Jul 30 11:12:39 2014 -0500 ptserver: Fix RemoveFromSGEntry hentry memcpy In this function, hentry is the "previous" continuation entry that we looked at, and centry is the "current" continuation entry. We keep track of the previous continuation entry in case we need to update its 'next' pointer, which we do if we free one of the continuation entries because it is empty after the removal. So, this memcpy is supposed to copy the current entry to the previous one, but the arguments are flipped, so we just copy zeroes to centry (since hentry is initialized to zeroes early on in the function), and hentry never gets set to anything besides zeroes. The effect of this is that whenever a ptdb entry has more than one continuation entry, and we free up any of them after the first one via RemoveFromSGEntry, the previous continuation entry becomes blanked (though the 'next' pointer should still be correct). This means the membership information for that group is not recorded correctly, as it loses a chunk of the IDs that it is a member of. The reverse mapping should still be intact (the parent groups have a pointer to the sub-group), but the group probably doesn't function correctly. The reason this happened is because of the confusing conversion from bcopy to memcpy. Most of the instances of bcopy/bcmp/bzero/etc were converted (correctly) back in commit c5c521af, but the supergroups implementation was added afterwards, in 8ab7a909, and contained a bcopy reference. This bcopy was converted to memcpy in 58d5f38b, but the argument order was not corrected, causing this bug. To fix this, just flip the first two arguments of the memcpy. Just get rid of the casts here, too, to match the code in the non-supergroups RemoveFromEntry and elsewhere. Reviewed-on: http://gerrit.openafs.org/11340 Tested-by: BuildBot Reviewed-by: D Brashear (cherry picked from commit 2d89d447c8b00a40d3fc559813fe31c177da164b) Change-Id: I78b80cb7b043c9d1562b543906a593a985020b43 Reviewed-on: http://gerrit.openafs.org/11352 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit fcbcce664025b87d81ae2b0ad8957193a3b34a38 Author: Stephan Wiesand Date: Mon Jul 14 10:26:02 2014 +0200 cmd: List version in help for commands List version in help for commands using cmd library Reviewed-on: http://gerrit.openafs.org/10956 Tested-by: BuildBot Reviewed-by: D Brashear (cherry picked from commit 4b4d44b3dd62c2a36908f20eeff345b666e7858d) Change-Id: I1c4881de710f5c48af5645bce64fbee4fb4854f2 Reviewed-on: http://gerrit.openafs.org/11214 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit fb32fcf4f711c525b0c1504b2ca831362b75f131 Author: Michael Meffie Date: Fri Mar 28 00:36:29 2014 +0100 libafs: reduce stack space Allocate temporary vrequests to reduce the amount of stack space used. Reviewed-on: http://gerrit.openafs.org/11003 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear (cherry picked from commit 027e2bbb1191c31dbbe968a925c192b064d52c47) Change-Id: I2dc6d49c7d3b7578359930f7fd922f177729281f Reviewed-on: http://gerrit.openafs.org/11165 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Gergely Madarasz Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 17bf59ae6e426a7fd86f7edda040edb352729d2e Author: Michael Meffie Date: Mon Apr 14 16:07:53 2014 -0400 libafs: api to create and free vrequests Add a pair of functions to allocate and free struct vrequests, which are to be used to avoid having struct vrequests on the stack. Reviewed-on: http://gerrit.openafs.org/11074 Reviewed-by: D Brashear Tested-by: D Brashear (cherry picked from commit 76ad941902c650a4a716168d3cbe68f62aef109f) Change-Id: I08932256af58aeba31b2d5c11008658c419cf008 Reviewed-on: http://gerrit.openafs.org/11164 Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk Reviewed-by: Gergely Madarasz Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit d40c92509f5d91bf996039dcc5a8770141b719aa Author: Benjamin Kaduk Date: Wed May 28 10:41:02 2014 -0400 Use a separate toplevel target for venus/tests There's no particular reason to lump them in with the venus target, and we have reports that it causes parallel build failures on some systems. Just use a separate 'venustests' target akin to rxtests and ubiktests and the like, instead. Some of these lines are now long and should be wrapped, but leave that for a follow-up commit. Reviewed-on: http://gerrit.openafs.org/11177 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: D Brashear (cherry picked from commit f66c467bdd7182eb80ede3b9faa5f5ae5231632f) Change-Id: Ic0c1ae4d6adb265417ba726967ff02fed476da7e Reviewed-on: http://gerrit.openafs.org/11282 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit c2af2b7b9597b5f5ab779a092b5bf9a2d35ea746 Author: Michael Meffie Date: Fri Apr 13 11:58:02 2012 -0400 Build: check for gencat Check for the gencat program and give a missing warning if not present. Reviewed-on: http://gerrit.openafs.org/7203 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit dcefc4576020c2c076af1a4af07cc827bf4eea40) Change-Id: I383af43e6bb26de0095629e99d41e0e0b6bcb685 Reviewed-on: http://gerrit.openafs.org/11158 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit cf5e18b6a5231face090d1e186946aaa18dc112a Author: Perry Ruiter Date: Mon Mar 31 04:42:22 2014 -0700 afs: Suppress duplicate message on Linux Update afs_util.c to call afs_warnall in places where afs_warn and afs_warnuser are called back to back with identical parameters. Reviewed-on: http://gerrit.openafs.org/11006 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: D Brashear (cherry picked from commit 0287086fa78f0bc0012325c2eadb3dccb6b1f766) Change-Id: I91d13654fbedffac4b2ad7ef54a90ade245de726 Reviewed-on: http://gerrit.openafs.org/11183 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 17d0e8c012bd2d4ad9a0004b04943525b38c6b0f Author: Perry Ruiter Date: Sat Mar 22 00:52:32 2014 -0700 afs: Define afs_warnall routine In a Linux environment afs_warn and afs_warnuser both go to the same spot, resulting in duplicated messages if both are invoked back to back. Define a new function afs_warnall for use when identical messages are directed to both warn and warnuser. In a Linux environment it will do the right thing and present only one copy of the message. Reviewed-on: http://gerrit.openafs.org/10943 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: D Brashear (cherry picked from commit a70f8e1a7e3fcbc13c9a60f8a7409dd01d014afb) Change-Id: I264633cd4a30cfb7f7264e56512f318cfb23ef3e Reviewed-on: http://gerrit.openafs.org/11182 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 6f9038dcbe01370e275cc2391397841e93d86eb2 Author: Perry Ruiter Date: Fri Mar 21 23:31:21 2014 -0700 afs: restructure afs_warn and afs_warnuser Restructure afs_warn.c to provide an afs_vwarn and afs_vwarnuser that accepts a va_list rather than a variadic parameter specification. afs_warn and afs_warnuser continue to be variadic functions but now call afs_vwarn and afs_vwarnuser. This is a preparatory change. A subsequent update will further exploit afs_vwarn and afs_vwarnuser. Reviewed-on: http://gerrit.openafs.org/10942 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: D Brashear (cherry picked from commit c3d4c109305b2db8a63b754c1894ad37326dc340) Change-Id: Ica9c3c8a0ae2c5b680b2e11bc85c747cfd11d30a Reviewed-on: http://gerrit.openafs.org/11181 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit f3c0f74186f4a323ffc5f125d961fe384d396cac Author: Marc Dionne Date: Wed Jun 18 09:06:39 2014 -0400 Linux 3.16: Convert to new write_iter/read_iter ops Change read/write operations to the new write_iter/read_iter operations. Reviewed-on: http://gerrit.openafs.org/11303 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a303bb257ed9e790d8c14644779e9508167887b6) Change-Id: I3f66104be067698a4724ed78537765cf26d4aa10 Reviewed-on: http://gerrit.openafs.org/11309 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit ae86b07f827d6f3e2032a412f5f6cb3951a27d2d Author: Marc Dionne Date: Wed Jun 18 08:53:48 2014 -0400 Linux 3.16: Switch to iter_file_splice_write Users of generic_file_splice_write need to switch to using iter_file_splice_write. Reviewed-on: http://gerrit.openafs.org/11302 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e284db57f94c8f97ed1c95dcd0bd9518d86c050c) Change-Id: I6f88ec0388fe43accc150c7243c1a474c9e643af Reviewed-on: http://gerrit.openafs.org/11308 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 251de92a72c4c5a95aa58e5cb1cd3d6b0b3b6833 Author: Chas Williams (CONTRACTOR) Date: Fri May 23 07:48:11 2014 -0400 afs/VNOPS: use osi_AllocSmallSpace() correctly Send the size down to the allocator so it can perform some consistency checks. Reviewed-on: http://gerrit.openafs.org/11168 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Michael Meffie Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk Reviewed-by: D Brashear (cherry picked from commit 2d973c10f13b40c0ac9da25fe7f4c73b3560a686) Change-Id: I38d16bdd014010a2ccc9636b890c9ea7a6158e6a Reviewed-on: http://gerrit.openafs.org/11203 Tested-by: BuildBot Reviewed-by: D Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit f48e111f6802c8b9f220ee9c53fea281731171a8 Author: Michael Meffie Date: Wed May 25 21:54:06 2011 -0400 volinfo: refactor size counters Put the volume, partition, and server size counters into structures. Reviewed-on: http://gerrit.openafs.org/4733 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4e97b2e5f820e07ffbaf8407cca18c536d9d0f67) Change-Id: I1d6f5d31d359a6e89dad34c7319b6bbd4d121ed6 Reviewed-on: http://gerrit.openafs.org/11251 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit dbefc9c2b070e5d39e19967ed3eb15adc82d66f0 Author: Michael Meffie Date: Wed May 25 18:19:22 2011 -0400 volinfo: refactor -sizeOnly printing Refactor the -sizeOnly output processing to reduce code duplication and coupling with -saveinodes. Reviewed-on: http://gerrit.openafs.org/4732 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 70145b4f4affc6aabf83fc1cc34cb4de0702c83f) Change-Id: I8ca8979854959dc62ac5ff5147d2087e00e1f198 Reviewed-on: http://gerrit.openafs.org/11250 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 8d29caec8b60295e2c0d32e1a101e672fc9acf6a Author: Michael Meffie Date: Sat May 21 20:56:23 2011 -0400 volinfo: print namei filenames of index files On namei fileservers, also print the namei filenames of the volume special files when the -header flag is given. Reviewed-on: http://gerrit.openafs.org/4696 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4999ed13d2355743e07587c8d7c4d23cbc073c5f) Change-Id: I09c93c6b7512250f47359e70c5a744182ea91d9f Reviewed-on: http://gerrit.openafs.org/11249 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 7953ca06b21abf880c99e8dc6f3312dd784b36fe Author: Michael Meffie Date: Sat May 21 12:06:43 2011 -0400 volinfo: remove code duplication in HandleVolumes Reduce duplicate code for processing volume header files when printing header details (-header) and calculating the volume size (-sizeOnly). Reviewed-on: http://gerrit.openafs.org/4695 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ae27283550dab33704f30e18975722e0ed2c5424) Change-Id: I83e5797acf09597d7c4da8c90e49049cec1294db Reviewed-on: http://gerrit.openafs.org/11248 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit c35419e495575840e5cac8ee6f5e2e5ee430f85f Author: Michael Meffie Date: Sat May 21 12:38:03 2011 -0400 volinfo: fix volume aux totals output Do not print the volumes aux totals prematurely when running volinfo with the -headers flag on an namei fileserver. Instead print the aux totals only once after the link table size is found. Reviewed-on: http://gerrit.openafs.org/4694 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c833ff6c5b7f9c27cf26eae4833b033bd7382c56) Change-Id: I6e059a070785fb44821827a75397d04c8669418d Reviewed-on: http://gerrit.openafs.org/11247 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 96f3e86ab6f419a46fb8b2507b447b850212e212 Author: Michael Meffie Date: Sat May 21 07:28:41 2011 -0400 volinfo: print errors to stderr Print volinfo errors messages to stderr instead of a mix of stdout and stderr. Print a consistent program name. Reviewed-on: http://gerrit.openafs.org/4693 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b7fe087745923bdea4571870799e484da67221d2) Change-Id: Id9b6eb5c0cb50bc3908d6e1662f4485219452ecc Reviewed-on: http://gerrit.openafs.org/11246 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 23cb83b45f70186fa97b9e7d2a1a8b44272579d8 Author: Michael Meffie Date: Thu Apr 24 15:27:38 2014 -0400 libafs: check afs_InitReq return code Do not ignore the return code from afs_InitReq everywhere it is called. If afs_InitReq fails, the vrequest could not be initialized for some reason. Reviewed-on: http://gerrit.openafs.org/11097 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear (cherry picked from commit cdbf49f06baf33abd803b5d1ec245e58a94eec52) Change-Id: Ia8c0368f50f77b148a1e3f41b0538b0ec7c4123d Reviewed-on: http://gerrit.openafs.org/11163 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Gergely Madarasz Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 3b554f62f138997a5b75834e9bf3bc427c7438c3 Author: Chas Williams (CONTRACTOR) Date: Fri Mar 28 16:46:32 2014 -0400 afs/VNOPS: reduce stack usage AFSFetchStatus is rather large and is in the stack twice. Allocating with osi_AllocSmallSpace will save about 160 bytes of stack. Reviewed-on: http://gerrit.openafs.org/10964 Reviewed-by: Benjamin Kaduk Tested-by: Benjamin Kaduk Reviewed-by: D Brashear (cherry picked from commit 972585c24b5c193a982570ff9264a1971760f48f) Change-Id: I5ee4441cd1c09646051e148a67147a2663768d44 Reviewed-on: http://gerrit.openafs.org/11162 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 6c9fe7f80e4b5d9fb21609ee6743470d39dfb8f5 Author: Chas Williams (CONTRACTOR) Date: Fri Mar 21 16:33:36 2014 -0400 vlserver: Add auditing to some more RPC's A future commit will conditionally restrict access to these RPC's. Auditing will allow debugging and monitoring of this feature. Reviewed-on: http://gerrit.openafs.org/10939 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 900427ecac4bde5ef78ae9fc86f9237552cc1dd4) Change-Id: Id140855220522ebfe560e1023f3b68acb67e82e9 Reviewed-on: http://gerrit.openafs.org/10946 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 619448f16c91b496e7dc2cc9b24dfbff38fabd73 Author: Michael Meffie Date: Mon Jan 20 14:37:52 2014 -0500 doc: afs_compile_et -h option Document the afs_compile_et -h option. Reviewed-on: http://gerrit.openafs.org/10722 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear (cherry picked from commit 501d6d288fcaa195c3cda0be0e3423c7959c9958) Change-Id: I5085f35d1b75a6dbae2768c2ba1ea61bb9c4201c Reviewed-on: http://gerrit.openafs.org/11226 Reviewed-by: Perry Ruiter Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 6b0c80f5577e1097a04c501c1fa8dfaa3939f3ef Author: Michael Meffie Date: Tue Jan 21 09:26:11 2014 -0500 comerr: long and short form of the -prefix option. The man page documented the prefix option as -prefix; compile_et supported only the short form -p. Document and support both the long and short forms for the prefix option; -p and -prefix. Reviewed-on: http://gerrit.openafs.org/10721 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 37937a3e924eee7a09c7719ca6355703e65092e1) Change-Id: I65b8d54bde89be85bd535d3a85fd2b22408bba39 Reviewed-on: http://gerrit.openafs.org/11225 Reviewed-by: Perry Ruiter Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 526f285306d8a676fe05b9ccd6dff6b4d3500b9c Author: Michael Meffie Date: Fri Nov 22 15:26:34 2013 -0500 comerr: avoid comma operator Avoid unnecessary use of the comma operator in compile_et's command-line argument processing. Reviewed-on: http://gerrit.openafs.org/10491 Reviewed-by: Benjamin Kaduk Reviewed-by: Marc Dionne Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 15c80b1a92516a41d4aed8403db1485e97a7eff6) Change-Id: I28f7503877d670406c973520a33924480bb96ad9 Reviewed-on: http://gerrit.openafs.org/11224 Reviewed-by: Perry Ruiter Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit ad28b296c242e321eb768235407e5b9892ed01fe Author: Michael Meffie Date: Tue Jan 21 09:39:56 2014 -0500 doc: afs_compile_et -lang short form Document the -lang short form for -language. Reviewed-on: http://gerrit.openafs.org/10720 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 355ca7b20b8bb9f06b030be966311d4afb40ed00) Change-Id: I26c56ac064968d65f06de9f34c50bc71d2208560 Reviewed-on: http://gerrit.openafs.org/11223 Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit b0cfa5af5fa564f51a6da8ed0ab96293c856e5dc Author: Michael Meffie Date: Tue Jan 21 09:36:37 2014 -0500 doc: afs_compile_et formatting fixes Fix two pod formatting errors and remove one trailing whitespace characters. Reviewed-on: http://gerrit.openafs.org/10719 Reviewed-by: Ken Dreyer Tested-by: Ken Dreyer Reviewed-by: Derrick Brashear (cherry picked from commit de8ff76f8767246431115bf04a1475a0cf3ad28a) Change-Id: Ie2da8d8bf55a6ef9a067be06eb6626fc3dfd57fc Reviewed-on: http://gerrit.openafs.org/11222 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Stephan Wiesand commit f45ab4ffb526e8493d7bd3c27a1850ed535dac82 Author: Michael Meffie Date: Fri Oct 25 13:47:59 2013 -0400 ubik: fix include quotes Include the generated header in the current directory. Reviewed-on: http://gerrit.openafs.org/10361 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit aa440ec7cbb8732ad0d9e1e1401fe4929c2cfd50) Change-Id: I985dadc0db2ecd76c6a8640bd838511cf2abd80b Reviewed-on: http://gerrit.openafs.org/11221 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 562a1ba1267b0cdd2a8d4a2b2bdaabd04e993ca5 Author: Michael Meffie Date: Fri Sep 23 11:28:05 2011 -0400 bozo: remove duplicate prototype Remove duplicate function prototype. Reviewed-on: http://gerrit.openafs.org/5496 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fab921de67fe2bfbf6967c2e1cbf27230aad8bb2) Change-Id: I6074ff7d8cdb6b3360ad4064b524d22ab6afe61c Reviewed-on: http://gerrit.openafs.org/11220 Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit f77bf62c4b315d73176bd61fbb9248e613881c7e Author: Michael Meffie Date: Fri May 9 11:43:35 2014 -0400 aklog: double get_credv5 in retry logic Fix a bug where get_credv5() is called twice, even if the first one succeeded, in the aklog retry logic. (This bug uncovers another bug where get_credv5_akimpersonate crashes in the krb5 libs when get_credv5 is called back to back.) Reviewed-on: http://gerrit.openafs.org/11133 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit b9979e1a23ce28b20fe95d5e6042b9b15506c993) Change-Id: I53b274f5e417ebd2a88b18df15ceb0e1ea39624d Reviewed-on: http://gerrit.openafs.org/11218 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Perry Ruiter Reviewed-by: Stephan Wiesand commit c9d4ab575e5596560fae656d76fcc101e2b7c118 Author: Chas Williams (CONTRACTOR) Date: Thu Apr 3 14:12:38 2014 -0400 rx: Remove rx_waitingForPacket Commit f43c2f4412d670ce1131dc429cb43302352df3e4 introduced rx_waitingForPacket. Given its current usage, I can't see any functionality. It looks like this might have been the result of merging a renamed rx_waitForPacket from another development branch? Reviewed-on: http://gerrit.openafs.org/10981 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit be236140f72fc51e111898abc896f93cc505fac7) Change-Id: Ib1be9031bc217183f1997b6d79455e1693fa7c21 Reviewed-on: http://gerrit.openafs.org/11219 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 60e878e80aaa0f217b538261380f95ecceba7ed9 Author: Perry Ruiter Date: Tue May 27 01:26:59 2014 -0700 config: Move AFS_LRALLOCSIZ to afs_args.h AFS_LRALLOCSIZ is currently defined in afs/afs.h. Other memory related definitions such as AFS_SMALLOCSIZ and AFS_MDALLOCSIZ are defined in config/afs_args.h. Move AFS_LRALLOCSIZ to config/afs_args.h for consistency. Reviewed-on: http://gerrit.openafs.org/11174 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear (cherry picked from commit 02565591855f5a5ddb7dd6e308d9f535c2fd64b8) Change-Id: I691a7d6025a1b4353f479049d09c54297b80989c Reviewed-on: http://gerrit.openafs.org/11209 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit aa734b700c8f6d6d84f35318ab8f669bb17853c0 Author: Perry Ruiter Date: Tue May 27 01:16:26 2014 -0700 Delete several unused memory management constants Change 412854593cf368006c18e6c0dc607a9ecd76a0e0, removed from the code base the last usage of: AFS_SALLOC_LOW_WATER (defined in afs/afs.h) AFS_MALLOC_LOW_WATER (defined in config/afs_args.h) AFS_MDALLOCSIZ (defined in config/afs_args.h) This patch deletes these constants. Reviewed-on: http://gerrit.openafs.org/11173 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Michael Meffie Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman (cherry picked from commit 85f3d0941b37c71047f59e1b1f4f92557d232fb8) Change-Id: Ie9178db145bde21021251a17adb4bbb1bd77f14d Reviewed-on: http://gerrit.openafs.org/11208 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 1423a3debec3ec5a67c0ef1c613c02a266529e45 Author: Michael Meffie Date: Mon Jun 2 23:24:45 2014 -0400 linux: dont ignore kmod build errors Errors from the linux kmod build are not propagated, since make is run as the first command in a pipeline, and the shell returns the exit code of the last command in the pipeline. Run the make command in a subshell to detect errors, and exit afterwards. (This method is more portable than bash specific pipeline processing options.) Thanks to Mark Vitale for pointing out this build system defect to me. Reviewed-on: http://gerrit.openafs.org/11186 Tested-by: BuildBot Reviewed-by: Mark Vitale Tested-by: Mark Vitale Reviewed-by: D Brashear (cherry picked from commit 48789d47b613e40734e7b0caac58572a80f8b318) Change-Id: Idbdfad2a50901041aedaed35b8f01d713a66620d Reviewed-on: http://gerrit.openafs.org/11205 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Anders Kaseorg Reviewed-by: Stephan Wiesand commit 9c7f4490af8582c943f115474df645e825ad4cff Author: Stephan Wiesand Date: Fri May 30 15:05:28 2014 +0200 libadmin: Remove redundant memset call Commit bf78bf2c115659b78c34d3bc9d1934bcff21c8cc added initialisation of the nbulkentries structure to 0, to avoid freeing garbage due to a goto fail_... before the structure is initialised. As pointed out by Andrew Deason, there already is an equivalent memset call later in the code which is now redundant. Remove it. Reviewed-on: http://gerrit.openafs.org/11180 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit f05abc47938beddb436fd0b9677f7b59fc64a215) Change-Id: I7338e42a45d0871af2ad404191ab622605172ac3 Reviewed-on: http://gerrit.openafs.org/11195 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 627dc517250de390316c2b8523318be755bd898c Author: Michael Meffie Date: Mon Jan 13 15:28:17 2014 -0500 xstat: use ephemeral ports for xstat_fs_test and scout Instead of trying to bind to port 7101, and then retrying if the port is in already in use, let the os find an available port for scout and xstat_fs_test. This fixes a bug where scout and xstat_fs_test do not call rx_Finalize() before retrying rx_Init() with a different port number, causing the program to crash later when more than one copy of xstat_fs_test and/or scout are running at the same time. Reviewed-on: http://gerrit.openafs.org/10707 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit cda5e665ebee3da5615dba71b7a11ffff1229c6d) Change-Id: I00c2d9e7d48e80dc1bc062a85788ad2de65709c7 Reviewed-on: http://gerrit.openafs.org/11155 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Perry Ruiter Reviewed-by: Stephan Wiesand commit 40dc074227de0985940fd97de81d36372c1ca349 Author: Michael Meffie Date: Mon Jan 13 15:38:44 2014 -0500 xstat: fix a malformed debug message a munged format specifier obscured the missing rn arg. Reviewed-on: http://gerrit.openafs.org/10708 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit ba0208f1d69c8c403150fb6312214f9b1c972c6d) Change-Id: Ie422f4a7be98052fec9281be73eac1823e9ea57f Reviewed-on: http://gerrit.openafs.org/11154 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Perry Ruiter Reviewed-by: Stephan Wiesand commit 1174e0a6adcc4cfe7719e7090d75b4eda855998d Author: Anders Kaseorg Date: Sun May 4 05:30:25 2014 -0400 Fix buffer length validation in ktc_GetToken and knfs The signed int tktLen is checked against a maximum size, then passed as the unsigned size_t argument to memcpy. So we need to make sure it isn’t negative. This doesn’t appear to be exploitable: tktLen comes from the kernel, which should have previously validated the length within the SETTOK pioctl. This bug was found with STACK . Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/11109 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 9c10c202f1f2e516dde8b70c3a3b69a73d163070) Change-Id: Id8dacdc00fd686d4f2ff234ffd6c8f5346d9e7b0 Reviewed-on: http://gerrit.openafs.org/11112 Reviewed-by: Perry Ruiter Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Anders Kaseorg Reviewed-by: Stephan Wiesand commit f99226a2ec12997060202e8badd3a67e66cd871b Author: Andrew Deason Date: Wed Jun 4 09:42:46 2014 -0500 bozo: Ignore ListKeys ka_KeyCheckSum return value With commit c04de52da4e89e15b211b4a19a3d9bc4d612b209, an error in ka_KeyCheckSum here makes the entire BOZO_ListKeys RPC to fail. This caused two changes: - That commit makes the RPC fail in situations where it did not before. But even if we cannot calculate the checksum, we can still return other information about the key, so this is undesirable. - It masks the previous 'code' value, returned from stat(). The return code of stat() is now effectively ignored, except for the purposes of setting st_mtime, whereas previously a failure caused the RPC to fail. This is a behavior change. So, effectively revert c04de52da4e89e15b211b4a19a3d9bc4d612b209. Explicitly cast the return value of ka_KeyCheckSum to void, to make it clear that we are intentionally ignoring the return value, so hopefully this will not be flagged as a warning by code analysis tools such as coverity. Reviewed-on: http://gerrit.openafs.org/11194 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: D Brashear (cherry picked from commit 1673764ea091a3f02a64a3d853c3e14f758cdda7) Change-Id: Ibb05f0afc68db5fa66e1dc55f7dae190d8057232 Reviewed-on: http://gerrit.openafs.org/11206 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Perry Ruiter Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 955c4999b5ac73dcc0a38b315f1dea7667579fd6 Author: Simon Wilkinson Date: Tue Feb 26 12:10:17 2013 +0000 bosserver: Return error if key is bad If a key is bad, have SBOZO_ListKeys return an error, rather than silently ignoring the result from ka_KeyCheckSum. Caught by coverity (#988413) Reviewed-on: http://gerrit.openafs.org/9270 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit c04de52da4e89e15b211b4a19a3d9bc4d612b209) Change-Id: I7474da0967d759fc4359140c9057ac997935dc76 Reviewed-on: http://gerrit.openafs.org/11014 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 04ef24659a428af037dfb3a3d368142cd3ffd8c3 Author: Stephan Wiesand Date: Mon Jun 2 16:15:15 2014 +0200 fstrace: Don't read uninitialised data on other platforms either Commit 908105fe8d51551e45692de4e145022138a0356c fixed an off-by-one error potentially causing a buffer overread in CheckTypes, but only in the IRIX/AIX version of the function. Apply the same fix to the code for the other platforms. Spotted by Andrew Deason. Reviewed-on: http://gerrit.openafs.org/11185 Reviewed-by: D Brashear Tested-by: BuildBot (cherry picked from commit 3ab546395536a3c93613dfd53363d380e2c05081) Change-Id: Iea700be24803d8156f07d1cf0617ba7aa2aa03d5 Reviewed-on: http://gerrit.openafs.org/11196 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Perry Ruiter Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 05d1bf1f462fc956ecdc5087c6e9f5241b1430da Author: Perry Ruiter Date: Thu May 29 19:24:24 2014 -0700 afs: Delete unneeded duplicate code Delete a memory release and a goto since natural code flow will result in exactly the same thing. Reviewed-on: http://gerrit.openafs.org/11179 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: D Brashear (cherry picked from commit 69705782318226806b6a2b092ec4b63d594d184c) Change-Id: I44ea83c6b7da68fe0c5c8959d2c8eafb6e942d4b Reviewed-on: http://gerrit.openafs.org/11207 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 11cab56df59e028a294c2799e83a40ba14288090 Author: Marc Dionne Date: Wed May 28 09:53:58 2014 -0400 vol: Fix gcc 4.9 warnings gcc 4.9 complains here because the trailing 0 in these macros has no effect, the value having already been set to NULL. Just remove the offending 0s, nothing uses the return value anyway, even if there were platforms where 0 != NULL. Reviewed-on: http://gerrit.openafs.org/11176 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: D Brashear (cherry picked from commit c0683441a0121433d772bfb36e1e9a1c020a5dcb) Change-Id: Ia63f56d3254b87e7d56752ec11729d82e0293792 Reviewed-on: http://gerrit.openafs.org/11204 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Perry Ruiter Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 47c5ef52c6cabd9a18273cf779a3972c90da4144 Author: Michael Meffie Date: Thu Jun 28 17:24:49 2012 -0400 vldb_check: remove unused functions Remove the readSIT function, which has been unused since the IBM days. Remove the commented out and unimplemented writeUbikHeader stub. Reviewed-on: http://gerrit.openafs.org/7613 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman (cherry picked from commit 7f646382f633fb83d2054298cd5ce12a7bfa250c) Change-Id: I706e3728216cecf0d0c12ad3008ff0ae6ddbc553 Reviewed-on: http://gerrit.openafs.org/11159 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 7cfb8d388ee64a05aa01cef6f60ef1e89817e0f7 Author: Christof Hanke Date: Thu Apr 24 06:19:32 2014 +0200 Logfiles: open with O_APPEND This does not change the current (normal) behaviour, but allows logrotation via "copy and truncate" as offered by logrotate. Otherwise the processes will remember the offset of the last write and a truncated file is filled with '\0' until the current offset. The mrafsStyleLogs are untouched, since they can be rotated by a kill -HUP and are deprecated anyway. Reviewed-on: http://gerrit.openafs.org/11092 Reviewed-by: Nathaniel Filardo Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Michael Meffie Reviewed-by: D Brashear Tested-by: D Brashear (cherry picked from commit b71a041364d28d6a56905a770cd20d1497ee26ec) Change-Id: Idc148f4d6b9302d25cbf32763d08ee24eaf7378b Reviewed-on: http://gerrit.openafs.org/11193 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Perry Ruiter Reviewed-by: Stephan Wiesand commit 81be318c65e70df4add91838b4de275840c6127c Merge: 9492d2a 3381492 Author: Jeffrey Altman Date: Thu Jun 12 19:21:13 2014 -0400 Merge tag 'openafs-stable-1_6_9' into openafs-stable-1_6_x openafs 1.6.9 commit 3381492d26c2c3677b5f6065e1022c9cfe225c79 Author: Stephan Wiesand Date: Thu Jun 12 10:30:48 2014 +0200 Make OpenAFS 1.6.9 Update version strings and NEWS for 1.6.9 Change-Id: I80fe292dd091a26cbec5d5b4a2fab51e4cf4dee6 commit bc8f62fcdfa479023d15125404d1b13b6dfd6dc3 Author: Jeffrey Altman Date: Wed Jun 11 19:03:45 2014 -0400 Revert "viced: Avoid issuing redundant TMAY requests" This reverts commit 03a9b481c7f27c462c9d65a756d172e79758b86d. Andrew Deason wrote, "Briefly, 'host' structures are allocated without clearing all of the contents to '0'. Only part of the structure is cleared, according to the HOST_TO_ZERO macro. Unfortunately I put the new tmay_ fields right below the 'index' field for some reason, so this means they aren't zeroed and can contain garbage. This means we can easily segfault in the fileserver when we try to access the pointers in there. "We access uninitialized memory for every 'host' that is allocated. So the chance of us corrupting memory is the chance that a particular pointer-sized area of memory from 'malloc' is not already NULL. "That seems pretty likely, but it's not so frequent as to have the fileserver effectively "constantly" crashing at the site that noticed. So it has not been a fire drill, but it has been noticeable (we heard about it I think yesterday, and got details today when it happened again). The noticing incident was a segfault, but an abort or sigbus are probably also likely. "Of course, the chances of noticing go way up with more clients. I expect the chances dramatically increase if you have more than 512 client hosts hit the box, since the first block of 512 are allocated before we really do anything. For the next 512, it seems much more likely that 'malloc' will give us back non-zeroed data. But this is just theory. "With the incident I know about, the crash happened semi-quickly after the server started (a few minutes). But it seems likely to occur after the server has been up for a long time, if/when you cross the next line of 512 hosts. "I am also concerned that this can easily be corrupting memory without being noticed via a crash (or it takes a while to crash), since we are potentially free'ing invalid pointers, or stomping over someone else's memory, etc etc." Change-Id: I20bd40fc9df69247884099a0623e6db40908b3e8 commit 9492d2ac0ca6ff8390713229382fcc5e1adb24ce Author: Michael Meffie Date: Mon May 20 11:32:04 2013 -0400 volser: -log restore operations Add vos restore to the list of operations which are logged when the volserver is running with the -log option. Example log line: admin on 172.16.50.141 is executing Restore 536870969 Reviewed-on: http://gerrit.openafs.org/9926 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Derrick Brashear (cherry picked from commit eb7b3dac482ed0427b6e618bf60507a7a1a99769) Change-Id: If09d8d170c14cfd71c181cbdc87c6027ee570c45 Reviewed-on: http://gerrit.openafs.org/11153 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit c10aa39f31d7000b746d429cd75d74cb9390be0e Author: Antoine Verheijen Date: Mon Apr 8 20:51:52 2013 -0600 Increase size of space for ACL in "up" command. The amount of space allocated for use by the pioctl call to obtain the ACL for the source directory in the "up" command is not large enough and the call fails when access lists get sufficiently large. This change increases the size of the space provided to pioctl to the maximum possible. This allows for much larger access lists and is consistent with a similar call in the "fs listacl" command). Reviewed-on: http://gerrit.openafs.org/9753 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 639453196dd9f71a86e61d2c83e2e8ae0d8bf45f) Change-Id: I4fabbe3fc294c076bd786d43f5e9d2dd0b32e99d Reviewed-on: http://gerrit.openafs.org/11111 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 6609a7dfa4884f8996102e220546ac2023719ad4 Author: Stephan Wiesand Date: Wed May 7 15:20:51 2014 +0200 redhat: Use the right path to depmod As of Fedora 17 and RHEL 7, depmod has moved from /sbin to /usr/sbin. The full path to depmod is used in package scripts and as a dependency. This hasn't caused problems in most cases because on an installed system a link /sbin -> /usr/sbin is present and during ordinary package installations yum/rpm correctly then figure out that /sbin/depmod is actually provided. But in other situations, the dependency check is not that clever and (incorrectly) fails. Add a macro to the spec defining the full path to depmod, use the macro rather than plain /sbin/depmod throughout the spec, and also pass it to kmodtool when required to generate the kmod package scripts and requirements. FIXES 131860 Reviewed-on: http://gerrit.openafs.org/11128 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Perry Ruiter Reviewed-by: D Brashear (cherry picked from commit c20c01185ed748b2bc823369a8f28cf004b7d1c9) Change-Id: Ib9e0bfe586de668ddba6fb82ff1ea2a081277150 Reviewed-on: http://gerrit.openafs.org/11171 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Perry Ruiter Reviewed-by: Ken Dreyer Reviewed-by: Stephan Wiesand commit 0fe14e5487330a161dbbb1d293aba43ac395ddcf Author: Simon Wilkinson Date: Sat Mar 2 11:09:08 2013 +0000 libadmin: Don't double check for required param The server, process and stat_type parameters are declared as required when the command syntax is set up - so they must be present when the command handler is called. So, don't bother checking for them. Caught by coverity (#985963, #985964, #985965, #985966, #985967, #985968, #985969, #985970, #985971, #985972, #985973, #985974, #985975, #985976, #985977) Reviewed-on: http://gerrit.openafs.org/9399 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit f5b462c9d4a56be0ae4696db08fb92a1e7390e2c) Change-Id: I4ea58eadbc97a934bb54a346086cdaf77ab28b9c Reviewed-on: http://gerrit.openafs.org/11048 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: D Brashear Reviewed-by: Dan Hyde Reviewed-by: Stephan Wiesand commit e47d97c8ae316c90ecb636a497c52cdb9a27a935 Author: Andrew Deason Date: Tue Apr 15 12:30:19 2014 -0500 doc: Clarify some BosConfig.new text It is not always clear to users whether BosConfig.new is noticed during an automatic restart, or if it requires stopping and starting the bosserver. Slightly reword the relevant text and add a small note that a "general restart" does cause BosConfig.new to be noticed, so this is explicitly clear. Reviewed-on: http://gerrit.openafs.org/11076 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 3946b50a7ecdfd34681ab471863929b2f82aff4b) Change-Id: Ia630aec6ef5259fc3c3fd531fdf8fda8a4152c54 Reviewed-on: http://gerrit.openafs.org/11216 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 6519f31fd9238864c17cd2fac0a14fda40e47943 Author: Chas Williams (CONTRACTOR) Date: Fri Mar 21 14:35:46 2014 -0400 volser: remove commented code Apparently this predates AFS 3.0 so it should be safe to remove. Reviewed-on: http://gerrit.openafs.org/10935 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cc39ac77c6e8d120a41ffe67a60896463323ab31) Change-Id: Ia034b8a14c000ee2772ba555a45a9776a20aff43 Reviewed-on: http://gerrit.openafs.org/10945 Tested-by: BuildBot Reviewed-by: D Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 08355369c3917392ea1d3eabd420452c2e1361a3 Author: Andrew Deason Date: Wed Mar 27 18:12:41 2013 -0500 afs: Raise fake free space reporting We report 'fake' values for free space, free file nodes, etc for the 'AFS' filesystem, since these values are not meaningful for AFS itself. Currently we report about 9G of free space for most platforms, and a few different values for a few others. Raise all of these to 2^32-1, so that trying to copy over 9G of data into AFS does not fail for those applications that check the destination free space with statfs(2). Note that one such application is KDE 4.8.x. Consolidate all places that do this, and put the 'fake' value in one place, AFS_VFS_FAKEFREE, along with the relevant comments. Related issues reported by Lars Schimmer, Richard Brittain, and others. Reviewed-on: http://gerrit.openafs.org/9688 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Markus Koeberl Tested-by: Markus Koeberl Reviewed-by: D Brashear (cherry picked from commit e385571ba37fa6d43fecca17e9e5d60a22a414cd) Change-Id: Id9b5fa92f48bc83b84bb4f50bc0ae25b028694b0 Reviewed-on: http://gerrit.openafs.org/10984 Tested-by: Andrew Deason Reviewed-by: D Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 9e227094914d1a74b64f247cb74793c429930b25 Author: Stephan Wiesand Date: Thu Apr 10 17:59:24 2014 +0200 fs: Fix improper use of readlink readlink returns a non-NUL terminated buffer. If we are going to terminate its response, we need to make sure that there's space to do so. So the length passed to readlink should be one less than the real length of the buffer. This is a 1.6-only change It is inspired by commit 25011b4544e48dffd5978201669f7b9e23da3144 which cannot be cherry picked due to other missing commits on the 1.6 branch, like 763ec5250deef6f0f8ae1c85b52bac3ffc1a6176. Change-Id: I5c3f2946f7c1b8e935ae46bc195f58e207e115d6 Reviewed-on: http://gerrit.openafs.org/11054 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit d08e048e57906574d3e505a345e0935d1df2dba4 Author: Stephan Wiesand Date: Fri Feb 28 18:47:12 2014 +0100 bozo: remove obsolete bnode_Deactivate() prototype Commit 54eb2485b59550ba42569ed3a8d76211a3a35019 removed the implementation of bnode_Deactivate(), which had been #ifdef'd out for a long time, but left the prototype in place. Remove the obsolete declaration in bosprototypes.h as well. Reviewed-on: http://gerrit.openafs.org/10868 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Jeffrey Altman (cherry picked from commit 01a7c64e472c241798306e7f8137de28efdef37e) Change-Id: Ic1ca95ef455705a14cf68f0801d73789cc7bd4b5 Reviewed-on: http://gerrit.openafs.org/11192 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 5382e9f9adadd0851615e697876134e3a2c8e21e Author: Stephan Wiesand Date: Fri Mar 14 14:44:54 2014 +0100 bos: Change the remaining use of ktc_to_charptr to char cast This is a 1.6 only change to complement the preceding commit. On the master branch, this modification is part of commit a9b8fd81bf14c04d33113e9e4df4e1ca7573e49d which otherwise comprises changes not foreseen to be applied to 1.6. Change-Id: I44678c2fb15f136d70f2d38a3996ad3d7d0455d5 Reviewed-on: http://gerrit.openafs.org/10891 Reviewed-by: D Brashear Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 98d8b56c7d9a1865492fe4bb23d28674162b7050 Author: Simon Wilkinson Date: Thu Apr 5 15:50:35 2012 -0400 bos: Change to using char casts for ka functions The ka_IsZero and ka_PrintBytes function just use char strings. Cast directly, rather than going via a helper functions to simplify this code. The helper functions add complexity, and additional dependencies which cause problems with some uses of this code. Reviewed-on: http://gerrit.openafs.org/7066 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 46c5aabfc6f5af2875e8b20252a17955ad89dd38) Change-Id: Ifee3178e5cdc2eab947f759541864ecea4345b7a Reviewed-on: http://gerrit.openafs.org/10867 Reviewed-by: D Brashear Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 6c591b74e4c4ecd1653efc46c4dca15fd0b748d7 Author: Ken Dreyer Date: Wed Mar 6 13:53:29 2013 -0700 doc: recommend cleanup steps in "vos convertROtoRW" man page vos convertROtoRW leaves the older RW copy on the original fileserver, although it is no longer in the VLDB. Provide the user with some hints regarding clean up. Reviewed-on: http://gerrit.openafs.org/9408 Reviewed-by: Ken Dreyer Tested-by: Ken Dreyer (cherry picked from commit 279345c231d0a2d9f6e8c2f76a5347bafd40e70b) Change-Id: Id273ab86bfe68f89ef629f0c4d839882852e09ab Reviewed-on: http://gerrit.openafs.org/11126 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Ken Dreyer Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 63e35976933c8e24c2153fb55a46842a8dc04414 Author: Ben Kaduk Date: Wed Jul 17 15:00:11 2013 -0400 bozo: Remove dead code and minor cleanup This stuff has been #if 0'd for ages; put it out of its misery. While here, remove the global bnode_waiting which is not used for anything. bnode_SoftInt claims to return a pointer, so return NULL instead of 0. Reviewed-on: http://gerrit.openafs.org/10284 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 54eb2485b59550ba42569ed3a8d76211a3a35019) Change-Id: Ife2604f1a99ef81e2075a82cb97d94ae5373031c Reviewed-on: http://gerrit.openafs.org/10864 Reviewed-by: D Brashear Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit ef449bc73ea35130f83d15fba4b497c972f50f70 Author: D Brashear Date: Tue Apr 22 11:38:44 2014 -0400 linux: make reading unixusers from proc actually work our indentation did not match our braces so we would never read all the objects in each unixuser hash chain. add the missing braces Reviewed-on: http://gerrit.openafs.org/11094 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: D Brashear (cherry picked from commit 279e01051600f0884ed3669786543578e53cf518) Change-Id: If8d4faf8a9cc301d231c1f7b11ab5bb9ca721451 Reviewed-on: http://gerrit.openafs.org/11093 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Ken Dreyer Reviewed-by: Nathaniel Filardo Reviewed-by: Stephan Wiesand commit 6cdeb497923b11b94de08a32f784c04871a25970 Author: Simon Wilkinson Date: Mon Mar 4 16:34:20 2013 +0000 butc: Init volheader before using it for hton When converting a volume header from host to network order, make sure that any unused fields in the structure are zero'd, so we don't end up filling them with stack garbage in the network version of the structure. Caught by coverity (#985956) Reviewed-on: http://gerrit.openafs.org/9548 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 21166744bf15f13bc04c25d68a28fe803a960b0a) Change-Id: I7156cc51f52a8c9911d6ce087ba0a6b1cc0d9a9e Reviewed-on: http://gerrit.openafs.org/11065 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 7597fdda3ff949077829727c26f4bd289c4ae285 Author: Simon Wilkinson Date: Mon Mar 4 16:22:08 2013 +0000 upserver: Don't overflow file and hostname buffers If the user specifies a ridiculously long command line, don't overflow the filename or hostname buffers with what they supply. Caught by coverity (#985911) Reviewed-on: http://gerrit.openafs.org/9546 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d672d5ee78d7673f3c42a7a343989b2bd4dca02b) Change-Id: Id86f5488bfb3bbf5794af43e9f8fe84a2fe796c3 Reviewed-on: http://gerrit.openafs.org/11064 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit fd403e3f2ad74e7d568a4982d99af1acba305b55 Author: Simon Wilkinson Date: Sat Mar 2 13:01:14 2013 +0000 auth: Don't overflow buffer in CompFindUser The fullname buffer in CompFindUser is theoretically big enough to take the data usually supplied to it. However, play it safe by using strlcat and strlcpy to catch buffer overflows. Caught by coverity (#985771) Reviewed-on: http://gerrit.openafs.org/9543 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit cc95fca8e16f83d7dda3f09a5133dc9294299d61) Change-Id: I900611e13d6254c4410915b0688b18a3b6c4acc3 Reviewed-on: http://gerrit.openafs.org/11063 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 19bcc0ab08ad6b1080688ce06b2e9300610bbc33 Author: Simon Wilkinson Date: Sat Mar 2 12:38:49 2013 +0000 audit: Fix overflow in file backend If the filename passed to open_file was larger than MAXPATHLEN-5, then we'd overflow the oldName buffer when creating the backup filename. Fix the overflow by using a malloc'd buffer instead. Caught by coverity (#985767) Reviewed-on: http://gerrit.openafs.org/9448 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b0b3def56c15161df28059e270f0360c31241217) Change-Id: I3993de8e4372c30d35e6e675042511f85ba9d014 Reviewed-on: http://gerrit.openafs.org/11062 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 2c3b0c239285b2f503c5c745648a710cb84af130 Author: Simon Wilkinson Date: Sat Mar 2 12:21:06 2013 +0000 aklog: Fix buffer overflows in next_path Use strlcpy and strlcat Caught by coverity (#985765) Reviewed-on: http://gerrit.openafs.org/9447 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit f4373e7867abd50b3fe39716073811794fe62379) Change-Id: I45d3be18e2975443ce2135f4057128e51d995fa2 Reviewed-on: http://gerrit.openafs.org/11061 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit e49026b294d3b625baba2a91dab65e3d2e0050a7 Author: Simon Wilkinson Date: Sat Mar 2 12:15:22 2013 +0000 aklog: Protect against overflows from cmdline The cell, realm and path arrays are populated based on the user's command line, and xlog_path is populated from their passwd map entry. Protect against all of these overflowing, by making suitable use of strlcpy and strlcat. Caught by coverity (#985764, #985904) Reviewed-on: http://gerrit.openafs.org/9446 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 2902ef93976fd4baa1a1ed07f4940c5979702856) Change-Id: I1c8b72aa087902e45cef758844193949471170c5 Reviewed-on: http://gerrit.openafs.org/11060 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 110b2b674f0e2fda46d01a0b038c49bcc410cca4 Author: Simon Wilkinson Date: Sat Mar 2 12:09:42 2013 +0000 aklog: Avoid overflows in get_afs_mountpoint When working with the fixed length cellname buffer, use strlcat and strlcpy rather than strcat and strcpy. Caught by coverity (#985763) Reviewed-on: http://gerrit.openafs.org/9445 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 19d2683d711f95165adc16fac765bb4a31c99043) Change-Id: I91c169380600496a8b5148fffcb1a21feb1eee29 Reviewed-on: http://gerrit.openafs.org/11059 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit a68deb7fc5719b2399e3e1d063f9681f6aa4bf31 Author: Simon Wilkinson Date: Sat Mar 2 12:04:46 2013 +0000 aklog: Fix overflows in auth_to_path In the auth_to_path routine, don't use strcpy and strcat when working with the fixed length pathtocheck buffer. Instead, use strlcpy and strlcat to ensure that all string operations fit within the buffer limits. Caught by coverity (#985762) Reviewed-on: http://gerrit.openafs.org/9444 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 788a6b67a088e2565c3b47ecb6e594a7b15f2757) Change-Id: I9abb8ab33da1d72e42764969e5527d443eea9652 Reviewed-on: http://gerrit.openafs.org/11058 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit ba71a23fd47ee603eba670259caf96b8618fc8cc Author: Simon Wilkinson Date: Sat Mar 2 12:00:47 2013 +0000 afsmonitor: Fix theoretical overflow of handler string Don't do an unbounded copy into the thresh structure's handler string, in case the caller has passed us a string which is too long. Instead, switch to strlcpy for all string copies. Caught by coverity (#985761) Reviewed-on: http://gerrit.openafs.org/9443 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 95cd5b1d950ecb820179e4279b8570d8ad6780f5) Change-Id: Id8d7f3b97ac3ccbf65862d61b2f9e9d39baeb162 Reviewed-on: http://gerrit.openafs.org/11057 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 7eb63cd21ee57312ca71930d59f49177d80f4f2a Author: Simon Wilkinson Date: Sat Mar 2 10:27:47 2013 +0000 util: Avoid overflow in GetNameByINet We copy the results of gethostbyaddr into a fixed length buffer without checking whether they fit. Add a length check, and use strlcpy to do the copy to make sure we can't overflow. Caught by coverity (#985912, #985872) Reviewed-on: http://gerrit.openafs.org/9393 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit fcb7974b838c2b37a8b81b88b11905c6ece398f6) Change-Id: I2d7f781c159999e721504cd6eec408db93bb703c Reviewed-on: http://gerrit.openafs.org/11056 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 5ad98f49dfb52b9f20375a9163ec17dd184523b3 Author: Simon Wilkinson Date: Sat Mar 2 09:35:01 2013 +0000 kauth: Don't overflow stack when building username knfs constructs the userName by combining the clientName.name and clientName.instance arrays, along with a dot separator. Make sure that the userName array is big enough to hold these, and use strlcpy and strlcat just to make sure. Caught by coverity (#985829) Reviewed-on: http://gerrit.openafs.org/9351 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit cc194827a841f057654f1dbe4dcb3f6de98c1c60) Change-Id: Iec62a0e0fb830e8bfc76896733269d0511c5a8d9 Reviewed-on: http://gerrit.openafs.org/11055 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit cb1c5ddb307db2d4f7a9e3e9627b8576fc1aa9e5 Author: Simon Wilkinson Date: Sat Mar 2 11:49:13 2013 +0000 fstrace: Don't read uninitialised data The pftix variable points to the next free element in the printfTypes array, so when we iterate through that array to read that data back, we should stop when our iterator equals pftix, not when it is greater than it. Caught by coverity (#986013) Reviewed-on: http://gerrit.openafs.org/9442 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 908105fe8d51551e45692de4e145022138a0356c) Change-Id: I2dec4dc3b041093e1d1ac2ea4546a341e9b00687 Reviewed-on: http://gerrit.openafs.org/11053 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit c5d1f3130dc2943de19e3a40b84500eb84078a79 Author: Simon Wilkinson Date: Sat Mar 2 11:44:02 2013 +0000 readpwd: Make sure user supplies a passwdfile If the user supplies enough command line arguments, but doesn't provide a passwdfile, then we can end up trying to open whatever garbage is on the stack. Once we've finished parsing the command line arguments, make sure that a filename was supplied. Caught by coverity (#986009) Reviewed-on: http://gerrit.openafs.org/9441 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit d81271640891fb8c364e8625e7a9f6ede21572f4) Change-Id: I66d38c04c0f9519c401d3299e7d3ece57d001d96 Reviewed-on: http://gerrit.openafs.org/11052 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 6682261c9fdc0ea76a96b166fba2746b421dee02 Author: Simon Wilkinson Date: Sat Mar 2 11:44:02 2013 +0000 readgroup: Make sure user supplies a groupfile If the user supplies enough command line arguments, but doesn't provide a groupfile, then we can end up trying to open whatever garbage is on the stack. Once we've finished parsing the command line arguments, make sure that a filename was supplied. Caught by coverity (#986008) Reviewed-on: http://gerrit.openafs.org/9440 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 3c564444cf1c0bad25792b10edc158030e180369) Change-Id: I8d0bb6ec6a39ad095959ede0252dc6f00777515e Reviewed-on: http://gerrit.openafs.org/11051 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit de7353838a0ed78eb7bc797ce75be2a1605455b3 Author: Simon Wilkinson Date: Sat Mar 2 11:36:31 2013 +0000 libadmin: Don't pass garbage to pts_UserCreate The libadmin pts_UserCreate function uses the value passed to it in newUserId to control whether the user is being created with a user supplied ID or not. Initialise this value in the caller, so we don't end up creating users with corrupt ids. Caught by clang (#985979) Reviewed-on: http://gerrit.openafs.org/9401 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 5cf4415c8ad400a92fc9c7f436ae52256db2ef09) Change-Id: I0e91352a98f63b386185abf9860dc056cb775821 Reviewed-on: http://gerrit.openafs.org/11050 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit ce9230839696af7f6fbcca23364f9ee0fdf2e759 Author: Simon Wilkinson Date: Sat Mar 2 11:36:31 2013 +0000 libadmin: Don't pass garbage to pts_GroupCreate The libadmin pts_GroupCreate function uses the value passed to it in newGroupId to control whether the group is being created with a user supplied ID or not. Initialise this value in the caller, so we don't end up creating groups with corrupt ids. Caught by clang (#985978) Reviewed-on: http://gerrit.openafs.org/9400 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit ece7bd669af0c58dcaa2589e093387adb7d1756a) Change-Id: I51750db47f7709406c079c4fbeec561228359e73 Reviewed-on: http://gerrit.openafs.org/11049 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit a78e3a7e673d5d0428e769a8a9f0ea1ccb683d40 Author: Simon Wilkinson Date: Sat Mar 2 11:02:09 2013 +0000 libadmin: Don't free garbage pointer If we jump to the error handler early on in pts_GroupOwnerChange, idlist may not have been used, and so we will end up trying to free stack garbage. Initialise the structure to 0 at the start of the function, so it is always safe to enter the error handler. Caught by coverity (#985962) Reviewed-on: http://gerrit.openafs.org/9398 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 8260d86dda766a21e9f457994e7a3b259ba3a31b) Change-Id: I79f7fe3cba11a2904c644e6747511e3630d74a79 Reviewed-on: http://gerrit.openafs.org/11047 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 37eb63dfaf020dfc17553d33a846bf09a9a9566b Author: Simon Wilkinson Date: Sat Mar 2 10:54:16 2013 +0000 kauth: Use strl* functions in ka_log Switch to using the strlcat and strlcpy functions in ka_log, to avoid potential buffer overflows. Caught by coverity (#985824) Reviewed-on: http://gerrit.openafs.org/9397 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit b535059d48ac592760e2e5b87414d9010143c993) Change-Id: Ie2a3f39e3189492f855729b4ded7a6fa71c43c9c Reviewed-on: http://gerrit.openafs.org/11046 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 43b80fee3dee191fe7d768f2594eb1f57cdda624 Author: Simon Wilkinson Date: Sat Mar 2 10:48:50 2013 +0000 kauth: Handle calls to ka_log with no principal If ka_log is called without a principal string, then the resulting buffer will be garbage, as we don't start with a string for strlcat to append to. Caught by coverity (#985959) Reviewed-on: http://gerrit.openafs.org/9396 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 508674486a5b1b3b25d7f28febb41e8712d8592d) Change-Id: Ib65f63a1a7adef73d56d61ea59adfbca430dff13 Reviewed-on: http://gerrit.openafs.org/11045 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 99795bac249f56e49999117eeaaedaf327f1b15a Author: Simon Wilkinson Date: Sat Mar 2 10:42:27 2013 +0000 vsys: Avoid uninitialised variable warning Initialise the parms array to 0 so that we don't get warnings from the compiler when we call syscall() using it. Caught by coverity (#985949) Reviewed-on: http://gerrit.openafs.org/9395 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit a666bfd67bd14028aac5eb49f1bf02576fb58405) Change-Id: Ia777a33c1332fe9a1f00cc56be3980f0d50b69ea Reviewed-on: http://gerrit.openafs.org/11044 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit da3dc59ce087ff2128a96f4dbf171e7ec38af218 Author: Simon Wilkinson Date: Sat Mar 2 10:15:10 2013 +0000 rmtsys: Don't overflow pathname buffer When we're constructing a homedirectory path to look for the .AFSSERVER file in, we copy the HOME environment variable into a static buffer, with a risk of overflowing that buffer. Instead of using a static buffer, just allocate one with asprintf. Caught by coverity (#985910) Reviewed-on: http://gerrit.openafs.org/9392 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit f322b0ff1ec44d713c23d567f4d304e3dc65e702) Change-Id: I588fecf4caee64915fc2e7730f68f051d6faa92a Reviewed-on: http://gerrit.openafs.org/11043 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 049e7650a81866c4b32b8a5189780d0a4379ea44 Author: Simon Wilkinson Date: Sat Mar 2 10:35:42 2013 +0000 fsprobe: Get rid of unused hostname buffer When we copy the user supplied hostname into the fixed length hnamebuf array, we might overflow it. As we never use this buffer, just get rid of it. Caught by coverity (#985913) Reviewed-on: http://gerrit.openafs.org/9394 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b32d92268f77608b57adf350d963941a94a31604) Change-Id: I09d119745dfdc9545af4912bd27f8ee09ccefd1f Reviewed-on: http://gerrit.openafs.org/11042 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit a5b40254de63ade492da9508b7d0218a7fe07f30 Author: Simon Wilkinson Date: Sat Mar 2 09:59:20 2013 +0000 auth: Don't overflow hostName array afsconf_cell's hostName structure is a fixed length. Don't overflow it by writing whatever comes back from gethostbyaddr into it. Use strlcpy to catch an overflow, and if one occurs, just use "UNKNOWNHOST", rather than a truncated host name. Caught by coverity (#985906) Reviewed-on: http://gerrit.openafs.org/9354 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit fed5dac9f25f7fbd74b6834ce6f087eaf31be2f2) Change-Id: I468f66585e19623d62dee8730141767bd050ed1d Reviewed-on: http://gerrit.openafs.org/11041 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 06f0b6022342879c5519ff1bd0f272e1bff4538a Author: Simon Wilkinson Date: Sat Mar 2 09:47:53 2013 +0000 libadmin: Don't overflow volume name The maximum volume name length in the VLDB RPCs is VL_MAXNAMELEN (65), not 64 as used as a hardcoded value in vsprocs. Switch to using the defined value, and also use strlcat to check that we don't overflow this. Caught by coverity (#985849) Reviewed-on: http://gerrit.openafs.org/9353 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 79abe9d68ea041a2ea6261c6f7bb1f055a45bf0a) Change-Id: I0e1dd46be835e74fc43335606bf5ab8341678251 Reviewed-on: http://gerrit.openafs.org/11040 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit e6984f84d53115810e7936b8ee240b3a67789e56 Author: Michael Meffie Date: Fri Mar 28 17:08:46 2014 +0100 volser: fix spurious strcat of volume extension. Fix malformed merge error left over from commit 4f9ec8396d1c7f12f8fa264cea7c255ce62b7b8d where we converted strcat to strlcat. Reviewed-on: http://gerrit.openafs.org/10963 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit e6110959e802bd9ae60e3724ba41078e7b335bab) Change-Id: I3ac39245f9151f319ab5d5bb6b6d17dd13446ac1 Reviewed-on: http://gerrit.openafs.org/11039 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit fe288204f65298e494b5ea8bc031ae9c9b798364 Author: Simon Wilkinson Date: Sat Mar 2 09:47:53 2013 +0000 volser: Don't overflow volume name The maximum volume name length in the VLDB RPCs is VL_MAXNAMELEN (65), not 64 as used as a hardcoded value in vsprocs. Switch to using the defined value, and also use strlcat to check that we don't overflow this. Caught by coverity (#985849) Reviewed-on: http://gerrit.openafs.org/9352 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 4f9ec8396d1c7f12f8fa264cea7c255ce62b7b8d) Change-Id: I7e2dfcaf23312dde123515e2c7329df1fa62de3e Reviewed-on: http://gerrit.openafs.org/11038 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit e511a4069e30ecf14375f58380972b17b04e0fc2 Author: Simon Wilkinson Date: Sat Mar 2 09:33:12 2013 +0000 kauth: Don't overflow cell string The cell string within a ktc_principal is only 64 characters long. Be careful not to overflow it. Caught by coverity (#985829) Reviewed-on: http://gerrit.openafs.org/9350 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 77aa6c65b74e46c77dfaf440745496ab98b14244) Change-Id: I7e0411ce635d481cf1618c2eabf79dfb85fcd069 Reviewed-on: http://gerrit.openafs.org/11037 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 286f9e47d97c55bd8724a65350cf162478eea87c Author: Simon Wilkinson Date: Sat Mar 2 09:26:05 2013 +0000 auth: Don't overflow cell string If the kernel gives us bogus data back from the VIOCGETTOK pioctl, we might overflow the cell string when copying in to it. Use strlcpy to avoid this (unlikely) occurrence. Caught by coverity (#985768, #985769) Reviewed-on: http://gerrit.openafs.org/9349 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 362728d2d6d53011603dc39f691707db20866434) Change-Id: I839c330a232525ddccc7957ead785c7ed9beec88 Reviewed-on: http://gerrit.openafs.org/11036 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit e56dfc5c2c97e1429924c44acce56bde8486ac8b Author: Simon Wilkinson Date: Sat Mar 2 09:16:10 2013 +0000 aklog: Fix improper use of readlink readlink doesn't NUL terminate its return string, so it is up to us to do so. Caught by coverity (#985739) Reviewed-on: http://gerrit.openafs.org/9347 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 2fac53522e7ef5b3a376e191bffdc1f6784e6995) Change-Id: I9d47a6a7cbc86fba3f68f7e47c5d7a0fb924781f Reviewed-on: http://gerrit.openafs.org/11035 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 82f66b96fac2deb8e8afe189d51d1b003f72f111 Author: Simon Wilkinson Date: Sat Mar 2 09:01:59 2013 +0000 vlserver: Use correct literal in bounds check The base array has VL_MAX_ADDREXTBLKS elements. Use this when checking for an array overflow, rather than VL_ADDREXTBLK_SIZE. Caught by coverity (#985600) Reviewed-on: http://gerrit.openafs.org/9346 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 6a54bf735871d93bc77e5cf166e506f4f2423d0a) Change-Id: I056432a1bf85b175ee4fc307d0662d072724b272 Reviewed-on: http://gerrit.openafs.org/11034 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit b76b80bb08173edb5d2423c4edcd951b6630c679 Author: Simon Wilkinson Date: Fri Mar 1 11:35:05 2013 +0000 rxgen: Don't overflow PackageIndex PackageIndex++ returns the pre-index value of PackageIndex, so the error statement isn't run when PackageIndex == MAX_PACKAGES. This means we go on to overflow all of the arrays that are MAX_PACKAGES in size. Caught by coverity (#985583, #985584, #985585, #985586, #985587, #985588, #985589) Reviewed-on: http://gerrit.openafs.org/9325 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit a1d8109c8fa8c10e3ce5ed67cda03b3b557608ff) Change-Id: I5278bff5fe6be1bf127b240f7752c69385a9da24 Reviewed-on: http://gerrit.openafs.org/11033 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 2e644c3d860b5576be0cdf69b09b554fc4af1542 Author: Simon Wilkinson Date: Fri Mar 1 11:09:04 2013 +0000 bucoord: Remove theoretical overflow of ubik array The ubik connections array is NULL terminated, so we have to ensure that there is enough space for the trailing NULL. As the array is MAXSERVERS elements long, this means that we can only store MAXSERVERS-1 connections in it. This problem will never be encountered by the correct code, as the number of hosts returned from afsconf_Open is capped at MAXHOSTSPERCELL (currently 8). MAXSERVERS is currently 20. However, fix the bug in case we increase MAXHOSTSPERCELL at some point in the future. Caught by coverity (#985576) Reviewed-on: http://gerrit.openafs.org/9322 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit c0fba6eab519bd1bb6929b788361219f97da7212) Change-Id: I1e2556df6867ebb7b6b311e54a0271fb6fe631fd Reviewed-on: http://gerrit.openafs.org/11032 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 16bef5a55429feb067d7db163e102e6322e75485 Author: Simon Wilkinson Date: Fri Mar 1 10:52:32 2013 +0000 xstat: Add the residency RPC to the list of fs ops Include the ResidencyRpc in the list of fs operation numbers that can be display by xstat_cm_test. Caught by coverity (#989029) Reviewed-on: http://gerrit.openafs.org/9320 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 64630d07b893199431b601a73de23c303c61db40) Change-Id: If14fb4e6929ea667b2dde18b381ab5c59c6bf8db Reviewed-on: http://gerrit.openafs.org/11031 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 08002c553bda0a7bfa60a4d269b57f5b168e6668 Author: Simon Wilkinson Date: Thu Feb 28 22:07:12 2013 +0000 libadmin: Don't free garbage Make sure that we initialise the nbulkentries structure to 0 before we start work, so that if the failure handler is called, it doesn't try to free garbage. Caught by coverity (#985980) Reviewed-on: http://gerrit.openafs.org/9317 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit bf78bf2c115659b78c34d3bc9d1934bcff21c8cc) Change-Id: I24536b0bec47f381eee7cfcbe1feb89c373cca0f Reviewed-on: http://gerrit.openafs.org/11030 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit e73905634170b2708386bc0697f87dad1614a4be Author: Simon Wilkinson Date: Thu Feb 28 17:14:20 2013 +0000 afsmonitor: Fix multiple NUM_CM_STAT_ENTRIES overflows If an array is n elements long, accessing element array[n] is an overflow. Fix various places where we apply loop bounds incorrectly using the NUM_CM_STAT_ENTRIES constant. Caught by coverity (#985571, #985573) Reviewed-on: http://gerrit.openafs.org/9316 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 3beca62928665868294ec3e9d34ab63b41e12645) Change-Id: Icb2221409d7cd62a7efa229697eeb16146ad3ddd Reviewed-on: http://gerrit.openafs.org/11029 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit ab2077b4646e612a4d51b0216344c4e63c165c1b Author: Simon Wilkinson Date: Thu Feb 28 17:14:20 2013 +0000 afsmonitor: Fix multiple NUM_FS_STAT_ENTRIES overflows If an array is n elements long, accessing element array[n] is an overflow. Fix various places where we apply loop bounds incorrectly using the NUM_FS_STAT_ENTRIES constant. Caught by coverity (#985570, #985571, #985572) Reviewed-on: http://gerrit.openafs.org/9315 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 4ea1c8440aad6bb6dc9cdb598b5708c685603219) Change-Id: I028fcb13716ba60266635a1f04f2dda083cba1a3 Reviewed-on: http://gerrit.openafs.org/11028 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit d2d2b5759006dcb6e1820c528f88339867db183c Author: Simon Wilkinson Date: Thu Feb 28 17:07:31 2013 +0000 afsmonitor: Add missing items to fsOpNames array The Lookup and Residency fs stats counters were missing from the fsOpNames array. Add them in - Lookup has been missing since the IBM release, Residency was missed when the MR-AFS code was merged. This is still rather fragile, as there's no guarantee that AFS_STATS_NUM_FS_RPC_OPS matches the number of elements in this array. However, this is now correct until someone breaks it again... Caught by coverity (#985569) Reviewed-on: http://gerrit.openafs.org/9314 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 74d0d0d5e686d82e18f896889870af666c4d495d) Change-Id: Iac7275fd9dd9a2fa5fe163ba96a15d32d4e5d05e Reviewed-on: http://gerrit.openafs.org/11027 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 564573da48f61e5d96d5df017d25a39c930d566f Author: Simon Wilkinson Date: Thu Feb 28 12:15:29 2013 +0000 dumptool: Remove newlines safely The code currently does fgets(cmdbuf, ... ); cmdbuf[strlen(cmdbuf - 1)] = '\0'; in order to remove new lines from cmdbuf. Coverity thinks there's a danger of strlen(cmdbuf) being 0, and thus the strlen being negative. That shouldn't happen, but if fgets hits EOF midway through a line, we might get a string that doesn't have a trailing '\n', and end up removing the wrong character. Tidy this up by checking that the string isn't 0 length, and that the character we're zapping is a newline. Caught by coverity (#985430) Reviewed-on: http://gerrit.openafs.org/9310 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 8f51502e5f45a43fba130d260813716be894d51e) Change-Id: Ie165c8e50c4071c07fffa220601c8b5e92ccf815 Reviewed-on: http://gerrit.openafs.org/11026 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 113ede2a6b43551efe9df19774202e91730dfe11 Author: Simon Wilkinson Date: Wed Feb 27 10:28:05 2013 +0000 Unix CM: Don't free cell, then release lock on it If afs_NewCell fails, then we can end up releasing a lock on a section of memory that we have already freed. As this only happens if the memory we're operating on is newly allocated and not yet visible to anyone else, it is safe to release the lock before starting to tidy things up. Caught by coverity (#986054) Reviewed-on: http://gerrit.openafs.org/9298 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 816b0c76738b7e404c9384a745b58b4d90bfc30d) Change-Id: I7976f00431e4dc96642b45fc7563485a5087c938 Reviewed-on: http://gerrit.openafs.org/11025 Reviewed-by: Nathaniel Filardo Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 206d6d9271504cad16326bcb717146ea5b3eed35 Author: Simon Wilkinson Date: Wed Feb 27 10:11:21 2013 +0000 libafscp: Can't unlock something we've freed When we call _StatCleanup on a stored statent structure, it deletes the mutex, and frees the structure itself. This means it can't be called with a locked structure as the mutex deletion will fail, and then we'll try to reference freed memory when we later unlock that mutex. Fix this by unlocking the mutex before calling _StatCleanup. This is safe because the only reference to the structure visible to other threads must have been deleted by the time we reach this point. Caught by coverity (#986058, #986059) Reviewed-on: http://gerrit.openafs.org/9297 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit ce20f1f15103226667bc872378cf9b2e4b3e8cd7) Change-Id: Id89df6302002224ec2f871f18711e781990f73d3 Reviewed-on: http://gerrit.openafs.org/11024 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 7863332ab7a88dd1aaa3c5bd2138622c57ee6197 Author: Michael Meffie Date: Tue Apr 30 11:30:15 2013 -0400 pt_util: fix group line check for input files Fix the check for requiring group lines before any membership lines. Do not clear flag indicating the presence of a group after reading each line. (This error was caught by the pt_util-t unit test.) Fix for commit 12ced70c95fe8efbcec09a372f0af81d819bb8cd Reviewed-on: http://gerrit.openafs.org/9832 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9c391e7f7d0e5dfdfe947d385e2db9a8b8ca3610) Change-Id: I6414f78d7611c61628aaacb4ae41111dbeec0d89 Reviewed-on: http://gerrit.openafs.org/11148 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit cf4f1c7775f445987d8df1a4b4c4c7a12a0928e8 Author: Simon Wilkinson Date: Wed Feb 27 09:23:07 2013 +0000 pt_util: Protect against corrupt input files If we have an input file which contains a group membership line (with a leading space) before any group definitions occur, pt_util would use stack garbage as the group to create these members in. Avoid this by requiring the presence of a group line before any membership lines. Caught by coverity (#92180, #986000, #92248) Reviewed-on: http://gerrit.openafs.org/9296 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 12ced70c95fe8efbcec09a372f0af81d819bb8cd) Change-Id: I1ad524ed701e78ebe5b2e990168782a75d69613b Reviewed-on: http://gerrit.openafs.org/11023 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 464ea3abdc46a31729cf8389fe8bba66706d65ae Author: Simon Wilkinson Date: Wed Feb 27 09:21:30 2013 +0000 pt_util: Catch sscanf failures If there isn't sufficient data in the input line to satisfy sscanf, fail with an error, rather than continuing with potentially corrupt data. Reviewed-on: http://gerrit.openafs.org/9295 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 62a10e063b4fe6721bd9768611d5f0c13b303189) Change-Id: I7b9cff1d106538496c6d554291710f73fd6b5370 Reviewed-on: http://gerrit.openafs.org/11022 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 3afc0fdfcfef07d11046a34b8c74ad0f7b1bb9ad Author: Simon Wilkinson Date: Tue Feb 26 22:40:04 2013 +0000 kauth: Fix overflow when writing ticket file krb_write_ticket_file uses a fixed length buffer to store the name of the ticket file, but copies into this from an environment variable. Remove the fixed length buffer, and use a mixture of the variable itself, and dynamically allocated strings. Caught by coverity (#985909) Reviewed-on: http://gerrit.openafs.org/9294 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit a332ce9d0e87fab55f3d286690026fe075f624dd) Change-Id: Idcf442323b13cc4daa893917ede6492616ba1aeb Reviewed-on: http://gerrit.openafs.org/11021 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 7822702cf80de1902de5fe8fe0e7128690622a6f Author: Simon Wilkinson Date: Tue Feb 26 22:31:49 2013 +0000 auth: Refactor afsconf_Open failure handler Refactor the code which returns a failure from afsconf_Open into a single section, rather than having multiple copies through out the routine. Reviewed-on: http://gerrit.openafs.org/9293 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit a5324a6bb6ff127997c48b54f8ad0e98189f3f1e) Change-Id: I03f963b717c8095914dd994d7d5612bf57148ce7 Reviewed-on: http://gerrit.openafs.org/11020 Reviewed-by: Perry Ruiter Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 13515489cbfd138d221d54bdedc4bf44ff24778e Author: Simon Wilkinson Date: Tue Feb 26 22:27:25 2013 +0000 auth: Fix buffer overflow in afsconf_Open If we fallback to the .AFSCONF file in the user's homedirectory, the results of getenv("HOME") are copied into a fixed length string, without checking for overflows. Instead of risking this, just use asprintf to dynamically construct a string, and free it when we are done. Caught by coverity (#985905) Reviewed-on: http://gerrit.openafs.org/9292 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 41d9ea697bf5e81e5003ad7b208788223c25536b) Change-Id: I5b8664328dd0d397cbe459ff1e7667e63afc31e2 Reviewed-on: http://gerrit.openafs.org/11019 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 2ae05022bfd083f2095565636ab0251ff5204a85 Author: Simon Wilkinson Date: Tue Feb 26 21:30:20 2013 +0000 bos_util: Fix buffer overflow Get rid of a buffer overflow in the bos_util utility, by just printing the key from the 'tbuffer' string, rather than copying it into 'x' which is too small for it. Reviewed-on: http://gerrit.openafs.org/9291 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit debf43714b0f00fa00a0ef3384e098de78d28ed6) Change-Id: If8b075691defeded972d0eff29b7fb594680e433 Reviewed-on: http://gerrit.openafs.org/11018 Reviewed-by: Nathaniel Filardo Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit adc34642923d8969c3aa6bc73d90e0817ba57a8e Author: Simon Wilkinson Date: Tue Feb 26 21:28:52 2013 +0000 volser: Fix bad readlink usage readlink fills the buffer passed to it with a non-terminated string. It can legitimately fill the whole of this buffer. So, if we require a string to be NUL terminated, we must give readlink one less than the string length so that the termination character can be safely appended. Caught by coverity (#985611) Reviewed-on: http://gerrit.openafs.org/9290 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit ddc37043351056c402158610477312f0d7d01c13) Change-Id: Ic3aa9f767b3dce988e32ce670763791f17e72aa2 Reviewed-on: http://gerrit.openafs.org/11017 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit ac970305e80c8d43c7bc3a85e9486f0fc3d75b69 Author: Simon Wilkinson Date: Tue Feb 26 20:52:47 2013 +0000 afsmonitor: Use NULL, rather than (struct foo *)0 Reviewed-on: http://gerrit.openafs.org/9285 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit caabad98232557220f153461520fc0cf1c6978fb) Change-Id: Ie1e0e1bb4dcae88f17c592b4ebccaef227298190 Reviewed-on: http://gerrit.openafs.org/11016 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 588252806a478e36e59a6dfdb2c470eff6c3e25a Author: Simon Wilkinson Date: Tue Feb 26 20:51:34 2013 +0000 afsmonitor: Check correct variable is non-NULL Before freeing curr_fsData, check that it is non-NULL, rather than checking prev_fsData in error. Caught by coverity (#985289) Reviewed-on: http://gerrit.openafs.org/9284 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 5a61e826fa0de6a5987f06257199476f79d2473a) Change-Id: Ie63e90f8873f4fbe8afc7abee160a090920add4d Reviewed-on: http://gerrit.openafs.org/11015 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit f40cc4dbdfb5ace884fcc84f0949316840cc6c6f Author: Simon Wilkinson Date: Tue Feb 26 12:30:00 2013 +0000 ptserver: Zero ubik header before writing to it When using pt_util's ubik shim, if we're creating a new ubik label make sure to zero the whole structure before writing it out to disk. Otherwise we get a shorts worth of stack garbage in the resulting file. Caught by coverity (#986010) Reviewed-on: http://gerrit.openafs.org/9274 Reviewed-by: Derrick Brashear Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 96131593b329a319b22368a9ef37788fb4e5d4f4) Change-Id: I9b2b22c075bf896a74f4b527354c8a6758ac2865 Reviewed-on: http://gerrit.openafs.org/11013 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 2c37afa50fd01e8208c55056895de0e140fad966 Author: Simon Wilkinson Date: Tue Feb 26 12:26:36 2013 +0000 ptserver: Rename ubik.c as ptubik.c Coverity gets confused between ubik/ubik.c and ptserver/ubik.c, and produces a load of false positives. Rename the ptserver ubik shim (which is only used by pt_util) in order to reduce this confusion. Reviewed-on: http://gerrit.openafs.org/9273 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit daed548f70a2187c679232e4f79d703389419c4e) Change-Id: I834fab3b65859cb73ece3fc52d9272d0b7d452ed Reviewed-on: http://gerrit.openafs.org/11012 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit d5d8de145551c7afaf2aa488712901b2b9c18678 Author: Simon Wilkinson Date: Tue Feb 26 12:06:15 2013 +0000 bosserver: Catch failures to create daemon thread If we can't create the bozo daemon thread, then don't keep going regardless. Just warn the user and exit. Caught by coverity (#988414) Reviewed-on: http://gerrit.openafs.org/9269 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 4587ddc130547b4cce723476cfa798a03ccc0320) Change-Id: I4dcf67f4aeb2533ad39e9b1b0202d00205584118 Reviewed-on: http://gerrit.openafs.org/11011 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 5b0d0785ef6dad2cdc5389d708a7556bbb545da2 Author: Simon Wilkinson Date: Tue Feb 26 11:59:56 2013 +0000 libadmin: Catch VL_GetNewVolumeId failures If ubik_VL_GetVolumeId fails in the vos ProcessEntries routine, report the failure and give up, rather than continuing with a 0 maxVolid Caught by coverity (#988417) Reviewed-on: http://gerrit.openafs.org/9268 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 8192554e36272d5ed21007b4c0e3b6c56511457d) Change-Id: I004386d62dc9d2955a795c4c5952b573ff203784 Reviewed-on: http://gerrit.openafs.org/11010 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit e27aa85f8d07960ceac1c54542373090f2e9cd9e Author: Simon Wilkinson Date: Thu Feb 21 20:36:19 2013 +0000 libadmin: Fix a lot of dead assignments in vsprocs Tidy up a lot of places where we initialise a variable, then immediately assign a proper value to it, or store a return value that we don't actually care about. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9205 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit ee0d57bb488e9fd74b46547273904a9821e20c57) Change-Id: I60f690336bc449f481a5be542ab7369d6e04f4b6 Reviewed-on: http://gerrit.openafs.org/11009 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit d6ea973022fb2a73ccfddb584a34b793b12043d1 Author: Simon Wilkinson Date: Tue Feb 26 11:55:32 2013 +0000 fs: Catch pioctl failure in mkmount If the VIOC_FILE_CELL_NAME pioctl fails in fs mkmount, return an error to the caller, instead of ploughing on with potentially bad data. Caught by coverity (#988418) Reviewed-on: http://gerrit.openafs.org/9267 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 3ad7ba106dea28277b9e1f7a7370ba17b9fb3d17) Change-Id: I239ff7e567b01ecbec0314ec61f79d2fd0064de7 Reviewed-on: http://gerrit.openafs.org/11008 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit bcb20408d6cab347b51f5a6e17e8ec93c36f0685 Author: Stephan Wiesand Date: Sat May 10 20:00:59 2014 +0200 Make OpenAFS 1.6.8 Update version strings for the 1.6.8 release Change-Id: If74aea398c0210807d8e5a1d9236a4c6242ac23f Reviewed-on: http://gerrit.openafs.org/11137 Tested-by: BuildBot Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit 812dd9ea498a49cdadc46ec20daf301c870bfb06 Author: Stephan Wiesand Date: Sat May 10 19:57:13 2014 +0200 Update NEWS for 1.6.8 Finalize the 1.6.8 release notes Change-Id: Ic97d1767ff168b538ce69c15aa8c7f0af4607b1b Reviewed-on: http://gerrit.openafs.org/11136 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit 8d338b5b659211915ecd35cb9a18a8b4cc5424c5 Author: Stephan Wiesand Date: Fri Mar 14 16:01:16 2014 +0100 Make OpenAFS 1.6.8pre2 prerelease for 1.6.8 Change-Id: I1664633e86e218330c729362d5814ec8c160fc5c Reviewed-on: http://gerrit.openafs.org/10894 Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit a983bca3ed7efc4c63d796c8440995531522324c Author: Benjamin Kaduk Date: Fri Jan 24 12:00:20 2014 -0500 FBSD: catch up to 1997 and include if_var.h with if.h The commit message for upstream's r257244 change includes: - Make the prophecy from 1997 happen and remove if_var.h inclusion from if.h. Despite the clear public posting, we were caught unawares. We made it down to the cellar despite the missing stairs, but "Beware of the Leopard" caused us to turn back, apparently. Since if.h is included in many places and if_var.h is not present on all OSes, pull the if.h inclusion into the common kernel headers for afs/ and rx/ , and add in if_var.h (as well as the sys/socket.h prerequisite). Reviewed-on: http://gerrit.openafs.org/10754 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8817308a87ca76bc47a0f5564b97c7942b3be04a) Change-Id: I8a03c7b2a0fe54f987b6d63cac19980f66c80e9d Reviewed-on: http://gerrit.openafs.org/10987 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit dcf389d3ec3c84f4d07f8f9d98cb0835a9b72b28 Merge: 5fe7d84 94ffd11 Author: Stephan Wiesand Date: Wed Apr 9 14:10:35 2014 +0200 Merge branch '1.6-security' into HEAD Conflicts: NEWS configure-libafs.ac configure.ac src/config/NTMakefile.amd64_w2k src/config/NTMakefile.i386_nt40 src/config/NTMakefile.i386_w2k Change-Id: If4cf26d5559229a35b2754957f856350a8100ffb commit 94ffd115f0510fde86339395f88d41d9d56950f4 Author: Stephan Wiesand Date: Thu Apr 3 14:07:58 2014 +0200 Make OpenAFS 1.6.7 Update version strings for 1.6.7 Change-Id: Ia9d931cd5329afb440cfa7da1f139ae669c6e8ae commit ba73b9a766379fc56e6a1724c79b6e0c3cc85e62 Author: Stephan Wiesand Date: Thu Apr 3 13:54:58 2014 +0200 Update NEWS for 1.6.7 Release notes for OpenAFS 1.6.7. Change-Id: I9c331ca0dd01f9617917af326f58fc1944c152d7 commit cde152658dcf5ee31293ed75b9a6cfaf8192f320 Author: Michael Meffie Date: Sat Feb 15 12:03:43 2014 -0500 viced: fix get-statistics64 buffer overflow Range check the statsVersion argument of the GetStatisitics64 RPC to avoid a buffer overflow in the fileserver, or a huge memory allocation, by a rogue client. FIXES 131803 (cherry picked from commit bd2cc32da969abe57334d20563d5cddf065a905e) Change-Id: I05b18b9f4bacd8981eafb9fe4b5aea904f88a9cc commit 19c4d6023c8f616de0d194e560e64576e5986f70 Author: Andrew Deason Date: Fri Feb 21 15:30:49 2014 -0600 rx: Avoid rxi_Delay on RXS_CheckResponse failure Currently we rxi_Delay whenever RXS_CheckResponse fails for any reason. This can result in disastrous performance degradations if a client keeps sending "bad" responses, since rxi_Delay'ing here will delay the Rx listener thread. This means we cannot receive any packets for about a second, which can easily cause us to drop a lot of incoming packets. Instead, send the abort after 1 second by scheduling an event. This will retain existing behavior from the point of view of the client (it will get the abort after 1 second), but avoids hanging the Rx listener thread. FIXES 131802 (cherry picked from commit 0ec67b0a9a175af14e360da75d1f5429c6c97b24) Change-Id: Idf2fb2cc26c013b9071d578b46f6d4831ff3fe5f commit 32688c069f22f3b96e261f2361e251081957a047 Author: Andrew Deason Date: Fri Feb 21 15:26:35 2014 -0600 rx: Split out rxi_SendConnectionAbortLater Take the functionality in rxi_SendConnectionAbort that schedules a delayed abort, and split it out into a new function, rxi_SendConnectionAbortLater. This allows callers an easy interface to send such a delayed abort with their own delay. This commit should incur no change in behavior; it is just code reorganization. (cherry picked from commit 61d80537cae95d125c4b9fed31e2454a281b8b02) Change-Id: I8798ace952bffa0c736ab90e9028fd7c99305a78 commit 5fe7d847f274f90a1ff48a215308b43d3a23266c Author: Stephan Wiesand Date: Fri Mar 14 15:59:29 2014 +0100 Make OpenAFS 1.6.8pre1 prerelease for 1.6.8 Change-Id: I1b0632aa5b76ecff1690fb252eb3427aa17aaad0 Reviewed-on: http://gerrit.openafs.org/10893 Reviewed-by: D Brashear Reviewed-by: Jeffrey Altman Tested-by: Chas Williams - CONTRACTOR Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit b218854d406e7c4aab46aba437234f7254f8a9ce Author: Stephan Wiesand Date: Thu Mar 27 10:27:17 2014 +0100 Update NEWS for 1.6.8 release notes for OpenAFS 1.6.8 Change-Id: I77712d776a2c31eb2c65612768734a4cceaa1d34 Reviewed-on: http://gerrit.openafs.org/10958 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit e6a43bff17019160154726d7f6ed48805ae14cbc Author: Andrew Deason Date: Wed Feb 26 11:42:16 2014 -0600 viced: Restore some previous log message language Before commit 6c41b1f740e16b5b9adfe9026630595be6f0699e, we logged these three messages in the fileserver in different situations: CallPreamble: Couldn't get client. CallPreamble: Couldn't get CPS. Fail CallPreamble: couldn't reconnect to ptserver After commits 6c41b1f740e16b5b9adfe9026630595be6f0699e and 0a5e878aa0a71c4dfaef1806744ed78bcc13b9f4, these messages were changed to contain more useful information, but the language was also changed. The messages now look like: Client host too busy while handling request from host %s:%d viceid %d fid %lu.%lu.%lu, failing request Cannot get CPS for client while handling request [...], failing request Cannot reconnect to ptserver while handling request [...], failing request While the new messages are more informative, and (in my opinion) better describe what is happening in those situations, they do look very different from the old messages. This can break scripts that try to parse these logs, but in general it is also not clear to administrators that these messages still refer to the same events. So instead, put these messages back the way they were. Still include the extra information, of course, but revert the language to look more like the old messages. Now we log: CallPreamble: Couldn't get client while handling request from host %s:%d viceid %d fid %lu.%lu.%lu, failing request CallPreamble: Couldn't get CPS while handling request [...], failing request CallPreamble: couldn't reconnect to ptserver while handling request [...], failing request Thanks to Ben Kaduk for bringing this up. Reviewed-on: http://gerrit.openafs.org/10857 Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Tested-by: D Brashear Reviewed-by: D Brashear (cherry picked from commit 0e9bb718ce231ffd73fe11810d8dc1d3902e4b2d) Change-Id: I35c8369a7efba0c08c000a24e14385209082cfe0 Reviewed-on: http://gerrit.openafs.org/10953 Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 462cc497db11c390e626925d383bdef9c98a1e62 Author: Andrew Deason Date: Thu Oct 17 20:22:48 2013 -0400 viced: Improve client error log messages Commit 6c41b1f740e16b5b9adfe9026630595be6f0699e improved a few log messages to include the client ip and port of the request triggering that log message. Include the viceid and fid (if applicable), too, so an administrator may more easily identify the cause. This creates the function LogClientError, so we can use a common function for logging very similar information. This also modifies h_FindClient_r to give the viceid to the caller, even in the case of error. In addition, this modifies CallPreamble to accept a fid and modifies all callers to accomodate. Reviewed-on: http://gerrit.openafs.org/10347 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0a5e878aa0a71c4dfaef1806744ed78bcc13b9f4) Change-Id: Ib8b41989809e559dee486757b11ccff789d615e9 Reviewed-on: http://gerrit.openafs.org/10757 Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit c4752dca439a12c2be162eb98869ef37d7c43767 Author: Stephan Wiesand Date: Wed Mar 12 10:47:17 2014 +0100 doc: bos setrestricted -mode 0 does make sense Commit 070230ab76e1df338db3f2a7971111ca976a0c1a added documentation of the mode parameter to bos setrestricted, claiming that the value 0 is useless, and commit eee0bf5871944d919951cc8b7b4908ee909c3b62 added documentation of the restrictmode entry in BosConfig, claiming that it can only be set back to 0 with an editor. Both claims are wrong, since bos setrestricted -mode 0 will do exactly that (if it succeeds, which it only can if the server is running in unrestricted mode, which can be achieved by sending it the FPE signal). Fix the man pages accordingly. Reviewed-on: http://gerrit.openafs.org/10885 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Marc Dionne Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: D Brashear (cherry picked from commit da549eea21941681c075796512a27a830259c835) Change-Id: Iea8f252829ba6192176da0ceba464cbc41aad53c Reviewed-on: http://gerrit.openafs.org/10955 Reviewed-by: Andrew Deason Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand commit d138114092426ddda6ff78f380f1042994039dae Author: Andrew Deason Date: Fri Jun 14 15:58:45 2013 -0500 doc: bos manpage fixes Add missing documentation for the -mode option. Reviewed-on: http://gerrit.openafs.org/10390 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 070230ab76e1df338db3f2a7971111ca976a0c1a) Change-Id: I0780fc350840631d55d60c21e6223020ca9a845f Reviewed-on: http://gerrit.openafs.org/10954 Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit cbb2ce7fe1a297191336b2488c9f86cebab5f15d Author: Stephan Wiesand Date: Fri Mar 7 11:03:36 2014 +0100 doc: improve man pages related to bos restricted mode Mention the restrictmode entry and the commands for setting and querying it in the BosConfig man page, and add/fix cross references between the BosConfig, bos, bos_getrestricted and bos_setrestricted ones. Reviewed-on: http://gerrit.openafs.org/10874 Reviewed-by: Ken Dreyer Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit eee0bf5871944d919951cc8b7b4908ee909c3b62) Change-Id: I25d2f23d75a9074ae478f86296bb13c1b2dda95b Reviewed-on: http://gerrit.openafs.org/10883 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 395c04fbca7760979b7bc4e371c1f9f8e1d09858 Author: Michael Meffie Date: Fri Feb 7 06:55:31 2014 -0800 fs: display cell not available on ESRCH The cache manager pioctls abuse ESRCH to represent errors due to unavailable cell information. Give a more sensible error message to the user when a pioctl returns an ESRCH error, instead of "no such process", which is the conventional meaning of ESRCH. The new error message is consistent with the Windows implementation of fs. For example, on a host with a misconfigured ThisCell and/or CellServDB. $ fs wscell fs: No such process becomes: $ fs wscell fs: Cell name not recognized. Reviewed-on: http://gerrit.openafs.org/10824 Tested-by: BuildBot Reviewed-by: D Brashear (cherry picked from commit 8beba712d95b637225f215534a759961ff4d80a9) Change-Id: I0cf6f6e0939a1075332049361153bc8a0b0958ce Reviewed-on: http://gerrit.openafs.org/10949 Reviewed-by: D Brashear Reviewed-by: Andrew Deason Tested-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 7726ef868c9afb0e5447cc4e49944f9dd8fa5738 Author: Stephan Wiesand Date: Fri Mar 14 17:51:49 2014 +0100 doc: fix releases mentioned in fileserver sync behavior documentation The default will likely change in 1.6.8, not 1.6.7. Change-Id: I5f5d62979fabd22ed79ccac6c584921acf571108 Reviewed-on: http://gerrit.openafs.org/10897 Reviewed-by: D Brashear Reviewed-by: Michael Meffie Tested-by: Stephan Wiesand commit f59acadef1f0278fe37f1ad2b07912a0308b2294 Author: Michael Meffie Date: Tue Mar 11 12:40:33 2014 -0400 libafs: reset global icl set pointers on shutdown Avoid panicking when an icl tracing function is called after shutdown_icl. There is a window during shutdown in which pioctls can be requested after the shutdown_icl is issued. Reset the global icl set pointers so tracing is disabled after the shutdown_icl, instead of using pointers to freed memory. Removed the unneeded afs_icl_FindSet calls and use the global pointers which were set during the initialization. Reviewed-on: http://gerrit.openafs.org/10884 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Benjamin Kaduk Reviewed-by: D Brashear (cherry picked from commit 64dd6dd018eb7413636ed6416bd244bb81893d9e) Change-Id: I65671ee60e3cdf11d9921585dcd67df7cc22c88f Reviewed-on: http://gerrit.openafs.org/10932 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: D Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit c24dd7dc74e35cbc79b572eafe2fd47c9108c478 Author: Hartmut Reuter Date: Mon Mar 10 17:21:21 2014 +0100 volser: use also vn_length_hi in dump size calculation Only the low order 32 bits of the file length were used. Now using macro VNDISK_GET_LEN instead of direct FillInt64. FIXES 131819 Reviewed-on: http://gerrit.openafs.org/10876 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 705f3ee384814bc082817267a2658bd5c918550c) Change-Id: I1816e4b7c5fe1166ac81ff53235f9f676f4d234f Reviewed-on: http://gerrit.openafs.org/10933 Tested-by: BuildBot Reviewed-by: D Brashear Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 20217c278ef9ed554d4a53686fe867bca0007d3d Author: Marc Dionne Date: Wed Mar 19 11:15:13 2014 -0400 Linux: Do drop dentry if lookup returns ENOENT Commit 997f7fce437787a45ae0584beaae43affbd37cce switched to using d_invalidate instead of d_drop to prevent unhashing dentries which are only temporarily invalid and may still be referenced by someone having a current working directory pointing to it. This could result in getting ENOENT from getcwd() after some transient problems, even when the directory is there and accessible. The change had the side effect of potentially leaving something visible when it has actually been removed, for instance a mountpoint removed by "fs rm". If afs_lookup returns ENOENT, we want to forcibly drop (unhash) the dentry, even if it has current users. Reviewed-on: http://gerrit.openafs.org/10928 Tested-by: BuildBot Reviewed-by: D Brashear (cherry picked from commit 389473032cf0b200c2c39fd5ace108bdc05c9d97) Change-Id: Ifeda5a38a01bc136d3ecef01227ecd354da7cc3e Reviewed-on: http://gerrit.openafs.org/10948 Reviewed-by: D Brashear Tested-by: D Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit a23e76c6dcf0fc56df6d971bae2686003c6386fd Author: Benjamin Kaduk Date: Wed Mar 19 12:16:48 2014 -0400 Make struct CallBack indentation uniform again Align the per-field comments. Reviewed-on: http://gerrit.openafs.org/10929 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Jeffrey Altman (cherry picked from commit cb4ec4e4952b40999013d4f67c0add6bf51ff286) Change-Id: I9b388d03d9ca3da10eba6010147427b44a88d787 Reviewed-on: http://gerrit.openafs.org/10934 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit 3376bc13b8722cfb4435458cd8a0131121a7b026 Author: Andrew Deason Date: Mon Aug 12 17:37:29 2013 -0500 viced: Avoid endless BCB loop Without this commit, when we break callbacks for a fid, we loop over all callbacks for the fid, break a few of them, and then start over. We do this repeatedly until we run out of callbacks. If a client sees a callback break, and then establishes a new callback promise while the fileserver is still breaking callbacks, the fileserver can break the same callback for the same host again and again. This can continue forever, if the client establishes its new callback promises quickly enough. So to avoid this, when we start breaking callbacks, flag all of the callback structures that we want to look at. Then when we repeatedly loop through all of the callbacks for the fid, only look at the flagged callback structures. This adds a 'flags' field to struct CallBack, and defines a single flag, CBFLAG_BREAKING. This is an alternative fix to the issue also fixed in 843d705c. This implementation avoids allocating extra memory under locks, and has the slight benefit of not breaking callbacks that were elsewhere deleted during the BCB. This comes at the cost of a single extra traversal through our callback list, and the cost of claiming one of the bits in the CallBack structure. Reviewed-on: http://gerrit.openafs.org/10172 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear (cherry picked from commit 47124f337b43f8731bfbe3bd71e42d046a4d1075) Change-Id: I522e0cecd0a9a10bf9eafaae669f4f0005ced893 Reviewed-on: http://gerrit.openafs.org/10755 Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit dfa4f822f6696d1a3ba84ee9bfa63fce96fa503a Author: Benjamin Kaduk Date: Fri Mar 14 11:13:15 2014 -0400 libafs: DARWIN: update for Xcode 5.1 (1) remove -mlong-branch from amd64 build Random internet postings suggest that it has triggered a warning since at least Xcode 3.2, and the gcc manual page suggests that it is only applicable on ppc, anyway. (2) remove -mpreferred-stack-boundary=4 from the amd64 build The evidence here shows up less readily in an internet search, but it seems that Apple's compilers will force the stack alignment to 16 bytes regardless of what is passed here. One poster had trouble with -mpreferred-stack-boundary being unused in Xcode 4.4.1 This change only fixes warnings reported as errors by buildbot; it does not attempt to fully synchronize with the flags that Xcode 5.1 uses for kernel module builds. Reviewed-on: http://gerrit.openafs.org/10896 Tested-by: BuildBot Reviewed-by: D Brashear (cherry picked from commit cb18fbde6536942e4bc87bd5943a13cc14fbe332) Change-Id: Ic66d9028e4f15bd7a9d7c80db84087879560f4d2 Reviewed-on: http://gerrit.openafs.org/10926 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit 9ba0be640933e7b416328f248d050f02d4561212 Author: Benjamin Kaduk Date: Thu Mar 13 16:37:10 2014 -0400 Do not use garbage-collection for DARWIN ObjC apps Xcode 5.1 does not support this feature. Reviewed-on: http://gerrit.openafs.org/10890 Reviewed-by: D Brashear Tested-by: D Brashear (cherry picked from commit 52a9d1929518feab17b81b0a9db7ba45f69d5071) Change-Id: Ia383e1f9c4ee4ae19ed81cfedb1541399d7546b3 Reviewed-on: http://gerrit.openafs.org/10925 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit 26c5e507afb28eb01ff49998321982cc355bac05 Author: Benjamin Kaduk Date: Thu Mar 13 15:33:44 2014 -0400 Use correct include guard for vol_prototypes.h Correct the case of the 'h'. Reviewed-on: http://gerrit.openafs.org/10889 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8832cd4e61f04fa5c650060e968bd7834afebd92) Change-Id: I306107184667724e48d5c9c32a11ddc4c9748ce7 Reviewed-on: http://gerrit.openafs.org/10924 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit bcd57ac2f7ec0a8bf364d1422ac21b7bbc8d0ddd Author: Benjamin Kaduk Date: Thu Mar 13 15:30:42 2014 -0400 Remove static const char copyright[] We do not have copyright strings in our other executables for the other copyright statements applicable to them, so these are rather exceptional. They also cause build failures with OS X Xcode 5.1 and --enable-checking . Reviewed-on: http://gerrit.openafs.org/10888 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3f189f8fe8cbb52aac4b7b5fe767d0de481cb569) Change-Id: I11f878e4e4077bd242364810e1aaa473a36bc08c Reviewed-on: http://gerrit.openafs.org/10923 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 03a9b481c7f27c462c9d65a756d172e79758b86d Author: Andrew Deason Date: Thu Apr 4 17:35:01 2013 -0500 viced: Avoid issuing redundant TMAY requests Currently, if a new Rx connection comes in from a host we already have a host struct for, we make a TellMeAboutYourself (TMAY) call to the given host, to verify the UUID (and caps, interface info, etc) is what we expect it to be. That is, if it's still the "same" host that we know about. This is necessary because we otherwise have no way of telling if the Rx connection is from the same host, or from a new host that just happens to have the same IP address (e.g. in the case that hosts are moving around and changing IPs). We do this while the host is locked, so we only issue these TMAY calls one at a time. If a large number of Rx connections come in from the same host at around the same time, this can result in a lot of TMAY requests being issued against the host, even for hosts that never change IPs and never do anything strange. In these situations, issuing so many TMAYs is useless. If we have several calls waiting to lock the host to issue a TMAY, some of the extra TMAY calls are provably useless. So instead of calling TMAY repeatedly, remember what the last successful TMAY result was, and reuse it for the "provably useless" calls. Note that this 'cache' stores the actual raw results of TellMeAboutYourself. We could save some memory by storing just how we interpret that data later on in h_GetHost_r, but this way results in way simpler h_GetHost_r logic. Since, we can use the same code paths as for a "real" TMAY call. Reviewed-on: http://gerrit.openafs.org/9711 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9a0a8ca4d186cf953b87d9fae1a35f66090b060c) Change-Id: I0f0e6a4a1a56ea7992194cbabebf5f793a74f37a Reviewed-on: http://gerrit.openafs.org/10759 Reviewed-by: Andrew Deason Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand Reviewed-by: Benjamin Kaduk Tested-by: BuildBot commit 8de5e707f16582b1cb9bc9be879e56462390ef1e Author: Michael Meffie Date: Sat Mar 15 11:31:27 2014 -0400 doc: fix typo in volinfo man page Reviewed-on: http://gerrit.openafs.org/10904 Reviewed-by: Ken Dreyer Tested-by: Ken Dreyer (cherry picked from commit 3a0c348d6ebc375f11d2bab70de9a00f5905fe94) Change-Id: I8a39bdc1cb4bff509d54ef7c76d4b8735505c0e1 Reviewed-on: http://gerrit.openafs.org/10931 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Stephan Wiesand commit 4750f4ce272f944cc8d02e4fedf6e78ea153d7f9 Author: Andrew Deason Date: Fri Jan 31 16:46:12 2014 -0600 afs: Throttle byte-range locks warnings per-file Currently, the warning messages about byte-range locks are throttled only according to what the last PID of the locking process was. So, if that same process performs a bunch of byte-range locks a bunch of times, we log this warning message at most once every 2 minutes. However, if we have even just one other process also performing byte-range locks, the throttling can become pretty useless as lastWarnPid ping-pongs back and forth between the two different PIDs. This can happen if multiple unrelated byte-range-lock-using pieces of software just happen to be running on the same machine, or if a piece of software uses byte-range locks after forking into separate processes. To avoid flooding the log in situations like this, keep track of the last warn time in the relevant vcache, so we don't get frequent warnings for byte-range lock requests on the same file. Reviewed-on: http://gerrit.openafs.org/10796 Reviewed-by: D Brashear Tested-by: BuildBot (cherry picked from commit 9f90b12e14e5511cb1c11cbc4d85cfa291be861f) Change-Id: Ia5426e97fa431e6b9eeb1c82e03c74c959249e9a Reviewed-on: http://gerrit.openafs.org/10839 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit f1d51b7cba81dde50193b3ed74eb6fcdb9e50328 Author: Andrew Deason Date: Fri Jan 31 16:40:35 2014 -0600 afs: Include FID in DoLockWarning Provide the FID that is being locked when we warn about byte-range locks, so the user can find what file the process is trying to lock. Reviewed-on: http://gerrit.openafs.org/10795 Reviewed-by: D Brashear Tested-by: D Brashear (cherry picked from commit 4f253106dc5d1a5280b0a5be393df0e87e00a661) Change-Id: I369e9505583c1b6b820b5bc54b8e4908ab8bf3e5 Reviewed-on: http://gerrit.openafs.org/10838 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit 9d49c684286cbcb1e141cb1244c46968419cfba2 Author: Andrew Deason Date: Fri Jan 31 16:36:44 2014 -0600 afs: Refactor DoLockWarning Change DoLockWarning around a little bit, so subsequent changes are easier to follow. Move lastWarnTime/lastWarnPid so they are only usable within this function. This commit should incur no functional change. Reviewed-on: http://gerrit.openafs.org/10794 Tested-by: BuildBot Reviewed-by: D Brashear (cherry picked from commit c73883e7846fa0421cfac29830c27c9b6aacf5ed) Change-Id: Ie419aa5110f9c72f99514c8159c10582747601db Reviewed-on: http://gerrit.openafs.org/10837 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit bc1da21540a2787b9badd9e9153cea5cc3c01bac Author: Ben Kaduk Date: Mon May 6 23:03:42 2013 -0400 Apply cast from cfc9b348 to the else clause Clang on FreeBSD complains about format string mismatch as well. Reviewed-on: http://gerrit.openafs.org/9855 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 61caad06b7a95c27eae7aca0536bcffe61d3e31a) Change-Id: I24af455a4f2d2144d78b5e9030830b7233af353f Reviewed-on: http://gerrit.openafs.org/10836 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit 716bce628f2eddd2acc28022ac5915a575f40d09 Author: Ben Kaduk Date: Tue Jul 9 23:12:43 2013 -0400 Alias "vos e" to "vos examine" This shortcut broke when endtrans was added, and some people have strong finger memory. Reviewed-on: http://gerrit.openafs.org/10081 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit 5e56298876f64b7c5f36c9dbe375b196a2951521) Change-Id: I9c9626768770c7b380060e26f81eee61cc7f7fab Reviewed-on: http://gerrit.openafs.org/10886 Reviewed-by: D Brashear Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 31b32e2e2f3d09a8ca5cd91a6f48be9ab72efe10 Author: Andrew Deason Date: Tue Oct 12 17:46:36 2010 -0500 viced: Add options for interrupting clients Add the -offline-timeout and -offline-shutdown-timeout options to the fileserver, to implement interrupting clients accessing volumes we are trying to take the volume offline. Document the new options. Currently this is only implemented for read operations. Implementing this for write operations and callback breaks will require more work. This also removes the VGetVolumeTimed interface from the volume package, since the fileserver was the only user and with this change the fileserver now uses the VGetVolumeWithCall interface. Reviewed-on: http://gerrit.openafs.org/2984 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4f7a51aa5115a9073771bc396e25d510aeae71e8) Change-Id: I34967bb03a09e5655b02c9b7b39272cfe8f71d7b Reviewed-on: http://gerrit.openafs.org/10799 Reviewed-by: D Brashear Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 744d01a63b32d848af7a2aeee0280036f83cdbec Author: Andrew Deason Date: Fri Oct 29 11:29:37 2010 -0500 vol: Interrupt RX calls accessing offlining vols When we are waiting for a volume to go offline, only wait a certain amount of time for it to go offline before we interrupt all RX calls associated with that volume. This amount of time is configurable in the new offline_timeout and offline_shutdown_timeout volume package option fields. Reviewed-on: http://gerrit.openafs.org/3216 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 57a5da63439c2e2b88dd32dc8aa42dc2f6eef116) Change-Id: I331d7ca09f17e5fc74de0c5da40c18b67e124cff Reviewed-on: http://gerrit.openafs.org/6266 Reviewed-by: D Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 53da61120b65578e2a5de52f53eb3f47da37b06e Author: Andrew Deason Date: Tue May 10 13:45:26 2011 -0500 libafs: GiveUpAllCallBacks at shutdown again Commit cee2c677d7de66a510d05978e3b41dcd5d8aca78 caused the cache manager to give up all callbacks at shutdown. But 76158df491f47de56d1febe1d1d2d17d316c9a74 removed the call to afs_FlushVCBs in afs_shutdown. Put it back. Reviewed-on: http://gerrit.openafs.org/4640 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 330cc7c83bf8470e1e63f6e6d514f1e82008f167) Change-Id: I9c2b309b482a735f5cce57aa7497b67858db2c3e Reviewed-on: http://gerrit.openafs.org/10855 Tested-by: Andrew Deason Tested-by: BuildBot Tested-by: Stephan Wiesand Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 040b9333ea416cec8f4d5b6b674464847efc8e31 Author: Andrew Deason Date: Thu May 5 11:37:12 2011 -0500 libafs: Correct GUACB afs_LoopServers flags Use the named constant AFS_LS_ALL. This change is 1.6-specific, and contains only part of 1f48bc7a30d5df88a1e5f539ee22df3952533a88. The rest of 1f48bc7a30d5df88a1e5f539ee22df3952533a88 was committed in 4c4075ade0d46087638bd8cc96aa9fac005e62f3, before the FlushAllVCBs call was added. Reviewed-on: http://gerrit.openafs.org/4624 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 1f48bc7a30d5df88a1e5f539ee22df3952533a88) Change-Id: I9284abe1cb9752c5204b9b1c91438983d854a864 Reviewed-on: http://gerrit.openafs.org/8840 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 372cf44895b368b12add5fcb9715754bbcee5599 Author: Derrick Brashear Date: Wed Dec 1 15:23:11 2010 -0500 unix: giveupallcallbacks at shutdown just try to give up callbacks at shutdown. at this point if you're running 1.4.5 or older, you're sad anyway. Reviewed-on: http://gerrit.openafs.org/3404 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit cee2c677d7de66a510d05978e3b41dcd5d8aca78) Change-Id: I56e6b9e0e5f2921126a468854a1735b257e05219 Reviewed-on: http://gerrit.openafs.org/6272 Tested-by: BuildBot Tested-by: Andrew Deason Tested-by: Stephan Wiesand Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit b5f8c9f3f5d3aea06e572f2eb5e636deb0f2cfe9 Author: Marc Dionne Date: Fri Jul 5 12:50:36 2013 -0400 bos: Do encryption if requested Commit d008089a79 didn't replace the processing of the aencrypt flag passed to the GetConn() function, causing all bos connections to be un-encrypted. This causes "addkey" to fail with an error from the server, and "listkeys" to silently ignore the -showkey option to display keys. Set the AFSCONF_SECOPTS_ALWAYSENCRYPT flag, and don't set AFSCONF_SECOPTS_FALLBACK_NULL since fallback is not acceptable if the caller requested enrcyption. Reviewed-on: http://gerrit.openafs.org/10043 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 7565cb420366d79df319e344678a8d9ceab6db08) Change-Id: Ibc643a352ed560ad0f32cbff61167463e16201ee Reviewed-on: http://gerrit.openafs.org/10863 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Jeffrey Altman Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit d2d749ec0c656d6e4c595a5f8c93b164a6cf911b Author: Simon Wilkinson Date: Fri Mar 8 16:15:51 2013 +0000 bos: Remove theoretical overflow in DateOf DateOf copies the results of ctime into a static buffer. Typically ctime will return a 26 byte string, but if you pass it a year larger than 9999 (which we shouldn't), you can get a 32 (or more) byte string. Get rid of this unlikely event by using strlcpy for the copy. We already truncate at 24 bytes when we remove the \n, so this shouldn't cause any further problems. Really, this whole thing should be rewritten to use strftime. Caught by coverity (#985776) Reviewed-on: http://gerrit.openafs.org/9551 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 8b76110e23160e33716234f9560d22ca5275cb0a) Change-Id: I47bdadf0159c12d747040765d28e6e8908678fd1 Reviewed-on: http://gerrit.openafs.org/10862 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 53773034aa5c33009ddaa7d42a89c3d17cf85668 Author: Simon Wilkinson Date: Fri Mar 8 13:02:26 2013 +0000 bos: Don't overflow buffer with key data When parsing key data from the command line, don't overflow the buffer used to hold it - instead just give an error if the data is too long. Caught by coverity (#985775) Reviewed-on: http://gerrit.openafs.org/9550 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 4e9c6eb9d5192888d79a07042c9cb6029def9726) Change-Id: Ic1892ba4cd5e69c48003073a758a47a08b84a890 Reviewed-on: http://gerrit.openafs.org/10861 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Jeffrey Altman Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 538faed7f79f48864cb8bccf4c4f819f55d9c0ca Author: Simon Wilkinson Date: Fri Mar 8 13:01:28 2013 +0000 bos: Don't overflow cellname buffer Don't overflow the fixed sized cellname buffer when copying the information in from the command line - instead, just use a dynamically allocated buffer. Caught by coverity (#985775) Reviewed-on: http://gerrit.openafs.org/9549 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 45993e3ad55358c3e94105e2e3aa13df43f5fdd3) Change-Id: Idb2b165c9b08f72cb57ca879ff6d61f9d556a631 Reviewed-on: http://gerrit.openafs.org/10860 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 3a1a4c4fc7ff1233cda8da19c93cc4c7ddd7e589 Author: Simon Wilkinson Date: Thu Feb 21 21:29:56 2013 +0000 bos: Don't set up the conenction twice in AddKey AddKey calls GetConn twice - once at the start of the function, and then again immediately before calling BOZO_AddKey. This leaks a connection... Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9230 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 6ef224da14da88318ede836a2c80998299c93e2f) Change-Id: I6cbd68a72b041a9638d98481ef793e34b8946abd Reviewed-on: http://gerrit.openafs.org/10859 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Jeffrey Altman Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit a416b983a339bfa4a80a65abc170cc4d1917876e Author: Michael Meffie Date: Thu Mar 6 11:42:52 2014 -0500 doc: fix typo on ka-forwarder man page Reviewed-on: http://gerrit.openafs.org/10873 Reviewed-by: Stephan Wiesand Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 189a17146e789f2cf716ed3a477ed6f54776df12) Change-Id: Ic4e2f4cc2947946a5e41bb71152ef6d5683048f4 Reviewed-on: http://gerrit.openafs.org/10875 Reviewed-by: Ken Dreyer Reviewed-by: Andrew Deason Tested-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 8f6a814016fa7a8ef4bbe55425f9a9f4c66cb824 Author: Michael Meffie Date: Mon Dec 23 12:10:36 2013 -0500 vol: reset nextVnodeUnique when uniquifier rolls over The on disk uniquifier counter is set to 200 more than the current nextVnodeUnique counter when the volume information is updated to disk. When the nextVnodeUnique is near UINT32_MAX, then the uniquifier counter rolls over. This can happen during a volume header update due to VBumpVolumeUsage_r(). With this change, the nextVnodeUnique customer is reset to 2 and the uniquifier is reset to 202 when a roll over occurs. (uniquifier of 1 is reserved for the root vnode.) With this change, the number of possible uniquifier numbers is limited to 200 less than UINT32_MAX. The following shows a series of vnode creation/deletions to illustrate the uniquifier rollover before this commit: fid = 536870918.4.4294967114, nextVnodeUnique = 4294967115, uniquifier = 4294967295 fid = 536870918.4.4294967115, nextVnodeUnique = 4294967116, uniquifier = 4294967295 fid = 536870918.4.4294967116, nextVnodeUnique = 4294967117, uniquifier = 21 fid = 536870918.4.4294967117, nextVnodeUnique = 4294967118, uniquifier = 22 and after this commit: fid = 536870918.4.4294967115, nextVnodeUnique = 4294967116, uniquifier = 4294967295 fid = 536870918.4.4294967116, nextVnodeUnique = 2, uniquifier = 202 fid = 536870918.4.2, nextVnodeUnique = 3, uniquifier = 202 fid = 536870918.4.3, nextVnodeUnique = 4, uniquifier = 202 Reviewed-on: http://gerrit.openafs.org/10617 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 64d7715c0247734731ef4cc8be5de32ee7c4a1f6) Change-Id: Ieead6921f8ebca436cbcaecbf7711236c6cdf0e9 Reviewed-on: http://gerrit.openafs.org/10847 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 4b6f0efba23d855cc79b8d503242589be9ac7ce2 Author: Michael Meffie Date: Mon Dec 23 11:42:19 2013 -0500 vol: fix nextVnodeUnique roll over Fixes for the per volume nextVnodeUnique counter roll over. Uniquifier number 1 is reserved for the root vnode, so reset the unique count to 2 when the nextVnodeUnique counter rolls over. Update the disk backed V_uniquifier count when the in-memory nextVnodeUnique counter rolls over during the creation of a new vnode. If the nextVnodeUnique rolls over when V_uniquifier is UINT32_MAX, then the V_uniquifier is not updated and remains at UINT32_MAX until the next VUpdateVolume_r() call for the volume. This bug is usually masked by the VBumpVolumeUsage(), which on every 128 volume accesses, bumps the V_uniquifier to be 200 more than the current nextVnodeUnique counter. This causes the V_uniquifier to roll over before reaching UINT32_MAX. (The number of access before updating the headers is set in the usage_threshold volume package option, which is currently set to 128 by default.) The following shows the unique counters for a series of vnode creation/deletions before this commit. The nextVnodeUnique rolls over to 1, and the uniquifier is not reset. The `usage_threshold' was set to a value greater than 200 to avoid the VBumpVolumeUsage() calls during this test run. fid = 536870918.4.4294967294, nextVnodeUnique = 4294967295, uniquifier = 4294967295 fid = 536870918.4.4294967295, nextVnodeUnique = 0, uniquifier = 4294967295 fid = 536870918.4.1, nextVnodeUnique = 2, uniquifier = 4294967295 fid = 536870918.4.2, nextVnodeUnique = 3, uniquifier = 4294967295 The following shows the unique counters after this commit: fid = 536870918.4.4294967294, nextVnodeUnique = 4294967295, uniquifier = 4294967295 fid = 536870918.4.4294967295, nextVnodeUnique = 0, uniquifier = 4294967295 fid = 536870918.4.2, nextVnodeUnique = 3, uniquifier = 203 fid = 536870918.4.3, nextVnodeUnique = 4, uniquifier = 203 Reviewed-on: http://gerrit.openafs.org/10616 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 1a287c631ead0221828ae70e10c3cfd5563fdfb7) Change-Id: I4d2bca2f3f1763f00e12de98f9dc4534c2ae51de Reviewed-on: http://gerrit.openafs.org/10846 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 346982f3f13b16c1b1e0aa1e8ddb0534a7f6d4a0 Author: Andrew Deason Date: Wed Sep 18 16:56:23 2013 -0500 vol: Nuke parent vol special inodes When we "nuke" a volume, we delete all inodes we can find that are for the given volume id. This currently means that if we nuke an RW volume id, we delete all of the inodes for file data for the entire volume group (since they're all stored in the VG id), but we do not delete the special inodes for any non-RW volumes in that volume group. Those special inodes left behind are not very useful, since we just deleted all of the actual file data. Currently this means that on namei, it's impossible to nuke the special inodes for non-RW volumes, since the namei nuke will only look in the subdir for the given volume id. If you give it the RW volume id, it won't delete the special inodes as menioned above; if you give it the RO volume id, it will only look in the RO subdir, and won't find the RO special inodes in the RW subdir. If a volume group is damaged in such a way that the salvager cannot fix it (due to a bug), this means that it is impossible to get rid of that volume group completely from the partition on namei without manually running "rm -rf" on the relevant AFSIDat directory. Normally we have a failsafe of running 'vos zap -force', but that doesn't work for non-RW special inodes, as mentioned above. So, in order to allow this 'vos zap -force' failsafe to work in hopefully all situations, also delete the special inodes for the parent volume. Use similar logic as exists in the salvager's OnlyOneVolume function. Reviewed-on: http://gerrit.openafs.org/10256 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d83c1231cf371ac998304cbb2007ca848a514e0c) Change-Id: I80216cb73b9bc8edb7e6dca735a522d7132017dd Reviewed-on: http://gerrit.openafs.org/10772 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit 326d46bdb846db6564bef9799a844c75adf981f3 Author: Andrew Deason Date: Thu Oct 3 12:51:41 2013 -0500 salvager: Handle multiple/inconsistent linktables The ListAFSSubDirs code in namei_ops.c currently detects incorrectly-named linktable files, and whines about them and says the salvager will handle them. However, the salvager doesn't really handle them, since we just use the first linktable we find (FindLinkHandle) without checking any of the information about it. So, check for these. Fix FindLinkHandle to only consider a linktable the "real" linktable to use if it actually matches the volume group id we're salvaging. Also delete any inconsistent linktables via the new function CheckDupLinktable later on. Note that inconsistently-named linktables have been known to have been created in the past due to a bug in the salvager (fixed by ae227049), and possibly due to other unknown issues. Reviewed-on: http://gerrit.openafs.org/10322 Reviewed-by: Mark Vitale Tested-by: BuildBot Reviewed-by: D Brashear (cherry picked from commit 602e8eb2000be02ef2a6627633b7ba80ea847762) Change-Id: I472e250bbe5dcb4de44111ac705c9a319abf2b44 Reviewed-on: http://gerrit.openafs.org/10811 Reviewed-by: D Brashear Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 1437175df5c8c799d11c92eaeaf3470534cbcb9b Author: Andrew Deason Date: Fri Aug 30 14:21:16 2013 -0500 namei: Ignore misplaced files The namei salvaging/ListViceInodes code currently ignores files where we cannot derive an inode number from a given filename. However, if a file is a valid inode filename, but is in the wrong directory, we still record it. This can cause the salvager to abort, since it assumes inode e.g. 12345 is present, but when it tries to open 12345, namei translates the inode to a nonexistant path, and we bail out. It is unknown how a namei directory structure can reach this state, but try to handle it. To be on the safe side, just ignore the files, and log a message about them. That way, if the files are required for reconstructing the volume or contain important data, they are still available if needed. And if they contain incorrect or old data, we don't screw up the volume by trying to use them. Thanks to Sabah S. Salih for reporting a related issue. Reviewed-on: http://gerrit.openafs.org/10214 Reviewed-by: D Brashear Tested-by: BuildBot (cherry picked from commit 1096582bde6156bb469f2e397cbc40d13a8f2822) Change-Id: I9252877fbfe01328ac4a8692ebe28a86913b9713 Reviewed-on: http://gerrit.openafs.org/10810 Reviewed-by: D Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit ac20b369188e259037b0d9dfaa4353e45e87e8f6 Author: Andrew Deason Date: Thu Oct 3 12:38:08 2013 -0500 salvager: Ignore linktable-only RW volumes In general, the salvager will try to salvage any volume if we find an inode for that volume. However, for namei, we'll always have at least one inode for the RW volume, even if we only have e.g. an RO volume at a particular site, since the linktable special inode is always marked as for the RW volume id. So, if we salvage a volume group that only has an RO, normally we would also try to salvage the corresponding RW, even if it doesn't exist. We would then recreate the "missing" metadata files, so after salvaging, the RW appears to exist as a normal volume. The salvager currently tries to avoid this by skipping salvaging the RW if we find more than one volume in the volume group, and if the RW only has one special inode, and that one special inode is the linktable. This solves the problem most of the time, but misses a few corner cases: - If we found more than one linktable, we'll try to salvage the RW anyway. This shouldn't happen, but certain cases of corruption can cause incorrectly-named linktables, resulting in multiple linktables. - If we only find one volume (the RW), we'll still salvage the RW, even if the only inode for it is a single linktable. This can happen due to botched salvages in the past, or interrupted deletes and such. It's just cruft. In any situation like those, we cause an RW volume to be created where there previously was none. This can be a problem, since the RW volume is unknown to the administrator, and does not appear in the VLDB. Such "phantom" volumes can be very confusing and can cause problems in the future. For example, if that same RW volume is moved to the server with the "phantom" RW volume, we now have two of the same RW volume on the same server on different partitions, which is a big problem. So, to avoid these corner cases, check all of the special inodes to see if all of them are linktables. Also perform this check if we don't have any non-special inodes (even if we only see 1 volume), to catch the "cruft" case above. Reviewed-on: http://gerrit.openafs.org/10321 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 600712877ca0883c6ec609d51909336964b06cba) Change-Id: Ia8fb952df3e7a2e85f47d9d9e903239e349791d9 Reviewed-on: http://gerrit.openafs.org/10771 Reviewed-by: Andrew Deason Reviewed-by: D Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 65847d19c6a795709cb5523e5927e5d0a9b24302 Author: Andrew Deason Date: Tue Oct 1 17:31:44 2013 -0500 namei: Set inconsistent linktable linkCount to 0 Currently, if we detect an inconsistent linktable filename (where the filename indicates it's for a different volume than the directory path indicates), we don't set the linkCount for the inode info. This means that our caller will get random garbage for the linkCount. In many cases this value is ignored, but for the salvager, if this is the only linktable file we find, we treat it as the linktable we should be using. Thus, if linkCount contains undefined data, we might try to INC or DEC the linktable a bunch of times, depending on what random stack garbage the linkCount is filled with. The salvager shouldn't be INC/DEC'ing these linktables according to the their linkCount anyway, but in the meantime, at least ensure that this doesn't contain stack garbage, so we ensure that we won't try to INC or DEC this thousands or millions of times. Reviewed-on: http://gerrit.openafs.org/10320 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2286fac1447e2e9e834957ec414cb5605f51e63b) Change-Id: I480ad328d594531869874b4207629533553bfc64 Reviewed-on: http://gerrit.openafs.org/10770 Reviewed-by: Andrew Deason Reviewed-by: D Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit e10a3efe5828e4f1f98ea456d8507e9a93b023ab Author: Andrew Deason Date: Tue Aug 14 17:25:44 2012 -0500 viced: Move host quota calculation Calculate this during initialization, not every time we want to use it. Reviewed-on: http://gerrit.openafs.org/9710 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 31b518fcf184ba122b6faab54e2e4fa0d37605a3) Change-Id: Ia4bb30b31e2e3ce25ea16d5932f8f3ae26210c11 Reviewed-on: http://gerrit.openafs.org/10758 Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit fd4bb48075a6ba1d38a5852fe08883dea2f007d7 Author: Andrew Deason Date: Fri Feb 22 22:46:12 2013 -0600 viced: Improve CallPreamble error messages These messages are not very useful right now. At least try to say what host we sent an error to, so we know which host may be experiencing some troubles as a result. Reviewed-on: http://gerrit.openafs.org/9381 Reviewed-by: Mark Vitale Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 6c41b1f740e16b5b9adfe9026630595be6f0699e) Change-Id: I4e9cf5e0d038c572895b4a31bfdff481ea0b3286 Reviewed-on: http://gerrit.openafs.org/10756 Reviewed-by: Andrew Deason Reviewed-by: Mark Vitale Reviewed-by: Benjamin Kaduk Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 4e7e1d0c4b8dfb70b48ea20837f6657a2bce2184 Author: Andrew Deason Date: Mon Jan 27 18:03:59 2014 -0600 afs: Translate VNOSERVICE to ETIMEDOUT Some fileservers will kill calls that are taking too long with the VNOSERVICE abort code. Our logic for retrying calls is already aware of this usage, but if we cannot retry the call, we still just return VNOSERVICE as an error code to our caller. Don't return this raw, since has the same value as ENOBUFS, which can cause a confusing error message from logs or applications ("No buffer space available"). Return ETIMEDOUT instead. Reviewed-on: http://gerrit.openafs.org/10766 Reviewed-by: Derrick Brashear Tested-by: Andrew Deason (cherry picked from commit 335a70653adb59795f262663af3972de016c068d) Change-Id: Ia0b4dbfb61353c08917898c3cb9128625023f311 Reviewed-on: http://gerrit.openafs.org/10814 Reviewed-by: Perry Ruiter Tested-by: BuildBot Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit 7ee0beb5ed58161fb452e88324eaf16cad626f8b Author: Andrew Deason Date: Thu Dec 26 16:42:46 2013 -0500 afs: Treat vc_error as a CheckCode-translated code The vcache field vc_error is generally treated as an error code that has been translated through afs_CheckCode, but this is inconsistent in a few places. Fix this in a few ways: - Adjust afs_nfsrdwr so we do not call afs_CheckCode on vc_error, translating the error code twice. - Change afs_close to store vc_error in code_checkcode, and have the logging code check for specific values in code_checkcode as well. Log unknown values of code and code_checkcode, so we can distinguish between e.g. a 'code' value of VBUSY, and a 'code_checkcode' value of ETIMEDOUT. Reviewed-on: http://gerrit.openafs.org/10634 Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 34e4a4fed356fbda9fc8ace1d01a080bd09238b0) Change-Id: Icceee0c82b0704e0d445f96946b493b4be424506 Reviewed-on: http://gerrit.openafs.org/10813 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit 1dd3a383cb1e192b042bbbe7b62d25915bb88e5f Author: Andrew Deason Date: Fri Dec 20 12:16:37 2013 -0600 afs: Return raw code from background daemons Currently, a background daemon processing a 'store' request will return any error code in the 'code' field in the brequest structure, for processing by anyone that's waiting for the response. Since any waiter will not have access to the treq for the request, they won't be able to call afs_CheckCode on that return code, so the background daemon calls afs_CheckCode before returning its error code. Currently, afs_close uses the 'code' value from the background daemon as if it were not passed through afs_CheckCode. That is, if all background daemons are busy, we get our 'code' directly from afs_StoreOnLastReference, and if we use a background daemon, our 'code' is tb->code. But these values are two different things: the return value from afs_StoreOnLastReference is a raw error code, and the code from the background daemon (tb->code) has been translated through afs_CheckCode. This can be confusing, in particular for the scenario where a StoreData fails because of network errors or because of a VBUSY error. If we get a network error when the request went through a background daemon, afs_CheckCode will translate this to ETIMEDOUT, which is commonly value 110, the same as VBUSY. So, an ETIMEDOUT error from the background daemon is difficult to distinguish from a VBUSY error from a direct afs_StoreOnLastReference call. Either case can result in a message to the kernel like the following: afs: failed to store file (110) To resolve this, have the background daemon store both the 'raw' error code, and the error code that has been translated through afs_CheckCode. afs_close can then use the raw error code when reporting messages like normal, but can still use the translated error code to return to the caller, if it has a translated error. With this change, now afs_close will always log "network problems" for a network error, regardless of if the error came in via a background daemon or a direct afs_StoreOnLastReference call. In Irix's afs_delmap, we just remove the old usage of tb->code, since the result was not used for anything. Reviewed-on: http://gerrit.openafs.org/10633 Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 7f58e4ac454f9c06fb2d51ff0a17b8656c454efe) Change-Id: Id5935d41b0d20000f06b39c48649cd7d0dd2fd81 Reviewed-on: http://gerrit.openafs.org/10812 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit 3f9cf37b7b78ad9523bb93c67ad5eff0d0e371aa Author: Andrew Deason Date: Mon Sep 30 17:53:36 2013 -0500 salvager: Fix in-memory invalid linktable counts When we have a nonexistant or invalid linktable, we manually set all of the linkcounts to 1, since we're recreating the link table from scratch. However, we also have a linkCount count in our in-memory allInodes array, which could be populated by garbage if we had a garbage linktable. So make sure to set our in-memory linkCount to 1 for each inode, so we don't use garbage linkcount data. Reviewed-on: http://gerrit.openafs.org/10312 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6a4831e0e9a003bed06ac2269987c69090d3f7e7) Change-Id: Ic580176f0350a2f44b60f1b448cf3da8a091e36d Reviewed-on: http://gerrit.openafs.org/10769 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit e4c83c5c17b19d3ad599b48a1cfabd5f90275594 Author: Simon Wilkinson Date: Fri Mar 30 19:41:17 2012 +0100 afs: Handle reading past the end of a file ... except that this change doesn't actually handle this, it just stops clang from throwing an error about the bogus code that's already in there. This needs fixed properly ... Reviewed-on: http://gerrit.openafs.org/7090 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3198cef8ccf0d9cb9a7479c0b973e604e21e62fc) This change differs slightly from the one on master because on master, afs_MemRead and afs_UFSRead were consolidated into afs_read(). On the 1.6 branch, we must patch the two functions separately. Change-Id: I7d8d104c89355c0a3294372340af0e02ab170b59 Reviewed-on: http://gerrit.openafs.org/10744 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit 618343f0261bb5ffa036d93f1a3bc313ed76a037 Author: Andrew Deason Date: Tue Dec 10 17:02:34 2013 -0600 cellconfig: Do not use 'long' for dbserver IPs A few places in this file assume that our dbserver IP addresses are "long"s. A long int can be 8 bytes on some platforms, but we know these IP addresses are all 4-byte integers. In the rare instances where we have the maximum number of dbservers, this can overwrite a bit of extra memory. This can also result in a misaligned access on platforms such as SPARC v9, since the elements of he->h_addr_list are not guaranteed to be 8-byte aligned. So instead, treat these as 4-byte integers. For copying out of he->h_addr_list, also use a memcpy anyway to be safe, since we are not guaranteed alignment. Reviewed-on: http://gerrit.openafs.org/10599 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit d8f75d3206eaa56b3a819a5bc13a4bf3a9130512) Change-Id: I2568577b05f47ebc75b34a9cd106fceac8a31ef7 Reviewed-on: http://gerrit.openafs.org/10603 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 3166cba243e6e69f52fedfe81ea4d407eb6553e1 Author: Andrew Deason Date: Thu Feb 6 14:27:12 2014 -0600 ihandle: Make _ONCLOSE the sync behavior default The _DELAYED behavior has had serious problems in the past, so change the default to be _ONCLOSE instead. This is a 1.6-only change. On master, the _DELAYED option does not exist at all, and the _ONCLOSE behavior was made the default when this option was introduced in master, in commit eb5190eb4a7cd95166866a89e0a8f3a69bbc6e8f. Change-Id: I01a50e1d829c141c38fbbbaba2c6d2d5a371b130 Reviewed-on: http://gerrit.openafs.org/10809 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Andrew Deason Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit 2667f59e12ddba9d73c9996a28d7c63414887713 Author: Benjamin Kaduk Date: Wed Feb 5 18:32:16 2014 -0500 afs_fetchstore: re-avoid uninitialized variable As noted in the gerrit comments for change 10742, commit baf6af8a8f2207ce39b746d59ca4bc661c002883 does not handle the case where the second rx_Read() call fails, and the 'length' variable can still be used uninitialized. Instead of using an err label and jumping to it on the case of errors, initialize length to zero and take care to neither set nor access *alength if an error has occurred. This is more consistent with the style of the surrounding code while still avoiding the use of an uninitialized variable. Reviewed-on: http://gerrit.openafs.org/10806 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit b7326e487f6387033282cc5d1128b00a0456673a) Change-Id: I371ec319b9a984e61e41a30110b8f2c0cf14b379 Reviewed-on: http://gerrit.openafs.org/10835 Tested-by: BuildBot Reviewed-by: D Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 596b464d20150bbb816176cb278e2e9c845edecd Author: Benjamin Kaduk Date: Thu Jan 9 22:42:26 2014 -0500 afs_fetchstore: avoid use of uninitialized variable rxfs_fetchInit() attempts to do a 64-bit RPC first, but falls back to the 32-bit StartRXAFS_FetchData() if the server appears to not support the 64-bit RPCs. We correctly did not read a length from the call if the FetchData RPC(s) failed, but proceeded to assign from the 'length' local variable into the 'alength' output variable unconditionally later on. Instead of blindly continuing on, jump to the error-handling part of the routine when we cannot read a length from the call. This has the side effect of skipping an afs_Trace3() point in the error case. Reviewed-on: http://gerrit.openafs.org/10694 Reviewed-by: Derrick Brashear Tested-by: Benjamin Kaduk (cherry picked from commit baf6af8a8f2207ce39b746d59ca4bc661c002883) Change-Id: Icf14d5e8a6abf8a8a014ab7d48b767e3dcc7a6a9 Reviewed-on: http://gerrit.openafs.org/10742 Tested-by: BuildBot Reviewed-by: D Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit a7d8601253f17943c994dff9be79f00d6d281ff5 Author: Andrew Deason Date: Tue Dec 17 17:30:26 2013 -0600 LINUX: Use sock_create_kern where available Currently, we use sock_create to create our Rx socket. This means that accesses to that socket (sendmsg, recvmsg) are subject to SELinux restrictions. For all recvmsg accesses and some sendmsg accesses, this doesn't matter, since the access will be performed by one of our kernel threads (running as kernel_t or something similar, which is unrestricted). Such as: the rx listener, a background daemon, the rx event thread, etc. However, sometimes we do run in the context of a normal user process. For some RPCs like FetchStatus, we tend to run the RPC in the accessing user thread, which can result in us sendmsg()ing the data packets with the initial arguments in the user thread. We can also send delayed ACKs via rx_EndCall, and possibly a variety of other scenarios. In any of these situations when we are sendmsg()ing from a user thread, SELinux can prevent us from sending to the socket, if the calling user thread context is not able to write to an afs_t udp_socket. This will result in packets not being sent immediately, but the packets will be resent later, so access will work, but appear very slow. This can easily happen for processes that are specifically constrained by SELinux; for example, webservers are often constrained, even if most of the rest of the system is not. This can be noticed by seeing the 'resends' and 'sendFailed' counters rising in 'rxdebug -rxstat', as well as noticing SELinux access failures if 'dontaudit' rules are ignored. To avoid this, use sock_create_kern to create the Rx socket, to indicate that this is a socket for use by kernel code, and not accessible by a user. This should cause us to bypass any LSM restrictions (SELinux, AppArmor, etc). Add a configure check for this, since this function has not always existed, according to Reviewed-on: http://gerrit.openafs.org/10594 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit e988aa45d765c935fef4bcd35585d6a3594cc497) Change-Id: Ie04a8ac166dabf9fb8368d47d5624d1f319174bd Reviewed-on: http://gerrit.openafs.org/10598 Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand Reviewed-by: Michael Meffie Tested-by: BuildBot commit ea6e7d76ebc696cc1a18246fc535cae3e76656d0 Author: Simon Wilkinson Date: Fri Mar 30 19:34:53 2012 +0100 viced: Remove pointless braces Doing if ((a==b)) is unecessary. It's also potentially dangerous, as that's the syntax required to do assignment within an if statement. clang now issues warnings (errors in -Werror mode) when it encounters these. Remove pointless braces from viced to make clang happy. Reviewed-on: http://gerrit.openafs.org/7085 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6d83b33324b68389d0cb8fee73f3bf3a06e9abe5) Change-Id: Ied4eb404108e7d8384cc394d5f5e65a04beb17dc Reviewed-on: http://gerrit.openafs.org/10747 Reviewed-by: D Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit dda87b13a5464aa345b8d405da4afc6ce0c4cd6a Author: Marc Dionne Date: Thu Jan 30 13:50:37 2014 -0500 Linux: When revalidating, don't drop in-use dentries The Linux client can get into a state where the current working directory is seen as "deleted" by some tools, while it is still there and accessible to "ls" and other tools. This has been reported by several users and sites. One scenario that has been observed while debugging: - A process does a chdir() into a directory - This stores a pointer to the dir's dentry in the task structure - The server hosting the volume goes offline temporarily - The dentry for the directory is passed to afs_linux_dentry_revalidate - afs_linux_dentry_revalidate calls afs_lookup which returns an error (110 - ETIMEDOUT) - It then considers the dentry not valid, and calls d_drop() - d_drop unhashes the dentry unconditionally - Server comes back up, but dentry is still unhashed - getcwd() fetches the task structure pointer to the current dir dentry. If unhashed, it returns ENOENT, and the vfs layer is not involved at all. At that point, many things won't work and there is no obvious way for the user to get the directory rehashed. Instead of calling d_drop directly, call d_invalidate instead, as it will only drop (unhash) the dentry if we're the only one holding a reference. Since d_invalidate will also call shrink_dcache_parent, also remove that call from our code so it doesn't get called twice. Reviewed-on: http://gerrit.openafs.org/10774 Tested-by: BuildBot Tested-by: Anders Kaseorg Reviewed-by: Derrick Brashear (cherry picked from commit 997f7fce437787a45ae0584beaae43affbd37cce) Change-Id: I1e2b46fd076e96a7acbf3443f118fac8355d3e8c Reviewed-on: http://gerrit.openafs.org/10804 Tested-by: Anders Kaseorg Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Reviewed-by: D Brashear Reviewed-by: Stephan Wiesand commit 568a8872ae0fb038d9364af426513389791685ae Author: Stephan Wiesand Date: Fri Jan 31 17:01:06 2014 +0100 RedHat: don't package manpages for binaries not included We don't package copyauth, aklog_dynamic_auth and rmtsysd. Omit their manpages too. Reviewed-on: http://gerrit.openafs.org/10781 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: D Brashear (cherry picked from commit b78b7f0c3454be02048e4533ee26ef28dc8f78ff) Change-Id: Ifb52d8bcc19940b3725d7bbe616df70c9bd1a948 Reviewed-on: http://gerrit.openafs.org/10807 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Ken Dreyer Reviewed-by: Stephan Wiesand commit 23709f03a38eca661529b745b185393a0a239835 Author: Benjamin Kaduk Date: Thu Jan 9 23:34:30 2014 -0500 Disable some explicit sbrk() usage Mac OS X 10.9 now considers this function deprecated and warns on its use, causing the buildslave configuration to error out. On master, we added a library routine to get a process's size to opr; opr is not present on the 1.6 branch so another route is needed here. Since use of the OS X malloc implementation appears to have no effect on the result of sbrk(0), there is no loss of functionality by replacing the function call with a (different) constant value. There may still be some value in sbrk(0) on other systems, so only disable sbrk() for OS X, on the stable branch. This change is specific to the 1.6 branch. Change-Id: Ie5f96e923b78be22a9ce83d0a35a7675d517b073 Reviewed-on: http://gerrit.openafs.org/10746 Tested-by: BuildBot Reviewed-by: D Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 473322a453bbc409d54ab21e1d9637eaf15f085a Author: Benjamin Kaduk Date: Wed Jan 22 06:00:00 2014 +0100 cmd: Avoid unsafe use of strncat The NName function was using strncat(a, b, sizeof(a)), which doesn't work as you would expect if 'a' already contains data, giving a potential buffer overflow. This was fixed on master in commit 9a007a9df43645b63a8b642029b4931928f9268b by using strlcat from libroken, but we do not use libroken on the 1.6 branch. Instead, modify the strncat invocation to use a safer maximum length to copy. This is a 1.6-specific change. Change-Id: Ifa41e603a1c98682550afadd063def4b9706d9e2 Reviewed-on: http://gerrit.openafs.org/10731 Tested-by: BuildBot Reviewed-by: D Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 9987cb6cc35463eaf87d209e741aacf5c621d894 Author: Benjamin Kaduk Date: Tue Jan 21 14:59:59 2014 -0500 Search srcdir and objdir paths for rxkad includes The addition of rxkad-k5 support in 1.6.5 introduced dependencies on rxkad to the auth and afsauthent libraries. However, the rxkad headers used are both source files and generated files, so we must add both the source and build tree rxkad directories to the include search path. This is a 1.6-only change, since on master we are using libtool and do not need to reach into other parts of the source tree to rebuild certain files into these libraries. Change-Id: I819095a3e0ac259bba43205d0462659cbd2c6f03 Reviewed-on: http://gerrit.openafs.org/10736 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 2313e78e82354390e76ec0d24c7f2229c901e18e Author: Mark Vitale Date: Wed Dec 11 17:56:47 2013 -0500 viced: remove dead code CheckHost() Remove CheckHost(). Reviewed-on: http://gerrit.openafs.org/10580 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman (cherry picked from commit 76076708a921aae0635975d418dea4b06d2c1af6) Change-Id: I7400a874d9d638ed26f30fc46a01ace5857f1300 Reviewed-on: http://gerrit.openafs.org/10602 Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Mark Vitale Tested-by: BuildBot commit 36aef3c2b288d41acc7081533ca926ddc896d797 Author: Michael Meffie Date: Wed Oct 2 15:35:09 2013 -0400 cleanup potpourri.h references Clean up references to a header file which was removed some time ago. Reviewed-on: http://gerrit.openafs.org/10318 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear (cherry picked from commit 38fc16ddbf1e5477050db21c94d55f75bdadf80b) Change-Id: Ibb62c0f74b1ea0906d4379c37d2cf8b977d14e16 Reviewed-on: http://gerrit.openafs.org/10473 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit ff6712be60ec81725c4dd3f1f659eb592d4ec5ad Author: Andrew Deason Date: Mon Sep 30 17:51:40 2013 -0500 salvager: Whitespace formatting The whitespace here is pretty weird. Clean it up a little. Reviewed-on: http://gerrit.openafs.org/10311 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 93b0e0d50fb14561ca2b8b0c20876826335ec1ab) Change-Id: I2ee835fb33017301f207d827da10c93bc54bdf4a Reviewed-on: http://gerrit.openafs.org/10768 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 46f6f368a6da15b62beec07bcd3f3f42ca272d94 Author: Simon Wilkinson Date: Fri Feb 15 17:22:02 2013 +0000 vol: Don't assume enum is an int The type that an enum is promoted to for arithmetic is compiler dependent. We can't assume that it's an int, or a short. Explicitly cast the volume state enum where clang gets upset. Reviewed-on: http://gerrit.openafs.org/9137 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 304fac42b8cd4a71d0df063cafe88b2888e4d175) Change-Id: I8c5b3493549ec88727728a7f28e3430660c673b2 Reviewed-on: http://gerrit.openafs.org/10748 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit dcadd6b5a6f52f1e11235362d0feecd41dfa2ae3 Author: Stephan Wiesand Date: Thu Jan 23 14:43:32 2014 +0100 RedHat: Use systemd unit files on RHEL >= 7 Handle rhel >= 7 like fedora >= 15 when deciding whether to package systemd unit files or sysvinit scripts in the rpm spec file. Reviewed-on: http://gerrit.openafs.org/10631 Tested-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Ken Dreyer (cherry picked from commit 534f802ac900df4704f4e8397eca0aeccf169023) Change-Id: I98f5844b30a6baa85061864f58f64be80f2c7b62 Reviewed-on: http://gerrit.openafs.org/10767 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 440583f39b3791de9b58a2c9bd3b74aced68c182 Author: Simon Wilkinson Date: Fri Feb 22 10:30:56 2013 +0000 afsmonitor: Allow CBSTATS collection to work The switch which selects the collection number was missing a 'break', so selecting the CBSTATS collection would always fall through to the default, error, case. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9235 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 75ef02d9dfb43079f111ea22ae351cf0eec13fab) Change-Id: I45bd1152385bdb05d1d027905b52592b1bc0869f Reviewed-on: http://gerrit.openafs.org/10749 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 9feb69bb4c8417f0a8006fd43f6bc15e0b60cefd Author: Simon Wilkinson Date: Fri Mar 30 19:14:38 2012 +0100 libadmin: read returns an ssize_t, not a size_t size_t is unsigned, and therefore can never be less than 0. Using it as a return code from read() means that we never catch read errors. read() is defined as returning ssize_t, so just use this to capture its return code. Caught by clang's new error messages Reviewed-on: http://gerrit.openafs.org/7075 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit b5f75c122875b4212eb1a885d09bfdd63f537a19) Change-Id: Ief5b6cd7751cf68c4254cd113da734c864d53d5d Reviewed-on: http://gerrit.openafs.org/10741 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit d04df5c0e6f9136c400dd49dea3d9aec030e5ca2 Author: Simon Wilkinson Date: Fri Mar 30 19:33:55 2012 +0100 vlserver: unsigned values are always >0 Maxvolidbump is defined as an unisgned int, and thus can never be less than 0. Remove the pointless check, as it just makes clang sad. Reviewed-on: http://gerrit.openafs.org/7084 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 350b5d58779cc127b96497283c2d982e099b911c) Change-Id: Ib902a5b165219469db5f370ebea4c078f10726ee Reviewed-on: http://gerrit.openafs.org/10740 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 22d8f791f66b788011bb3e420ee0dca11e5db188 Author: Derrick Brashear Date: Wed May 1 15:59:41 2013 -0400 pt_util: gcc warning fix it's claimed these are not initialized before use. squelch compiler errors. has to be in parent as otherwise we will zero them in our loop where we potentially want the parent group id, which is not on "this" line as we add members. Reviewed-on: http://gerrit.openafs.org/9840 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 13a3ba7ba2d660a08925a3ccd05d74eedcf8c5cd) Change-Id: I71b968a8ef0751f6e80633e8051fdfb4a17cfd8d Reviewed-on: http://gerrit.openafs.org/10738 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 7af73eb272311f15d357c1d41a1f49a795eb20b8 Author: Benjamin Kaduk Date: Thu Jan 9 23:54:45 2014 -0500 Disable deprecated warnings for krb5 routines In OS X 10.9 Mavericks, Apple has marked all of the krb5 routines as deprecated (in favor of the GSS framework). We must disable these warnings in order to allow the buildslave to have a successful build. Luckily, Apple has left in rope for us to programmatically disable the deprecated attribute with a preprocessor macro. Defining this macro should be safe everywhere, so do so unconditionally. This commit touches a few more files than the version on master does, since the 1.6 branch is using the krb5 library for its rxkad-k5 implementation; the files in auth/ and rxkad/ are specific to 1.6. Reviewed-on: http://gerrit.openafs.org/10699 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 17c50911f79382e3ba8960e4b6c122b348e9baef) Change-Id: Id0e806029e25583698574bf3df626ce12a72312a Reviewed-on: http://gerrit.openafs.org/10735 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 71e3c5d6ca4e1d75504249693fe9f4587c870487 Author: Simon Wilkinson Date: Fri Mar 30 19:40:30 2012 +0100 xdr: Len can never be negative The len parameter to xdr_len is unsigned, so can never be negative. Don't bother testing to see if it is negative, so that clang likes us again. Reviewed-on: http://gerrit.openafs.org/7089 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f1842bcb87c84e8862ca521f491215e42ce1ee2a) Change-Id: I1cf030b8e9f79bdf867bcaecfd59d8ade7fc8c25 Reviewed-on: http://gerrit.openafs.org/10734 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 2ca29f568956b045f5e3ec27a7dc45683fbd5c67 Author: Simon Wilkinson Date: Fri Mar 30 19:37:36 2012 +0100 rx: Handle negative returns on packet reads rxi_RecvMsg returns an int, because it can return a negative value upon error. Don't store its return value as an unsigned int, because this may hide the potential errors. Modify the error handling loop so that errors get to where they are intended. Reviewed-on: http://gerrit.openafs.org/7087 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 438d6ba63cda7d7484c545a4fd181803e84d68eb) Change-Id: I4f479a4e722b5f298ba2be4e86816ebddede701d Reviewed-on: http://gerrit.openafs.org/10733 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 29a6e95cddff3dab9477937bcd0c64ef2ff00809 Author: Simon Wilkinson Date: Fri Mar 30 19:12:37 2012 +0100 Unix CM: Purge needless brackets Doing if ((a==b)) is unecessary. It's also potentially dangerous, as that's the syntax required to do assignment within an if statement. clang now issues warnings (errors in -Werror mode) when it encounters these. Remove pointless braces from the Unix CM to make clang happy. Reviewed-on: http://gerrit.openafs.org/7074 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 345656ec140f0156f2076629bdfc84940c02160b) Change-Id: I6a47d30fd6ef0ad0c6903c79a0bfe579db527847 Reviewed-on: http://gerrit.openafs.org/10743 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand commit bdb61cc567939386c3685f15ef2ac47bcff8f9ae Author: Simon Wilkinson Date: Fri Mar 30 19:30:18 2012 +0100 vol: Remove unneeded braces Doing if ((a==b)) is unecessary. It's also potentially dangerous, as that's the syntax required to do assignment within an if statement. clang now issues warnings (errors in -Werror mode) when it encounters these. Remove pointless braces from vol to make clang happy. Reviewed-on: http://gerrit.openafs.org/7082 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 58be19d792e6b8e93fbd49bc4ef04bbb8f4560ef) Change-Id: Ie2fd97927eace8a9317598c1b44d2c2610cdc31a Reviewed-on: http://gerrit.openafs.org/10739 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 0bb974222e31a7e7cfea1e2c1b15f542b99dbf99 Author: Simon Wilkinson Date: Fri Mar 30 19:24:23 2012 +0100 ptserver: Remove redundant braces Doing if ((a==b)) is unecessary. It's also potentially dangerous, as that's the syntax required to do assignment within an if statement. clang now issues warnings (errors in -Werror mode) when it encounters these. Remove pointless braces from ptserver to make clang happy. Reviewed-on: http://gerrit.openafs.org/7080 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 4d4e4dde7c0efcf238251b1ea1dc3933810062d0) Change-Id: I4aad6766fc759895c8bffc16dde06169589f64ba Reviewed-on: http://gerrit.openafs.org/10737 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 27f32e81e4fb8bf7219d732fc9bb053234ba4290 Author: Simon Wilkinson Date: Fri Mar 30 19:39:51 2012 +0100 rx: Remove needless braces Doing if ((a==b)) is unecessary. It's also potentially dangerous, as that's the syntax required to do assignment within an if statement. clang now issues warnings (errors in -Werror mode) when it encounters these. Remove pointless braces from the Unix CM to make clang happy. Reviewed-on: http://gerrit.openafs.org/7088 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 5e107724f3661254cfdb693ae2d4d1c5238eba7d) Change-Id: I99a04d9a2c547e34a3daca6f9e6714f6c7b76b9c Reviewed-on: http://gerrit.openafs.org/10732 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand commit 642e7f586de57683aadbc59545ebb5607afc90c6 Author: Arne Wiebalck Date: Fri Dec 13 11:46:04 2013 +0100 make openafs uninstallable even if /afs is missing The preuninstall scriptlet of the openafs RPM removes /afs. If, for whatever reason, that directory does not exist, the scriptlet will fail and hence break the deinstallation of the openafs package. The proposed patch makes the scriptlet evaluate to true even if the /afs has been removed by some other means and allows the package to be uninstalled. Reviewed-on: http://gerrit.openafs.org/10581 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0c5d403076946c7a4f53f5e44df8fe0d986cea06) Change-Id: Ie686545c6618242f2c2644a01891cd0dfe0d0d05 Reviewed-on: http://gerrit.openafs.org/10600 Reviewed-by: Ken Dreyer Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 6385d88318e47953f1ebbf2ff60246259e1720b2 Author: Michael Meffie Date: Wed Jan 22 20:23:29 2014 -0500 doc: fix typo in fs setacl Fix typo in the dropbox section where 'l' was referred to as 'read', not 'lookup'. Reviewed-on: http://gerrit.openafs.org/10750 Tested-by: BuildBot Reviewed-by: Ken Dreyer (cherry picked from commit eb3f8c99edcf005dfba836ae9ab1d3102f162c2a) Change-Id: I177e6975c19d176e5a7277d0b458e36b4e5f99f9 Reviewed-on: http://gerrit.openafs.org/10751 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Stephan Wiesand commit 294164aa4d4cd6e2c5fc993c39d3155254a6d54e Author: Stephan Wiesand Date: Wed Oct 9 11:05:27 2013 +0200 Make OpenAFS 1.6.6 Update version strings for 1.6.6 Change-Id: I52c88bc22d4f058a32c34e8690385b1cf116c7d6 Reviewed-on: http://gerrit.openafs.org/10330 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 01514413c344cf630425f92b5528f58711183f10 Author: Stephan Wiesand Date: Thu Jan 16 12:17:51 2014 +0100 Update NEWS for 1.6.6 Finalize the release notes for OpenAFS 1.6.6 Change-Id: I9e86a1675d79a828beb39932d4cbf4e0668e549e Reviewed-on: http://gerrit.openafs.org/10714 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 93601b05f8a4007ce4504079ce35b4e1f42232ea Author: Andrew Deason Date: Mon Dec 23 16:10:45 2013 -0500 RedHat: Fix specfile changelog Oct 29 2007 was a Monday, not a Tuesday. rpmbuild does actually yell at us about this, so fix this so it will shut up. Reviewed-on: http://gerrit.openafs.org/10621 Reviewed-by: Perry Ruiter Tested-by: BuildBot Reviewed-by: Ken Dreyer (cherry picked from commit 16d8ab09bd9a0bd75319e6c32afb8bc2c5c04e51) Change-Id: Idec96a6dc1e14eef90b11f02799dff28bcbc2d24 Reviewed-on: http://gerrit.openafs.org/10704 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 1855e00980916aafac6c629e91fde1761c7680bb Author: Andrew Deason Date: Thu Dec 26 12:56:37 2013 -0500 Fedora: Handle new kernel variant paths With Fedora 20, Fedora now separates the variant from the rest of the kernel version with a plus (+) instead of a period (.) . This results in directories called e.g. 3.12.5-302.fc20.i686+PAE, where right now we look for 3.12.5-302.fc20.i686.PAE. Use this new directory scheme for Fedora 20 builds, so we can build against non-default kernel variants on Fedora 20 and beyond. Reviewed-on: http://gerrit.openafs.org/10620 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Ken Dreyer (cherry picked from commit 837ec9dd41c4b1e10ad9d32a52b0f34dd665026a) Change-Id: I513ab231a9d7b61ec7790eb99a27da698a355f17 Reviewed-on: http://gerrit.openafs.org/10622 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit fb499d5b2f727d196f4cd4c300a26b4baf394e8e Author: Andrew Deason Date: Mon Dec 23 13:32:28 2013 -0500 RedHat: Munge future kernel versions We currently look for "fc1?" (that is, fc10 through fc19) when trying to munge the kernel version in some ways. This broke on Fedora 20, since 20 obviously does not match "fc1?". Similarly, we look specifically for "el6" for RHEL6 versioning quirks, but these will break on RHEL7 and beyond. Change the version checks so that this will work all the way through Fedora 99 and RHEL 9. That won't work forever, but it will keep us working for a few versions if the versioning quirks do not change. Reviewed-on: http://gerrit.openafs.org/10618 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Ken Dreyer (cherry picked from commit cddc732ec5fd40c94126e5f0b7103136592a2efe) Change-Id: I439cd3101ea360b775c638cd67961fc0e4ffcaf6 Reviewed-on: http://gerrit.openafs.org/10619 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit f101a0ab400ad8ed4359f4b2649d9998df16a042 Author: Arne Wiebalck Date: Fri Jul 12 11:39:53 2013 +0200 RedHat: support building on ELRepo kernels Amend the pattern matching in openafs-kmodtool to support building for kernels from ELRepo. Reviewed-on: http://gerrit.openafs.org/10083 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 397a086b77c4351e5332a73ae4859faf239bf45e) Change-Id: I0f1a7126271cb7952e4369af3c93484c4b0567d0 Reviewed-on: http://gerrit.openafs.org/10703 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 75046632f402c050328643220b5b44e8d545c34e Author: Andrew Deason Date: Tue Dec 17 17:27:53 2013 -0600 rx: Remove obsolete comment This comment refers to the fact that we used to be just checking for SELinux to see if we should pass that extra argument. Ever since commit cb1b41b159b98881f66319d7f65d941ba9fab911, we do have a better test for this. Reviewed-on: http://gerrit.openafs.org/10593 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 2ed7023b26acb3277e42eac803a0702b95167e6e) Change-Id: I5a8ebcda7fcb85931638ab0bec807b1da8ebed3f Reviewed-on: http://gerrit.openafs.org/10597 Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit e94e39bf226fad30e17ea4ff4ea746522c7de11a Author: Stephan Wiesand Date: Wed Dec 18 10:11:48 2013 +0100 doc: fix a nit in fs_newalias.pod The CAUTIONS section is about fs newalias, not fs newcell. Reviewed-on: http://gerrit.openafs.org/10595 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8b8e8c2ab1974ba4c14942cc7bd94aac8602192f) Change-Id: Ie800b600f85f17362d92ce51ee55de3f24a3361e Reviewed-on: http://gerrit.openafs.org/10601 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 7df02ff8915f6fe1d611a57836853b896b0f46be Author: Andrew Deason Date: Wed Jan 15 09:47:49 2014 -0600 Revert "viced: Enable NAT ping on hosts" This reverts commit 53005f4fe7b6df5263d399f0aec9fee3078e39bc. The fileserver-side "NAT ping" behavior has yet to be proven to be helpful in situations with NATs. If the behavior is not helpful, this generates potentially a significant amount of extra useless traffic. So until it can be shown to what degree this is helpful, keep this behavior out of the fileserver. Change-Id: I783222e1be166920445175fe09680cd4968c2810 Reviewed-on: http://gerrit.openafs.org/10135 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 7ad192baf5a1b1ce18b57562b02e74be2bbb73c7 Author: Stephan Wiesand Date: Thu Oct 17 13:51:29 2013 +0200 Make OpenAFS 1.6.6pre2 prerelease for 1.6.6 Change-Id: I51010e70d1a9377f7a82d48798dc2b439e5bb4f5 Reviewed-on: http://gerrit.openafs.org/10344 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand commit 3a3736574f48330aeaa8e80863522edcd578acc6 Author: Christof Hanke Date: Thu Dec 5 10:00:42 2013 +0100 Linux: fix whitespace issue introduced in Change I1e84969b. It does not follow the overall style. Reviewed-on: http://gerrit.openafs.org/10529 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit faf14be3827fa72914a1c792c9a99a3353717ded) Change-Id: Id98b222c20acd985c753e5f5c9acabf235cb7975 Reviewed-on: http://gerrit.openafs.org/10544 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit d68e6c24f53b6878733e28909e23e44a0fdfae1d Author: Jeff Layton Date: Fri Dec 6 13:34:04 2013 -0500 Linux: stop trying to use getname/putname The current code has afs_putname defined as kmem_cache_free (names_cachep, (void *) name); This is wrong and will cause a double -free when syscall auditing is enabled. Fix it to call putname properly. Instead of that, just create a new afs_getname function that doesn't bother with struct filename at all, and use that unconditionally. Signed-off-by:Jeff Layton Reviewed-on: http://gerrit.openafs.org/10547 Tested-by: BuildBot Reviewed-by: Jeff Layton Reviewed-by: Derrick Brashear (cherry picked from commit d40ed7391670010db0df2202d770341b2ca82f32) Change-Id: I860366b5ad3ce43cbade0ddfb8bed5ba5e7908a8 Reviewed-on: http://gerrit.openafs.org/10578 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit d6b6cd5a170f650fcbffcbb8f6bd9a54852ebabb Author: Stephan Wiesand Date: Wed Dec 18 15:26:59 2013 +0100 Update NEWS for 1.6.6pre2 release notes for OpenAFS 1.6.6 prerelease 2 Change-Id: Id829b60e82d56d11ebfb454595518d9585ca63fe Reviewed-on: http://gerrit.openafs.org/10596 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 77826dd3eeb5355834e073553462856df64b9e81 Author: Ken Hornstein Date: Thu Dec 5 13:53:56 2013 -0500 Packaging support for MacOS X 10.9 "Mavericks". Based on work originally done by Matt Haught . Reviewed-on: http://gerrit.openafs.org/10539 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit cb53d255a6285c884c6a5ea9a20427327b1ab9b3) Change-Id: Ic537b46c7eb3f6b1e12a92ffbcffd5416a2a81d9 Reviewed-on: http://gerrit.openafs.org/10542 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand commit 33edca62271ed4c5e50e1990adfb9cc262d8468e Author: Ken Hornstein Date: Thu Dec 5 13:46:18 2013 -0500 Add support for configuration of MacOS 10.9 "Mavericks". Based on work originally done by Matt Haught Reviewed-on: http://gerrit.openafs.org/10538 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit aac384b2eda823519780afed84e53a868561711d) Change-Id: Ic15fefc11e7b2f1170cb5ff52a94c1d6aea499a7 Reviewed-on: http://gerrit.openafs.org/10541 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand commit e4b2242f3a29832e1df389ceea6ec4ca41c06306 Author: Ben Kaduk Date: Tue Mar 26 17:42:38 2013 -0400 Fix DARWIN build with clang In 1d8937b86050 we added a function call to kauth_cred_unref in the DARWIN100 case (replacing a macro), but added the inclusion of sys/kauth.h only when using versions older than DARWIN80. On DARWIN100 and above, clang detects that the now-implicit function declaration is in conflict with the actual prototype, which is included later through afs/sysincludes.h when compiling the kernel rx code. Since including sys/kauth.h seems to have been harmless for old versions, just include it always. Reviewed-on: http://gerrit.openafs.org/9676 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6ad2cc0275cd1074316d6bc70cd8758d25f94467) Change-Id: I7e3bfdee65791828fe6ee68e3dc125be2311cd86 Reviewed-on: http://gerrit.openafs.org/10549 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand commit 931d1a8bea393ba3df69b163cb4d05c35f3c948e Author: Simon Wilkinson Date: Fri Mar 30 19:09:36 2012 +0100 DARWIN: Make crfree() an inline function On Darwin 100, we have #define crfree(X) kauth_cred_unref(&X) which expands in one place to kauth_cred_unref(&(afs_ucred_t *)avc->linkData) clang warns about this in -Werror mode, because arguments to the address-of operator must be lvalues. To fix this make crfree an inline function, which will then let us do the indirection required. Reviewed-on: http://gerrit.openafs.org/7073 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 1d8937b860509fcaabb041bc14faf7aa3023f3c9) Change-Id: I869caa41884c33e6376d664a745efb0f8aa761d0 Reviewed-on: http://gerrit.openafs.org/10548 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit e54a0902fb4ed09d955a2cb9c3d091da28b8f21a Author: Ken Hornstein Date: Thu Dec 5 13:57:36 2013 -0500 Remove extra whitespace from macro invocations On MacOS X 10.9, the compiler has switched to LLVM and as a consequence generates an error if there is a space between a macro invocation and the starting left parenthesis. Based on code originally done by Matt Haught . Reviewed-on: http://gerrit.openafs.org/10540 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ce96143d79ea006f7b1318dd1c962d4c4f79fc1e) Change-Id: I0e1c2a27ea2dc85205e9fa267a804438aad77bfe Reviewed-on: http://gerrit.openafs.org/10543 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Reviewed-by: Stephan Wiesand commit 192536d62b085bb14f54ffc958e6303810cca624 Author: Ken Hornstein Date: Wed Nov 20 13:37:52 2013 -0500 Support for changes to OS X Mavericks VNOP_SYMLINK() function. Add support for an extra argument to afs_symlink() to return the newly-created symlink vnode if requested (this is needed on OS X Mavericks). On OS X Mavericks return the newly-created symlink vnode in the symlink vnops functions, on all other platforms ignore it. It turns out that technically OS X has required the symlink to be created for a while, but code inside of symlink() would call namei() on the symlink name if the returned vnode point was NULL. The difference is that on Mavericks the Manditory Access Control Framework has been enabled, and that turns on some extra code which unconditionally calls vnode_mount() on the returned vnode pointer, which ends up causing a panic Reviewed-on: http://gerrit.openafs.org/10474 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 3f4c1099b7b2d1467b1f5b701ea2f953fec20dc0) Change-Id: Ib8bac6fd4ed8fe5c2e9567431f7d03fdab50cd50 Reviewed-on: http://gerrit.openafs.org/10519 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit a5611c2dffc58595d686d040b0f12c474a9d02c2 Author: Stephan Wiesand Date: Thu Nov 21 15:01:29 2013 +0100 Linux: Fix build for older kernels w/o bool Commit b7f4f2023b2b3e1aac46715176940fb50cc75265 broke builds against older kernels which don't have bool defined in linux/types.h . Fix this by using unsigned char instead of bool for the static inline functions. Reviewed-on: http://gerrit.openafs.org/10483 Tested-by: BuildBot Reviewed-by: Anders Kaseorg Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 5b67620c7b3ad224ea53075e37ecf1f7e6a7c51a) Change-Id: Iccb8ca2625211b94b105c6eb60764f4a064b345a Reviewed-on: http://gerrit.openafs.org/10518 Reviewed-by: Marc Dionne Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 908b8a0ea5e72fd0e5c5b020e1f939b0491070b5 Author: Christof Hanke Date: Tue Nov 19 09:57:22 2013 +0100 Linux: always include headerfile when it is required. In some linux-kernels (like in SLES11 SP3) it is not done automatically and the compilation fails. Reviewed-on: http://gerrit.openafs.org/10471 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 779ab18bafdea3535b403ba62f3ec8a8b127748e) Change-Id: If5bc31e0cf09634f5d36bbe7757919b6f1dc310f Reviewed-on: http://gerrit.openafs.org/10472 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Marc Dionne Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit d294e9cea5bf7c8b748355537c2f423eb177b035 Author: Stephan Wiesand Date: Thu Oct 17 13:48:26 2013 +0200 Make OpenAFS 1.6.6pre1 prerelease for 1.6.6 Change-Id: I4d93c9937316f47f06727a81deefab253de46030 Reviewed-on: http://gerrit.openafs.org/10343 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand commit 047c9ba792ce52d33cb5fcb15d980aebedcb665e Author: Stephan Wiesand Date: Wed Oct 23 15:53:52 2013 +0200 Update NEWS for 1.6.6 release notes for OpenAFS 1.6.6 Change-Id: Ifa9340d3c2e2a94f2d98adc85dec62022b9ea446 Reviewed-on: http://gerrit.openafs.org/10359 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 8f88530289297117b001d81843e3ac23564815d0 Author: Anders Kaseorg Date: Thu Nov 7 15:37:25 2013 -0500 Linux: Get rid of !STRUCT_KEY_UID_IS_KUID_T case On the few kernel versions before struct key.uid was converted to kuid_t (v3.7-rc1~147^2~76), it was not possible to enable both CONFIG_KEYS and CONFIG_UIDGID_STRICT_TYPE_CHECKS, so this case was impossible. That’s good, because it also had a typo in its implementation (and was confusing to deal with correctly). Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/10443 Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Reviewed-by: Marc Dionne Tested-by: BuildBot (cherry picked from commit d0a13fe678412464452afae9379d63fa48d41d83) Change-Id: I081115d13b6deb3b10e6da442bed7a7bb9347296 Reviewed-on: http://gerrit.openafs.org/10458 Reviewed-by: Marc Dionne Tested-by: BuildBot Tested-by: Anders Kaseorg Reviewed-by: Anders Kaseorg Reviewed-by: Stephan Wiesand commit 30160ad6eec3c290a770b6069fc106f452e5b4ba Author: Anders Kaseorg Date: Thu Oct 31 09:11:59 2013 -0400 Linux: Fix build with CONFIG_UIDGID_STRICT_TYPE_CHECKS (user namespaces) With CONFIG_UIDGID_STRICT_TYPE_CHECKS (a dependency of user namespace support, CONFIG_USER_NS) turned on, uid_t and kuid_t are different types, as are gid_t and kgid_t, and we need to use namespace-dependent functions to convert between them. We can’t use init_user_ns as the namespace because it’s GPL-only, so instead we grab the current user_ns at module load time. This is required to support kernels with user namespace support. We don’t yet have full support for independent AFS use by different users in a multiuser container; that will need to wait for future work. Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/10386 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit b7f4f2023b2b3e1aac46715176940fb50cc75265) Change-Id: I55fb7d4ccbed2b4381937270955b117244b80719 Reviewed-on: http://gerrit.openafs.org/10457 Reviewed-by: Marc Dionne Tested-by: BuildBot Tested-by: Anders Kaseorg Reviewed-by: Anders Kaseorg Reviewed-by: Stephan Wiesand commit 70790f87b7b0ef3746c043a868c4306e05008ecd Author: Anders Kaseorg Date: Tue Nov 5 01:11:15 2013 -0500 afs_linux_pag_from_groups: Stop checking for NOGROUP sentinel Linux hasn’t used NOGROUP as a sentinel like this since before kernel 2.1.12, and OpenAFS hasn’t used it on Linux since commit 109927bf6f54b58b76ac48ba41c2012c74937fed (Remove pre-Linux 2.6 support). Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/10426 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 231e50ff9742927188d67099f0e1dbaf09858c3c) Change-Id: I9ad46eb5a2aafa75e5412eafb1e26bd2c6f0d317 Reviewed-on: http://gerrit.openafs.org/10456 Reviewed-by: Marc Dionne Tested-by: BuildBot Tested-by: Anders Kaseorg Reviewed-by: Anders Kaseorg Reviewed-by: Stephan Wiesand commit 7d70e9819bb42ad45defb961fb5cee97653349b8 Author: Jeffrey Altman Date: Mon Sep 9 09:20:32 2013 -0400 afs: CacheTruncateDaemon work until Cache Drained The afs_CacheTruncateDeamon() thread will not sleep until both 'afs_CacheTooFull' and 'afs_WaitForCacheDrain' are true but the thread will stop freeing space in the cache when 'afs_CacheTooFull' is true which prevents 'afs_WaitForCacheDrain' from ever becoming true if it is not already. Make the conditional for doing work include 'afs_WaitForCacheDrain'. Change-Id: Id25929080eecd390d4ed56e5fffd6fe56cc8502c Reviewed-on: http://gerrit.openafs.org/10436 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 1d9cc8fa66e32b7e27a81c474d17f5134ff1f0c9 Author: Jeffrey Altman Date: Sat Sep 7 14:04:32 2013 -0400 afs: afs_CacheTruncateDaemon wake waiters !too full When processing afs_CacheTruncateDaemon() if the cache is no longer too full, then wake the waiters. Change-Id: I3dfc2251baad984bd53c4ddaa38f03293eb3ec1c Reviewed-on: http://gerrit.openafs.org/10435 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Marc Dionne Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 8695976b8bbc29b05d65563a1f54e90abb00e0c4 Author: Jeffrey Altman Date: Sat Sep 7 13:55:58 2013 -0400 afs: afs_CacheIsTooFull macro refs wrong constant When afs_CacheIsTooFull tests the number of free blocks it should use CM_DCACHESPACEFREEPCT (90%) instead of CM_DCACHECOUNTFREEPCT (95%). Change-Id: I7ecb795e04a2bb3aae801a6feb57f205d3ad4d46 Reviewed-on: http://gerrit.openafs.org/10434 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Marc Dionne Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 5718036049a01004cd1a085148b9530762811246 Author: Jeffrey Altman Date: Sat Sep 7 13:27:54 2013 -0400 afs: afs_FlushDCache avoid dup cache drained check afs_WakeCacheWaitersIfDrained is called as the last statement of both afs_DiscardDCache and afs_FreeDCache. There is no need to perform the same check again before exiting afs_FlushDCache. Change-Id: I111d7dc1638fa8fc0a4c35d9cc4c0a1631300f89 Reviewed-on: http://gerrit.openafs.org/10433 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Marc Dionne Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit ec96b7e60d63627e72950b6d46985a995734d787 Author: Jeffrey Altman Date: Mon Sep 9 12:17:36 2013 -0400 afs: Introduce afs_WakeCacheWaitersIfDrained Consolidate common code into afs_WakeCacheWaitersIfDrained(). Change-Id: I0240d7c1be6c1a8bf22eac5fd6daf909e8320615 Reviewed-on: http://gerrit.openafs.org/10432 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Marc Dionne Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 17aacc87dedffde07b2ae44a73cbddff46222159 Author: Jeffrey Altman Date: Sat Sep 7 12:26:52 2013 -0400 afs: FreeDCache test afs_blocksDiscarded For consistency with afs_FlushDCache and afs_DiscardDCache include afs_blocksDiscarded in the free space test. When afs_FreeDCache is called it should be zero. Change-Id: I84a5dea626258c628d24bf647088e2cbfd233c9a Reviewed-on: http://gerrit.openafs.org/10431 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Marc Dionne Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit ebc334a4cc020eaf4f46055155db3a4dede9bfc2 Author: Anders Kaseorg Date: Tue Nov 12 00:23:47 2013 -0500 Linux: afs_fill_super: Call bdi_destroy on the failure path Without this, if AFS startup failed, then trying to start AFS again triggers these warnings: WARNING: CPU: 3 PID: 657 at /build/buildd/linux-3.12.0/fs/sysfs/dir.c:526 sysfs_add_one+0xa5/0xd0() sysfs: cannot create duplicate filename '/devices/virtual/bdi/afs' WARNING: CPU: 3 PID: 657 at /build/buildd/linux-3.12.0/lib/kobject.c:196 kobject_add_internal+0x1f4/0x300() kobject_add_internal failed for afs with -EEXIST, don't try to register things with the same name in the same directory. and leads to general system instability. This can be reproduced by starting AFS twice with an empty cache, dynroot disabled, and no network. Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/10448 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit f5f53cb0a1f326ed4695621f6a5a63f798444549) Change-Id: I6dda2fb561279d445bb7fdfdb601b64b326cd4c1 Reviewed-on: http://gerrit.openafs.org/10454 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Michael Meffie Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit ba0a374966dcec78392443bb5f0c43e9c2f0f466 Author: Ben Kaduk Date: Wed Oct 30 13:24:59 2013 -0400 Make process.o depend on process.amd64.s Some versions of the rule for this target use the amd64 flavor of the source file, so it should be listed as a dependency. This is a 1.6-specific change; the relevant dependency was added on master as part of change #5450, which is a much larger change. Change-Id: I5eb392ccd6b059f6f2344398bd697a5096a1bd77 Reviewed-on: http://gerrit.openafs.org/10382 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit e2bdca9aa7af4636f411d1c9aabc485da20225b9 Author: Ben Kaduk Date: Tue Oct 15 20:57:26 2013 -0400 Tidy up MakefileProto.FBSD.in We don't support FreeBSD 6.x and older now. As such, we can convert entirely to the "new" world order, and not have to worry about adding new sysnames to the conditionals every time we add them. FreeBSD 7.x is no longer supported by upstream, but it does not impose an undue burden on us to continue to build on FreeBSD 7.1 and higher; the code needed for 7.0 exactly can be removed, though. (The sense of the conditionals should really have been reversed anyway, so that the default case would catch new sysnames correctly. Too late now.) This is a 1.6-only change, as the libafs build system on master is quite different. Change-Id: Iad5d8b6edb9140b38568ab57ffecf0cfdaf1cbd3 Reviewed-on: http://gerrit.openafs.org/10375 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit eacf8facd86f3480dfc8a2676f20572178d86bb3 Author: Ben Kaduk Date: Tue Oct 15 16:56:07 2013 -0400 Sysname and param.h for FreeBSD 9.2 and 11.0 9.2 is newly released and HEAD is now 11-current. On the 1.6 branch (unlike master), we still need to define AFS_64BIT_ENV. Reviewed-on: http://gerrit.openafs.org/10341 Reviewed-by: Derrick Brashear Tested-by: Andrew Deason Reviewed-by: Jeffrey Altman (cherry picked from commit 1b674ae30925c8459e1a5614e19562af460850d8) Change-Id: Id5d5f2ca74cbdb816a759487e01aefb215894887 Reviewed-on: http://gerrit.openafs.org/10381 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit ce19d1de2a12a31db8785309e108253c2a401076 Author: Ben Kaduk Date: Wed May 29 19:18:22 2013 -0400 FBSD: plug refcount leak in pioctl When gop_lookupname_user returns a non-NULL vnode, the vnode came from afs_GetVCache (by way of afs_lookup) which takes a reference on the vnode entry. There's no need to take another spurious reference here. The existing code already knows that there's a reference in place, as there is an AFS_RELE down where FBSD80_ENV unlocks the vnode if it's locked (that code is also suspicious). Prior to this patch, things like 'fs flush /path/to/file' would leak a reference on that cache entry, preventing clean shutdown. Reviewed-on: http://gerrit.openafs.org/9957 Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 2bbba424ad6728a221688f782b4df90bf6da4a63) Change-Id: If9435903b32ca7001b418bc7a0fb611bda4d424e Reviewed-on: http://gerrit.openafs.org/10380 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 0d41c9a09206ad2b74a494f49469e289d3617087 Author: Benjamin Kaduk Date: Wed Sep 25 16:57:41 2013 -0400 Fix build for FreeBSD 10.0 Move a rmlock.h inclusion up a bit so that the vm headers can get the rmlock assertion (and other) macros they need. The filedesc structure has been expanded on FreeBSD to support a stronger capabilities system; getting to the actual file descriptor requires another structure access. limits.h and stdarg.h need sys/ and machine/ prefixes for inclusion in the kernel on FreeBSD. Unlike on master, there are not spurious include search path directives to remove. Catch up to VM layer changes. This builds, but crashes at runtime due to some ABI incompatibilities that appear in the rx event layer; those will be fixed in a separate patch. Reviewed-on: http://gerrit.openafs.org/10339 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman (cherry picked from commit e222b08c4049dae95475eda2d5c54bd43dd45e2e) Change-Id: Ia8f0f31b000292fd160b8752ad5839852e11f0e0 Reviewed-on: http://gerrit.openafs.org/10379 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 4dad6373c808e67d87faf14e2d011d58979dc737 Author: Ben Kaduk Date: Fri Mar 22 13:51:02 2013 -0400 Catch up to FreeBSD VM object read/write locks Upstream r248084 changed the vm_object mutex to be a rwlock, allowing for future optimizations. This is a KPI change, so introduce conditionals to be compatible with both versions of the KPI. Reviewed-on: http://gerrit.openafs.org/10295 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 897e970dbe09d163479719b4c9befa660d99874b) Change-Id: Ieeb30f3ad9accab37117109ccf82952812157aab Reviewed-on: http://gerrit.openafs.org/10378 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 336fe48e42c68c759eb35232c6d7672bcb8e7957 Author: Ben Kaduk Date: Mon Jun 20 22:34:41 2011 -0400 FBSD: Remove include directive for nonexistent file In the bsd.kmod.mk world, this becomes a fatal error. Reviewed-on: http://gerrit.openafs.org/5033 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 037f3251cd8fa318ad8320a061368efedc480c37) Change-Id: If586761fce1254818c858d29ce6c31a5b8b13943 Reviewed-on: http://gerrit.openafs.org/10377 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 476e2048b96453827f2e50e3a79f3ecc539f352b Author: Ben Kaduk Date: Thu Mar 28 17:10:29 2013 -0400 FreeBSD: VOP_MMAP has been dead since 1996 Clang complains that our (K&R!) declaration of struct vop_mmap_args will only be visible within the (empty) function. With the kernel's CFLAGS, though, this is fatal. Remove the dead code. Reviewed-on: http://gerrit.openafs.org/9856 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a63e6747abd33fef40da16312dfc22d052bffd00) Change-Id: I647af5c9574dacd2b9fcd5147a0a252b3981c2c0 Reviewed-on: http://gerrit.openafs.org/10376 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 4914a6355d5cc7b6704706f4ec211b5f300cc682 Author: Ben Kaduk Date: Tue Oct 15 16:00:01 2013 -0400 Adjust for microtime() ABI on all XBSD On the BSDs, struct timeval is not two 32-bit integers like our struct clock, so the ABI is quite incompatible. Use the native type for the function call and translate to our local type accordingly. Unlike on master, there was no workaround in the FreeBSD kernel build to remove. Reviewed-on: http://gerrit.openafs.org/10340 Reviewed-by: Jeffrey Hutzelman Tested-by: BuildBot Reviewed-by: Antoine Verheijen Reviewed-by: Jeffrey Altman (cherry picked from commit 1bdcc3c7bca092f189f434f1f7b174090c24250c) Change-Id: I54cb609f80bc35fb09a5026c964ba28ae860f3f5 Reviewed-on: http://gerrit.openafs.org/10374 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit ac2d87fb6380de2ba83013983ad9c53f81347e11 Author: Andrew Deason Date: Thu Nov 1 16:46:13 2012 -0500 afs: Add some comments on GetValidDSlot panics A couple of call sites for afs_GetValidDSlot currently panic if an error is returned, but no explanation is given. Add a few comments helping explain why there is a panic there, instead of graceful error handling. Reviewed-on: http://gerrit.openafs.org/8407 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3081a2cff2e4f9499268854504873fa801d50ce5) Change-Id: I3bbe8f32683cb6086add494641b206c5b861fe3a Reviewed-on: http://gerrit.openafs.org/10358 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit c8ffb8b9eefc8c2a0c6b41e3e29c0f03940a5fcf Author: Andrew Deason Date: Thu Nov 1 16:33:31 2012 -0500 afs_FreeDiscardedDCache: Avoid assert on error Currently afs_FreeDiscardedDCache will assert if it cannot read in any discarded dcache entry to free. Return an error instead of asserting, so the caller can figure out what to do about the error. Adjust the callers to handle the error, or panic. afs_MaybeFreeDiscardedDCache still just panics anyway, as making it handle the error gracefully is beyond the scope of this commit, and is work for another day. This changes afs_FreeDiscardedDCache to return an int. Reviewed-on: http://gerrit.openafs.org/8406 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 866a9fbbdd89735ab76a70cb6d6523db2b98e4c9) Change-Id: I42a3be4938e5a43c394475653075f9e03a9e7975 Reviewed-on: http://gerrit.openafs.org/10357 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit eb9585879b3055c2c62d8cc880a6d24501d40aa6 Author: Andrew Deason Date: Thu Nov 1 15:43:09 2012 -0500 afs: Handle afs_AllocDCache errors Do not panic if afs_AllocDCache encounters an error and returns NULL. Instead, go into the normal retry loop that occurs if we couldn't free up any more free/discard dcache entries. Reviewed-on: http://gerrit.openafs.org/8405 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e02185547e316667989a100f77e68b918481b597) Change-Id: I507a6329b7b4fadaa39d0dc907c15fb5647fc135 Reviewed-on: http://gerrit.openafs.org/10356 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit 03dd9be6bb8c85a77603194b06f890a16b0c5fc0 Author: Andrew Deason Date: Thu Nov 1 15:32:31 2012 -0500 afs_AllocDCache: return NULL instead of panic Currently afs_AllocDCache will panic if we cannot get a valid dcache from the free/discard lists. Instead, return NULL, so the caller can decide how to handle the error. Currently the caller will just panic anyway, but that will be addressed in a future commit. Reviewed-on: http://gerrit.openafs.org/8377 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 64ee7b32f134e6431eb2894ed4397f8b1fea25ad) Change-Id: Ica8f1539279c30f4914ab84161c6bc2f0468d565 Reviewed-on: http://gerrit.openafs.org/10355 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit 2679af764de250448e3c7c8344c961f9b8149fd7 Author: Andrew Deason Date: Thu Nov 1 13:41:06 2012 -0500 afs: Traverse discard/free dslot list if errors Currently, when we pull a dslot off of the discard or free list, we just try to get the first entry from the list, and panic if we cannot get it. Instead, traverse through the whole list, trying to find an entry we can successfully get. This introduces the helper function afs_GetDSlotFromList to do this traversal. This does not yet address the case where we cannot get any entry on the relevant list. Reviewed-on: http://gerrit.openafs.org/8376 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 336939179721d79a6798614ff747dd06701e3edc) Change-Id: I12d8cfbe7d1fe7bbe50b49bcee34a8a5dced1569 Reviewed-on: http://gerrit.openafs.org/10354 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit 9d40feb5977bcaf897b869b52a9ae39c1a86a096 Author: Marc Dionne Date: Tue Nov 2 18:14:07 2010 -0400 volser: add missing Makefile dependencies Add some missing dependencies in the volser Makefile to prevent trying to compile while a header file is still being generated. This caused parallel make errors on some slower systems. Reviewed-on: http://gerrit.openafs.org/3244 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 6f1da57603cf86109e096001018ba9b0f1dd18b5) Change-Id: Ib2d64abfe4b10af03d0d3d7b6550afa931ccd3a0 Reviewed-on: http://gerrit.openafs.org/10337 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 01bf3b2ad70d63759588860b4ceed83bac3572a3 Author: Stephan Wiesand Date: Mon Oct 21 14:23:50 2013 +0200 Revert "build: compile_et rules for parallel make" This reverts commit 6c3adb6db781ef4b15d9336a63b40d3a79b11264. While gerrit 10310 may be correct, it at least triggers some other problem, causing significantly higher failure rates for parallel builds. This is especially true in combination with gerrit 10337, where there's at least one known case of 100% failure rate. A different solution, modifying compile_et to allow it to emit a single file per invocation, is being worked on. For the time being, revert 10310 on the 1.6 branch to get parallel build stability back to the previous level. Change-Id: I372d64868f7f7d0e7185f575212f16e453299b1c Reviewed-on: http://gerrit.openafs.org/10349 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Marc Dionne Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 994da1669293c7c341b5f73fdb7eaebbe530ec90 Author: Christof Hanke Date: Tue Oct 8 11:53:17 2013 +0200 linux-kernel-module: move keyring-specific function afs_set_session_keyring into if defined(LINUX_KEYRING_SUPPORT) block. Otherwise compilation fails. Reviewed-on: http://gerrit.openafs.org/10324 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b0d75d0687a3436201411384c570448a49a9db15) Change-Id: I268a32a09a80865cf127332c079583e5dba1ae67 Reviewed-on: http://gerrit.openafs.org/10325 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Christof Hanke Reviewed-by: Stephan Wiesand commit 6c3adb6db781ef4b15d9336a63b40d3a79b11264 Author: Michael Meffie Date: Mon Sep 9 22:25:50 2013 -0400 build: compile_et rules for parallel make Change all makefile rules which run compile_et in order support parallel make. The compile_et generates two outputs, so special care must be taken in rules which run compile_et. All the rules for compile_et have been changed to the form: foo.c foo.h: foo.et compile_et foo.et -h foo foo.h: foo.c The above rules are equivalent to: foo.c: foo.et compile_et foo.et -h foo foo.h: foo.et foo.c compile_et foo.et -h foo therefore a parallel make will serialize the builds of foo.c and foo.h, and should detect that the second is no longer needed once the first is over. This form works since foo.et is not a phony target, and does not depend on a phony target. Previously, the rules for compile_et were of the one of the two forms: a) foo.c foo.h: foo.et compile_et foo.et -h foo or b) foo.h: foo.c foo.c: foo.et compile_et foo.et -h foo Form a) is problematic for parallel makes, since it is equivalent to: foo.c: compile_et foo.et -h foo foo.h: compile_et foo.et -h foo In a parallel make, compile_et will be run concurrently, clobbering each other's output files. Form b) is better, but is problematic when foo.h is removed, since foo.h will not be updated. Thanks to Russ Allbery for pointing out the automake documentation which describes issues with commands that produce multiple outputs, and portable solutions. http://www.gnu.org/software/automake/manual/automake.html#Multiple-Outputs Reviewed-on: http://gerrit.openafs.org/10237 Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit dbf68229c6c90d65781fdc16565dd1e9b56248c0) Change-Id: Ibb5a5e9c85245d716b1b203a15adbe5c87d860b7 Reviewed-on: http://gerrit.openafs.org/10310 Reviewed-by: Jeffrey Altman Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit caad18b1bd1ab2edd2aed62307b0ca86c686f0bd Author: Marc Dionne Date: Sun Apr 17 14:06:57 2011 -0400 adminutil: parallel build fixes Rearrange the Makefile to make it more parallel build proof. Add some dependencies on the header files, and avoid rules with 2 targets. Reviewed-on: http://gerrit.openafs.org/4497 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c721bff5035b6e2d87e10be0f4711133b33dc5dc) Change-Id: Id66cd9557696224a6555f2ceb534fd27794f990a Reviewed-on: http://gerrit.openafs.org/10309 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 30f197727d8dcc361e1df07238d88f8bedf5038d Author: Andrew Deason Date: Wed Sep 11 11:22:20 2013 -0500 Probe directly for com_err.h com_err.h can be in com_err.h, et/com_err.h, or krb5/com_err.h (for netbsd 6.1 and possibly other netbsd). aklog currently only includes either com_err.h or et/com_err.h, depending on autoconf probes performed by the krb5.m4 macros. So, also look for krb5/com_err.h. The krb5.m4 macros currently only look for com_err.h at all if certain other libkrb5 tests return certain results, so just look for all of them directly in some of our openafs-specific krb5 probing logic in configure.ac. Also remove the duplicate check for et/com_err.h in acinclude.m4 while we're here. We only use et/com_err.h if krb5 support is enabled, so only check for it in the second of krb5 probes. FIXES 131716 Reviewed-on: http://gerrit.openafs.org/10244 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 8e32b11be6ce0517f75588360a3ca8c333358ca3) Change-Id: I567959b6d26ece9606086f4d82c5be40b11d7ea8 Reviewed-on: http://gerrit.openafs.org/10275 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 8e39eaa93a3f02eb85eabc9161fe4064026ff1be Author: Andrew Deason Date: Wed Sep 25 00:25:48 2013 -0500 Whine if single-DES keys are in use If we are using single-DES keys in our KeyFile, yell at the administrator, so they have a chance at realizing that they should migrate to stronger crypto. Reviewed-on: http://gerrit.openafs.org/10273 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 4212c7e604bebcb8f20b67c60323263231611bfb) Change-Id: I00b47889e7e79819a3c5d347349686e5d2da30e8 Reviewed-on: http://gerrit.openafs.org/10274 Tested-by: BuildBot Reviewed-by: Michael Meffie Tested-by: Michael Meffie Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit ea4018f9ee2b6af0549125c62e6be88094207021 Author: Michael Meffie Date: Mon Sep 23 21:23:27 2013 -0400 doc: state klog.krb is obsolete State upfront that klog and klog.krb (v4) are obsolete. Update the klog.krb description and remove some redundant text. Reviewed-on: http://gerrit.openafs.org/10270 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 8fc86de33e95efc5cdcd73131d97a2afd1ad935a) Change-Id: I1fbd3920495a855b34e8547e90a941d36cafdfdf Reviewed-on: http://gerrit.openafs.org/10314 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 9ae91dfe4767be0d7c097304d04a68cfee8c6c14 Author: Michael Meffie Date: Mon May 13 13:59:50 2013 -0400 vldb_check: print vlentry file offsets To aid in debugging, consistently print the vlentry database "address" and the file offset when displaying errors for vlentries. Print the vlentry file offsets when printing all the entries with the -entries option. Reviewed-on: http://gerrit.openafs.org/9906 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Derrick Brashear (cherry picked from commit ccb66323a0a74b35b44aa901a49490a5021d46e0) Change-Id: I4a3e7296b7b6cd8a228e4d44b591c572bdbb5c70 Reviewed-on: http://gerrit.openafs.org/10269 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 513a8fee6e60a7a369664aca9ba15789672783bd Author: Christof Hanke Date: Wed Aug 28 14:51:13 2013 +0200 Linux Keyring error handling honour the returncode of key_instantiate_and_link() to avoid having non-working pagsh without an error. Reviewed-on: http://gerrit.openafs.org/10179 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Michael Meffie Reviewed-by: Mark Vitale Reviewed-by: Derrick Brashear (cherry picked from commit c7f5a212025172307e85e09ada03333e5e288cc3) Change-Id: Ib5809e36ae8e87190206d75286bbeb23ace34b25 Reviewed-on: http://gerrit.openafs.org/10255 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 8cef9359cd3ff5bd7c36465e09a6d616f70f3cd0 Author: Derrick Brashear Date: Fri Sep 13 11:13:05 2013 -0400 linux: core dump requires write fop turns out not just writev is unhappy with aio_write (only); core dumping wants a write file op. always provide it. FIXES 131729 Reviewed-on: http://gerrit.openafs.org/10251 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 13165c05836bcd4b3f5655ab2bcc979ff859efa2) Change-Id: I35f16004164af79621307de1973d25e75b01ec2c Reviewed-on: http://gerrit.openafs.org/10254 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 51af11f297b54d79c3b54c9e6a0316db732d1047 Author: Christof Hanke Date: Thu Sep 12 09:25:31 2013 +0200 LINUX: Keyring deal with suse-specific key_type op instantiate_prep used for checking for STRUCT_KEY_TYPE_HAS_PREPARSE Reviewed-on: http://gerrit.openafs.org/10194 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 9db8b123e4dab6c25ef4166ad3fa74aaa0f630f4) Change-Id: I94e44be4d370c7096140162bea9ba1ad8fd69781 Reviewed-on: http://gerrit.openafs.org/10252 Reviewed-by: Derrick Brashear Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit acb2fb8cf896845b84b2b49e82fbd3eb662e08e7 Author: Andrew Deason Date: Wed May 9 18:45:51 2012 -0500 vos: Minimize release impact for new RO sites Currently, if a new RO site is added with 'vos addsite', the only way to populate the new site with data is a 'vos release' (excepting hacks using 'vos restore' and 'vos addsite -live', etc). Due to safeguards in 'vos' ensuring that RO sites always all contain the same data when marked as up-to-date in the VLDB, such a release always incurs some amount of data to be transmitted to all sites, as well as remote sites being brought offline briefly, even when the RW data has not changed in very long time. To alleviate this situation, make 'vos release' detect if new, unpopulated RO sites have been added, and if the RW volume has not changed since the release of any existing RO sites. If both of these conditions are true, do not update any of the existing sites, but only transmit volume data to the sites that did not already contain RO volumes. Reviewed-on: http://gerrit.openafs.org/7393 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 3fc800be9c702c1a40869908831a9895602909cb) Change-Id: Icfeb1bad816ff5c3220581c7adf541d8b87df989 Reviewed-on: http://gerrit.openafs.org/10174 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit ae8c311e207712e87421967749c79250a89d27ff Author: Derrick Brashear Date: Thu Sep 12 08:09:34 2013 -0400 linux: provide read and write ops even when we have aio read/write will fall back to aio ops but e.g. writev will fail if there is not either a write or writev op explicitly. force the fallback via do_sync_read/do_sync_write required with 2.6.18-348.x rhel kernels but probably not newer ones Reviewed-on: http://gerrit.openafs.org/10246 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e6af2ffc86af17c4be427384467c4122fc5301b3) Change-Id: I1b10a6428b1975ef5c76e1ff40217758ff7d90d9 Reviewed-on: http://gerrit.openafs.org/10248 Reviewed-by: Stephan Wiesand Reviewed-by: Marc Dionne Reviewed-by: Jason Edgecombe Tested-by: BuildBot commit ccc7a46b419141d7c28e89e2292f4e5d8cdb7683 Author: Andrew Deason Date: Fri Sep 20 15:13:43 2013 -0500 rx: Always call rxi_StartListener Commit c10f5296 made rx_Init only call rxi_StartListener in the kernel if we have RXK_LISTENER_ENV. But this doesn't make any sense, since rxi_StartListener only does anything if RXK_LISTENER_ENV is _not_ defined. As a result, for any non-rxk-listener non-rx-upcall platform, we never receives rx packets in the kernel, since we never set up our rx packet callback. The only such platform appears to be AIX, since while other platforms (HPUX, FBSD, IRIX) have a non-rxk-listener mode, they also implement an rxk-listener mode that we always turn on. So, just always call rxi_StartListener, and let the ifdef guards for the various implementations of rxi_StartListener do the right thing. FIXES 131725 Reviewed-on: http://gerrit.openafs.org/10263 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2aa26fcb4e3cf5fa85a3aee3263893a0443a2b75) Change-Id: Id98c29175ec811195183c35c2c43c6c4de817dfc Reviewed-on: http://gerrit.openafs.org/10272 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit ad8b40dc80bb5196bcda61858efc1a817ab4b9d1 Author: Michael Meffie Date: Mon May 13 13:47:06 2013 -0400 vldb_check: cope with broken names and volids Fix-up broken vlentry names and rw volid so entries can be looked up in the vlserver and can be deleted with vos delentry if needed. Reviewed-on: http://gerrit.openafs.org/9905 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7a89c4f94440ac1c8ebf16107ece3b56c178ffc9) Change-Id: I2cf2d711f6dee08b2d27429ff4d37290bc21b9a2 Reviewed-on: http://gerrit.openafs.org/10268 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit a33157bc62c3bae5975b2316ce62b6d09195601d Author: Christof Hanke Date: Fri Sep 13 11:47:08 2013 +0200 afsd: check if mountdir is an absolute path if the mountdir in the cacheinfo file is not absolute, it can confuse commands like "df". Thus, force it to be absolute. Reviewed-on: http://gerrit.openafs.org/10250 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fb623d5da30e6d304f672d8485da2e1781afa5df) Change-Id: I80542020848c901e57e7440cb1ed2149aa0d3251 Reviewed-on: http://gerrit.openafs.org/10253 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 4f14bf220e0fa75fda39dee2b4453b431555b388 Author: Andrew Deason Date: Thu Aug 1 14:06:52 2013 -0500 DAFS: Remove AFS_DEMAND_ATTACH_UTIL Currently we have two DAFS-related preprocessor defines in the codebase: AFS_DEMAND_ATTACH_FS and AFS_DEMAND_ATTACH_UTIL. DAFS_FS is the symbol for enabling DAFS code, and turns on demand attachment and all of the related complicated volume handling; it requires pthreads. DAFS_UTIL is supposed to be used for utilities interacting with DAFS, but do not have pthreads and so cannot build the relevant threads for e.g. the VLRU, so they don't support demand attachment and a lot of more advanced volume handling techniques. Having both of these exist is confusing. For example, currently in partition.c we only initialize dp->volLockFile for DAFS_FS, even though the structure exists if _either_ DAFS_FS or DAFS_UTIL is defined. This means when only DAFS_UTIL is defined, volLockFile will exist in the partition structure, but will be uninitialized! Amongst other possible issues, this means right now that DAFS_UTIL users (dasalvager is the only one right now) will try to use an uninitialized volLockFile whenever they try to use a volume that needs locking. Since the partition struct is usually initialized to all zeroes, this means we'll try to issue a lock request for FD 0, whatever FD 0 is. If FD 0 is not open, we'll fail with EBADF and bail out. But if FD 0 is open to some random file, the lock will probably succeed, and we'll proceed without actually locking the volume lock file. While the fssync volume checkout mechanism still works, the on-disk locking mechanism protects against race conditions the fssync volume checkout mechanism cannot protect against, and so handling volumes in this way is not safe. This is just one example; there are other issues with the partition headerLockFile and probably may other things; most instances of DAFS_FS really should be enabled for DAFS_UTIL as well. So, instead of trying to account for and fix all of these problems individually, get rid of AFS_DEMAND_ATTACH_UTIL, and just use AFS_DEMAND_ATTACH_FS. This means that all relevant code must be pthreaded, but since the only relevant code is for the dasalvager, we can just make dasalvager pthreaded. Salvaging does not make use of any threads or LWPs, so this should not have any side-effects. Thanks to Ralf Brunckhorst for reporting the issue where we encounter EBADF when FD 0 is not open, leading to the discovery of this. Reviewed-on: http://gerrit.openafs.org/10123 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7f15a1bbb34fa6f0d52800880f31be367d77a64f) Change-Id: I56904bc5989ffe346af9213584dee2ef5ce190ff Reviewed-on: http://gerrit.openafs.org/10167 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand commit 8db96f4848669ce2e765eda64ce0b0d28a8e20ef Author: Michael Meffie Date: Tue Aug 20 16:48:34 2013 -0400 bozo: cap retry delay Cap the retry delay to a reasonable amount of time instead of just doubling the delay until it reaches 16 hours. Reviewed-on: http://gerrit.openafs.org/10148 Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 21c8f4809ee7af9d2ec76cb37747183cee0c0d33) Change-Id: If10880ba5411af0ea66bcb50c8cce13f4155f2ad Reviewed-on: http://gerrit.openafs.org/10199 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 466e8cb15e794e13ef27a0aaa7be6abad499d66d Author: Michael Meffie Date: Thu Sep 29 14:44:11 2011 -0400 bozo: retry start after error stops After a bnode is stopped because of two many consecutive exits delay for some time and attempt to start the bnode again. Countine to retry on each error stop, doubling the delay for each retry attempt until a maxium number of attempts. Reviewed-on: http://gerrit.openafs.org/5534 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 170ce3db8a32c2b5df68ada3e84ecdaa98785e71) Change-Id: I4f3863c31318ba9c5950ef74ec0a04b31decfebb Reviewed-on: http://gerrit.openafs.org/9571 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 5ef139d769d4d3d43840e3a537a9939dd1d2d1e3 Author: Marc Dionne Date: Wed Jan 9 18:42:32 2013 -0500 gcc 4.8: fix warnings Quiet new warnings introduced by gcc 4.8: - Many unused typedefs under src/admin. - A possibly uninitialzed variable under src/viced Reviewed-on: http://gerrit.openafs.org/8913 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 684d1ec6ba4bb7e96404328d02be5d070ba63478) Change-Id: If887f461dc2bed37b342bb514334f0058b0aceda Reviewed-on: http://gerrit.openafs.org/10242 Reviewed-by: Andrew Deason Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 8e14537c605b3b6867c923dfef782492191939c7 Author: Marc Dionne Date: Tue Sep 3 07:55:14 2013 -0400 Linux 3.11: Adapt to d_count changes In preparation for upcoming changes in the 3.12 cycle, d_lockref was introduced late in the 3.11 cycle. The dentry's d_lock and d_count are moved to this new structure. A new d_lock macro makes the change transparent for locking, but direct users of d_count must adapt. A new d_count() helper function is provided and should now be used. Use the new d_count() helper function if available, and move some of the ifdef logic into a helper compatibility function. Reviewed-on: http://gerrit.openafs.org/10219 Tested-by: Jeffrey Altman Reviewed-by: Simon Wilkinson Reviewed-by: Jeffrey Altman (cherry picked from commit 1f577e41b65e9bd213a915a296ecf5bedd17fcc1) Change-Id: I43db7b00f966a214259b6814d0308b7164e31295 Reviewed-on: http://gerrit.openafs.org/10241 Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand Reviewed-by: Andrew Deason Tested-by: BuildBot commit 47fb5837820e0dcf46c0c19a15b81848e75be3aa Author: Simon Wilkinson Date: Fri Mar 30 19:16:50 2012 +0100 libadmin: Clear structures according to their size. memset(a, 0, sizeof(a)) is rarely correct, unless a is an error. Use the size of the destination structure, rather than the size of a pointer to it when deciding how much memory to clear. Caught by clang's new error messages Reviewed-on: http://gerrit.openafs.org/7076 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 34afb3e6b903fc1659b1c869fa2fb4226038e076) Change-Id: I06912a70af9f3cd54f4a5368e996a7308e687c20 Reviewed-on: http://gerrit.openafs.org/10243 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit b4de9dc5b030c04cfee5514ef8ca4f4497713699 Author: Andrew Deason Date: Mon Jun 3 16:28:44 2013 -0500 volser: Use the new IH_CREATE_INIT function Use IH_CREATE_INIT when restoring volume data, so we don't open each restored data file twice. Reviewed-on: http://gerrit.openafs.org/9970 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ba42758ce218e8985adc0129d0ee3ffa8690537f) Change-Id: I01a0506fefce299aa7dc799e3ff494dfbeb2b894 Reviewed-on: http://gerrit.openafs.org/10178 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 93c574365cf5926e1640f25d39f311fa9868e763 Author: Andrew Deason Date: Thu May 30 17:53:56 2013 -0500 namei: Create the IH_CREATE_INIT function Create a new function that combines calls to IH_CREATE and IH_INIT into one operation; the new function is called IH_CREATE_INIT. This allows a caller to create a file and then use it, without needing to open() the file twice. This is currently only implemented for the Unix namei backend; other backends result in effectively the same functionality (but can use the same API). Reviewed-on: http://gerrit.openafs.org/9969 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit aaa2584c0498037529a30c985ac8a437ec7d842c) Change-Id: I5018418cea63ba19ef0ef3bb047e3f9799a93293 Reviewed-on: http://gerrit.openafs.org/10177 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 2c619d2105ed3d0846640a48c0c4a8d687691c8d Author: Andrew Deason Date: Thu May 30 17:52:32 2013 -0500 ihandle: Refactor ih_open to split out ih_attachfd Refactor the function ih_open, so part of its logic gets split out into the new ih_attachfd_r (and ih_attachfd) function. This allows other code to splice in an existing fd, without going through the normal "open" path. This patch should incur no functional change; it is just code reorganization. Reviewed-on: http://gerrit.openafs.org/9968 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f40e20d5671310500fb4f6acf38980e158a74c66) Change-Id: I40bb515b5c822c3be3d3819c0183091753c41dea Reviewed-on: http://gerrit.openafs.org/10176 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 2d1ed3a1108de01ac6a967daf3fc71646703b9f2 Author: Andrew Deason Date: Thu May 30 17:40:58 2013 -0500 ihandle: Fix fdInUseCount leak on EMFILE Here, we close closeFd, but currently we don't decrement fdInUseCount. Since we retry the open immediately afterwards, this means we can leak fdInUseCount references. For example, if we retry this 5 times and get EMFILE on each attempt, we will close 5 FDs, but not decrement fdInUseCount at all. To fix this, decrement fdInUseCounter when we close a file for EMFILE. Reviewed-on: http://gerrit.openafs.org/9967 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 48344381d7a87a3617ec14ffc9f2d9735805ada6) Change-Id: I03aee981c0b9663ac937c6165796f19366acec1e Reviewed-on: http://gerrit.openafs.org/10175 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 0f795f08158ca65242b943ff89525e6901970bec Author: Michael Meffie Date: Thu Sep 12 12:20:33 2013 -0400 auth: fix cellservdb update check Fix a bug introduced by the check to avoid excessive stats of the cellservdb. Fixes a bug where cached cell config data is served for up to one second after a write. Check the timeRead field which is reset after a write to indicate the data should be read. Fixes commit 5cdc211b8bf1b3f5419ebe52ecc9d3772ffdf9a6 on the 1.6.x branch. Reviewed-on: http://gerrit.openafs.org/10230 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 73ae85bd59cfe9fca2daeb7dc0aa0917368bb5bf) Change-Id: I01c09383b0ba417aca13b2ef7724d4fde91e327a Reviewed-on: http://gerrit.openafs.org/10247 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 6e29c74fbd304e29b9d6309b4a79db17416fb081 Author: Mark Vitale Date: Fri Jan 25 18:47:49 2013 -0500 salvager: prevent assertion during -orphans attach Improve JudgeEntry() detection of orphaned directories to prevent unintentional deletion of their '.' and '..' entries. This in turn prevents a later assert (opr_Verify) when we try to delete and re-add '..' in order to attach the orphan. In JudgeEntry(), 2 sources of information about a directory entry are compared for consistency: - vnodeEssence (unique) from its vnode index entry - name, vnodeNumber and unique from its dir blob entry A directory entry may be ignored, deleted, or repaired/replaced, based upon the results of these and other tests (e.g. dirOprhaned). The '.' and '..' entries are treated as special cases because we do not want to delete them at this point if this directory is orphaned. However, the current test for orphanhood (vnodeEssence->unique == 0) is not sufficient; it could be zero for other reasons. This commit now uses the dirOrphaned flag to test for this. However, we are still interested in doing the right thing for '.' and '..' entries with vnodeEssence->unique == 0. This may indicate that the dir blob entry is pointing at the wrong vnode, and that vnode has unique==0. The current code incorrectly ignores (returns 0) this case. This commit now now falls through to the repair/replace code so that we can find the correct vnode for this entry. The current code assumes that the 'vnodeEssence == 0 && !dirOrphaned' case doesn't exist. Thanks to Andrew Deason for his assistance. Reviewed-on: http://gerrit.openafs.org/9104 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e8faeae6dcae0e566de2b21d53d3f78f3cc44e3f) Change-Id: Ibc9e6ddf1f281e3a3a560ed1eefcdb4776e12caa Reviewed-on: http://gerrit.openafs.org/10165 Reviewed-by: Andrew Deason Reviewed-by: Mark Vitale Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand commit 2879ab9b26fd67bfa802b54bc4ac316a9448f1d1 Author: Chaskiel Grundman Date: Wed Aug 14 23:36:42 2013 -0400 Declare sigwait parameter if it will be used Make sure the 'sigw' parameter for sigwait is declared if it's going to be used (it was missing for netbsd) Derived from 18b932f (http://gerrit.openafs.org/2767) Change-Id: I53f79ef5eb9ff132e99b78ca87f125e832d2e5f0 Reviewed-on: http://gerrit.openafs.org/10138 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit c358d7cbbdf24de7d62d9ae3f514201a31bed2f9 Author: Ben Kaduk Date: Tue Jul 16 20:39:56 2013 -0400 Check for over/underflow while allocating PTS ids The behavior of signed integer over/underflow is implementation-defined, but even if the compiler is nice and just wraps around, we could get ourselves into trouble later on. Reviewed-on: http://gerrit.openafs.org/10091 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Mark Vitale Reviewed-by: Derrick Brashear (cherry picked from commit 6c7c185ba3ec6fbdda0651d18868e66edd655809) Change-Id: I1feb1879cce064760ae061538215b22b6fd55933 Reviewed-on: http://gerrit.openafs.org/10124 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 7242e25ae28da95b11b98e1353333b0ca70dc6d5 Author: Anders Kaseorg Date: Tue Jul 23 17:11:24 2013 -0400 aklog: Put ${AKLIBS} after ${AFSLIBS} on the linker command line Systems with newer, stricter linkers (such as Ubuntu saucy) require this ordering because libauth.a uses symbols from libk5crypto. Fixes this build failure: gcc -o aklog -g -O -I/…/openafs/src/config -I/…/openafs/include -I. -I. -D_LARGEFILE64_SOURCE -DALLOW_REGISTER aklog.o aklog_roken.o krb_util.o linked_list.o -Wl,-Bsymbolic-functions -Wl,-z,relro -lkrb5 -lk5crypto -lcom_err /…/openafs/lib/libprot.a /…/openafs/lib/libauth.a /…/openafs/lib/libubik.a /…/openafs/lib/librxkad.a /…/openafs/lib/libsys.a /…/openafs/lib/librx.a /…/openafs/lib/libsys.a /…/openafs/lib/liblwp.a /…/openafs/lib/libdes.a /…/openafs/lib/libafscom_err.a /…/openafs/lib/libcmd.a /…/openafs/lib/libafsutil.a -lresolv /usr/bin/ld.bfd.real: /…/openafs/lib/libauth.a(akimpersonate.o): undefined reference to symbol 'krb5_c_make_random_key@k5crypto_3_MIT' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libk5crypto.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[5]: *** [aklog] Error 1 make[5]: Leaving directory `/…/openafs/src/aklog' Change-Id: Ibb12178d85e37e21320706eaafb84c7457d16e6c Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/10107 Reviewed-by: Andrew Deason Reviewed-by: Christof Hanke Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 36426f4569d1c8ea9f6828e3b93d6df3745fbbbf Author: Andrew Deason Date: Thu Mar 28 16:42:58 2013 -0500 aklog: Probe for libasn1 on heimdal aklog uses encode_EncTicketPart and some other encode_* ASN.1 routines when we're building against heimdal. Our krb5 autoconf logic from c-rra-util is not guaranteed to include libasn1 in KRB5_LIBS, since it's not required for functions in the krb5 API. So, specifically test for it. Related issue reported by Måns Nilsson. Reviewed-on: http://gerrit.openafs.org/9693 Tested-by: BuildBot Reviewed-by: Russ Allbery Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 1942d2a4fc90703e64e1c97ba10d2918ba584e73) Change-Id: Ibf3713ff5027ec3b410e4b19ffd11f5449357248 Reviewed-on: http://gerrit.openafs.org/9917 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit ff472ae83739de3f10900da272ae389defa259a1 Author: Andrew Deason Date: Tue Mar 26 17:50:31 2013 -0500 volser: Make VolListOneVolume errors consistent Currently, VolXListOneVolume errors out with ENODEV if any attachment error occurs with the specified volume. But VolListOneVolume always returns success if it can find the indicated volume, and any attachment errors and such are reported in the 'status' field of the volume info structure. These two functions do pretty much the same thing; VolXListOneVolume just provides more info than VolListOneVolume. So make them behave the same way, and provide more specific information, whether or not somebody ran 'vos examine' or 'vos examine -extended'. The 'vos' binary has always handled errors in the 'status' volume info structure for both "extended" and non-"extended" queries. This difference appears to just have been a mistake from OpenAFS 1.0. Reviewed-on: http://gerrit.openafs.org/9680 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Derrick Brashear (cherry picked from commit 199cfb4a885b98b583f538ed14dff7ec5c9f9990) Change-Id: I397c6b49eb7cfaef1c4dae16c1158dc0411701a3 Reviewed-on: http://gerrit.openafs.org/9916 Reviewed-by: Andrew Deason Reviewed-by: Mark Vitale Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit c637c4c6155c4b7c98669cfd3eed514f89c2e9fe Author: Andrew Deason Date: Tue Mar 26 17:26:23 2013 -0500 volser: Restore Vol*ListOneVolume error handling In the 1.4 series, the volserver VolListOneVolume function always returned success if the specified volume was found in any way, and ENODEV otherwise. The VolXListOneVolume returned ENODEV if the volume was not found, or if any error occurred. DAFS (specifically, commit ed25934c1fe96b143715025b49104e75dce9a361) changed these so they both behave the same way. That is, they both return success if the volume was found at all, and ENODEV otherwise. Commit 53cc2ebaea5e5488d5285f0d13ffa47069ee986f changed both of these functions so that we always return an error on any attachment error. These changes mean that a 'vos examine' for a volume with an existing volume transaction now indicates that a volume is offline/unattached, but in the 1.4 series, the volume was indicated as "busy". So, restore the original 1.4 behavior of these functions, so the volume status is reported as it always was. This effectively reverts 53cc2ebaea5e5488d5285f0d13ffa47069ee986f, and slightly changes the post-DAFS code to look more like the 1.4 code. This also removes the 'code' variable from VolListOneVolume and adds an explicit comment about what's going on, to make this a little more clear. While changing the behavior of VolXListOneVolume to match that of VolListOneVolume perhaps makes sense, for now just restore the exact 1.4 behavior, and make the function flow look a little more like the 1.4 code did. A future change may make them the same again. Reported by Andy Malato. Reviewed-on: http://gerrit.openafs.org/9679 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 71afa42cdd9107b071fb79f0adaf96c5fcf145da) Change-Id: I2d7143bf4fde98a11104c5071317a2d2545f41c4 Reviewed-on: http://gerrit.openafs.org/9915 Reviewed-by: Andrew Deason Reviewed-by: Mark Vitale Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit dc02aa435650b1cdf2c2aaa84c143ce19c7707e6 Author: Andrew Deason Date: Tue Mar 26 17:00:05 2013 -0500 volser: Indicate busy volume with VBUSY Commit 34fc86bcc749f3bd059831b7e5dae03dc09a9393 changed several uses of VBUSY to VOLSERVOLBUSY in order to detect retriable operations. However, one such change did not change an Rx abort code, but instead was used for the 'status' field for a volintInfo or volintXInfo structure. That is not really a general error code, but a field with a few specific known values (at least, that is how existing clients interpret it). Go back to using VBUSY, so clients indicate the volume as busy, instead of as offline/unattached. Reported by Andy Malato. Reviewed-on: http://gerrit.openafs.org/9678 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 3929282d2767bd35e54037e5477e917979c84be3) Change-Id: Ic6efeeca7f37d05704b09a3244bcf40641cae5ea Reviewed-on: http://gerrit.openafs.org/9685 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 9cf1206f1695a806fa0d5829737fd39bab2db5e3 Author: Michael Meffie Date: Thu Feb 23 12:34:44 2012 -0500 volser: preserve stats over reclones and restores Optionally, preserve the volume usage statistics instead of clearing them during reclone and restore operations. Reviewed-on: http://gerrit.openafs.org/3312 Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit dfceff1d3a66e76246537738720f411330808d64) Change-Id: I2e47c7ddac74f75b6f650327028644e178cfc574 Reviewed-on: http://gerrit.openafs.org/9477 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 3ddea6c9cc770b3fcc2669b6b43d44deea5f2d03 Author: Andrew Deason Date: Thu Jul 21 13:20:54 2011 -0500 afsd: Add the -rxmaxfrags option Add an option to afsd to limit the number of fragments Rx will send/receive, called -rxmaxfrags. Reviewed-on: http://gerrit.openafs.org/4899 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit ba546ecf0c6a404f2efced2e600826621876ffcf) Change-Id: Idb93fc60b3056604c1d415ac7fc134ee672ceefe Reviewed-on: http://gerrit.openafs.org/9430 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 86ce4dcac924440c29024906bfda89e8d6f030a7 Author: Marc Dionne Date: Wed May 29 10:33:44 2013 -0400 Linux: Remove extra "goto out" from tmpfs fix Remove a stray "goto out" that should not have been applied in this spot along with the tmpfs fix. Thanks to Stephan Wiesand for pointing it out. Reviewed-on: http://gerrit.openafs.org/9953 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f393612d8f0a121d0cb8755f3eb9913c0f09606d) Change-Id: Ief9521bb41ae1a853b14282b166c62de165a3dc8 Reviewed-on: http://gerrit.openafs.org/10193 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 7a40c83337cb4ff07646ea7c2cc0d6d98be94bff Author: Marc Dionne Date: Wed May 22 09:26:57 2013 -0400 Linux: Fix tmpfs cache support As of kernel 3.1, tmpfs no longer has a readpage() operation in its address space operations. Some of the cache manager code relies on this, causing an oops if tmpfs is used as backing store for the cache. As a minimal fix, detect that there is no readpage() and disable the optimizations that depend on it. Reviewed-on: http://gerrit.openafs.org/9949 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3767cf8bf420bd59c3426a4287259b1e97178e96) Change-Id: I4fa0f2449eabf4dc82e5450c0b378b9ebe49d848 Reviewed-on: http://gerrit.openafs.org/9950 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 0b591f452e62032fe9f70610b1a671d620e5d724 Author: Michael Meffie Date: Thu Nov 4 09:26:25 2010 -0400 avoid private stdio fields in waitkey Use the stdio_ext functions provided by solaris and glibc instead of directly accessing private stdio FILE structure members. This is needed for 64-bit solaris builds and is more portable in general since the FILE structure is meant to be opaque. This is a backport of commit aac929badb5e40a59ae77ae69fc43df8f6f376fc, without the changes to remove duplicate code. Reviewed-on: http://gerrit.openafs.org/3257 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit aac929badb5e40a59ae77ae69fc43df8f6f376fc) Change-Id: I2953fe9d27edb30365266b1f4372e5fd18baf06e Reviewed-on: http://gerrit.openafs.org/9604 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit d64031f3b81ed472e91a4e6823068f81ffefb064 Author: Michael Meffie Date: Wed Jan 16 12:10:02 2013 -0500 vlclient: add -probe option Add a new option to the vlclient test program to call the probe server RPC to ping the vlservers in a cell. Uses a multi rx call to do the probes in parallel. The existing -host option can be used to ping a single vlserver. Reviewed-on: http://gerrit.openafs.org/8911 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit bb733da134ce7d7742d5b7359edb36f67ec85632) Change-Id: I9d26e072fafa3e785bb1bc2eb0d8db43fbc1ff57 Reviewed-on: http://gerrit.openafs.org/9570 Reviewed-by: Andrew Deason Reviewed-by: Mark Vitale Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 22c9c452ec2f4b5a4ebc4d69c1c3e1495c34a382 Author: Michael Meffie Date: Thu Oct 6 08:33:37 2011 -0400 bozo: build notifier sample program Build the smail-notifier sample program. Reviewed-on: http://gerrit.openafs.org/5555 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ac88af748e25a40d062c888396aab8670ff8426a) Change-Id: Idb845fe0a3f7fd6581f6756b899be140db625123 Reviewed-on: http://gerrit.openafs.org/9568 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 1984f86fcfa094b7e7b2a2c37d8f3690b6e20aa3 Author: Andrew Deason Date: Tue Jun 19 14:42:23 2012 -0500 viced: Clear all client CPS on FlushCPS Currently the fileserver only finds the first applicable 'client' structure (via h_ID2Client) for a FlushCPS operation, and invalidates the CPS for it. However, there may be many 'client' structures in memory for the given viceid, since we may have many connections for the same user (possibly from different hosts). So, modify FlushCPS to find all relevant client structures, and invalidate the CPS calculation on them. Reviewed-on: http://gerrit.openafs.org/7574 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 387fe294f663abd9c92cd007869e2e9e8cc11d69) Change-Id: I45b278b59649526b62eb83353cfe31465e79c712 Reviewed-on: http://gerrit.openafs.org/9487 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 0dbe0a8dc7306b17a05685fc5e224b0a4eb0223d Author: Andrew Deason Date: Thu May 31 16:15:33 2012 -0500 vol-salvage: Unlock volumes before exiting Normally, volume locks acquired by an exiting salvaging process would be automatically given up when the process exits, since our FDs are closed. However, if we exit by calling Exit() or Abort(), we gracefully shutdown our SYNC channels before exiting. For FSSYNC, this can result in the fileserver trying to online the volumes we had checked out but had not yet checked back in, so the fileserver may try to online a volume we have locked, before the locks have been released. To avoid this, unlock all volume locks for all partitions before we shutdown SYNC channels on exit. Reviewed-on: http://gerrit.openafs.org/7514 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit fff80cb1983a8cf7ccf1c1dc4f69e232785700c5) Change-Id: I08f0ac2c4fb803cf7553a03beaa30439abab4e61 Reviewed-on: http://gerrit.openafs.org/9480 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit c94a12c9a759d8fb4558dd878a6299ca77b35eb1 Author: Michael Meffie Date: Mon Apr 16 22:29:24 2012 -0400 bozo: increase salvage instance poll rate Increase the bos client poll rate of the salvager temporary bnode instance status, from every 5 seconds to 1 second. This reduces the minimum time bos salvage takes, from 5 seconds to 1 second, which can add up when doing a large number of volume salvages. Reviewed-on: http://gerrit.openafs.org/7231 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Tom Keiser Reviewed-by: Derrick Brashear (cherry picked from commit 2460e132a9ed63714754745fe24f6f3a5712c81d) Change-Id: Ic86d3f3ed5791f880b41533edcd405a8fec24c0b Reviewed-on: http://gerrit.openafs.org/9476 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 903b5847cc017b7164542990dca022f6c41c4ed2 Author: Andrew Deason Date: Thu Feb 23 13:02:13 2012 -0600 salvager: Do not fork for single VG salvage Currently we always fork a child in the salvager in order to salvage a volume group. I believe this is in order to protect SEGV, exit(), etc in one salvage operation from preventing salvaging anything else. When salvaging a single volume group, though, there appears to be little benefit. In addition, we need to keep the VG salvaging code in the same process as the cleanup code for single-volume salvages, so we can know which volumes were deleted by SalvageVolumeGroup, so we know which volumes to bring back online. So, do not fork for the singleVolumeNumber case. Note that for DAFS, we already never fork for the entire salvage operation when salvaging an individual volume group. So, this is effectively a non-DAFS-only change. Reviewed-on: http://gerrit.openafs.org/6787 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 46e85dd4682a3273e15bbf96c4d5492087555cab) Change-Id: I545e9ad8d54ad63dbe8e221dfc6947446135cbb7 Reviewed-on: http://gerrit.openafs.org/9462 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 42a59d23a327380fc94ca2ff04bc5e4ff3bbf305 Author: Andrew Deason Date: Tue Feb 21 18:05:32 2012 -0600 salvager: Remove VolumeSummary->fileName The 'fileName' field in VolumeSummary serves two apparent purposes: - Storing the filename of the volume header file (V0XXX.vol). - Indicating whether or not a given VolumeSummary object is referenced by any inodes on disk. fileName is set by AskVolumeSummary/GetVolumeSummary, and is cleared in SalvageFileSys1 when a matching inodeSummary entry is found. This is very confusing. The first purpose is completely unnecessary; we can always calculate the filename from the volume id for the volume, and we already enforce the filename to be of that specific format. The second purpose is very unclear in the current code, and overloads the meaning of the field. So instead, remove fileName entirely. Code that was using it to locate the header file are changed to use VolumeExternalName_r. Code that was using the field to determine if the volume is "unused" is changed to use a field just called "unused", set to 0 or 1. Reviewed-on: http://gerrit.openafs.org/6786 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 2a1719faa810663d6d9cf774339e286c18ef2717) Change-Id: I295ef6c982991bdeeb533c55e6ba6d3175789ce6 Reviewed-on: http://gerrit.openafs.org/9461 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit ac0ce5d6ef57206cbad7dc2779c371a6b7bd46e4 Author: Andrew Deason Date: Thu Mar 31 17:22:12 2011 -0500 salvager: Error volumes on GetInodeSummary errors When GetInodeSummary fails due to an internal failure (not from just failing to find applicable inodes), currently it just returns an error, and does not return the checked-out singleVolumeNumber back to the fileserver. When we fail to gather inodes, we should force the volume to an error state, since we haven't salvaged the volume. But if we fail to find any applicable inodes, we just want to VOL_DONE the volume, since the header has possibly been destroyed, and the volume doesn't exist. So, issue an FSYNC_VOL_FORCE_ERROR command when we encounter errors in GetInodeSummary, except when we fail to find applicable inodes. Reviewed-on: http://gerrit.openafs.org/4439 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8084fc28a3069949bdc788f048fa8a96c012b96d) Change-Id: I64e8e1ac8e3386d09a3bcd7696a2d0f70ded33b0 Reviewed-on: http://gerrit.openafs.org/9459 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 3648401e204a9d447766ff0999d747b24aebdc55 Author: Andrew Deason Date: Tue Feb 21 17:46:41 2012 -0600 salvager: Do not require MaybeZapVolume fileName In MaybeZapVolume, currently we do not remove the volume header if the given isp->volSummary->fileName is not set. This effectively means that we only actually "zap" volumes for which we have just created the header, or which are not referenced by any inodes. For readonly volumes that have errors, we want to delete the volumes instead of salvaging. Readonly volumes with valid headers will have fileName as NULL, though (set back in SalvageFileSys1), so MaybeZapVolume will refuse to remove them. What ends up happening is that the headers will stay around, but since we do not finish checking the volume, all of the inodes for the data in the volume will be dec'd. This results in a volume whose header exists, but none of its inodes (including special inodes) exist, so the volume will need to be salvaged again, and during that salvage will be deleted (because there are no inodes for the volume). Avoid all this, and just delete volume headers for volumes that lack a valid fileName. Instead try to avoid deleting headers with volSummary->deleted set, just so we don't try to delete the same headers twice. Related issue reported by Åsa Andersson. Reviewed-on: http://gerrit.openafs.org/6784 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 839638870986ebd4cf992f7a2c81a23e37c14228) Change-Id: I0008d46d07c2ce763e70605b9260a7f71a86044a Reviewed-on: http://gerrit.openafs.org/9458 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 98222fb3b0b9adebb734195c7c21f646fc7c9b70 Author: Andrew Deason Date: Tue Feb 21 17:40:46 2012 -0600 salvager: Do not set fileName on header fixup Currently, SalvageVolumeHeaderFile will set isp->volSummary->fileName to a new string whenever the volume header needs to be created or re-written. When control reaches back to SalvageFileSys1, this can cause DeleteExtraVolumeHeaderFile to delete the header, since vsp->fileName is used as a sort of indicator to see whether or not a volume has been referenced by the inode summary. When we create a new header, we avoid this because we allocate a new VolumeSummary struct, which is not caught by the last DeleteExtraVolumeHeaderFile for loop in SalvageFileSys1. However, we do delete the header when we simply re-write a header, since we use the existing VolumeSummary struct. Set fileName in neither, for consistency. Reviewed-on: http://gerrit.openafs.org/6783 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 76f12c2389fd2a8e09b4e869730169401d154ce9) Change-Id: I4d59de02a190a6d175735482aa102a496407f32a Reviewed-on: http://gerrit.openafs.org/9457 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 91dd02f73529cca3bd105ada62b5e51f9b60f416 Author: Andrew Deason Date: Fri Dec 23 18:31:10 2011 -0500 fuse: Autodetect Solaris 11 FUSE FUSE exists in Solaris 11, but it does not come with a fuse.pc pkg-config configuration. Autodetect the presence of FUSE anyway. Reviewed-on: http://gerrit.openafs.org/6422 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2e5545342b0c644546f8a370bdbf836a6da68b60) Change-Id: Ib9ef1702af1ff20d836b1c1649fc1182c93e209b Reviewed-on: http://gerrit.openafs.org/9455 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit f048005be43287768b7fac28907f063eea07d2cd Author: Andrew Deason Date: Wed Dec 21 23:19:01 2011 -0500 afsd.fuse: Solaris 11 support The FUSE in Solaris 11 has a couple of quirks; work around them. Reviewed-on: http://gerrit.openafs.org/6421 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 98a6db0b047efcfbeb0fb3c8b1e4e136b206f10d) Change-Id: I6036c6e599c1fe57bae79516cb4333219afd75cf Reviewed-on: http://gerrit.openafs.org/9454 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 134c0b631ee45c162064c723c11bcb8e371fe7d7 Author: Andrew Deason Date: Fri Dec 2 16:06:42 2011 -0600 fuse: Add -oallow_other by default where possible By default, fuse mountpoints are only accessible by the same uid as that which mounted the fuse filesystem. When we're running as root, specify -oallow_other so by default anyone can access the afs mountpoint. Reviewed-on: http://gerrit.openafs.org/6390 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 83d3084e95ac025660f0b8064f49400eb94bfb60) Change-Id: I4c2217bc18502d8b761645f38522c02fc91c4084 Reviewed-on: http://gerrit.openafs.org/9452 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 9e9bce4b5ff987ce72a7923ca2d2765797d47f5b Author: Andrew Deason Date: Thu Apr 22 17:09:18 2010 -0500 Remove the global tempHeader/stuff structures Currently, volinodes.h defines an array ('stuff') for easily accessing information about different inode types. Part of the array points to parts of a global 'tempHeader' structure, making this not threadsafe. Change this into an interface which utilizes local storage to make this threadsafe and remove those horridly-named global variables. This adds the init_inode_info static inline function, for initializing a local inode information table. Reviewed-on: http://gerrit.openafs.org/1869 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit d8f2debce49a8a0eb310bdaf8ad0ee7601a0542e) Change-Id: I1567e9184327b1cfa397b0bf37d611c2e8c2b8a1 Reviewed-on: http://gerrit.openafs.org/9409 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Mark Vitale Tested-by: BuildBot commit f0ce80536adc9c6fa7b42286e999c325516695d3 Author: Mark Vitale Date: Fri Dec 21 18:26:18 2012 -0500 vol: correct old conditional for IH_CONDSYNC Two places in the vol package performed IH_CONDSYNC(vp->linkHandle) only if AFS_NT40_ENV. This was correct when the namei implementation was windows only; however, this ifdef was apparently overlooked when namei was implemented for UNIX. Reviewed-on: http://gerrit.openafs.org/8815 Reviewed-by: Derrick Brashear Reviewed-by: Michael Meffie Tested-by: BuildBot (cherry picked from commit 19f424ecc26b02b210a3ba54b93846dddba14ede) Change-Id: I944004d77ab17938465aa39f37d931df0adcd725 Reviewed-on: http://gerrit.openafs.org/9510 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Mark Vitale Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit fea397b0433ae3cc1155a3f826b0776eee23a497 Author: Andrew Deason Date: Wed Nov 28 17:22:21 2012 -0600 vol: Let non-usable volumes attach for non-DAFS Before DAFS, volumes that were not inService/blessed were not accessible by normal clients, but were still allowed to attach. That is, access to clients was prevented at VGetVolume-time, rather than at attach-time. Commit 939382c5 tried to short-circuit this by detecting this volume state at attach-time. However, volume utilities (e.g. volserver) can give us back a volume over FSSYNC when they are done with the volume, and for non-DAFS, we then try to attach the volume. So, with 939382c5 that attachment will fail when volserver gives us back a volume that is not inService/blessed (which can happen for some normal volume operations). This situation is not terrible, since either way the volume is not usable by clients (since the volume didn't attach), and the volume is still usable by volserver (since volserver is allowed to check out nonexistent volumes). But it is a deviation from pre-DAFS behavior and it can result in confusing error messages, so revert the 939382c5 behavior for non-DAFS. For DAFS, this behavior is fine, since the fileserver does not attach a volume unless it is trying to service a client request. So, leave it for DAFS. FIXES 131505 Reviewed-on: http://gerrit.openafs.org/8557 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 988f66c5c3bd4c4f23bfa53e69a52ed52c4e3ab9) Change-Id: I08b55b30047fc19788e2c83ada1ecd80456f1f74 Reviewed-on: http://gerrit.openafs.org/9499 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 115299e8aeedefa1c3f64e65f91a4ea0a5a2427f Author: Michael Meffie Date: Mon Jun 18 17:16:02 2012 -0400 vol: avoid attach retry loops on SYNC_FAILED Avoid unnecessary volume attach retry loops if a volume salvage is unable to be scheduled due to a hard error. Reviewed-on: http://gerrit.openafs.org/7566 Tested-by: BuildBot Reviewed-by: Tom Keiser Reviewed-by: Derrick Brashear (cherry picked from commit dda5cc0c5f7172aa4edf58c0f876c8bf05590889) Change-Id: I93760c1bd337a76079bf03dcba1d9c4e32cd692e Reviewed-on: http://gerrit.openafs.org/9483 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 8ff592b56d2ed74a01da8090637e06cab2cc1c19 Author: Andrew Deason Date: Thu May 31 17:45:56 2012 -0500 vol: Avoid getting stuck in ATTACHING in attach2 Since commit 5fc2365f, a VNOVOL error early in attach2 meant that we skipped changing the volume state to anything, and just returned instead. When we do this, the volume is in VOL_STATE_ATTACHING for DAFS, and so if we return, the volume will forever be in VOL_STATE_ATTACHING. The next thing that tries to access the volume will wait forever for the volume to come out of that state. So, revert half of 5fc2365f, and transition to ERROR state instead. This code path should not be hit during normal usage, since a nonexistant volume access for the fileserver will be detected earlier. If the volume does not appear to exist at this stage of attachment, something is wrong with the volume, so this warrants the ERROR state. For the volserver and other volume utilities, we may hit this when a request just plain references a nonexistant volume for whatever reason, but in that case the vp should go away soon. For non-DAFS, this commit does not change much, since the difference between error_notbroken and unlocked_error is very small. The other half of 5fc2365f is not changed, since it is correct. For VOFFLINE errors at this point, the volume has already been transitioned to VOL_STATE_UNATTACHED, so it is okay to return. Add a comment to help make this more explicit. Reviewed-on: http://gerrit.openafs.org/7516 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4f9c3f2be9abd5548dd52888b49c407d574b6557) Change-Id: I8e2b9d2a114f8aea283145ca44bf8ae52c354908 Reviewed-on: http://gerrit.openafs.org/9482 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit e7c6ff13868cfbf0c3374b52877a2d9d932dfa3e Author: Anders Kaseorg Date: Tue Jul 23 14:30:20 2013 -0400 Do not expose afs_assert.h from other public headers afs_assert.h redefines the standard assert macro, which is evil and breaks some applications that might want to include our public headers (e.g. some versions of Cython). This was fixed on master by commit cac74242728ad97e3ce9cef0a949d58c237250f6, which removes afs_assert.h entirely and adds opr_Assert. Since that patch may be too invasive for 1.6.x, here’s a minimal patch that just stops exposing afs_assert.h from our other public headers. Change-Id: I39a7b9ae8d43cfe0059e10e47ce4b1c22e01c544 Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/10096 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand commit 5640a55409fe88642b8b1ef55449052f22d65092 Author: Derrick Brashear Date: Mon Nov 21 12:06:59 2011 -0500 ihandle: don't keep reallyclosing future fds given that we can mark something invalid for future use, ever, once we have done so for all fds, we ih_reallyclose is done. don't persist the setting to the detriment of new fds Reviewed-on: http://gerrit.openafs.org/6101 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 2332ee3aa8e21738ed4aa42b53edd4e2ae0a2984) Change-Id: Ic77354893101acda867aa8e4c8ea7a2932666d5b Reviewed-on: http://gerrit.openafs.org/9490 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit ab524b5ed55bdcd296bea28ec717c0708e0c2553 Author: Andrew Deason Date: Thu May 31 16:41:15 2012 -0500 DAFS: Preattach, not attach, in FSYNC_Drop FSYNC_Drop currently attaches volumes that were checked out by the dropped fssync handler, but not checked back in, in order to make the volume available again. For DAFS, however, a full attachment is unnecessary; just preattach instead. Reviewed-on: http://gerrit.openafs.org/7515 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a43f0e4717fd72727ae325eb4437cef065419cdd) Change-Id: Iaa2320808c4855516192b164de9778c9019a4559 Reviewed-on: http://gerrit.openafs.org/9481 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 821bfd32682164f29228770c8152d68f37837b4b Author: Chaskiel Grundman Date: Wed Aug 14 23:31:46 2013 -0400 Eliminate pointless changes between nbsd50/60 params param.nbsd60.h removed AFS_64BIT_ENV and added an empty expression to an #if. AFS_64BIT_ENV is required for any platform to build (on 1.6) This is a 1.6-only change. On master, AFS_64BIT_ENV was removed entirely in commit fc9aa428. Change-Id: I57d7e2a2ef5ab4bf787a99083d35ba70e240710c Reviewed-on: http://gerrit.openafs.org/10137 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Jonathan A. Kollasch Tested-by: Jonathan A. Kollasch Reviewed-by: Stephan Wiesand commit 5cdc211b8bf1b3f5419ebe52ecc9d3772ffdf9a6 Author: Michael Meffie Date: Thu Oct 27 17:53:47 2011 -0400 auth: avoid excessive stat of cellservdb The modified time resolution is one second, so only stat the cellservdb file at most only once per second. Reviewed-on: http://gerrit.openafs.org/5743 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 0e3bfa033ed230fcb46ad8e3c26c8b7aae6e00af) Change-Id: Ia533d037cc772c085cfaad47035e2a29df64952e Reviewed-on: http://gerrit.openafs.org/9435 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit e77d5cea4a11677fea03abb2eb88717a1b686a94 Author: Andrew Deason Date: Wed Nov 2 16:55:49 2011 -0500 afs: Do not use separate array for srvAddrs The array of srvAddr structs we use in afs_LoopServers have indices unrelated to the indices of conns, rxconns, etc. Several places were assuming that addr[i] corresponded to conn[i], which is not necessarily true. So instead, do not use the separate addr array (except when populating the conn and rxconn arrays), and just get the srvAddr structure by going through the relevant conn[i]. Reviewed-on: http://gerrit.openafs.org/5790 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f199ac666195771a02e3ebb040c6e5fe47c58c58) Change-Id: I70be3c518d2b1ccd51e050532d966a27cf22090f Reviewed-on: http://gerrit.openafs.org/9434 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit b324d126c899dfe38d8eb8be8074beca60fdbb4c Author: Michael Meffie Date: Tue Apr 9 04:00:16 2013 -0400 libafs: initialize hard mount last errors Initialize the values of the server last errors introduced in commit 94a8ce970d57498583e249ea61725fce1ee53a50 to avoid logging garbage for the last error codes. Reviewed-on: http://gerrit.openafs.org/10082 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 495d6fcbba1630b136d9c1b4256f0a71666a8a7b) Change-Id: I4402838d761ab4bbb3e0798f219dfb825347b090 Reviewed-on: http://gerrit.openafs.org/10085 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 9ad6dfb3508bfcf658c0223adcf019840423782a Author: Andrew Deason Date: Fri Jun 15 16:58:42 2012 -0500 viced: Restrict RXAFS_FlushCPS to administrators RXAFS_FlushCPS currently can be run by anyone, including unauthenticated users. Forcing CPS calculation can be a relatively resource-intensive operation, though, if done frequently enough, and only should need to be done by administrators. Thus, only let administrators use it. Reviewed-on: http://gerrit.openafs.org/7572 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 568adf7d18eb17a42caa263aabc92a686f0ae121) Change-Id: I715e7ede7ea92be65a134116ecb4d1b7e2ccd264 Reviewed-on: http://gerrit.openafs.org/9485 Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Reviewed-by: Andrew Deason Tested-by: BuildBot commit 9a533f1661e322629f027c8755d07fe262ee926b Author: Simon Wilkinson Date: Sat Mar 31 19:21:04 2012 -0400 viced: Do error translation for InlineBulkStatus When a host has requested universal errors, error code conversion is performed in the CallPostamble. However, the InlineBulkStatus errorcodes are passed as part of the data set, not as RX errors, so this translation is not performed. Fix this so that we also translate error codes that are part of the InlineBulkStatus response. Reviewed-on: http://gerrit.openafs.org/6992 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9498cebd11ac26ed7986b5496440159f7ef745f2) Change-Id: Ia5b2d95e05bed0fb89aeb6132008d58de68c96a0 Reviewed-on: http://gerrit.openafs.org/9467 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 53005f4fe7b6df5263d399f0aec9fee3078e39bc Author: Andrew Deason Date: Thu May 12 10:57:09 2011 -0500 viced: Enable NAT ping on hosts Turn on NAT ping on the Rx connection for the callback channel for hosts. This should help improve behavior for clients behind NATs and stateful firewalls, even for clients that predate NAT ping functionality. Reviewed-on: http://gerrit.openafs.org/4646 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit aafdc08cfc49da4c23ecd91f9e690fd70e95df55) Change-Id: I428b6648276ec49fd4f003b3cf2d88a07c8aa1d9 Reviewed-on: http://gerrit.openafs.org/9420 Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Reviewed-by: Andrew Deason Tested-by: BuildBot commit 49a1ef5edfcbfcb411889081d89bc5c112e9033c Author: Mark Vitale Date: Tue Mar 12 22:13:20 2013 -0400 dafs: prevent corruption in large fsstate.dat files If while writing to the fsstate.dat file, it exceeds the current size of the file (multiples of FS_STATE_INIT_FILESIZE (8MiB)), we call fs_stateResizeFile. This un-mmaps, truncates, and re-mmaps the file. Unfortunately, fs_stateMapFile() resets the state->mmap.offset and .cursor, so any writes in flight over the resize will overwrite the first bytes of the file (and leave zeros in the file where the data should have been written). Upon return from the write that caused a file resize, the offset is eventually corrected and the state dump continues with a silent failure. Eventually the state dump completes and the file header is rewritten; this may conceal some or all of the overwrite damage at offset 0. However, any zeros near the 8MiB offset (and its multiples) remain as corruption. Add a flag to fs_stateMapFile() to allow the caller to specify if the offset and cursor should be preserved. Modify fs_stateResizeFile() to use this capability. testing note: temporarily reduced FS_STATE_INIT_FILESIZE to 256 bytes during testing in order to make the problem easier to reproduce. This problem would normally occur only on relatively large/active DAFS fileservers. Reviewed-on: http://gerrit.openafs.org/9599 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 42351db75e04e46012208d38f80dc17be7ab776d) Change-Id: I05a01ebce15e26534361863ed0f8d3161c3f8240 Reviewed-on: http://gerrit.openafs.org/9683 Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit bad0b13a17183c93c926c694270dc18964ff443c Author: Simon Wilkinson Date: Sun Apr 8 13:58:25 2012 +0100 fileserver: Fix NeverAttach support Commit 35becabed870d4bfe49abaa499d99a3ffb0a2d31 added support for the /vicepXX/NeverAttach. However this code only appears to work on Linux. It fails build testing on (at least) Mac OS X, FreeBSD, and AIX. Modify the code so that the NeverAttach call uses the same variable to locate the path of the partition as the AlwaysAttach call does. Reviewed-on: http://gerrit.openafs.org/7125 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 709a6358e1d1f6cc0b025522e1e595c50bb2b733) Change-Id: I2f142084fdb4e66c3e7841c9ac961cab417633a0 Reviewed-on: http://gerrit.openafs.org/9471 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit fe524cc1a401e9c8ee57a00960bf47a24d29251e Author: Jason Edgecombe Date: Fri Apr 6 20:58:13 2012 -0400 Fileserver: Add the /vicepXX/NeverAttach flag to skip mounting a partition FIXES 130561 LICENSE MIT Reviewed-on: http://gerrit.openafs.org/7108 Reviewed-by: Derrick Brashear Tested-by: Jason Edgecombe (cherry picked from commit 35becabed870d4bfe49abaa499d99a3ffb0a2d31) Change-Id: If14e0145404dcb81fb5d2184c0991fa3ca64a1df Reviewed-on: http://gerrit.openafs.org/9470 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Reviewed-by: Andrew Deason Tested-by: Stephan Wiesand commit fa147c02bcbc6c4f55a8100dafe4c29ee1290117 Author: Michael Meffie Date: Thu Jun 7 14:46:04 2012 -0400 libafs: fs flushall for unix cm Implement the fs flushall command on the unix cache manager to flush all volume data. Uses a new common pioctl code point VIOC_FLUSHALL (14), registered with the grand.central.org assigned numbers. Reviewed-on: http://gerrit.openafs.org/7540 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 4197bbecd9d0b2ff0b8eaec75a0df9a64f713cf0) Change-Id: Ia4e9eb070d279bf05dbe38ea9b99f1f2f6b9c6f0 Reviewed-on: http://gerrit.openafs.org/9390 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 25e11eea9f9b0aac20ed495bdf306329a00c2fd1 Author: Michael Meffie Date: Thu Jun 7 13:54:20 2012 -0400 libafs: avoid flushing already freed dcaches in flush volumes When flushing volume data, skip flushing dcache entries which are already freed. Reviewed-on: http://gerrit.openafs.org/7539 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 82865811e49aae8b7b8ff9f5d995dc32518b9eb8) Change-Id: I88c9940748dcf7d179fcc2327cddcf222314560d Reviewed-on: http://gerrit.openafs.org/9389 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit ae5e71b4e25eb2aac9b7923ceb17909fa0c22438 Author: Michael Meffie Date: Thu Jun 7 12:58:54 2012 -0400 libafs: use afs_ResetVCache in flush volume data Remove some code duplication by using afs_ResetVCache in the flush volume data pioctl. Adds a flag to ResetVCache to avoid unneeded calls to purge dnlc when reseting all the vcaches in a volume. Adds freeing of vcache link data in the flush volume data pioctl. Reviewed-on: http://gerrit.openafs.org/7538 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 36c6c46bd081e0278611c3bb6ae25dd765f10648) Change-Id: I0c4a001c20633a404c299359914f2368b4492901 Reviewed-on: http://gerrit.openafs.org/9388 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit de79977537f46cfc670136b8e5f7162e0f87c689 Author: Andrew Deason Date: Mon Nov 1 15:34:26 2010 -0500 Cleanup VOffline log message for non-DAFS Commit fd592c7674d4aa44dda90998b54d7b56947f6ed8 fixed the 'Volume X (Y) is now offline' message for DAFS, but the same problem persists for non-DAFS. Fix the non-DAFS case. Reviewed-on: http://gerrit.openafs.org/3213 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 138ac6577eab40e25a796f7c18f3c39add000ed2) Change-Id: I3e0c53d93bcaad43a9fd7b20ccf32bc216601455 Reviewed-on: http://gerrit.openafs.org/9412 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Michael Meffie Reviewed-by: Mark Vitale Tested-by: BuildBot commit b2401a892177a56a519011ced023616080042156 Author: Andrew Deason Date: Thu Feb 3 16:11:38 2011 -0600 volser: Do not reset copyDate in ReClone When we ReClone in the volserver, do not reset the clone's copyDate to the current time. If we retain the copyDate between ReClone operations, then we can know when the clone was first created (and thus makes local RO clones more consistent with remote RO sites). Reviewed-on: http://gerrit.openafs.org/3892 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 112b9b35fc701ca26ba7f99c31a73a7a1eecbdc0) Change-Id: Ifd84a161125bd14799fab2f75f321ca164ef39d2 Reviewed-on: http://gerrit.openafs.org/9451 Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 2a0f2de71841ddff402390457b80443bb9ac30ca Author: Derrick Brashear Date: Sun Nov 27 10:42:59 2011 -0500 namei: force-close fd on read or write error if we errored, just reallyclose so we'll get a new fd Reviewed-on: http://gerrit.openafs.org/6126 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 730832073a1e87654f28bfff054e24d4170c01dc) Change-Id: I019b38b6670d3a45b774740d324d5d49e23f94d1 Reviewed-on: http://gerrit.openafs.org/9436 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Michael Meffie Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit d43bdbb42a7f7a5663f0944c4e672ca81aa7b940 Author: Simon Wilkinson Date: Thu May 19 18:19:29 2011 +0100 vlserver: Use correct base value when replacing When we're removing existing address entries the code calculates a base and index value for each entry that we're removing an address from. However, it then _uses_ a previously calculated base value, with the new index. This works fine if the old base and the new base match, but if they don't, chaos will ensue. Fix to always use matched base and index pairs. Reviewed-on: http://gerrit.openafs.org/4771 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a180b0c5d8991a14f1fbd78d81dcb4754a24f4d3) Change-Id: I37372f020ad644f30b6dbdd1ed68b56eb1c0f2e2 Reviewed-on: http://gerrit.openafs.org/9429 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Mark Vitale Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit c155fa4fe2a2c6ebc2da31083c24ddeb355b5700 Author: Andrew Deason Date: Fri May 21 15:54:33 2010 -0500 vlserver: Access cache via vl_ctx The vlserver application-level ubik cache (which consists of HostAddress, ex_addr, and cheader) is currently being accessed via global variables everywhere. Instead, access these via the new vl_ctx struct that is passed to functions during a transaction, so we have the ability to modify the cache without making all changes visible as we change it. Reviewed-on: http://gerrit.openafs.org/2105 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 1f532d099b8b084d43dd0140890448464325b602) Change-Id: I161b6c41e104af045941663f78148037313036ee Reviewed-on: http://gerrit.openafs.org/9422 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 08745d9e2abf92d2d99dc44ffd8fe7db658b6606 Author: Andrew Deason Date: Fri May 21 11:12:50 2010 -0500 vlserver: Add a struct for trans-specific data Instead of passing a ubik_trans pointer to many functions inside the vlserver, pass a vlserver-defined vl_ctx struct, so we can add new things to keep track of in a transaction that are not part of ubik. Reviewed-on: http://gerrit.openafs.org/2104 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 3bf0350218dcf4d6e086941fac394769b6b9cc4a) Change-Id: Ic224f1fab7505b486baa0a41e5481bc615f00826 Reviewed-on: http://gerrit.openafs.org/9421 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 2870a6278079dd070aed278c8560cc0bc5590d36 Author: Andrew Deason Date: Thu May 12 10:21:09 2011 -0500 viced: h_SetupCallbackConn_r in removeAddress_r removeAddress_r has some code that is identical to the h_SetupCallbackConn_r function. Call the function instead. Reviewed-on: http://gerrit.openafs.org/4645 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 0376255747ac17ed41afbc219f5a5978e58d8e9c) Change-Id: I9f7b4fbc6059a15b30d675a7c78ac9ff00ba32b0 Reviewed-on: http://gerrit.openafs.org/9419 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand Reviewed-by: Mark Vitale Tested-by: BuildBot commit ec46d5af2e2b85caa6a2a9ddd3527ceccebdf32a Author: Andrew Deason Date: Wed Dec 12 16:14:55 2012 -0600 LINUX: Avoid multiple d_invalidate loops Currently, in afs_linux_lookup, we put an artificial limit on how many times we loop through all dentry aliases, trying ti d_invalidate all of them. Instead of using an arbitrary limit, we can just go through all of them once, by using d_prune_aliases. This should be faster, and removes some of the logic required here. Note that this does remove our check for DCACHE_DISCONNECTED in each alias' d_flags. This should not be a problem, since we will still use any remaining DCACHE_DISCONNECTED dentry via d_splice_alias if one still exists. Reviewed-on: http://gerrit.openafs.org/8751 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 370aaaeafa43f804b0a5286d92b4ec5f1ccb62be) Change-Id: I1aa70afe8268852c676f241e0189bc010ad757aa Reviewed-on: http://gerrit.openafs.org/9288 Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit b645fd18a2686d0a098261dc4a1a5b54a44e8adf Author: Andrew Deason Date: Thu Oct 4 15:49:56 2012 -0500 DAFS: VRS_r with VOL_SALVAGE_NO_OFFLINE in attach2 One caller of VRequestSalvage_r in attach2 was not passing the VOL_SALVAGE_NO_OFFLINE flag. This really should be passed for every place that manually sets vp->nUsers = 0, since then the VPutVolume_r handlers will never fire. Reviewed-on: http://gerrit.openafs.org/8203 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3237543afafae7191635fd8e8cada1f95e8abcff) Change-Id: I44a9a56b849bc3c1473b290961190a47ad45f5b5 Reviewed-on: http://gerrit.openafs.org/9283 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand Reviewed-by: Mark Vitale Tested-by: BuildBot commit 8940b7436ab6828b7053d2f6c97cc7f9ae0930f4 Author: Ben Kaduk Date: Wed Jun 19 16:48:23 2013 -0400 db_dump.o depends on budb_errs.h Add INCLS and budb_errs.h accordingly. In contrast to master, budb did not have this already. Reviewed-on: http://gerrit.openafs.org/9996 Reviewed-by: Jeffrey Hutzelman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7af86ecffb737b050f67908b63f247e8361eacdc) Change-Id: Id8657c39d58a1f73e07bf5d9a5324cb343b3888b (cherry picked from commit e6d1db4643d023eda837c8ae37b82b0dc7d5ee4d) Reviewed-on: http://gerrit.openafs.org/10005 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit 6a1c2d4a69471746978a9f2e95d1552f2f8f1a94 Author: Anders Kaseorg Date: Tue Jul 23 14:37:26 2013 -0400 volume_inline.h: Down with assert, again Commit 34767c6a0f914960c9a1efabe69dd9c312a2b400 replaced all assert calls in this file with osi_Assert, but shortly thereafter, commit db6ee95864a8fc5f33b7e95c19c8ff5058d37e92 added VTimedWaitStateChange_r with two new assert calls. These are precarious in a public header; fix them to osi_Assert like the ones in VWaitStateChange_r. Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/10094 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 30fa9480dd99ed93fa642dd8ce9746760fb42180) Change-Id: Id0bc0e75de000cf3e4133aaf31f52d9a565c8d9f Reviewed-on: http://gerrit.openafs.org/10095 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Mark Vitale Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 00fd34a65c7914bfd480d892cc95e9f694e29f5f Author: Andrew Deason Date: Thu Nov 1 11:51:42 2012 -0500 afs: Handle easy GetValidDSlot errors Many callers of GetValidDSlot currently assume they will always get back a valid dcache, and will panic on getting NULL. However, for many of these callers, handling the NULL case is quite easy, since the failure to get a dcache can just result in an error directly, or obtaining the dcache is best-effort or just an optimization. This commit just handles the "easy" cases; some other callers require more complex handling. Reviewed-on: http://gerrit.openafs.org/8375 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f74a0a7bbb37a8ab6050e833cf8d66abdff31854) Change-Id: Ic2c463edebcb821562541004bd4181483c90c3e6 Reviewed-on: http://gerrit.openafs.org/9287 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit bb80282ba95b23c85cc5f287ed174e37b4d374a7 Author: Andrew Deason Date: Wed Oct 31 15:04:55 2012 -0500 afs: Make last_error always useful Currently we record last_error as the last getuerror() we got when failing to read in a slot in UFSGetDSlot. For kernels that do not have getuerror(), this variable is currently useless, and we do not record anywhere what the last error received was (besides logging it via afs_warn). So, for non-uerror, just record what 'code' we got, so we at least have something. Reviewed-on: http://gerrit.openafs.org/8369 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 48b60478897e7cb22e9cc1adfa3b71c188572093) Change-Id: I32a079934c8d3ecd3d7316cfc7eb8da01580a08e Reviewed-on: http://gerrit.openafs.org/9286 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit f61880266f476fefbeacbe2a7af1e397b0ddadc3 Author: Andrew Deason Date: Thu Mar 22 17:54:12 2012 -0500 salvager: Trust inode-based special data over OGM Currently the salvaging code looks for special inodes, and infers the volume id and inode type from the OGM data in each special inode file. However, we can already derive this information from the inode number itself for the special inode, so if they disagree, use the values based off of the inode number and correct the OGM data. The inode number should be more likely to be correct, since that is how we look up the special inode from the header when attaching the volume. It is also impossible to get special inode files with the same name, so this ensures we don't get duplicates. And for people that go snooping around /vicepX/AFSIDat even though we tell them not to, it seems more likely that they go around 'chmod'ing or 'chown'ing rather than 'mv'ing. This change avoids an abort in the salvaging code when the OGM data is wrong. If we trust the OGM data when it is incorrect, we assume the special inode file is for a different volume. So when we go to recreate one of the special files for the volume we're actually working with, the IH_CREATE fails (from EEXIST) and so we abort. Reviewed-on: http://gerrit.openafs.org/6946 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit df522b588396aaac3ec662b516ef7287f3b7c47b) Change-Id: I7ae826b6d6747e3ab3a1d8086ff17503a904a6d5 Reviewed-on: http://gerrit.openafs.org/9282 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit b4f321f207f710bd62be53f653f45439e94992e0 Author: Andrew Deason Date: Fri Mar 23 13:02:22 2012 -0500 namei: Abstract out OGM functions a bit more Add GetWinOGM and SetWinOGM for getting and setting the Windows-equivalent of the Unix OGM data. Make those and CheckOGM use GetFileTime/SetFileTime so we can operate just via an FD_t, without needing the full pathname. Modify the NT namei_icreate to use SetWinOGM. Reviewed-on: http://gerrit.openafs.org/6945 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0594fc80b48152b4b03edda7e19133b59fc0670e) Change-Id: I65491a9a82911d9c99d6238a4ea66ed400db7aa0 Reviewed-on: http://gerrit.openafs.org/9281 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 514fc63db0664f263ce0b5a9b37e6f97bbeec440 Author: Andrew Deason Date: Wed Jul 31 15:58:41 2013 -0500 budb: Do not use garbage cellinfo If the -servers option is given, we never initialize cellinfo or the clones array. So, don't give the cellinfo structure or the clones array to ubik in that case, or we may crash or do other weird things. This issue appears to have been introduced in commit fc4ab52e. FIXES 131706 Reviewed-on: http://gerrit.openafs.org/10115 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6b0016dd992b3215cb17c93812e14de9e4916d25) Change-Id: I7174d3ac596fb9ecf512aa159fdc839714f8791c Reviewed-on: http://gerrit.openafs.org/10166 Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 2ee9f04c1cd26b93d6b773c4eec329a0d04648ea Author: Michael Meffie Date: Mon Dec 10 18:00:25 2012 -0500 xstat: length check cm call info Define the cm xstat function call counters with an xmacro to avoid duplicating the list of cm function names. This obviates the need to update xstat_cm_test.c when new function names are added to the cm xstat collection id 0. Check the number of returned records when printing the function call counts to avoid over-running when a newer xstat_cm_test client receives data from an older cm. Reviewed-on: http://gerrit.openafs.org/8741 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 09c0484fd8878797957f7ff5936c542a0f6332c4) Change-Id: I622a4f16cbb102962199f26e5431b04ea381d5fe Reviewed-on: http://gerrit.openafs.org/9065 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 008a0965615d0a16eb1eb402e4d240ebd70e73c2 Author: Andrew Deason Date: Tue Oct 2 14:38:20 2012 -0500 afs: Avoid tracking file locks for RO volumes Advisory file locks for RO volumes don't make a lot of sense, since there are no possible writes to worry about. The fileserver already does not track these, so don't even bother processing them in the client. Reviewed-on: http://gerrit.openafs.org/8197 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0fc27471e7da0c5de4addcdec1bfbca5208072cc) Change-Id: I308d930c94708fd8d9025886c10f40cc4d10d195 Reviewed-on: http://gerrit.openafs.org/8910 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 220336585530ff9f0b4b1e3b47e3dd6727a18ab3 Author: Simon Wilkinson Date: Tue Feb 26 11:52:01 2013 +0000 libafscp: NULL return value not pointer When afscp_FindCallBack sets its return-by-reference value to NULL, it should do so to the value itself, not the pointer to it. Caught by coverity (#988419) Reviewed-on: http://gerrit.openafs.org/9266 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 99929488511d13dab94491cac1d477062f9da741) Change-Id: I046189684cef6c88c46455a90ab49d03da1f1cab Reviewed-on: http://gerrit.openafs.org/9359 Tested-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear commit 2d3ae77f9f26f64c88415a2e063e28c2cebeed1c Author: Simon Wilkinson Date: Tue Feb 19 17:53:11 2013 +0000 libafscp: Actually return callback from FindCallback Fix FindCallback so that it actually returns the callback that it found. This requires changing the function prototype so that the third parameter is passed by reference, and updating the single call site. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9198 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit f67e4a3cdfb1856e31dda0d4741c8d34df13f8fc) Change-Id: Ia610993535acc68beef7e8cffcfac77db2638aa4 Reviewed-on: http://gerrit.openafs.org/9973 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand commit ac750113f34bcd03df3350ec9863b7b3c67efa25 Author: Mark Vitale Date: Fri Dec 21 17:56:14 2012 -0500 dafs: preattach should wait for exclusive states In rare circumstances an FSYNC_VOL_ON operation may fail silently, leaving the volume in its previous state. The only clue is a FileLog message "volume not in quiescent state". This is caused by a race condition in the volume package: an FSYNC_VOL_ON operation is attempting to preattach a volume (in VPreAttachVolumeByVp_r()) at the same time a fileserver RPC (e.g. FetchStatus) is detaching the volume (in VReleaseVolumeHandles_r()) at the conclusion of attach2() logic. The fix calls VWaitExclusiveState_r() before calling VPreAttachVolumeByVp_r(). Change-Id: Ib66859381d29311fda3e08984dcb740eadafb340 Reviewed-on: http://gerrit.openafs.org/8814 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 1f891b622e9b32a068082087eae9d787057f7f00) Reviewed-on: http://gerrit.openafs.org/9070 Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit fa085d0b3c53b94cb3d582269ee7a568bfbc7ccf Author: Ken Dreyer Date: Wed Jul 31 16:00:24 2013 -0600 do not ship uncompressed tarballs There's not much point to shipping uncompressed tarballs in 2013. Delete them during "make-release". Reviewed-on: http://gerrit.openafs.org/10116 Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Ken Dreyer (cherry picked from commit 0346ed6f53a6f3fb5d75de41c7ec5a139727618f) Change-Id: Ic1247c6a42ecb6a5c6bae1fd88b789a8b3e55d49 Reviewed-on: http://gerrit.openafs.org/10131 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 0e8929f9a8cddac3ad806a1adaa72e3bf108719b Author: Ben Kaduk Date: Wed Mar 13 13:27:32 2013 -0400 Enable dvolser and tvolser for FreeBSD The top-level Makefile did not recurse into dvolser or tvolser for FreeBSD. They compile just fine, so enable them. Reviewed-on: http://gerrit.openafs.org/9598 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit e93360ecc79822dd8149990a6eb5f3235b7cca1f) Change-Id: Ia7dfbce23453a147f2c1ba81718373f632a039b6 Reviewed-on: http://gerrit.openafs.org/10122 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit fe99b4883af9eee954c3a3942b11cd9874690cb0 Author: Jonathan A. Kollasch Date: Tue Oct 11 12:33:19 2011 -0500 build tsalvaged, tvolser, and dvolser targets on *nbsd* Reviewed-on: http://gerrit.openafs.org/5595 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 1ca207f18491147bb7f7de3e588fb1979ac3d0c5) Change-Id: I8570370905fa4c3bbdd72f5535329cfab5bebf1a Reviewed-on: http://gerrit.openafs.org/10121 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Tested-by: Jonathan A. Kollasch Reviewed-by: Jonathan A. Kollasch Reviewed-by: Stephan Wiesand commit 83ef563a1ffadbc965c5863d11c488d46ceffc62 Author: Andrew Deason Date: Thu Jan 27 13:13:21 2011 -0600 afscp: Fix -s option for writes When writing to AFS with afscp, the -s option was sleeping before any StoreData RPCs actually got issued to the fileserver. Move the sleep to after we have done one rx_Read/rx_Write, so we sleep after starting to contact the fileserver, to make sleeping while writing more consistent with sleeping while reading. Reviewed-on: http://gerrit.openafs.org/3762 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 380cc22a45dff7e40cd50d57a56742b59ccc4952) Change-Id: I5bafad6958111bfb196adde79361939b00a176a1 Reviewed-on: http://gerrit.openafs.org/9417 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 23048745c9b8611a4e2e24c2b7ba01e103d8cf53 Author: Andrew Deason Date: Wed Nov 10 15:35:17 2010 -0600 afscp: Add -s option Add an -s option to afscp, to specify an amount of time to sleep in the middle of a read or write operation. This can be helpful in simulating a slow client. Reviewed-on: http://gerrit.openafs.org/3291 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 00023f168e0e097c6a7e9da4450a009e4818a1a5) Change-Id: Ifefce12d7372f9f8fe7149b91af0d0a7f128cb96 Reviewed-on: http://gerrit.openafs.org/9416 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 5a89d8972d53ec913e1d7eec52955410b568aa86 Author: Ken Dreyer Date: Sat Jul 27 09:22:56 2013 -0600 doc: clarify setcrypt defaults Reviewed-on: http://gerrit.openafs.org/10111 Reviewed-by: Jason Edgecombe Reviewed-by: Michael Laß Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 3a24ed9baef178d34b6d0fb3a5f6a485dea9353b) Change-Id: I2d9cd3c9167e2d67ced609e5be2d173a82b36a28 Reviewed-on: http://gerrit.openafs.org/10136 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Stephan Wiesand commit 989b8a48c435b7561ded88dc43dfd73dcdf3c64e Author: Michael Laß Date: Sun Jul 14 21:31:27 2013 +0200 Use -nofork when starting bosserver via systemd Systemd does not expect the started process to fork unless "Type=forking" is given. Use -nofork to run BOS in foreground and allow systemd to track its state. Reviewed-on: http://gerrit.openafs.org/10087 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Marc Dionne Reviewed-by: Mark Vitale Tested-by: Michael Laß Tested-by: Ken Dreyer Reviewed-by: Ken Dreyer (cherry picked from commit e2d458c11956af6fe721f7151487cb19f07ac16f) Change-Id: I2b66ca126dbda6c2c616d74b571908c57d1e86e4 Reviewed-on: http://gerrit.openafs.org/10093 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit bd52d1a2c3cb50aba533adc44a99e9c20db27706 Author: Andrew Deason Date: Fri Feb 8 17:24:28 2013 -0600 afs: Avoid SetupVolume panic Currently SetupVolume panics if it cannot successfully read a volumeinfo entry from disk. Try to return an error instead, so we don't panic the machine. Reviewed-on: http://gerrit.openafs.org/9094 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6f7ae535bbac2a5376358801b7f2c9e072f2d141) Change-Id: Ib8ea06192bfcd6c2111444db325abc4a90190bbc Reviewed-on: http://gerrit.openafs.org/9131 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 4d03cfc8bd6545e60ff63d206841dc8537e9d07a Author: Andrew Deason Date: Fri Feb 8 17:26:32 2013 -0600 afs: Move SetupVolume tv initialization after loop The fields in tv are not used by the loop looking for the given volume on disk. If we wait until after that loop to initialize the fields in tv, it is easier to handle errors encountered in the loop. This should incur no functional change. Reviewed-on: http://gerrit.openafs.org/9093 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 8f95dc9eb92cb31f9d29eb87daac747f53b5a1cc) Change-Id: I65f3b647017aebacf28026a648c75b2d279c768e Reviewed-on: http://gerrit.openafs.org/9130 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand commit da2d64ce2f85e6b807a01f4a696a25fd989181b1 Author: Andrew Deason Date: Wed Jan 2 14:09:06 2013 -0500 afs: Check dv against localhero aincr For operations that modify directories, we call afs_LocalHero to determine if we can perform the directory modification in our local cache, and avoid fetching the dir blob from the fileserver. Currently, afs_LocalHero assumes that the DV received from the fileserver is correct, and will update the cache DV as long as we have a valid callback on the file. If for any reason the client cache falls out of sync with what's on the fileserver, this can cause the client to incorrectly believe its cache is up to date. Since, the cached data will be marked with the newest DV, even if the DV on the server has jumped to be larger than we expected. While the client cache should never fall out of sync with the fileserver, in the past this has been possible due to other bugs (fileserver idle dead processing and client VNOSERVICE handling). Assuming that the given DV is correct is also just unnecesarily fragile, since we can always check if it is correct, so just check it, and add some comments helping explain what's going on here. Note that regular file writes effectively already check this. Note that this change makes use of the 'aincr' argument to afs_LocalHero, which was previously unused. aincr appears to have been used for a purpose similar to this before OpenAFS 1.0, but was removed, possibly accidentally. It is possible this change negatively affects, or even breaks (unlikely), functionality with the AFS<->DFS translator. Although nothing of the sort has been seen, it is difficult to know one way or the other, due to the lack of available DFS translators. Reviewed-on: http://gerrit.openafs.org/8864 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 004e9f25634d76be58b5a60dfc3c9a058d8bcd26) Change-Id: Ie0a3ab5defc5dde3284ad7527fdd05835a85da7f Reviewed-on: http://gerrit.openafs.org/8898 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit 0c5afaca547549e788d86962c7180d5de42488b5 Author: Marc Dionne Date: Mon Jul 8 10:53:00 2013 -0400 Linux 3.11: Convert from readdir to iterate file operation Convert the readdir function so that it can be used as the new "iterate" file operation. This new operation is passed a context that contains a pointer to the filldir function and the offset. The context is passed into the new dir_emit function that will call the function specified by the context. The new dir_emit function returns true on success, so we must be careful about how we check for failure since this is different behaviour from what filldir currently does. Reviewed-on: http://gerrit.openafs.org/10051 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 902b8809f03533ffa7731919930bb5178f77df6c) Change-Id: I12dc2517af66b66b2de6b2cb01d39e3a0cbc5fe2 Reviewed-on: http://gerrit.openafs.org/10118 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 984ff6cb2b3100ae3dd567c537dc3e4ae065f3ae Author: Derrick Brashear Date: Thu Jul 25 07:51:04 2013 -0400 dirpath: update keytab strings in windows this was missed in the pullup from 33eecea7db14d06c59e1081b970d4caf0af773ca Change-Id: Iee734bf06af4152ead5cfcf33bbbcafc39812c5a Reviewed-on: http://gerrit.openafs.org/10109 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2f411f4f8c3e1116cb9bc515db598eda1e6cea1b Merge: 772a378 5f5b02a Author: Simon Wilkinson Date: Wed Jul 24 16:10:28 2013 +0100 Merge branch 'rxkad-kdf-1.6' into origin/openafs-stable-1_6_x Merge the changes necessary for OpenAFS-SA-2013-003 and OpenAFS-SA-2013-004 back into the stable branch. commit 5f5b02a57102af1a85fb9bdaaec31b6094d0c9c4 Author: Michael Meffie Date: Wed Jul 17 23:10:42 2013 +0100 ubik: Fix encryption selection in ugen Make sure that we encrypt when requested to by the application Change-Id: If4c2ba2257bf060d3e9169ccdbcae54f54dfe5d7 commit 0e41558190a5190dee3037c08e8df31e61e5134e Author: Simon Wilkinson Date: Tue Jul 16 19:37:00 2013 +0100 Make OpenAFS 1.6.5 Change-Id: I693297ef6e20358966930cb29116d45b9151811f commit 9e1c24a583634e6102091388dedc47745efce78a Author: Ben Kaduk Date: Sat Jul 13 10:49:27 2013 +0100 Add support for deriving DES keys to klog.krb5 (cherry picked from commit e79102e7918ce5196e870a806879135743ec3abb) Change-Id: Ia7ebfdd10dcfd6cd164b10275016147630748bac commit 4b7553600a7659d117df0bde7b1c1dfde031deb8 Author: Andrew Deason Date: Wed Jul 10 12:52:28 2013 -0500 Reload rxkad.keytab on CellServDB modification Make the reloading of rxkad.keytab keys occur in the same way that KeyFile keys are reloaded. That is, we only try to reload them if the CellServDB mtime has changed. This is intended to have exactly the same reloading behavior as KeyFile reloads. I would have triggered this from afsconf_Check, but that approach has annoyances. (Calling ticket5_keytab functions directly from cellconfig pulls in libkrb5 dependencies for everything that uses cellconfig, and we'd have to trigger an afsconf_Check call by calling some other cellconfig function.) 9102f49a3bdc67ed74e254349eb55b529472f45c commit d2024c158e3a879305ff17cf726d3958f20677f4 Author: Andrew Deason Date: Mon Jun 10 17:49:12 2013 -0500 Avoid calling afsconf_GetLatestKey directly Don't call afsconf_GetLatestKey to determine whether we can print our own local tokens, since we may have keytab 'local' keys, but no DES keys. Just try to construct them and see if it fails, using afsconf_PickClientSecObj or afsconf_ClientAuth{,Secure} as appropriate. commit d4788f6e283b79a1b974dda1e8fae213efd34930 Author: Andrew Deason Date: Mon Jun 10 17:15:27 2013 -0500 auth: Do not always fallback to noauth Make afsconf_PickClientSecObj error out if we can't construct localauth tokens (unless the caller explicitly requested rxnull fallback). afsconf_ClientAuth{,Secure} still falls back, as always. commit 95d57c74476c5a02ce6d9ca913dcbf88ac5c1143 Author: Ben Kaduk Date: Tue May 14 19:37:59 2013 -0400 Clean up akimpersonate and use for server-to-server Since a6d7cacfd, aklog has been able to print a krb5 ticket to itself for an arbitrary client principal, allowing a user with access to the cell's krb5 key to get tokens as an arbitrary user. Now that it is possible to use native krb5 tickets with non-DES enctypes for authentication, and akimpersonate is available from libauth, use printed native krb5 tickets for server-to-server communication (as well as the -localauth versions of the client utilities). Remove the early call to afsconf_GetLatestKey() in afsconf_PickClientSecObj() so that we do not end up picking an old DES key before we try to find a better key to use. Before doing so, refactor the akimpersonate code to be more usable and readable, and eliminate some dead code. For example, we always printed addressless tickets, so that code could be removed. Other code had excessive stack usage for a library routine, which is eliminated. Use a start time of 0 instead of 300 so that the printed ticket will always be detected as infinite-lifetime. In order to ensure usability on all platforms (in particular Solaris), provide a couple more compat shims to implement routines which are not always available from the krb5 library, in particular encode_krb5_ticket and encode_krb5_enc_tkt_part. Thanks to Andrew Deason for implementing these compatability routines. UKERNEL doesn't need this stuff. commit 15b77552b22e3ff3e7478008673775a45047f600 Author: Alexander Chernyakhovsky Date: Tue May 14 18:12:08 2013 -0400 Move akimpersonate to libauth Give it its own source file and header, install the header at depinstall time, and have aklog get the akimpersonate functionality from libauth. Keep the linux box copyright from aklog_main.c (but strip the trailing whitespace), as that block was added with the akimpersonate code. Remove all calls to afs_com_err() as is fitting for library code, to let it build. Do not bother removing curly braces which are no longer needed; a future cleanup commit will catch that. commit 1c7fa1405940a136a992d65023cc690b1111ab3e Author: Chaskiel Grundman Date: Sun Mar 17 21:58:47 2013 -0400 Derive DES/fcrypt session key from other key types If a kerberos 5 ticket has a session key with a non-DES enctype, use the NIST SP800-108 KDF in counter mode with HMAC_MD5 as the PRF to construct a DES key to be used by rxkad. To satisfy the requirements of the KDF, DES3 keys are first compressed into a 168 bit form by reversing the RFC3961 random-to-key algorithm Change-Id: I4dc8e83a641f9892b31c109fb9025251de3dcb27 commit 33eecea7db14d06c59e1081b970d4caf0af773ca Author: Chaskiel Grundman Date: Sun Feb 10 13:27:03 2013 -0500 Integrate keytab-based decryption into afsconf_BuildServerSecurityObjects Now all servers can have it. authcon.o grows a krb5 dependency and needs to get KRB5_CPPFLAGS. Change-Id: I95fecb3f88c19b3d5193ea8200fa20c86ec08ad7 commit 14db1a40e5be3b7325951d002885bbf288d570c1 Author: Chaskiel Grundman Date: Sat Feb 9 12:42:20 2013 -0500 New optional rxkad functionality for decypting krb5 tokens An additional, optional mechanism for decrypting krb5-format tokens is provided that uses the krb5 api with a key from a keytab instead of using libdes and the AFS KeyFile. The AIX compat stub for krb5_c_decrypt is contributed by Andrew Deason. Change-Id: I97c08122c60482b84d602d6fa6482f1d5deef142 commit 5e0cbc930508a697331bad07cc201c1e1985ff84 Author: Chaskiel Grundman Date: Sat Feb 9 12:01:37 2013 -0500 Add rxkad server hook function to decrypt more types of tokens Allow tokens to be encrypted with algorithms other than DES. The security object owner must provide an implementation by calling rxkad_SetAltDecryptProc. Make sure plainsiz is initialized before calling the alternate decrypt proc. commit 772a378bc412d62e25dfa5d4d8b3c854ee8b604a Author: Andrew Deason Date: Fri Jun 15 16:55:16 2012 -0500 viced: Rename fs_rxstat_userok The fs_rxstat_userok function can be used for other purposes; give it a more general name. Reviewed-on: http://gerrit.openafs.org/7571 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 7a875f639f61966f2d327f929305091d2678e99a) Change-Id: I44301904cc8e7145ba13276a32b7cea475bc0574 Reviewed-on: http://gerrit.openafs.org/9484 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit dc8b3d0c3ca680933cffa0aafe04fed821ea52ca Author: Stephan Wiesand Date: Tue Jun 18 15:50:03 2013 +0200 make openafs 1.6.4 The wrong commit was tagged for the 1.6.3 release by accident. Update the version strings to 1.6.4, and adapt the release notes. Change-Id: I0c4f8e796a1017aebaaf6c219fd12e1547ad9319 Reviewed-on: http://gerrit.openafs.org/9983 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 74bd4b6e9fed92b188b91f7cf05438d7f1db53a7 Author: Stephan Wiesand Date: Sun Jun 16 21:15:53 2013 +0200 make openafs 1.6.3 update version strings for 1.6.3, finalize release notes Change-Id: I2f3e3dee0b1ea9e2fce522ad72e9018825b4103b Reviewed-on: http://gerrit.openafs.org/9976 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear commit f1702d57bcad2843f08341aaa46519a095d970ce Author: Stephan Wiesand Date: Thu May 30 16:52:26 2013 +0200 Update release notes for 1.6.3 As of pre3, we'll support Linux 3.10 clients (at least up to rc3). Change-Id: I81b783ad563e4a7735638bde2aa77d11ea1ec83c Reviewed-on: http://gerrit.openafs.org/9959 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 6e92b66271df340917c4243404b5b85df7505e94 Author: Stephan Wiesand Date: Thu May 30 15:54:59 2013 +0200 make 1.6.3pre3 prerelease for OpenAFS 1.6.3 Change-Id: I92e3df57e9c8d55759c317cc8d7743c23c349399 Reviewed-on: http://gerrit.openafs.org/9958 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d5fcb35aea8a15bb8de760d2e27ef5734cfff16a Author: Marc Dionne Date: Mon May 6 20:20:07 2013 -0400 Linux 3.10: Replace create_proc_entry() with proc_create() Add an afs_proc_create() compat function that uses the appropriate kernel function based on a configure test. Reviewed-on: http://gerrit.openafs.org/9854 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 9b24013426e03a501fcaa6334ba5a9b48a8da3d1) Change-Id: I976ef345b1638434026e852e577e1f4474171e3d Reviewed-on: http://gerrit.openafs.org/9948 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 2bbd762c57003a9340d52edd517bc7540b1b2d8d Author: Marc Dionne Date: Wed May 15 15:19:22 2013 -0400 Linux 3.10: Include linux/aio.h directly This file needs bits from linux/aio.h, but gets them indirectly from the inclusion of aio.h by sched.h. That gets removed for Linux 3.10. Since this header is not of general interest elsewhere, just include it directly here. Reviewed-on: http://gerrit.openafs.org/9912 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Tested-by: BuildBot (cherry picked from commit fca4252621b80c5126e1ae3d84a54da5ebc677ba) Change-Id: I7da471ee033087592b9ec3f10331baf0135cc201 Reviewed-on: http://gerrit.openafs.org/9947 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand commit b9984671c567ec82e128f64a1f3612348f2b156c Author: Stephan Wiesand Date: Wed May 15 19:36:14 2013 +0200 make 1.6.3pre2 prerelease for OpenAFS 1.6.3 Change-Id: Ie6148239feae53bdaca9409c6b75714a25968c00 Reviewed-on: http://gerrit.openafs.org/9909 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 4d59d59dc04e25cc59da19a71a0400116d10e0fc Author: Stephan Wiesand Date: Wed May 15 19:46:56 2013 +0200 Update release notes for 1.6.3 We merged another change, helping Linux 3.6+ clients. Mention it. Change-Id: I71d2ee7f2b6fc591d767f37436d0e154809e0786 Reviewed-on: http://gerrit.openafs.org/9910 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit af2dda555adfa71bc6a84e04f72523273aca6c16 Author: Antoine Verheijen Date: Mon Apr 8 20:29:58 2013 -0600 OpenBSD 5.3: Replace use of copyinstr for setting mount point name. As a result of a realignment of kernel memory in OpenBSD 5.3, the copyinstr() routine no longer works for copying the mount point name into the internal mount table structure. It also fails silently, so it's not noticed until someone looks at the mount table and discovers that the mount point name for AFS is missing. This patch replaces the use of copyinstr() with strlcpy() for copying the mount point name in OpenBSD 5.3. Note that this is consistent with how other similar device support has addressed the same issue in OpenBSD 5.3. Reviewed-on: http://gerrit.openafs.org/9752 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit b39461fc67d4f258d31e0a13b5d8dcb3c5fae49f) Change-Id: I5e9a3d0871360e0e3b19cdb2b4a609baeed050f8 Reviewed-on: http://gerrit.openafs.org/9908 Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit a71cc5511c115c1b6cb4a6a2997a846bab6e19e2 Author: Anders Kaseorg Date: Tue May 7 00:27:33 2013 -0400 Linux: osi_TryEvictVCache: Don’t skip the first dentry if D_ALIAS_IS_HLIST An hlist doesn’t begin with a sentinel like a list does, so the old code would skip the first dentry or crash with a NULL dereference if there wasn’t one. Use the kernel’s list_for_each_entry or hlist_for_each_entry macros instead of trying to do it manually. Should fix a crash observed by Alex Chernyakhovsky on kernel 3.6 and newer. Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/9857 Reviewed-by: Alex Chernyakhovsky Tested-by: Alex Chernyakhovsky Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Jeffrey Altman (cherry picked from commit ad6e31d5fea221bf5eefcd35a416667bc7c1f9be) Change-Id: Id8b31246067b5a718af91c8c206d5abd5210c558 Reviewed-on: http://gerrit.openafs.org/9898 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Stephan Wiesand commit 3afe8cd715859ec4e758e6b43c82851893dc706e Author: Stephan Wiesand Date: Tue May 7 18:45:53 2013 +0200 make openafs 1.6.3pre1 prerelease for 1.6.3 Change-Id: I8eb600cdc0ed55d15e928a9f165f68d3ff924f82 Reviewed-on: http://gerrit.openafs.org/9858 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Ken Dreyer Reviewed-by: Stephan Wiesand commit c0457a046d14c6df8253c9ab33f948da6d1893f7 Author: Stephan Wiesand Date: Tue May 7 20:46:47 2013 +0200 Preliminary release notes for 1.6.3 Change-Id: Ie4a6a984cfd9b819b0a3170acce7817998307157 Reviewed-on: http://gerrit.openafs.org/9859 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit b8a7861ed01fb01ef90c491a5bf1fcda79d3ce36 Author: chas williams - CONTRACTOR Date: Mon Sep 5 09:26:32 2011 -0400 ppc64_linux26: build binaries as 64-bit by default lwp doesnt work since ucontext/setjmp are incomplete when running 32-bit binaries with the 64-bit kernel. Reviewed-on: http://gerrit.openafs.org/5365 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 39b788eeafe27d21ae6b4fd3cfeb59ce5dc70077) Change-Id: Ic4fd5c1a861db8e96dd58a79d7fb2ea73ab4f0d6 Reviewed-on: http://gerrit.openafs.org/9605 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 9be556d2c1c15ffc1561a6f03d2381430ba1c21c Author: Andrew Deason Date: Thu Mar 28 13:03:40 2013 -0500 afsio: Pass KRB5_LDFLAGS along with KRB5_LIBS We need this in case e.g. the krb5 library we're using is in an alternate location, so we can pass -L. aklog already does this, so do it for afsio, too. This is a 1.6-only change. On master, this problem went away when the krb5 ldflags/cflags/etc were standardized in commit 6f9443e702745d1e371eb72ad7fcba5cac47f3db. Thanks to Måns Nilsson for reporting this. Change-Id: I79aeb1f4de123b7550b64c1890a2773a44ff8d1e Reviewed-on: http://gerrit.openafs.org/9692 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit c18835330e9bec04672baf78eb1ff7fce47c4263 Author: Ken Dreyer Date: Tue Apr 30 21:59:32 2013 -0600 doc: quote list items in POD Recent versions of Pod::Simple complain if we use integers or other special characters in an =item list. We have a couple bulleted lists that happen to have integers or other special characters as the list values. Quote the items with C<> so that Pod::Simple can correctly parse them again. Reviewed-on: http://gerrit.openafs.org/9838 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 32d823c52f212fb79816708418ad7d958eb32a01) Change-Id: Ie3e5c792d64f1d2e973e3a5f68b8466986cde0d7 Reviewed-on: http://gerrit.openafs.org/9842 Tested-by: BuildBot Reviewed-by: Jason Edgecombe Tested-by: Jason Edgecombe Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 753d3380f30f7277b88365fe1994072ae75a8be7 Author: Andrew Deason Date: Tue Apr 30 14:37:54 2013 -0500 afs: Do not invalidate all dcaches on startup Commit 20b0c65a289e2b55fb6922c8f60e873f1f4c6f97 changed afs_UFSGetDSlot to always treat a dslot entry as invalid if 'datavalid' was 0. This was to force the invalidation of the given dslot if we were reading in a dslot from the free or discard list, since the data in that dslot is not valid. However, 'datavalid' is also 0 when we read in dcache entries from disk on startup. So, this means that we invalidated all cache entries when the client started up, effectively making our persistent cache worthless. Fix this by only forcing this invalidation when we are reading from a free or discarded dcache, and not during the initial cache scan. That is, when 'indexvalid' is 1, and 'datavalid' is 0. The parameters for these Get*DSlot variants should maybe be changed to be a little more clear, but for now, this is a targeted fix for this specific issue. FIXES 131655 Reviewed-on: http://gerrit.openafs.org/9833 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 479c34614f33859131258e330e7a3f8494e0bc80) Change-Id: I72b7ad41658c51b81aa9844327372724a0f3151e Reviewed-on: http://gerrit.openafs.org/9837 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand commit be2cc944febb262ae0168bf5fe9411b6ef611469 Author: Andrew Deason Date: Fri Mar 29 13:40:41 2013 -0500 Make ihandle sync behavior runtime-configurable The actual behavior of FDH_SYNC has changed a bit over the years, and some people want one behavior, and some want another. Make it possible to make this choice at runtime with the new -sync option, instead of making this decision by running with different patches. Note that FDH_SYNC is not a macro anymore, nor is it an inline function. While it could be a macro, it would look a bit complex, and there are some oddities with trying to use vol_io_params inside the FDH_SYNC expansion (vol_io_params is not declared for LWP, for example). And having it be an inline function causes problems with some odd linking dependencies. For example, vlib.a contains volume.o, but does not contain a definition for DFlushVolume (dir/buffer.c), which is referenced in volume.o. 'vos' uses vlib.a, but does not bring in anything that defines DFlushVolume. Currently this appears to not cause a problem because 'vos' uses nothing from volume.o, so the dependencies of volume.o don't matter. Adding an inline FDH_SYNC for platforms that don't support 'static inline' would add a dependency to volume.o (via vol_io_params), which causes an error for the lack of a DFlushVolume. Those are possibly just some problems, and may not be all. So instead, make it so we don't have to deal with that and just have a normal function. While FDH_SYNC may be called in a performance-critical section, the overhead of a real function call is nowhere near the delay of an actual fsync(), so presumably any overhead doesn't matter. Reviewed-on: http://gerrit.openafs.org/9694 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit eb5190eb4a7cd95166866a89e0a8f3a69bbc6e8f) Change-Id: I7a6c99d00eff3400423440db91a350053ed099ea Reviewed-on: http://gerrit.openafs.org/9695 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit d99de7f2e869c9dcf2873f0c62d7fbe54f7afe43 Author: Andrew Deason Date: Wed Apr 17 18:04:58 2013 -0500 LINUX: Sometimes let dentry_open handle refcounts When Linux changed dentry_open to use a 'path' argument, they also changed it so dentry_open handles incrementing the relevant ref counts. So now, sometimes we need to inc the dentry and vfsmount refcounts ourselves, and sometimes we need to leave them alone. To accommodate this, change afs_dentry_open to also handle refcounting itself, and 'get' the given dentry and vfsmount if necessary. Also note that currently, afs_linux_raw_open can call afs_dentry_open twice in the case of an error, but it does not dget(dp). This means that dp could be undercounted, since dentry_open on older kernels will dec the refcount on the given dentry in the case of an error. This change should also fix this so dp is not undercounted in that case. FIXES 131613 Reviewed-on: http://gerrit.openafs.org/9801 Reviewed-by: Derrick Brashear Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Andrew Deason (cherry picked from commit e31240732cbe449fedea5095037ac08d1d513fa9) Change-Id: I082063d324d99c3d02ed372a1c20462f13bb4a26 Reviewed-on: http://gerrit.openafs.org/9803 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Reviewed-by: Stephan Wiesand commit d572281d5db2896362e9addf8a8157c618e3a776 Author: Andrew Deason Date: Wed Apr 17 01:27:47 2013 -0500 LINUX: Avoid duplicate mntget in afs_dentry_open Our caller already got a ref to 'mnt'; getting another one here will overcount refs on 'mnt'. This can make it impossible to unmount the filesystem the cache resides on (even after the client is stopped), since it's ref count will be very high. FIXES 131613 Reviewed-on: http://gerrit.openafs.org/9790 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit e019429d4548348c6ab8674305d985feee040476) Change-Id: If88e108bb3e67602cf9e6bbe7646f9862228b684 Reviewed-on: http://gerrit.openafs.org/9792 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Marc Dionne Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 323d961862033496d5d3d5838c02a21eafdb8352 Author: Antoine Verheijen Date: Tue Jan 22 19:24:25 2013 -0700 OpenBSD: Add config headers for new(er) OS versions. The OS-specific config header files have not kept up with the newer releases of OpenBSD. This patch corrects that by adding header files for OpenBSD versions from 4.9 to 5.3 (the newest version currently under development). Reviewed-on: http://gerrit.openafs.org/8927 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 20a54b02521b40b07e4ec87df55a1e9a2549c881) Change-Id: I9ee66dbba300d5a68bc294a14dd9463441143371 Reviewed-on: http://gerrit.openafs.org/9661 Reviewed-by: Simon Wilkinson Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 1243f1c034af37079501c5d546a613c406bc32d5 Author: Andrew Deason Date: Tue Nov 20 15:00:15 2012 -0600 ubik: Do not count votes from error'd connections If the given connection has a connection-wide error on it, the vote we got from that site is probably not valid, and we could easily be interpreting an error code as a vote time. So instead, treat the host as if we got a network error from it. Reviewed-on: http://gerrit.openafs.org/8487 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 23092acce5d2d71a5ad6402119973c7c2c2f5e89) Change-Id: Id320b33bb6662d7867ae1f4a8d0a29808f16b59d Reviewed-on: http://gerrit.openafs.org/8947 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit a369628d2c0a2f91a894ea5781166a18329b896d Author: Andrew Deason Date: Tue Nov 20 14:18:47 2012 -0600 ubik: Try to detect VOTE_Beacon errors Currently the way ubik dbsites vote for each other is via the "return value" of the Beacon VOTE RPC. Since this is really an Rx abort, this can easily collide with actual errors on the wire, such as rxkad errors. Try to detect these by detecting vote times that are very different than the current timestamp (more than an hour in the future or past), and treat it like a network error. If we do not do this, a single site reporting an error can cause us to never reach quorum, since we calculate our sync site expiration based on the oldest 'yes' vote, which for most known Rx aborts will be far in the past. Reviewed-on: http://gerrit.openafs.org/8486 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4d4668b1618a2bd5b94ed4620464787f42d11cab) Change-Id: Iaca12506a35e924631754b638f99cb12faa84479 Reviewed-on: http://gerrit.openafs.org/8946 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 538fdd3860927a90dfd4ade9d9daa2de8113e37b Author: Jeffrey Altman Date: Thu Mar 14 23:27:25 2013 -0400 vol: remove duplicate stmp declaration Patchset 38cf31463e3f3c675de727c1e793e117a90e6d20 added a definition of afs_ino_str_t stmp which should have replaced the b64_string_t stmp declaration that was already present. Thanks to Jason Madar for noticing. FIXES 131620 Reviewed-on: http://gerrit.openafs.org/9608 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit dd903ce729c24c9d1ed78b227a261b2549482461) Change-Id: Ia0a43f64183b47b6df30495673907d176d95799a Reviewed-on: http://gerrit.openafs.org/9771 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 44e97c45f3700ead06db25e1027ca0314647c932 Author: Andrew Deason Date: Wed Apr 3 16:39:07 2013 -0500 vos: Restore some VNOVOL error messages Many places in vos/vsprocs have code to delete a volume. Commit f4e73067cdef990262c69c38ac98761620a63f25 tried to refactor them by consolidating the common "delete" code into DoVolDelete. However, not all of the removed code had exactly the same behavior, and some of these variants were not handled by DoVolDelete. One such variation is that DoVolDelete always printed an error message if the target volume did not exist. But for some call sites this condition is not an error, and prior to the refactoring they did not print such an error message. Commit 1092cbe34fc8519826b3fa0565505b7bd81bc922 tried to correct this by suppressing the error message if the target volume does not exist. However, this means that all DoVolDelete calls do not print such an error, where some should and some should not print an error. This means that in some edge cases when we encounter an unexpected VNOVOL error, we now skip printing the specific error we got and instead go right to cleanup/recovery/exit. For a few other cases, we used to print an error and continue (because it is a non-fatal error or a warning), but now we print nothing when we encounter a VNOVOL error. Fix this by specifically printing an error for the VNOVOL error for DoVolDelete call sites that used to print such an error. Do this for all such sites except ones where we obviously print an error immediately afterwards anyway. This is just a quick targeted fix. A future more robust fix should involve altering DoVolDelete to handle all of the different behaviors expected by its various callers. Reviewed-on: http://gerrit.openafs.org/9704 Reviewed-by: Mark Vitale Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0a063815cc27ed065bcc9e4a91fb3a7b280818bb) Change-Id: Ia333b2257b9fdc39f7bcc9ba8ed3c98254d2e76a Reviewed-on: http://gerrit.openafs.org/9770 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit ddaef4378de7af439de1d574155506f659ca8c56 Author: Mark Vitale Date: Thu Mar 7 09:34:55 2013 -0500 vos: noise messages when attempting to delete non-existent volume With vos refactor commit f4e73067cdef990262c69c38ac98761620a63f25, some formerly conditional volume deletes are now unconditional. This regresses 'vos move' output with harmless "error" messages when AFSVolTransCreate() returns VNOVOL: "Failed to start transaction on " "Volume not attached, does not exist, or not online" Modify DoVolDelete() to return early (and silently) with VNOVOL in this case, allowing the caller to handle this appropriately. Reviewed-on: http://gerrit.openafs.org/9596 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 1092cbe34fc8519826b3fa0565505b7bd81bc922) Change-Id: I77e701378a999c8ad9413bfefcace0ee06aecb07 Reviewed-on: http://gerrit.openafs.org/9597 Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 1c811f9fddf336317099e7ec73e28131acf65be8 Author: Marc Dionne Date: Sat Dec 22 07:54:54 2012 -0500 Rework set_header_word macros Rework the set_header_word macros so that all compilers are happy: - the use of offsetof() is avoided, as it has an issue on IRIX when the result is not constant - the assignment within the macro is explicitely sequenced before the function call to avoid a gcc sequence-point warning Reviewed-on: http://gerrit.openafs.org/8816 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 7f96084969d3082842a9575ee8ff7da8c52a0796) Change-Id: Iefdf7f6dbb60ffc569b67b3c89893fb43527eb02 Reviewed-on: http://gerrit.openafs.org/8818 Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit e8307ef10c5653ffa597b58384686141adba58f7 Author: Derrick Brashear Date: Tue Jul 17 15:34:07 2012 -0400 macos: get more packets if requested analogous to eead07418f13cd87a90770f03ea5118c546d8f1a for ukernel, this is for macos' upcall procedure Reviewed-on: http://gerrit.openafs.org/7788 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 33a761ebd11e33b5e111e67204218e8f67bef431) Change-Id: I1b59c802717393758370c376f95569467dc61049 Reviewed-on: http://gerrit.openafs.org/9747 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 0508bdf0be69e93895df2f2d4bd26a06faf21c7b Author: Andrew Deason Date: Tue Dec 18 18:49:49 2012 -0600 viced: Sanity check file link count during CoW A few ihandle bugs in the past have caused the CopyOnWrite code to open cached file handles for files which have been deleted. When we CoW, both of the files we're dealing with had better actually be on disk, so bail out and flag an error if either of them appear unlinked. FIXES 131530 Reviewed-on: http://gerrit.openafs.org/8839 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 752514bd1c8eaae487d25116dc59853552f77d12) Change-Id: I2aa70145b12e9babd1a1eb881bf7f48151c20f6c Reviewed-on: http://gerrit.openafs.org/9508 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 5e05f22798cce04ab1c76f979eeeb578f1e72f97 Author: Andrew Deason Date: Fri Dec 21 12:30:24 2012 -0600 ihandle: Add FDH_ISUNLINKED Add the FDH_ISUNLINKED functionality to ihandle. This lets the caller know if the file for the underlying file descriptor has been deleted out from under us. This is useful for sanity checks in some callers. Reviewed-on: http://gerrit.openafs.org/8838 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9cf9a0e978ece2b0afb8ba5947455f307a424cab) Change-Id: If5cde825a2e7413c47409c69f15507d6df1934c3 Reviewed-on: http://gerrit.openafs.org/9507 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit e2f29a79a7c6e385bac8cace970a5d0053b17edb Author: Andrew Deason Date: Fri Dec 14 15:05:53 2012 -0600 volser: Check vnode length on dump Commit aadf69eabb1962496fa93745ab560a5b48cacd61 adds length checks on vnodes during fileserver read/write operations. Do the same thing when we dump volume data from the volserver, to ensure that we don't transmit incorrect data e.g. to other RO sites when releasing. FIXES 131530 Reviewed-on: http://gerrit.openafs.org/8836 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit eb938bd18d9806f3529b7a2cbccdce5340c0e39f) Change-Id: Ia49e7310f2e143d4eed965a5090e687be55864e4 Reviewed-on: http://gerrit.openafs.org/9505 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit c40eb13d019203aa73e3ba3b25d6a8dcc950ff05 Author: Andrew Deason Date: Fri Dec 28 16:49:20 2012 -0500 afs: Add a little more info on SLVC loop panic If we panic due to a perceived infinite loop, log a little more info about our loop iterations. Reviewed-on: http://gerrit.openafs.org/8850 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 2f087dc434f62cfa7888434427eaac6803b563ab) Change-Id: Ie4a02a40fafa88f8b54b05b8a0926f258ae7cf7a Reviewed-on: http://gerrit.openafs.org/9509 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 96389a9996eeb8b6e03b2ddadacefae1ceb1cb44 Author: Andrew Deason Date: Wed Nov 28 15:12:12 2012 -0600 afs: Apply VLRU safety check for Linux too This invariant should apply to all platforms, not just those with dynamic vcaches. Since this prevents an infinite loop if the list os corrupt or something, having this around everywhere seems useful. So, drop the check for afsd_dynamic_vcaches. Reviewed-on: http://gerrit.openafs.org/8555 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 696db8667d12b1c5639515840f69c9a46d2b866d) Change-Id: I81e4c7c7678a9f4a3e02952e243735d59b3af35c Reviewed-on: http://gerrit.openafs.org/9502 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit ef562f58195a75cb8c9e7437ced6f1f40387f8ec Author: Michael Meffie Date: Sat Mar 3 10:05:01 2012 -0500 viced: fix log message for MapName_r Do not log a code of zero if the name plus instance length exceeds the max pr name buffer. Reviewed-on: http://gerrit.openafs.org/6861 Reviewed-by: Derrick Brashear Reviewed-by: Alistair Ferguson Tested-by: Derrick Brashear (cherry picked from commit ef6ae1e7eda56e1d6ff7b9ade25b290c855e5780) Change-Id: If644670ed522eaba575e7246084f106231649991 Reviewed-on: http://gerrit.openafs.org/9474 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 1e8f1c7727d77e469ed83d51f314e6e66e4ea518 Author: Andrew Deason Date: Thu Jul 8 11:25:19 2010 -0500 viced: Ignore client loopback alternate addresses When we receive interface information from a client to determine its alternate IP addresses, ignore any addresses that look like loopback. Reviewed-on: http://gerrit.openafs.org/2368 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Alistair Ferguson Tested-by: Jeffrey Altman (cherry picked from commit 2a6ddae62e4fac5eecdf4634746e7294405393d6) Change-Id: Idcdaabd3aad62f0e84efbaf1d8523338bc683924 Reviewed-on: http://gerrit.openafs.org/9466 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit d4d6ece9e1791dcc3717407df71878bc61a3d5f9 Author: Andrew Deason Date: Tue Feb 21 18:03:24 2012 -0600 salvager: Remove PrintVolumeSummary Nothing uses this function; remove it. Reviewed-on: http://gerrit.openafs.org/6785 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit d426e613b9a4802c3b404903f7122f6fd0046aba) Change-Id: Ibca098550a073013228c4907fbbeab7f3c0333ae Reviewed-on: http://gerrit.openafs.org/9460 Reviewed-by: Stephan Wiesand Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: BuildBot commit a0f0be1295440c36a24de4c892ef298f571b92c6 Author: Andrew Deason Date: Tue Nov 29 12:07:49 2011 -0600 udebug: Fix endianness when fudging lastYesHost hostAddr is in NBO, lastYesHost is in HBO. Reviewed-on: http://gerrit.openafs.org/6136 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 073edd3fbdf442249920acea8f3ee90b6346bf23) Change-Id: Iea4f7799c8f5500010448d6104cc9f701663d826 Reviewed-on: http://gerrit.openafs.org/9437 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 2f0a1ed60eabc8863439f30c46618ad797ac73b9 Author: Simon Wilkinson Date: Fri Aug 20 13:17:53 2010 +0100 Configure: Tidy up AC_CHECK_FUNCS Move all of our AC_CHECK_FUNCS calls into a single, ordered, list so that it's easier to see what's being checked for and what's not. Reviewed-on: http://gerrit.openafs.org/2598 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 3fc5863f062c14c346bcc50c82b8d15971750e55) Change-Id: I167b42d84c9ddbb8b35aee6b4ced3c7a809e72dc Reviewed-on: http://gerrit.openafs.org/9423 Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit e46f2cdb540d6a9648aaebe8158f44b6e18df1d8 Author: Simon Wilkinson Date: Mon Jan 3 10:40:56 2011 +0000 autoconf: Tidy up header includes Tidy up our list of header includes so it's easier to see what we're testing for. The list is now one-per-line, in alphabetically sorted order. Note that this won't affect our use of the default include set, as autoconf will already have tested for all of those before it starts this CHECK_HEADERS run. Reviewed-on: http://gerrit.openafs.org/3612 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit c8fc94fb86255a2c5cbd1613b33e32ec3a4d3b21) Change-Id: I0b507dcd9578d1c041731f7f7923f27e33fc89df Reviewed-on: http://gerrit.openafs.org/9411 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 65ae1315891e4c4802b82bdeceea40d20865a648 Author: Simon Wilkinson Date: Wed Apr 3 07:09:03 2013 -0400 fix garbage counters in supergroup prdb_check This is a backport of one hunk of commit 9efc255ab8de7ad90c7d599fea7bd1956bfd48c2, where a calloc fixes an incorrectly sized memset. The original memset clears the size of the pointer, not the sizeof the structure. Change-Id: I40250e0346345fe9b4b43d14e76ea5fb23c8c04b Reviewed-on: http://gerrit.openafs.org/9701 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 703849934244f67bfbae1bb83169a5f32a4eab9d Author: Andrew Deason Date: Tue Mar 26 13:27:33 2013 -0500 aklog: Only try to use krb5-weak.conf if it exists The logic we use for using krb5-weak.conf to allow 'weak crypto' requires us to know where the default krb5.conf is. The default krb5.conf local can vary significantly depending on the platform, and we don't have a good way of figuring out what it is, so we guess. We may guess wrong. To limit the cases where we guess wrong, only try to do this workaround if the krb5-weak.conf file actually exists. Reviewed-on: http://gerrit.openafs.org/9667 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 95240a5a5030a1053ce9966b54037eda2d37140b) Change-Id: I02313b2cc37da05adc0529e685abf6a8546bb3de Reviewed-on: http://gerrit.openafs.org/9687 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 3789e98f8850188c9b5e169e98ba54bf388ae52c Author: Andrew Deason Date: Tue Mar 26 13:14:30 2013 -0500 aklog: Search for /etc/krb5/krb5.conf aklog tweaks the KRB5_CONFIG environment var when performing one of our 'weak crypto' workarounds. We assume that the default krb5.conf is /etc/krb5.conf, but for Solaris 11 libkrb5, krb5.conf is in /etc/krb5/krb5.conf. Although this file could be anywhere, try /etc/krb5/krb5.conf too, so we at least work on stock Solaris. Reviewed-on: http://gerrit.openafs.org/9666 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit cd1ffc1073d6f9a191e07cb72e8d0b4ec8cd6347) Change-Id: I8eeb406107592bac6da415d25b688d936a385a87 Reviewed-on: http://gerrit.openafs.org/9686 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 710b40e388dcff8d3b64476a02fdc13b60e31ced Author: Andrew Deason Date: Wed Dec 21 22:00:12 2011 -0500 afsd: Parse cacheinfo during argument parsing Currently we parse cacheinfo in afsd_run, when the client is initialized and started. Parsing cacheinfo can change afsd_cacheMountDir, however, which may be of interest to afsd.o users; in particular, libuafs exposes this via uafs_MountDir(). This means that if a mount dir is not explicitly specified in the libcmd arguments to afsd, a libuafs-using program will see the mountpoint as the empty string if it is queried after afsd_parse but before afsd_run. For afsd.fuse, this causes the cryptic error message: fuse: bad mount point `': No such file or directory since the mountpoint is the empty string if it is not specified explicitly on the command line. To fix this, move cacheinfo parsing to effectively near the end of afsd_parse, so the mountpoint is calculated in afsd_parse(). Reviewed-on: http://gerrit.openafs.org/6400 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit af218dee6c517f4636a18c681bff6f1212a7d9c0) Change-Id: Ibd087f52c9a6f1d98614f4fdbbc5b92ea0806506 Reviewed-on: http://gerrit.openafs.org/9453 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit e64921531a0f100c269c659d6500a8b358e23f87 Author: Derrick Brashear Date: Mon Dec 20 16:36:42 2010 -0500 LWP: don't copy pid to a null pointer In LWP_CreateProcess we take a pid. if it's null, don't crash. Reviewed-on: http://gerrit.openafs.org/3556 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5d218831f3186d0d1dc7d3b00dd4a3b6a4a8757c) Change-Id: I96c0e2a8858fa929f0de22a774050aa63a200101 Reviewed-on: http://gerrit.openafs.org/9414 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 7c2cc74e4dd0ab0dbe674bb55104a7ce148d858a Author: Marc Dionne Date: Thu Jan 24 21:38:28 2013 -0500 Linux: crset should use passed credentials When copying credentials in crset, take the passed credentials as the source instead of the current process credentials. This doesn't cause any problems currently since crset always gets called with the current credentials. Reviewed-on: http://gerrit.openafs.org/8980 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3b733db8bf2bc3a1366554ae97814cc722437149) Change-Id: I4d0000a139d16fafe480f7ebccc6759da7dea6bb Reviewed-on: http://gerrit.openafs.org/9333 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 01ee0551ba5f3d874a9d012b7b362813bb4212f1 Author: Simon Wilkinson Date: Wed Feb 27 10:34:59 2013 +0000 ubik: Avoid unlinking garbage If SDISK_SendFail fails before the pathname to the temporary file has been constructed, then the failure handler will unlink stack garbage, with variable results. Initialise the string, and check to see if it has contents before calling unlink Reviewed-on: http://gerrit.openafs.org/9299 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 44e806431bec3149a78127f5d1003e84e3a0b072) Change-Id: I366de3ce15a5e1ea855eb45110ff7acf1748c377 Reviewed-on: http://gerrit.openafs.org/9538 Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Reviewed-by: Michael Meffie Tested-by: BuildBot commit 67f5f38ec3145d6f53433975dc26e64499c05992 Author: Marc Dionne Date: Sat Jan 29 12:48:02 2011 -0500 ubik: cleanup DB lock usage in SDISK_SendFile Some failure paths can return from SDISK_SendFile with the database lock still held. Other failure paths will cause setlabel to be called without holding the lock. Rework the failure paths so we always release the DB lock before returning, and always hold it when calling setlabel. Reviewed-on: http://gerrit.openafs.org/4151 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ad63745f357e377c613881fa3470b85d4d36fe36) Change-Id: I99cb359f108f604be75f19250fb697eb95b81947 Reviewed-on: http://gerrit.openafs.org/9418 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 42233dd65b7bf5c6cc31b10a0de728bc0c3495b0 Author: Rainer Toebbicke Date: Wed Sep 19 12:13:15 2012 -0400 butc: clean xbsa shutdown on control C when we catch a control-c, do a clean shutdown Reviewed-on: http://gerrit.openafs.org/8141 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit aea3c71e59ec30e84ca4e7383fd3b566ce94bbb6) Change-Id: I89665c29a522909e126214abaec008a18acb59d7 Reviewed-on: http://gerrit.openafs.org/9495 Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit d5daffef48b133d6a663d3072c75b201a3e7508d Author: Andrew Deason Date: Fri Dec 21 11:11:00 2012 +0000 ihandle: Indent ifdef maze According to the mesoamerican long count calendar, ifdef ladders will destroy the world in 2012. Reviewed-on: http://gerrit.openafs.org/8837 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a04071e7940b26dc2a29ac3f0952b10321e7b786) Change-Id: I1db449283c709cba48cc887757c9109cfc4bd253 Reviewed-on: http://gerrit.openafs.org/9506 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 3336b6b5ef04773ce0cbe7c91acb48373581483e Author: Andrew Deason Date: Fri May 18 17:55:09 2012 -0400 afs: Do not avoid DNLC if fakestat is set Currently in afs_lookup we avoid putting an entry in the DNLC if 'force_eval' is unset, in order to avoid populating the DNLC with mountpoint symlinks (we want the target of the mountpoint to be in there instead, the root dir). However, if -fakestat or -fakestat-all are enabled, 'force_eval' is always false, since we only set it to true under certain circumstances when evaluating mountpoints. To fix this, populate the dnlc for non-mountpoints, even if force_eval is unset. Reviewed-on: http://gerrit.openafs.org/7431 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 35d5be2adf2456e26aa6b10935352dc19eb6b3f2) Change-Id: I32f859c4478432de65025f35ae0c484ff7fa1bf0 Reviewed-on: http://gerrit.openafs.org/9494 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 099dca0adc65a54af3a37409c4b512600950dc13 Author: Andrew Deason Date: Mon Jun 18 17:01:24 2012 -0500 cacheout: Perform authenticated RXAFS_FlushCPS Fileservers may now require RXAFS_FlushCPS calls to be made with administrator tokens. So, try to make the call with admin tokens, and provide the usual -noauth and -localauth options. Reviewed-on: http://gerrit.openafs.org/7573 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit cb64dea75a114f6ebcba174be4e71c7fb5f85658) Change-Id: I0d8e38d3cc1b0e55f63cfa0e50fd9cd4cebc8c30 Reviewed-on: http://gerrit.openafs.org/9486 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit fcab44631cb5f3bac63eedfc25703aedff336c70 Author: Andrew Deason Date: Fri Dec 28 13:16:49 2012 -0500 viced: initInterfaceAddr_r regardless of ICBS code Currently we only call initInterfaceAddr_r for a host if a call to RXAFS_InitCallBackState3 succeeds. However, this leaves the host without a host->interface structure, which indicates that the host does not support UUIDs, and is represented by just a single host,port pair. But this is not correct; the host probably does have the relevant UUID associated with it, but it is just not responding. So, with the current code, we create a uuid-less host structure for a host that probably has a uuid; that host structure will probably never be used, and will just get deleted later. So instead, always call initInterfaceAdd_r. Do it before the ICBS call, so the host will be findable via UUID as early as possible. If the ICBS call fails, the host will be marked as 'down' later on. Reviewed-on: http://gerrit.openafs.org/8847 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f2f7ba50ed61a6187814d633327a8cacda0f656f) Change-Id: I4847ec0350346d44883b5c5912867555292cf3db Reviewed-on: http://gerrit.openafs.org/9380 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 71bd2680b536ef0f5ed4dc9a08fbc475ed8dfe2d Author: Andrew Deason Date: Wed Aug 29 14:14:39 2012 -0500 LINUX: Detect non-vectorized aio functions In kernels before 027445c3, the functions generic_file_aio_read and generic_file_aio_write, as well as the fs operations aio_read and aio_write, do not deal with iovecs but rather just use a single buffer. Detect this, so our aio_read and aio_write implementations have the correct signatures. This removes several warnings on such kernels. Reviewed-on: http://gerrit.openafs.org/8020 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e5ba359f64b5d8d874a31a50694398c17f27cfa1) Change-Id: I8d8ee81c2bcff2dc85c2ff3e70452a0af5639921 Reviewed-on: http://gerrit.openafs.org/9493 Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 1d38a73cb31e44fdbd71f8d90635514936ec1b28 Author: Marc Dionne Date: Fri Apr 22 15:23:27 2011 -0400 Linux: cleanup aio support Code that called directly into the aio operations (ex: readv/writev) would bypass the AFS specific operations found in afs_linux_read and afs_linux_write. Rework the handlers: - For newer kernels with aio, let the kernel use its default read and write operations, and define the aio_read and aio_write operations, with the AFS specific bits, calling into generic_file_aio_read/write. The kernels default read/write operations are just wrappers around the aio versions. - For older kernels, leave things as is, pointing read and write to afs_linux_read/write Reviewed-on: http://gerrit.openafs.org/4563 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit a8c46e5010c0b4e41ad66458b8723e32f99b427d) Change-Id: I3c20064cc911aabfce576178c22fcdc1a99b8125 Reviewed-on: http://gerrit.openafs.org/9492 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 70a77f25e449a1772fb3a17ec5bc1b3ecda13cd1 Author: Andrew Deason Date: Thu May 31 16:08:00 2012 -0500 vol-salvage: Indent some ifdefs Reviewed-on: http://gerrit.openafs.org/7513 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 80359f562a459ef1dba2cdf53ee486578b50752d) Change-Id: I36fdd58895928fc82f9542e3c0d2ec1db7551e42 Reviewed-on: http://gerrit.openafs.org/9479 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 33c642ae948fced53b457f1394fa97be4c1469f2 Author: Thorsten Alteholz Date: Sun Feb 3 11:58:25 2013 +0100 Beautify ubik_print() After lots of intermediate steps a call to ubik_print(), ubik_vprint() and ubik_dprint*() ends in vFSLog() which adds a timestamp to the output. So any call to ubik_print(), that does not contain a \n at the end, makes a mess of the logfile. The least invasive change will simply add this newline at the end of any ubik_print() call. This also prevents long lines in the log, which might appear on multi-homed hosts with lots of interfaces. FIXES 1446 Reviewed-on: http://gerrit.openafs.org/9059 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit dc32caae7768c486e610c4e56c6a78e9c918d975) Change-Id: I05892d6d9c47517208e21a3ab00bad2f30d58ba9 Reviewed-on: http://gerrit.openafs.org/9522 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 0f1a9764b04278994c43afb4482dfafe233eff3c Author: Michael Meffie Date: Mon Dec 13 14:53:50 2010 -0500 xstat: print collection values in debug mode Print the values of the integers returned in the collection data when the -debug option is given to xstat_fs_test and xstat_cm_test test programs. This allows us to at least see what the unformatted values are when there is a mismatch in timeval sizes between the host and client (aka the 32/64 bit xstat bug). This change could break scripts which call the xstat test programs with the debug option. New debug output are prepended with 'debug:' to be easily ignored. Reviewed-on: http://gerrit.openafs.org/2878 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 13aeb1dcaee5ad4e95477464860963788c5d1469) Change-Id: Ief2f9346fad92e86aa2a214f1a462a10560c6e64 Reviewed-on: http://gerrit.openafs.org/9567 Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit ebca99d0b193cd3a720e26fa59b629b70f3dc929 Author: Simon Wilkinson Date: Wed Jul 13 13:53:08 2011 +0100 libafs: Fix statistics for PrefetchFromTape pioctl The PrefetchFromTape pioctl was overloading SetAcl's statistics. Give it a slot of its own. 1.6-only: Also give a slot for the master-only PSetTokens2, so xstat data will be more consistent across versions. Reviewed-on: http://gerrit.openafs.org/4989 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4e9a49c58aa1a6c910b01fe995739d0852c75dd4) Change-Id: I718585a6ff6fcb39469bd6a007e6ebd2b59ef4fa Reviewed-on: http://gerrit.openafs.org/9468 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 0671e93abcf927d48f935283682e6761a933d558 Author: Marc Dionne Date: Tue Mar 5 20:54:50 2013 -0500 Linux 3.9: hlist iterator change hlist iterators have been reworked to not require a temporary node parameter. Reviewed-on: http://gerrit.openafs.org/9403 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 9cfd7f768ca350d3b750e89e7ddb186bdad6f726) Change-Id: I47df8894467f4bb1c60cf239ec0ce0a4d6ca29aa Reviewed-on: http://gerrit.openafs.org/9639 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit ef07580783ad7a7fa70bb41c27225d429865cdaa Author: Karl Ramm Date: Sun Dec 4 13:56:29 2011 -0500 Print "waiting for job termination" at most once. This message is useless, annoying, and is the UI equivalent of littering... but it does explain why your backup command is just sitting there. Reviewed-on: http://gerrit.openafs.org/6223 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 6d6d52e18f3bd537331de6021a0fcc2e96fc48db) Change-Id: Ide51c7ef7c40426f34a5f1cb6c23395b0d93886a Reviewed-on: http://gerrit.openafs.org/9438 Reviewed-by: Derrick Brashear Tested-by: Andrew Deason Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 64d4d13c4491a6f27f2cd63dc85a629d44a4b71a Author: Andrew Deason Date: Tue Apr 3 18:13:17 2012 -0500 xstat_cm_test: Print all call info stats For CM xstat collecton 0 (function call statistics), there are many more stats given to us on the wire than we currently print. Change this so we print out everything in the afs_CMCallStats struct. Reviewed-on: http://gerrit.openafs.org/7047 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1a458e8e72455e480ccf4c0e3fd926dd9af9beea) Change-Id: Ib263a26829bc538009f605ebb502895628e66fc2 Reviewed-on: http://gerrit.openafs.org/9469 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 3b26eb76a37fb858672d2bb59589086d230d7959 Author: Andrew Deason Date: Fri Dec 28 12:58:33 2012 -0500 viced: Avoid dangling uuid hash table entry Currently we add a given host to the uuid hash table, then call RXAFS_InitCallBackState3, and then only initialize the host->interface structure if the ICBS3 call succeeded. If the ICBS3 call fails, we have added a host to the uuid hash table, but the host structure does not contain that uuid. If the host is then deleted, we will not remove the host from the uuid hash table (since host->interface is NULL), and so the uuid hash table entry will still point to the freed host. If that host is then later looked up via that uuid, we can reference a freed host, which can cause all kinds of undefined behavior. So instead, add the host to the uuid hash table at the same time that we initialize the host->interface structure, inside initInterfaceAddr_r. FIXES 131277 Reviewed-on: http://gerrit.openafs.org/8846 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 7b642173c7cd7b6b7130214c1a940501736abbf0) Change-Id: I838b55244a9745dd07b7d633cb3091414162b0d5 Reviewed-on: http://gerrit.openafs.org/8868 Tested-by: Andrew Deason Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 7c964a259f62eca8044016477ebb8b11d84108b3 Author: Andrew Deason Date: Fri May 4 17:23:42 2012 -0500 Call rx_SetNoJumbo earlier For ubik server processes, rx_SetNoJumbo needs to be called before ubik initialization for it to effect the communication between dbservers; otherwise, full database transfers may result in Rx jumbograms on the wire regardless of the jumbo/nojumbo setting. Move the call to rx_SetNoJumbo to before ubik initialization to avoid this. Also move the call to rx_SetNoJumbo to immediately after rx_Init* for all server processes, for consistency. Move similar calls to rx_SetMaxMTU for the same reason. Reviewed-on: http://gerrit.openafs.org/7350 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 0debf2d2274db1ea862bfdc2ef767372f1fa77e3) Change-Id: Iacb1afa853281e856bbb70f39c6ac9a81f210d0d Reviewed-on: http://gerrit.openafs.org/9121 Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Simon Wilkinson Tested-by: BuildBot commit 88c6a183de3e99ce386e8ee4f47b449e7c53c2e9 Author: Derrick Brashear Date: Thu Mar 7 06:53:16 2013 -0500 afscp: null-terminate root.cell dir if needed in dynroot mode instead of doing a check for something which will never be true, and then terminating, just terminate if it's not already null-terminated. Reviewed-on: http://gerrit.openafs.org/9439 Tested-by: BuildBot Reviewed-by: Chaskiel Grundman Reviewed-by: Derrick Brashear (cherry picked from commit ceac74a6baad79155adaa692639b1d9f403525b6) Change-Id: I14d3de25bca5b1ba1878048aac1973518f8c2359 Reviewed-on: http://gerrit.openafs.org/9583 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 0b211ebe718977fe96ea1a62fbcdd8211396fddd Author: Marc Dionne Date: Mon Feb 11 18:49:21 2013 -0500 Linux: Add missing semi-colon Add a missing semi-colon in the error case when missing symbols are detected. The effect is strictly cosmetic - a few additional error messages would follow the "undefined symbols" error. Reviewed-on: http://gerrit.openafs.org/9095 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 50879d5727c183982a40bd242d6039ed470d835d) Change-Id: If2c1be51969131794cb2ea30f96490fce95b0103 Reviewed-on: http://gerrit.openafs.org/9365 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit cff3b5ddd1b92d769138ed97addb54602de3f540 Author: Marc Dionne Date: Sun Jan 27 20:52:39 2013 -0500 Linux: Detect undefined symbols in kernel modules Undefined symbols in the kernel modules are not currently detected at build time. As a result, buildbot may indicate success while the resulting kernel modules are unusable. In the kernel build process, modpost warns about missing symbols but does not return an error in the case of external modules. Detect these warnings and cause the libafs build to fail. Reviewed-on: http://gerrit.openafs.org/8981 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit dbdee60a83d72d38a04a0eeb2a5324cf497e57e3) Change-Id: I1986dfd3c195be13b4014014b42eb745f9daf1f8 Reviewed-on: http://gerrit.openafs.org/9364 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit d16fac9dfb55cc70bc9f868ee58db9ba143108e9 Author: Andrew Deason Date: Sun Feb 17 19:34:06 2013 -0600 rx: Assert call error for RXS_PreparePacket error If we've received an error from the underlying security class, we must not try to send the given packet, or we risk security issues. We currently achieve this by setting an error on the connection. It is slightly indirect in how this yields an error on this specific call, and so it may not be immediately clear, but doing so is critical. If somehow the call does not have an error by the end of this, we cannot proceed as this is an error condition we do not handle. So, assert. Reviewed-on: http://gerrit.openafs.org/9122 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 85f2a66ceafd7a13f51d0352c62b5d69f4620edb) Change-Id: Iae523e6f18dd73749a6be5c3d10e132e5c14a70c Reviewed-on: http://gerrit.openafs.org/9280 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Simon Wilkinson Reviewed-by: Michael Meffie Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 997a9980e33ae92abdaa81d07d0857d41dd6e9ae Author: Andrew Deason Date: Mon Jan 14 12:45:04 2013 -0600 rx: Honor RXS_PreparePacket errors rxi_PrepareSendPacket calls RXS_PreparePacket to allow the security class to modify the given packet appropriately (to be undone by CheckPacket on the other endpoint). However, currently rxi_PrepareSendPacket ignores all errors generated by RXS_PreparePacket, and processing continues as if there was no error. For rxkad, an error often results in the given packet being untouched. This means that the security checksum is not calculated, and thus not populated in the packet, and for encrypted connections means that the packet contents are not encrypted. This occurs for any error generated by the security class PreparePacket routine. For rxkad, the most common error is probably RXKADEXPIRED, though some other internal errors are possible as well. This behavior has a few effects for rxkad: 1. When any error is generated by PreparePacket, the other endpoint generally bails out with the error RXKADSEALEDINCON, since the security checksum of the packet is 0, which does not match what the checksum should be. This results in error messages like 'rxk: sealed data inconsistent'. This can be very confusing if the actual error is, say, just that the given credentials have expired. 2. For connections requiring encryption (rxkad_crypt), an error from PreparePacket means that the packet payload is sent in the clear. This can happen for about a window size's worth of packets. 3. If a client ignores errors/inconsistencies with the checksum and encryption, etc, they can keep reading data for the call forever, even after their credentials have expired. To fix this, make an error from RXS_PreparePacket cause a connection error for the given connection, and immediately send a connection abort. No further error checking should be necessary for the callers of rxi_PrepareSendPacket, since they already check for call/conn errors before sending any actual packets. Reviewed-on: http://gerrit.openafs.org/8909 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 03d3dacae16847352af754ac13c854ca0df0c08c) Change-Id: I5d0f421d22ca2e4d723df2d698088b6bbdc85f7b Reviewed-on: http://gerrit.openafs.org/9279 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit b230e176d8e66090afb9225bf4d68c26006b5f5f Author: Dan van der Ster Date: Fri Dec 14 11:08:44 2012 +0100 rxperf: print achieved transfer rate Prints the client transfer rate in appropriate units (kbit/s, Mbit/s, or Gbit/s). Reviewed-on: http://gerrit.openafs.org/8758 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 07d83cd473146a0db9c2ed521b6fa6ba607b0d40) Change-Id: Ia17b315e79313407e5479cd3710ac454d56ee7dd Reviewed-on: http://gerrit.openafs.org/9682 Tested-by: BuildBot Reviewed-by: Dan van der Ster Reviewed-by: Simon Wilkinson Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 2e8317d2018e89418abbe541e3ac9c5e5bb524c8 Author: Andrew Deason Date: Wed Dec 14 14:16:16 2011 -0600 viced: Yell when we GetSomeSpace_r A GetSomeSpace_r call indicates we don't have enough callbacks configured. For many people, this can happen without the administrator realizing anything is wrong, since we never give any indication that something is amiss, unless the administrator checks the xstat statistics. Since this can indicate a serious performance problem, yell in the log when this happens. Only do it once, so we don't spam the log. Reviewed-on: http://gerrit.openafs.org/6334 Reviewed-by: Michael Meffie Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit da3f8d86dd216a90bc400367b7b95e9a427f99e8) Change-Id: I63ec14c6f635c57249023e0fc34b15838cee2eb3 Reviewed-on: http://gerrit.openafs.org/9386 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 30ec61f2ee8c3c0651580e596489963ae27bd9a3 Author: Ken Dreyer Date: Mon Sep 10 11:20:26 2012 -0600 add a simple backport policy to README.GIT This will clarify where patches should go, and who can do backports. Reviewed-on: http://gerrit.openafs.org/8075 Reviewed-by: Andrew Deason Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 8662592caedbcf8e065312fe142731faabe1eb77) Change-Id: I1d2c452dd17c8ae63eebfd8d800659c9de0fc327 Reviewed-on: http://gerrit.openafs.org/9684 Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 0d76f5b07fd975bfb3a1fd0d1167f2c8dc061839 Author: Stephan Wiesand Date: Thu Mar 14 10:35:30 2013 +0100 Update NEWS for 1.6.2.1 Reviewed-on: http://gerrit.openafs.org/9602 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Jeffrey Altman Reviewed-by: Paul Smeddle Reviewed-by: Derrick Brashear (cherry picked from commit 5123deebdcbf634151b236bf7ff7ac7ca099b11e) Change-Id: I2d357e3fb385fcaa0e3da056e41ef8704007da6b Reviewed-on: http://gerrit.openafs.org/9664 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 4f1018433734f03131f7f9a231892021de162f78 Author: Stephan Wiesand Date: Thu Mar 14 10:16:30 2013 +0100 Make NEWS match the 1.6.2 Release Notes Reviewed-on: http://gerrit.openafs.org/9601 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear (cherry picked from commit b74728590ce14f9b6c3235f0b51f8865caa9427d) Change-Id: I61acc90efd22e9577aa0447b93b3f81c6339da27 Reviewed-on: http://gerrit.openafs.org/9663 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 8fb50638f5f71cac2e3e1e4956c55cd8d1de5863 Author: Simon Wilkinson Date: Thu Feb 28 17:05:29 2013 +0000 Unix CM: Update AFS_STATS_NUM_FS_RPC_OPS There are actually 30 elements in the AFS_STATS_FS array. When the ResidencyRpcs counter was added, the total number of operations wasn't updated. Fix this so that it is correct, although this still remains rather fragile. Reviewed-on: http://gerrit.openafs.org/9313 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 2c8e4f839fc253abb8051bbf89d36e94a2200590) Change-Id: Id6094e6e5007984cb080281f6a085eba958d6367 Reviewed-on: http://gerrit.openafs.org/9540 Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Tested-by: BuildBot commit ae7ea148390fb2b41bfa7437e97ea55a099abb5f Author: Simon Wilkinson Date: Fri Feb 22 16:54:17 2013 +0000 Unix CM: Fix byte accounting for storebehind In the current version of CacheStoreDCaches, the stored variable is maintained within the for loop that iterates over the chunk list. This means that it is reset to 0 each time we handle a new chunk. However, this means that our progress is no longer accurately tracked, as (bytes - stored) no longer gives the number of bytes which remain to be transfered. In fact, as stored is zeroed with each loop iteration, (bytes - stored) == bytes. This means that store behind is no longer activated according to the users settings. Prior to commit 334114ac58b0039ae90d7e29fa2f019fe068bd79, the stored variable was maintained within the outer, function, scope. Just move it back there to restore the previous behaviour. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9237 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5acb1a0f323a6692cca66ee3aa4c7e5f1a0f24f2) Change-Id: I22c60b07ba9518d5714c65b1952a35214f690433 Reviewed-on: http://gerrit.openafs.org/9530 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit e7be9bf929560a1f033b2513915781920884954d Author: Andrew Deason Date: Mon Nov 5 23:47:06 2012 -0600 afs_open: Deal with afs_GetDCache returning NULL afs_open was assuming afs_GetDCache always returned non-NULL. Make it deal with a NULL return. Reviewed-on: http://gerrit.openafs.org/8408 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 595a614d76d84be602c07d519738556b7f9ebf2a) Change-Id: Iba54fd03a63be485490db33ff48e5642f55df52d Reviewed-on: http://gerrit.openafs.org/9500 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 2f78e92f2f152526749e0f19211cb1231ad3e6c3 Author: Christof Hanke Date: Wed Aug 22 16:39:13 2012 +0200 fileserver: add volume number to error-messages in physio. If things go wrong in ReallyRead() or ReallyWrite(), the admin would like to know which volume to salvage. Reviewed-on: http://gerrit.openafs.org/8010 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 185699e631ec3548bb6d1e68302d4a652632d3e6) Change-Id: I0bc7fa31db17fc438e4c9852d685984747fb9b74 Reviewed-on: http://gerrit.openafs.org/9491 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 1240f6dbb8de27174b58c56f99f9bd221c4de171 Author: Michael Meffie Date: Mon Apr 9 15:49:50 2012 -0400 libafs: log error code when marking server down Log the error code when marking the server down due to server/networks issues. Reviewed-on: http://gerrit.openafs.org/7138 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f0b039fc4761bb0151c7ee69110926ef16e264c7) Change-Id: Ib66457a75006858b9523fa44c164859e8c8fae6f Reviewed-on: http://gerrit.openafs.org/9473 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 3f19ea5ffc3c56a342f8eb7f9c8b73eeca4d8aa6 Author: Andrew Deason Date: Thu Nov 10 11:05:28 2011 -0600 vol: Remove O_EXCL|O_TRUNC combinations A few places were specifying both O_EXCL and O_TRUNC to open(). O_TRUNC does not make any sense with O_EXCL, and doesn't do anything, so remove O_TRUNC from these instances to make the code more clear. Reviewed-on: http://gerrit.openafs.org/5832 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4c679e380f697760de777d35fe057229bf2bf762) Change-Id: Iae79f552d17d626bbf2a7c9428bc9c7bbf91fae9 Reviewed-on: http://gerrit.openafs.org/9433 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 8f33982b230f87dac3856bea998015251ce2beec Author: Anders Kaseorg Date: Tue Mar 5 02:34:02 2013 -0500 afsd: afsd.fuse needs MT_LIBS This fixes a build failure on Ubuntu raring as of binutils 2.23.1-0ubuntu8, which pulled in a bugfix that makes --no-copy-dt-needed-entries stricter: http://sourceware.org/git/?p=binutils.git;a=commit;h=63f3bee644cc30f1e6d049ca54d307a7c63b8186 make[3]: Entering directory `/…/src/afsd' gcc -O -I/…/src/config -I/…/include -I. -I. -D_LARGEFILE64_SOURCE -I/…/src/afs -I/…/src/afs/UKERNEL -I/…/src/rx/UKERNEL -DUKERNEL -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -o afsd.fuse afsd_fuse.o /…/lib/libuafs.a /…/lib/libdes.a /…/lib/libafsutil.a /…/lib/libcmd.a /…/lib/libafsutil.a -lresolv -lfuse /usr/bin/ld.bfd.real: /…/lib/libuafs.a(afs_usrops.o): undefined reference to symbol 'pthread_setspecific@GLIBC_2.2.5' /usr/bin/ld.bfd.real: note: 'pthread_setspecific@GLIBC_2.2.5' is defined in DSO /lib/x86_64-linux-gnu/libpthread.so.0 so try adding it to the linker command line /lib/x86_64-linux-gnu/libpthread.so.0: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status make[3]: *** [afsd.fuse] Error 1 make[3]: Leaving directory `/…/src/afsd' This is roughly a partial cherry-pick of commit f6d7a4b426f55db366113bbdda4da71570310410 (which doesn’t apply on 1.6.x), although this particular build failure had already been fixed on master as a side effect of commit 98f86cfc53fc987fdaed2f5bb733b5b5d21bfda9. Change-Id: I89467f00bbf511ec63c464b656d342c5fd2ce557 Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/9387 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand commit bf732d3e7a44bd8df5071714d0537024dc9d2517 Author: Jeff Blaine Date: Wed May 18 23:49:52 2011 -0400 Added -dryrun Added missing information about -dryrun option Reviewed-on: http://gerrit.openafs.org/4680 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 97070b425d4c6e4fa4944160c0e7a6965ebb8e75) Change-Id: I185f0d76a6c95dcffa01713798a06672e6f9bfa3 Reviewed-on: http://gerrit.openafs.org/9623 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit f5f50b9f31aa4eb86f53a085b01f13955434c80a Author: Simon Wilkinson Date: Fri Feb 22 10:23:43 2013 +0000 viced: Allow GetCapabilities to return an error At the moment, the GetCapabilities RPC handler ignors errors from CallPreamble or CallPostamble. Instead of silently swallowing these, and potentially reutnring a bogus capabilities structure, make it possible for the RPC to return failure to the caller. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9241 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit ea0441520138d2129b5c6b2bd16c7640a8680146) Change-Id: Ic3828198e43403506f991455f09924387b483879 Reviewed-on: http://gerrit.openafs.org/9534 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 5f983ae0b97fee5bd56bb939a5dc5a4fc78b44bc Author: Ben Kaduk Date: Fri Jan 11 13:03:02 2013 -0500 Catch up to FreeBSD KPI for vfs_cmount Almost a year ago, mckusick changed the VFS KPI/KBI for the cmount VFS operation, making the flags argument a 64-bit quantity. Introduce appropriate conditionals for our prototype of afs_cmount for the change on the 10.x and 9.x branches. Reviewed-on: http://gerrit.openafs.org/8907 Reviewed-by: Garrett Wollman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 13111d25408cf6765d1b67bc3767614c8963cfde) Change-Id: I6e74760422f57336203d562dc4ee39ed2af0df84 Reviewed-on: http://gerrit.openafs.org/9406 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 1e515eb4c5436e387db6a9a72b97080500115f73 Author: Simon Wilkinson Date: Fri Feb 15 16:05:33 2013 +0000 rxgen: Fix NULL pointer dereference Avoid a NULL pointer dereference if strchr doesn't find any occurence of '*' in the string. Whilst we handle the not found case when inserting a mid string terminator, we don't handle it when restoring the string to its previous value. Reviewed-on: http://gerrit.openafs.org/9158 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 0d28f8c0cec91d68023795e6ba9c769d60869f9e) Change-Id: I6eb3ec5647153e588c5a80025da2bf2c921469b3 Reviewed-on: http://gerrit.openafs.org/9525 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit e33bdad36bb96a2477f1511d82b597113919a11a Author: Simon Wilkinson Date: Fri Feb 22 10:20:58 2013 +0000 viced: Catch GetCellInfo failure If GetCellInfo returns a non-zero result, catch the error, rather than just carrying on regardless. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9240 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 1d1ba5f74102ae703ef657aa19150729edfe6ab2) Change-Id: I205b32a3e38faeae8e06bad3dc615ba01f0626d8 Reviewed-on: http://gerrit.openafs.org/9533 Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 86c3a3b7ea14e06bd89eaccab51da12a9b7ed2a3 Author: Simon Wilkinson Date: Thu Feb 21 19:34:47 2013 +0000 Unix CM: Catch ICL initialisation failures If afs_icl_CreateLog fails, don't still call afS_icl_CreateSet. If afs_icl_CreateSetWithFlags fails, don't ignore its error code. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9203 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 3bbff16c6d34c905fab8fcb792c8606ea356e2a8) Change-Id: I4835a6cbdc802bc08f5ae83fa10f9c93357cf736 Reviewed-on: http://gerrit.openafs.org/9532 Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 8bd21b891f862a8754cf32cc6d85707cdfdb52fd Author: Simon Wilkinson Date: Fri Feb 22 09:51:24 2013 +0000 kauth: Don't ignore GetExtendedCellInfo failures Don't ignore a failure from afsconf_GetExtendedCellInfo, as it will leave buffers that we later read uninitialised. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9180 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 5cefa0247fe4f22f769e366a207fb177ee8fb94f) Change-Id: I613a371f1f0ab1a739966e81965661d6cbff8e5e Reviewed-on: http://gerrit.openafs.org/9531 Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Tested-by: BuildBot commit fff7c2fe29b5187a0c36441521d92c6513cdec88 Author: Ben Kaduk Date: Tue Feb 19 15:24:04 2013 -0500 FreeBSD version compatibility for 1.6.x This is a direct commit, not a cherry-pick, as the libafs build is different for master and the 1.6 branch. Instead of needing to always play catch-up, reverse the sense of the conditional and specifically exclude the FreeBSD 5.x and 6.x versions so that new versions will automatically be in the right conditional. Change-Id: Ifa1d4004faab8a7d6a94ca8d5aeff90e4c51b88e Reviewed-on: http://gerrit.openafs.org/9143 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 977a7b060d1fcf289ad74d7d59edbb8b22ebfedd Author: Andrew Deason Date: Mon Sep 24 14:20:07 2012 -0500 doc: Fix Solaris 11 kernel module path For Solaris 11, the module goes in drv, not fs. Reviewed-on: http://gerrit.openafs.org/8152 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Ken Dreyer (cherry picked from commit a7278eb5620507cd70086582cf539b4024b46194) Change-Id: Idb5f864132f436f9a6cc619d1c672c9ceec3ff67 Reviewed-on: http://gerrit.openafs.org/9566 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 3a51648fb500680934498730f3ed9b2bbd24b745 Author: Michael Meffie Date: Fri Sep 21 15:58:29 2012 -0400 doc: solaris x86 kernel module path Add instructions for solaris x86 kernel module installation. Reviewed-on: http://gerrit.openafs.org/8143 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 5ef5cf48f3d2ba52cf5ed428728215b5b5f8d0b2) Change-Id: I7bec3361b5f9e47c8b3cfbfbe27e012288ec9780 Reviewed-on: http://gerrit.openafs.org/9565 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 392b1c6b4c10e18e608f04513ba7b82220f74cc1 Author: Michael Meffie Date: Tue Apr 10 16:07:37 2012 -0400 doc: distributed files are under dest Add the dest path component in the quick start guide instructions for copying files from a binary OpenAFS distribution file. Reviewed-on: http://gerrit.openafs.org/7187 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit bc770a5007ae16aa5477bf1748f3e0666f665781) Change-Id: I54c96f35ce4f9c60a25fee012306ecb210972287 Reviewed-on: http://gerrit.openafs.org/9564 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 73fa4ef44dd763da0f4ba067a0b53892934a0922 Author: Michael Meffie Date: Fri May 20 13:53:48 2011 -0400 doc: document volinfo -filenames option Add the namei -filenames option to the volinfo man page. Note this option as implemented implies the -vnode flag, but for consistency with the other fields that modify the default mode output, it is documented to be accompany the -vnode flag. Reviewed-on: http://gerrit.openafs.org/4690 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit e3fb2740ba20e78fdc93308b6a2843454a6d269c) Change-Id: I1ef65090d5449f600ef03171436a27c142e69fbb Reviewed-on: http://gerrit.openafs.org/9563 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 7f5856342961540f46b9012cda12b144d5256274 Author: Simon Wilkinson Date: Sun Feb 24 12:53:59 2013 +0000 budb: Store dumper information correctly Change f498c18a6f7300eb89ca3b9d9b85c4d461fa8474 attempted to fix a problem with using an inappropriate function to copy the ktc_principal value 'principal' into the d.dumper structure element. Originally the code read: principal_hton(&principal, &d.dumper) which copies the 'host' principal principal into the 'net' structure d.dumper. However, this was changed to principal = d.dumper Which populates 'principal' with whatever garbage is in the d.dumper structure. Fix this so that the assignment is done the right way around. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9252 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit dce2d8206ecd35c96e75cc0662432c2a4f9c3d7a) Change-Id: Ib3851649293bddedf465739acc9bd7ad327c80e0 Reviewed-on: http://gerrit.openafs.org/9537 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 2b14a3b290b7f459edb426fa70b18c14e369596e Author: Simon Wilkinson Date: Sun Feb 24 10:43:52 2013 +0000 budb: Fail if afsconf_GetExtendedCellInfo does Rather than silently ignoring the failure of afsconf_GetExtendedCellInfo, and then using garbage cell configuration, just fail to start if afsconf can't parse the config directory. Reviewed-on: http://gerrit.openafs.org/9247 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 3fbdc609dc025cfcaac6949485d6fb072bf34764) Change-Id: I40f0aefda1bc44ce92a7733ec644002229c32079 Reviewed-on: http://gerrit.openafs.org/9536 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 489bb387a35f14ae94ba73ec395f51c5bdfd0b7a Author: Simon Wilkinson Date: Sun Feb 24 10:39:53 2013 +0000 butc: Catch failures to start keep alive thread If we can't start the keep alive thread, in either the LWP or pthread versions of a code, report an error and exit instead of carrying on regardless. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9245 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit e4862e284832420e9dbf5a6f437f6f7c8801f7dd) Change-Id: I55453557b592bb1814877d291b1604907ab2e8d6 Reviewed-on: http://gerrit.openafs.org/9535 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 2327f5fd3a250c14f5367f93a975573a04e04655 Author: Simon Wilkinson Date: Thu Feb 21 22:10:38 2013 +0000 Unix CM: Fix bogus character in license string A stray $ had crept into the license string in afs_dcache.c. Fix it. Reviewed-on: http://gerrit.openafs.org/9233 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 983d67616b670c5d57c8c67578fdb52f2bb3ddbd) Change-Id: I21d31dc9e50e6be253cc7e7878e1079567f10220 Reviewed-on: http://gerrit.openafs.org/9529 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 9b3f4d8be8b7b9c7760abf982b9ed12bc457b66e Author: Simon Wilkinson Date: Tue Feb 19 15:43:29 2013 +0000 ptserver: Don't ignore ubik_Write failures If we can't write to the ubik database, then that's a bad thing. Don't ignore it. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9176 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 860c34ba938602387f78c10c2f548fb8a523a9cd) Change-Id: Id379d94844e6cc520829b4ef6015d0a004fdbc42 Reviewed-on: http://gerrit.openafs.org/9526 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 85fade41f2fca7eefa1efff770d6173aef4d9158 Author: Michael Meffie Date: Sat Jan 5 13:37:51 2013 -0500 correct whitespace errors in readme files Fix the trailing whitespace and leading spaces before tabs in the readme files. Reviewed-on: http://gerrit.openafs.org/8877 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Ken Dreyer Reviewed-by: Jeffrey Altman (cherry picked from commit 8a17568fb4fd3f77a3b9d043bbe49e992bca8266) Change-Id: I60fb4d05cf79f4998e8652026dc3f1f636bcd6a4 Reviewed-on: http://gerrit.openafs.org/9518 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 6751327f6f7ba1389c6caf1207abe78e9cdb0d70 Author: Nickolai Zeldovich Date: Sat Jan 5 23:44:55 2013 -0500 ubik/udebug.c: check array index before dereferencing Avoid out-of-bounds array accesses by first checking that the index is in-bounds, and then dereferencing; not the other way around. Reviewed-on: http://gerrit.openafs.org/8879 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 0e83cde60e6e91fbe20ffac0f0a77afe8497d950) Change-Id: I7a5018011939d43b702c63a272d53a2018df7d33 Reviewed-on: http://gerrit.openafs.org/9513 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit dc8952ff29584a8bbc7be66a53f6c4fffd3178f3 Author: Jeffrey Altman Date: Tue Jul 3 15:58:01 2012 -0400 viced: RXAFS_GetVolumeStatus remove access check The AFS file server had always performed a PRSFS_READ permission check on the volume's root directory (1.1) vnode before responding succesfully to the client. A successful response contains the following volume state information: Message of the day (if any) Offline message (if any) Online flag InService flag Blessed flag NeedsSalvage flag Type MinQuota MaxQuota BlocksInUse PartBlocksAvail PartMaxBlocks All of this information is publicly available to anonymous users via other services so it is odd that it is hidden from anonymous cache managers. As sites begin to tighten the ACLs on volumes due to privacy and security concerns this READ permission check is begin to cause problems for Windows clients that rely upon the quota and block counts to determine whether or not it is likely to be safe to perform an extending write. In many environments volumes are being configured such that the root directory is 'l' for all and only the subdirectories provide for 'ridw'. Under these situations the user is able to read/write the data but cannot determine how much free space is available. Since all of the data returned by RXAFS_GetVolumeStatus is publicly available, the patchset removes the access check entirely. Reviewed-on: http://gerrit.openafs.org/7705 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit d2d591caf2c9b4cf2ebae708cc9b4c8b78ca5a5a) Change-Id: I94886f2325ee46995dd886bbf2d359f6d3af76fe Reviewed-on: http://gerrit.openafs.org/9489 Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Tested-by: BuildBot commit 35108215d98ef78c9bf54cb66597c53f3d03164f Author: Simon Wilkinson Date: Fri Feb 15 22:34:36 2013 +0000 libadmin: Don't try to release garbage connection In bos_ServerOpen, initalise the contents of bos_server structure to 0 using calloc, so that if we jump to the error handling stuff before they are assigned real values we don't end up trying to release garbage. Reviewed-on: http://gerrit.openafs.org/9163 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 17154a3c0afa88f7bb25e2b642fc13ee69c2b7db) Change-Id: Iaa6e5166cb29799feb82ca29ef3e78ceea82d6e2 Reviewed-on: http://gerrit.openafs.org/9524 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 0671633b59ac8fd1d2fe54c65a516aa518fbca83 Author: Andrew Deason Date: Mon May 21 18:15:58 2012 -0500 afsd: Report fakestat correctly A fakestat value of 1 is for -fakestat-all, and 2 is for -fakestat, not the other way around. Reviewed-on: http://gerrit.openafs.org/7445 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 47e12584804b287051552900c94c99a3c84daa92) Change-Id: I8b0872430c771741962afcfd9854cbe5fcdc42e8 Reviewed-on: http://gerrit.openafs.org/9478 Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Tested-by: BuildBot commit c1bc649cefc37aa4fb2546b648ba917a4fb1b897 Author: Mark Vitale Date: Thu Feb 14 10:51:34 2013 -0500 salvager: incorrect comment The comment for the code handling the -showsuid option was incorrect. Reviewed-on: http://gerrit.openafs.org/9109 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 4051c5e96e921b69ac2a6e7bcb805cbc0a8f7993) Change-Id: Id19e063c9540e362b4d9478a0fce606084d470e6 Reviewed-on: http://gerrit.openafs.org/9523 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit f8d05579128f953b870cd3f4d9a0ffbe9d7287dd Author: Thorsten Alteholz Date: Wed Jan 30 20:11:04 2013 +0100 fix some typos in bos_setrestricted the real name of the command is: 'bos setrestricted' it is sufficient to name 'bos install' only once Reviewed-on: http://gerrit.openafs.org/8990 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 69f634503482f899e4d422b16100636905c72ea8) Change-Id: I7ab452cb2cf5e836341f7fc66dacd317cf65ed58 Reviewed-on: http://gerrit.openafs.org/9521 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 69ef35ac1417ddba2d292bc22df9f54305ba9da1 Author: Chas Williams (CONTRACTOR) Date: Wed Jan 16 21:16:31 2013 -0500 LINUX: fix array indexing issue in memory statistics The comma is a sequence point and i gets incremented and then used. This results in writing past the end of the array by one (and failing to initialize the first element as well). Potential fix for RT ticket 131566. Reviewed-on: http://gerrit.openafs.org/8914 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 04ddecc1f2827463edf22857f9b19910ccc25e98) Change-Id: I09a96fcb5ffc9a58f0930f76e4ee5f65628ba5c8 Reviewed-on: http://gerrit.openafs.org/9520 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit d0418efd8edc60979ee7983b81437b5a467732e9 Author: Nickolai Zeldovich Date: Sat Jan 5 23:45:59 2013 -0500 libadmin/vos/vosutils.c: mask out sign-extension Right-shifting a signed int by 24 bits can produce a value outside of 0..0xff due to sign-extension. As a result, in AddressMatch(), the first bPattern!=255 check can never succeed. Fix by masking with 255 before comparison. Reviewed-on: http://gerrit.openafs.org/8884 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 8e8e3c26b87d78b92d96ba91d58ee59d774ebcb5) Change-Id: Ifee303905d004936e96f6be1e6a9188d7b70978c Reviewed-on: http://gerrit.openafs.org/9517 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit bfe9b6a8d384739cfe98fcc54bdb55a894cc9d0c Author: Nickolai Zeldovich Date: Sat Jan 5 23:45:46 2013 -0500 lwp/iomgr.c: avoid off-by-one out-of-bounds access Avoid accessing sigDelivered[NSIG] and sigEvents[NSIG], which are out-of-bounds by one. Reviewed-on: http://gerrit.openafs.org/8883 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit bd850e5b980d34236ee98d16b9717860b63af306) Change-Id: I859c654b8d35484aeeb029432c69848846335fb8 Reviewed-on: http://gerrit.openafs.org/9516 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit bba18139f27169bd9040c43db29955399a419695 Author: Nickolai Zeldovich Date: Sat Jan 5 23:45:33 2013 -0500 butm/file_tm.c: check for null pointer before dereferencing Move the null pointer check to before the pointer is dereferenced. Reviewed-on: http://gerrit.openafs.org/8882 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 4d6967e0b0a0628deb1dd9d210de84779d41f856) Change-Id: Ib6c9308170b1242ea207f5380275d51b1514028d Reviewed-on: http://gerrit.openafs.org/9515 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 8a6b943b3f057f5e7995d9687ddc9574f3e55ddc Author: Nickolai Zeldovich Date: Sat Jan 5 23:45:11 2013 -0500 src/tests/pathname.c: properly check strdup() return value Fix the check for strdup() running out of memory. Reviewed-on: http://gerrit.openafs.org/8880 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit d9cc9c9dee9ad0213ddd39174e81d01b9707937b) Change-Id: I56dc0dd7ced4df5be636a03db819169b5413e56b Reviewed-on: http://gerrit.openafs.org/9514 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 0e367d2eb72e1ea80c04378d837468e0cbaf1a7e Author: Nickolai Zeldovich Date: Sat Jan 5 23:44:33 2013 -0500 volser/vol_split.c: do not dereference known-NULL pointer Avoid dereferencing a pointer that we just checked is NULL when printing an error message. Reviewed-on: http://gerrit.openafs.org/8878 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5c5515a5c3b34f9a115b29378e123c779c138f51) Change-Id: I73de73f8cd9be9d106285f45e86e030909293521 Reviewed-on: http://gerrit.openafs.org/9512 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit ff77c3a190b0271381d9f79e260f806befbafeee Author: Simon Wilkinson Date: Fri Mar 30 19:31:10 2012 +0100 vol: Call memset with the correct size Call memset with the size of the structure we're initialising to 0, and not the size of the pointer to that structure. Caught by clang's new warnings. Reviewed-on: http://gerrit.openafs.org/7083 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 408afc5690fc8ac3b6942983765ab36e63d2534d) Change-Id: I25fd235ffd7478295bf205b232ecc5816f962d3f Reviewed-on: http://gerrit.openafs.org/9472 Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 1eb75c9bc7cba880936f4cb9a35399051314897c Author: Michael Meffie Date: Tue Nov 20 08:49:39 2012 -0500 tools: example sysvmq audit reader A user contributed sysvmq audit log example reader. Shows how to read the sysvmq audit log using core only perl modules. Reviewed-on: http://gerrit.openafs.org/8485 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7c8373c8c27abdfa316c6526aa14654caed3e7f8) Change-Id: Ib2eb66763e6ada884f33f14fbe950759fc9c3c43 Reviewed-on: http://gerrit.openafs.org/9501 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 0c6b8c13ce38de628bddc9e17232b4900c661091 Author: Marc Dionne Date: Fri Sep 21 20:08:58 2012 -0400 bozo: fix typo in help text Fix a typo for "interface" in the help text for bosserver. Reviewed-on: http://gerrit.openafs.org/8144 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Jason Edgecombe Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Michael Meffie (cherry picked from commit 58c089e642198a210462b3bf508056b56667f879) Change-Id: I90fff6c691ae59ff467a641cb025cedc17a3bb4c Reviewed-on: http://gerrit.openafs.org/9498 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit a3f495b66431773d44a04be14b09d71cb3921d82 Author: Andrew Deason Date: Tue Sep 11 18:46:42 2012 -0500 rx: Save errno in LWP rxi_Sendmsg Much of this code examines errno or WSAGetLastError to determine what to do. However, some other operations between the actual sendmsg call and code that examines errno may modify errno. So, save the value of errno to ensure errno reflects the actual error we got from sendmsg; this also slightly simplifies some of the logic. Reviewed-on: http://gerrit.openafs.org/8110 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 347908cd0031c558c266ec412aa49200ae2b3204) Change-Id: Ia0134acb2ae5f9e47fb82f36bd0889987803d897 Reviewed-on: http://gerrit.openafs.org/9496 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Tested-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 72ce52692f388587cbccc29180e0bd3f47d70cc8 Author: Andrew Deason Date: Wed Jun 20 16:28:51 2012 -0500 vos: Avoid creating volume with the same RO/BK ids If we specified an RW id of 5, an RO id of 6, and no BK id, this code would assign the BK id to RW+1, or 6. This gives the RO and BK volumes the same volume id, which is a mistake. Choose a different id instead. Reviewed-on: http://gerrit.openafs.org/7603 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 234bedae6ef506ec1ff53854a22548e892db3f11) Change-Id: I332fed5b8cac23a847a8890188f899cff909f130 Reviewed-on: http://gerrit.openafs.org/9488 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit d87fdb50db5c306973f4f379e82d992d18244c34 Author: Marc Dionne Date: Thu Sep 22 19:09:52 2011 -0400 viced: fix incorrect error message The error message was obviously copied from another location in the code (after the pr_Initialize call) and is misleading. Adapt it for vl_Initialize failure. Reviewed-on: http://gerrit.openafs.org/5490 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a020c572d372f2e86807dc4c75ec50ff14ef2fba) Change-Id: I067ceb0e5e2281508647065f11e48d4a07033c99 Reviewed-on: http://gerrit.openafs.org/9432 Reviewed-by: Derrick Brashear Tested-by: Andrew Deason Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 2fa8aebb40c8884994ed6089a4b38cc73930cc79 Author: Marc Dionne Date: Tue Sep 13 19:32:37 2011 -0400 vos: print correct command name in diagnostics for changeloc Fix the label in the diagnostics message, it prints "addsite" instead of "changeloc" when an error occurs during vos changeloc Reviewed-on: http://gerrit.openafs.org/5414 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1de4561529bdb92b6647a634d9f2c2714e1758e5) Change-Id: If87fd2a1ed0d4c2975479b5167f6e867db62437a Reviewed-on: http://gerrit.openafs.org/9431 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit ab07b2f8b279570177169364aeb6842dc4614fd2 Author: Simon Wilkinson Date: Thu Feb 28 10:22:43 2013 +0000 ptuser: Clear return value from pr_ListMembers Make sure that lnames is zero'd on entry to pr_ListMembers, so that an early error return doesn't also return garbage. Reviewed-on: http://gerrit.openafs.org/9309 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit bc70828f0713891597cf0042bc3e204f3d923271) Change-Id: If99abc35f49ac1d436fbb82c1f9dbf97590e95c5 Reviewed-on: http://gerrit.openafs.org/9379 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 81aee1540534350bc33826bf207c7ee1df147f63 Author: Simon Wilkinson Date: Thu Feb 28 13:45:00 2013 +0000 Unix CM: Don't overflow ICL logs array When checking whether a user supplied index into the ICL logs array is out of bounds, we need to check whether it is greater or equal to the maxmimum number of elements. Otherwise we can access one more than the number of elements in the array. Caught by coverity (#985567) Reviewed-on: http://gerrit.openafs.org/9311 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit ff8bae8938532d95f792258d2c520705e095e7af) Change-Id: I5dba0d22d4589cb7d1f0a4fe57623646d300ab61 Reviewed-on: http://gerrit.openafs.org/9378 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit d8c76c472a4d85c8d30de6ea4f02e4b3aeb07945 Author: Simon Wilkinson Date: Fri Mar 1 10:54:07 2013 +0000 Unix CM: Fix stray semicolon Commit d2437d02a6f59d972dd0690f7eb1c46cf7cc4b85 introduced a stray semicolon in the osidnlc code. Fix it. Caught by coverity (#989030) Reviewed-on: http://gerrit.openafs.org/9321 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 59def405ba9404954debd35da539346b1ccd4096) Change-Id: I35256e7b0aec95b3341db9cd1e99387b1050fab4 Reviewed-on: http://gerrit.openafs.org/9377 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 0c1815b37a27a609892a553005da2305a5779a1e Author: Simon Wilkinson Date: Thu Feb 28 15:26:15 2013 +0000 Unix CM: Fix hash table overflow in dnlc code In GetMeAnEntry, we can end up overflowing the nameHash array by one element if the stars are particularly badly aligned. nameptr is a static across function calls, so nameptr and j are not equal. If nameptr is increment to NHSIZE in the same loop iteration as j reaches NHSIZE + 2, the loop will terminate. We'll then lookup nameHash[NHSIZE], which is 1 element passed the end of the array. Add an if statement which loops nameptr outside the loop (in the same way as the if statement in the loop) Caught by coverity (#985568) Reviewed-on: http://gerrit.openafs.org/9312 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit d2437d02a6f59d972dd0690f7eb1c46cf7cc4b85) Change-Id: Ic19d72e6c012cb06e98c3c970162995e77da4b68 Reviewed-on: http://gerrit.openafs.org/9376 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 393043f6dbfdd684b14281fbe568c14c0e11a15c Author: Simon Wilkinson Date: Fri Mar 1 11:22:26 2013 +0000 kauth: Don't overflow cellinfo hostAddrs array The hostaddrs array has MAXHOSTSPERCELL (8) available elements. The ubik connections list has MAXSERVERS (20) elements - when copying from the ubik list into the cellinfo hostaddrs list, be careful not to overflow it. Caught by coverity (#985577) Reviewed-on: http://gerrit.openafs.org/9323 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 30e25c74376dd8aa24018116015e57c47c1dfaf9) Change-Id: I6bf03fada98cf6f5442a7d6a1e52e18cc91aad59 Reviewed-on: http://gerrit.openafs.org/9375 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit d3dca0b7dd7874dee01065e04eccd68a63fc1493 Author: Simon Wilkinson Date: Fri Mar 1 11:31:31 2013 +0000 unlog: Don't overflow cells array cells has a maximum size of MAXCELLS. Doing cells[MAXCELLS] overflows that array. Clamp our maximum number of cells at one below this to avoid the overflow. Caught by coverity (#98551) Reviewed-on: http://gerrit.openafs.org/9324 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit ff7fd58b49a41bf85df492b9f470004d4433800e) Change-Id: If6c0caed4b4fedf571c4c6c6b8466bfaaff67975 Reviewed-on: http://gerrit.openafs.org/9374 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 9fc38b1bcdfd7c16fc84f88314d7b9ec0f084b18 Author: Simon Wilkinson Date: Fri Mar 1 11:47:03 2013 +0000 ubik: Don't overflow server's addr array We're checking to see if we've overflowed the array _after_ we've looked up an element within it - so on the final iteration, we always read past the end of the array. Fix this by swapping the order of the tests in the for statemen Caught by coverity (#985590) Reviewed-on: http://gerrit.openafs.org/9326 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit a4ae9a4c3cc1fa5ca2b813174040dce36284a4b9) Conflicts: src/ubik/recovery.c Change-Id: Ic09177a1e85492e181e51d554ddb25df2ca2dfbd Reviewed-on: http://gerrit.openafs.org/9373 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 486ba708442aa7296503dc44f2c2662ed784725f Author: Simon Wilkinson Date: Fri Mar 1 12:01:19 2013 +0000 util: Fix overflows in address parsing The extractAddr function (which turns a dotted quad into an IP address), has a number of overflows when one or more elements of the quad are more than 31 characters in length. The array allocated for each portion is 32 bytes long, but we only stop writing into the array when the indexing pointer reaches 32, which doesn't leave us with space for the trailing NULL. Rework this so we always allow space for the NULL, and use a #define for the array length to make it more clear whats going on. Caught by coverity (#985591, #985592, #985593, #985594) Reviewed-on: http://gerrit.openafs.org/9327 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 28a441ebd8323437bf762a790b4ec5e6301e4bec) Change-Id: I9506fd8b468c957f0c9f8dc2d58baf5bc6bc2e19 Reviewed-on: http://gerrit.openafs.org/9372 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit c73b6b61f62e966d8ca962d943b99b26fd441e26 Author: Simon Wilkinson Date: Fri Mar 1 12:12:07 2013 +0000 up: Fix improper use of readlink readlink returns a non-NUL terminated string. If the string must be terminated, we need to have space in the buffer for it. So, the buffer passed to readlink must be 1 less than the real length of the buffer. Caught by coverity (#985597, #985610) Reviewed-on: http://gerrit.openafs.org/9329 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 80875f8aa1540bf032073a4843566bbe6b1fe301) Change-Id: I1dd039bfceaff7891c9145cf4799469b2de2f23a Reviewed-on: http://gerrit.openafs.org/9371 Reviewed-by: Andrew Deason Tested-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 77249c3a549865565b15456cd511a690f127d163 Author: Simon Wilkinson Date: Tue Feb 26 12:38:59 2013 +0000 volser: Catch EOFs when reading dumps When reading a standard tag, make sure and catch an EOF error from iod_getc. Otherwise we'll end up trying to parse 0xFF as a tag length. Caught by coverity (#985603) Reviewed-on: http://gerrit.openafs.org/9275 Reviewed-by: Derrick Brashear Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit cc703d9562455c74767fcd6d2055339109fa9243) Change-Id: I29957f7b656bb2cdd19601d90990d7bacd82e98c Reviewed-on: http://gerrit.openafs.org/9361 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Paul Smeddle Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 4e9e404dea8f0d07714f8ba668735ac0999d7934 Author: Simon Wilkinson Date: Wed Feb 20 14:54:55 2013 +0000 volser: Make it clear what's copied from partList XVolListPartitions uses partList to maintain a list of partition IDs - it does not use the partFlags field. Make it clear when we populate the partEntries field that we are only copying the partition list. Caught by coverity (#986030) Reviewed-on: http://gerrit.openafs.org/9262 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 00601179625ffb71461bbcc46629791895cf4793) Change-Id: I878011efe4baae897e5d4f875c8e02378da38587 Reviewed-on: http://gerrit.openafs.org/9360 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 3073ca05ecef5a2c832e92a072e5b430fb40cef9 Author: Simon Wilkinson Date: Tue Feb 26 12:17:29 2013 +0000 viced: Don't write out garbage when extending file When we extend a file, we write a single byte of data to it - tlen is used as a source for this single byte. However, in the current code, tlen is used uninitialised. Set it to 0, so we don't write a byte of stack garbage. Caught by coverity (#986015) Reviewed-on: http://gerrit.openafs.org/9271 Reviewed-by: Derrick Brashear Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot (cherry picked from commit e191cb889c941848fe09f04c24d969111e6dc494) Change-Id: I517b5772241314a0854094655e25f3f75eba90d1 Reviewed-on: http://gerrit.openafs.org/9358 Tested-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 19e427070fd14447658777cc572aab75f8fdc949 Author: Simon Wilkinson Date: Tue Feb 26 12:21:59 2013 +0000 ubik: Zero header before writing to disk The ubik disk header contains a padding field, which is never zeroed before being written out to disk. This means that there is a shorts worth of stack garbage in every ubik label! Just zero the whole structure with memset before we populate it. Caught by coverity (#986011) Reviewed-on: http://gerrit.openafs.org/9272 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit d8fa251a14e9469fb6ec722d100b6a8557248694) Change-Id: I1d3baf4ced6583f22458155edcc16344acc5757e Reviewed-on: http://gerrit.openafs.org/9357 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 36e1707ffbda22808cf5af23460dd05c38a6a87a Author: Michael Meffie Date: Mon Dec 10 12:01:38 2012 -0500 doc: dynamic mount requires dynroot and fakestat Document that dynamic mount (/afs/.:mount) requires dynroot and fakestat on non-linux unix. Reviewed-on: http://gerrit.openafs.org/8739 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear Reviewed-by: Ken Dreyer (cherry picked from commit 7dbb35a89f42743ff0a29bc9822b94141a2a8323) Change-Id: Ia77835cd1830c7bc5dde573f2e890341aa06bc21 Reviewed-on: http://gerrit.openafs.org/9519 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit af1888ff142763fc7ec8d10b9bc24e49669c1178 Author: Antoine Verheijen Date: Mon Jan 21 02:30:58 2013 -0700 OpenBSD: Replace "vnodeop_desc" with "vops" in kernel module. In OpenBSD 4.9, the vnode operations vector in the "vnode" struct was changed from using a "vnodeop_desc" struct to a new "vops" struct. This patch makes the appropriate changes to the OpenBSD kernel module support to accommodate the change. Reviewed-on: http://gerrit.openafs.org/8928 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit bb42c02ce56aec29e3860bec47e47157d0406f20) Change-Id: I768358758763a362c92351211bda6d8a7eab6a26 Reviewed-on: http://gerrit.openafs.org/9595 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 0ba3e7521c9b091b81f75ccb2fe06dcfc3743f43 Author: Michael Meffie Date: Sat Jan 5 10:40:42 2013 -0500 spelling corrections in readme files Fix spelling errors in readme files. Reviewed-on: http://gerrit.openafs.org/8876 Tested-by: BuildBot Reviewed-by: Ken Dreyer (cherry picked from commit 4042667388406e540c8a6546031d514793ffc8c4) Change-Id: Idd64293533af373c2b467049442231bb85b6d7db Reviewed-on: http://gerrit.openafs.org/9511 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 93bfb96b3a62bad5805d7fab93e61cee6b7f1e27 Author: Michael Laß Date: Sat Dec 22 22:54:20 2012 +0100 Remove AFSLore from wiki URLs The URL of the openafs wiki doesn't contain "AFSLore" anymore. Although these old URLs still work, replace them to point users to the correct address in the first place. Also be consistent and always use a trailing /. Reviewed-on: http://gerrit.openafs.org/8819 Reviewed-by: Ken Dreyer Reviewed-by: Chas Williams - CONTRACTOR Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit df4d971ec1a014826929dfeac017fb24d37ac38a) Change-Id: I99027c23c3a2e5604f927f51961298b5ec27d1c1 Reviewed-on: http://gerrit.openafs.org/9504 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Michael Laß Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit c629ab8faef2cde90219f56542a0a72c42e206e8 Author: Jeff Blaine Date: Sun Jun 5 16:38:53 2011 -0400 Remove completed tasks from todo list, add info about git/gerrit preference Removed completed tasks (fstrace subcommand help in-binary and issue with -noexecute vs. -dryrun in vos delentry) from todo list. Added info about git/gerrit preference for documentation help, but patches still allowed to the openafs-doc list. Reviewed-on: http://gerrit.openafs.org/4803 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 8f186c0f7a48059ca561422d58073e22934ea2dc) Change-Id: Iec6e3db185e816f6c1b587cc74cc5ca5a2c93282 Reviewed-on: http://gerrit.openafs.org/9503 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit d76971a08a8a0fb92cbd1b5951bd8798eda3873c Author: Andrew Deason Date: Wed Nov 10 15:21:07 2010 -0600 afscp: Always show fetch/store errors When we get an error from a fetch or store operation, show what the error was, instead of just saying "some network error occured". Reviewed-on: http://gerrit.openafs.org/3290 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 8078c4dcf2dd5a922225f0e37babf1b357b5e72d) Change-Id: Icfdce08149e16749097bd6be326312dec6292d34 Reviewed-on: http://gerrit.openafs.org/9415 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 2cf573da487b43e50cfc283fdd03374279d153c3 Author: Andrew Deason Date: Sun Nov 21 21:40:28 2010 -0500 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. Reviewed-on: http://gerrit.openafs.org/3364 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit be6fb658fe717469470bcd28c46bee1901c4d96c) Change-Id: I9ca3c81dde7321928c96a80ae46ff9b736c1040e Reviewed-on: http://gerrit.openafs.org/9413 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 96385ddaee0cc31c0ea7e5e9a900a7e58891f82c Author: Ben Kaduk Date: Tue Feb 19 13:06:36 2013 -0500 butc: do not use stack garbage for secobj The butc only ever handles connections over rxnull anyway, so just specify an array of security objects of length one. Reviewed-on: http://gerrit.openafs.org/9140 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 252a5b65c30636bf5f62a49a79e5777004ecd17d) Change-Id: I0b5c112f56553b7ee0ea4e40a9c65f2fe45f8297 Reviewed-on: http://gerrit.openafs.org/9404 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit ecb50e7989f7f197f69873780d71f0ea22a1e7bd Author: Derrick Brashear Date: Mon Feb 25 14:56:37 2013 -0500 afsutil: fix prototype the prototype for afs_config_get_string was broken. fix it. 1.6 fix only; on master, hcrypto provides this Change-Id: Id7f877c197e44437fe41cb89630ce6e1bf2d6e3d Reviewed-on: http://gerrit.openafs.org/9362 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 8f5c475895542ce119c346bd4a6926f8bf05ccf8 Author: Andrew Deason Date: Thu Mar 7 13:52:25 2013 -0600 tbudb depends on libafsauthent budb_server in src/tbudb requires libafsauthent to build. So, make tbudb depend on libafsauthent. This is a 1.6-only change. On master, tbudb no longer uses libafsauthent. Change-Id: I0737f455323589c28a78d680c6c09fcbcb99d302 Reviewed-on: http://gerrit.openafs.org/9456 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand commit 07b2f0e218f2a2fca4eaef19f364e74c16a48e92 Author: Ben Kaduk Date: Wed Mar 6 13:51:15 2013 -0500 Only have one build rule for budb_errs.c This commit squashes two cherry-picks from master together, as the first one broke the build with pthreaded ubik enabled. The first commit: Author: Simon Wilkinson Date: Mon Feb 21 00:29:33 2011 +0000 budb: Only have one build rule for budb_errs.c budb had two build rules that could produce budb_errs.c, but only one of them also produced budb_client.h. This led to problems with parallel makes, as depending on which rule fired first, budb_client.h might, or might not, exist. Rework all of this so that it's cleaner. Instead of producing two copies of the error table, just make budb_client.h a static file, and include the dynamically generated budb_errs.h from it. This reduces code duplication, and means that we have to run compile_et one less time. Reviewed-on: http://gerrit.openafs.org/4027 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 0d0b5048a5b68d4079b13609775f9234183d1947) The second commit: Author: Andrew Deason Date: Mon Feb 21 13:49:59 2011 -0600 Fix budb build rules for tbudb and WINNT Commit 0d0b5048a5b68d4079b13609775f9234183d1947 only fixed the budb Makefile.in. Make the analagous changes to tbudb/Makefile.in and NTMakefile. Reviewed-on: http://gerrit.openafs.org/4029 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 61453d8f33f6508f8464ffba0657aefb6c7eae3b) Change-Id: I7d35c7557bcd82ba50742f2594bd4bb78cf0e5a5 Reviewed-on: http://gerrit.openafs.org/9405 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 2a474f0284301151ea7342c658b08e17a7afed42 Author: Simon Wilkinson Date: Thu May 19 18:56:27 2011 +0100 vlserver: Use correct memsets in vlentry convertor The various vlentry_to_ conversion functions have obviously been copy and pasted from each other. However, the size of the structure which is being zeroed has not been updated when we are zeroing different structures. Fix this, so that we always clear all of the structure that we are filling. Change-Id: Ic822e1d2b17494574074c332c7680e94d4701c66 Reviewed-on: http://gerrit.openafs.org/4773 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 90507fcb104313154679f89ac22c1947c713a65d) Reviewed-on: http://gerrit.openafs.org/9019 Reviewed-by: Michael Meffie Reviewed-by: Ken Dreyer Tested-by: Ken Dreyer Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Jeffrey Altman commit 0c4110146d98c73c833d866f202a874784651a64 Author: Stephan Wiesand Date: Thu Mar 14 10:00:14 2013 +0100 make 1.6.2.1 Update configure version strings for 1.6.2.1. Note that macos kext can be of form XXXX.YY[.ZZ[(d|a|b|fc)NNN]] where d dev, a alpha, b beta, f final candidate so we have no way to represent 1.6.2.1. Switch to 1.6.3 dev 1 for macos. Change-Id: I98f4371b8c020ba9ba6a98046690968bbae05744 Reviewed-on: http://gerrit.openafs.org/9600 Tested-by: Stephan Wiesand Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 449672fe9c6c2a9bbf4143cf66c3d737cfa22b8d Author: Chas Williams (CONTRACTOR) Date: Tue Jan 29 22:54:00 2013 -0500 LINUX: ifconfig's output has changed net-tools in Fedora 18 has changed 'inet addr' to just 'inet' (possibly to more closely match the ip command). Reviewed-on: http://gerrit.openafs.org/8987 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear (cherry picked from commit 7d8b636d9493f3c470c1bbffb4a566060b21d98b) Change-Id: Iac819b281a26bbd508805541c80e6f1f281a19f9 Reviewed-on: http://gerrit.openafs.org/9363 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit b0a10607f90c4097206bc38cb9bd16e842dbda10 Author: Marc Dionne Date: Fri Jan 18 22:40:03 2013 -0500 Linux: setpag() may replace credentials For recent Linux. setpag() may replace the current process' cred structure with a new one. This is not a problem for most callers, but in the case of processing a SetTokens2 pioctl with the setpag option, the new credentials should be used to determine the target for the token. Reviewed-on: http://gerrit.openafs.org/8924 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b61eac783e8c092cd4ba9f53a2b5ca7d43e08b1b) Change-Id: I66b5f171318964ff40fe78be24e75519183c3a82 Reviewed-on: http://gerrit.openafs.org/8948 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Ken Dreyer Reviewed-by: Stephan Wiesand commit bf9bcd09e6a54eb40e47c7a6cdc060be43be9495 Author: Marc Dionne Date: Wed Jan 9 21:22:27 2013 -0500 Linux 3.8: vmtruncate removal vmtruncate had been deprecated for a while and has now been removed. Do things the new way based on truncate_setsize. Reviewed-on: http://gerrit.openafs.org/8906 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d0479bbaf43900d6733c3f7517926ee9813c9610) Change-Id: Iafc64e19544dec9fcaefad5ad274eac4133f4083 Reviewed-on: http://gerrit.openafs.org/8942 Reviewed-by: Ken Dreyer Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 314fcfa35917de0f688374137f0ffa040ea3660d Author: Marc Dionne Date: Wed Jan 9 19:26:54 2013 -0500 Linux 3.8: session_keyring changes The session_keyring is now attached directly to the cred structure and the thread_group_cred structure (cred->tgcred) no longer exists. Adapt code that makes use of tgcred, and use the standard rcu based mechanism to update session_keyring. Reviewed-on: http://gerrit.openafs.org/8905 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c6d27e322a8d3b352554650473a048235a9c763a) Change-Id: If0998ee777ab0d196e19162499eb3ee60c5ff85d Reviewed-on: http://gerrit.openafs.org/8941 Reviewed-by: Ken Dreyer Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 5a21be491adc6acd3cc01990910c5675393be953 Author: Andrew Deason Date: Wed Aug 29 11:34:06 2012 -0500 LINUX: Indent osi_machdep.h maze This one isn't so bad, actually, but it still benefits from some indentation. Reviewed-on: http://gerrit.openafs.org/8018 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 579048cb1ec24b09a869928ceb521c8db4201a43) Change-Id: I91bddcafe4141c5e6789b01cc4be1a879b6464d1 Reviewed-on: http://gerrit.openafs.org/9330 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Derrick Brashear commit 94d5bf11bd5ab0e0df1070cc72426b2bced63b78 Author: Derrick Brashear Date: Tue Feb 12 15:28:24 2013 -0500 make openafs 1.6.2 update version strings for 1.6.2 Change-Id: I60a765f899f09366b6b380b49dc14c191203af15 commit d1855f8e04b43c9e06cf5b8d48e51f7816cf7342 Author: Nickolai Zeldovich Date: Tue Feb 12 15:08:38 2013 -0500 Fix scanf buffer overflows Fix potential buffer overflows caused by misuse of the scanf function in the fileserver and ptserver. Also fix similar issues in the client side fs command and libadmin library. Change-Id: Ia6a46981c50537da1673507c2bc777f96e43f95a commit 6f9c5fd90969bd082076378e011e4e573513e9c5 Author: Andrew Deason Date: Fri Jun 29 12:36:36 2012 -0500 Remove empty Makefile continuation lines HP-UX make gets confused by constructs like: FOO = bar \ BAZ = quux Where a line continuation is followed by an empty line. So, get rid of all of these in the tree. Not all of them matter, but removing all of them makes it easier to find these, and catch them in the future. Reviewed-on: http://gerrit.openafs.org/7611 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Jeffrey Altman (cherry picked from commit 79f68de80e56179cfc5158fdcb51c34cfa864802) Change-Id: Icf379b9d7557746c2c47134b1314a38ec13134cc Reviewed-on: http://gerrit.openafs.org/8991 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Paul Smeddle commit c11e7db935665bcdca2ce26165ebc6f7112c5509 Author: Ken Dreyer Date: Wed Dec 12 10:37:47 2012 -0700 NEWS updates for 1.6.2 Add an entry for 1.6.2 with "in progress" instead of a date to hold the release notes for 1.6.2pre4 rather than creating separate entries for each release candidate. Users who track the release candidates can refer to the public announcements, and this will be cleaner when reading history later on. Reviewed-on: http://gerrit.openafs.org/8750 Reviewed-by: Ken Dreyer Tested-by: Ken Dreyer (cherry picked from commit 265a4b542b717c14e810202078c3ce83e4d851f5) Change-Id: I68d4e6983097a97caac660f740ea8a01f1a95caa Reviewed-on: http://gerrit.openafs.org/8988 Reviewed-by: Ken Dreyer Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Paul Smeddle commit 38afe3e041b5a55243641a63c46199a6ebcf45a7 Author: Stephan Wiesand Date: Wed Jan 30 18:46:45 2013 +0100 make openafs 1.6.2pre4 prerelease for 1.6.2 Change-Id: I012e498c5a2a46c0f712f453de03c98b0a5a5187 Reviewed-on: http://gerrit.openafs.org/8989 Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Paul Smeddle commit bd3fab65f6545b322f433d7832f6fcaf2d2e0b63 Author: Stephan Wiesand Date: Mon Jan 28 15:53:36 2013 +0100 CellServDB update 28 Jan 2013 Reviewed-on: http://gerrit.openafs.org/8982 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit 35ee4abecd2ed77eaa49e9748e4034ad9ad37edc) Change-Id: Idb8b868ddf927b5daf39f25925fff928e599bd14 Reviewed-on: http://gerrit.openafs.org/8985 Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Paul Smeddle commit a15c40636d2f24f166e94e51643633b21ac13342 Author: Andrew Deason Date: Fri Jan 18 14:27:16 2013 -0600 SOLARIS: Use vn_renamepath as early as possible Commit 6c509601 uses the vn_renamepath when we are building on Solaris 11. However, some recent patch level of Solaris 10 (more recent than stock 10u10) has the same problem fixed by that commit, where vn_setpath takes an additional argument. So instead, just test for the existence of vn_renamepath itself, so we also use it on Solaris 10 when we can. Thanks to Rich Sudlow for reporting this. Reviewed-on: http://gerrit.openafs.org/8920 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1b63689b99b49d902dd5a3286b14dcccee88b4a2) Change-Id: I035c76dba51571fa82fd8932302e7f26b4954333 Reviewed-on: http://gerrit.openafs.org/8984 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit f55084e5496781dd6dec96ca0882a5ce2de22b4f Author: Jonathan A. Kollasch Date: Tue Feb 7 15:23:23 2012 -0600 libafsauthent, tvolser: fix objdir build Reviewed-on: http://gerrit.openafs.org/6689 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fb0d056c69489d76a5aad216277bf81ac3420aea) Change-Id: I30b1e5876e9a91b3caaf9d097fd3a886fabe7e7e Reviewed-on: http://gerrit.openafs.org/8945 Tested-by: BuildBot Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit d9ce43be3e7e98641a1b33678d2ec516948e1968 Author: Andrew Deason Date: Tue Jan 22 15:41:38 2013 -0600 aklog: Fix allow_weak_crypto warning It's _crypto, not _enctypes. The user will just be more confused than before if we tell them to do the wrong thing. Reviewed-on: http://gerrit.openafs.org/8938 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: BuildBot (cherry picked from commit f6f145c90fbc236c350ddaa4d18b359be581496f) Change-Id: I17978b15f140729760ce84f1a7af913eac97d836 Reviewed-on: http://gerrit.openafs.org/8940 Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Paul Smeddle commit 0399446de37748aee51af8395203aba6b9712ada Author: Derrick Brashear Date: Tue Jan 22 15:00:29 2013 -0500 darwin: don't process incoming packets during rx shutdown we have a chicken and egg problem because the kpi doesn't let us kill the upcall before we close a socket. a more correct fix (on master) uses atomics, but for 1.6 this is a minimally-invasive fix, macos only and strictly better than before. FIXES 131577 Change-Id: I6003679f709284ae28f51bf5de8deff873346819 Reviewed-on: http://gerrit.openafs.org/8937 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit 5b6a1a619d073c895b938032f5f1b37fcfa7040f Author: Derrick Brashear Date: Mon Jul 16 15:16:53 2012 -0400 macos: future-proof MakefileProto.DARWIN.in if new cases show up which match the current ones, they just work. darwin60 and older were already killed from the tree, kill here also Reviewed-on: http://gerrit.openafs.org/7782 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e6aa586a996e32b3def4b8108815730fcfbf1463) Change-Id: I66bb6eb54856a37d3ff14cf455d90c482443a00e Reviewed-on: http://gerrit.openafs.org/8912 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit a167ef4a212f04dd105186f1bccf12bdaa0eea47 Author: Stephan Wiesand Date: Thu Jan 10 17:10:32 2013 +0100 make openafs 1.6.2pre3 prerelease for 1.6.2 Change-Id: I1df309f98b003f6ef88289e4219e24ef00dfbf13 Reviewed-on: http://gerrit.openafs.org/8899 Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 42257f27e69b7ff3f4c0d72a916423280dfd93e0 Author: Andrew Deason Date: Tue Jan 8 17:50:57 2013 -0600 SOLARIS: Avoid open count cleanup for Solaris 11 The comments in here no longer apply to Solaris, as of OpenSolaris commit 11736:63a134e1f09c by Donghai Qiao (4492533 Filesystems may need VOP_CLOSE() for executables following a VOP_OPEN()). This means that this workaround should no longer be necessary for any Solaris 11 release, any illumos release, and anything else based off of OpenSolaris. So, stop doing it. Thanks to Frank Batschulat for pointing this out, and providing all of the details. Reviewed-on: http://gerrit.openafs.org/8895 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 08a4b05c27964dd06d7922c134dc2dccc062b379) Change-Id: Ic689ac75fd618945ae7a6e101f29c3610d414603 Reviewed-on: http://gerrit.openafs.org/8897 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 3697dc8506c25a9b108644a94419efa9f12f5f5d Author: Andrew Deason Date: Tue Jan 8 17:41:21 2013 -0600 SOLARIS: Use vn_renamepath when available In Solaris 11.1, the signature of vn_setpath changes; it gains an extra boolean_t argument called 'force'. Instead of trying to adapt to it, call vn_renamepath() instead, which will do the correct thing and call vn_setpath &co for us. vn_renamepath has existed since Solaris 10 Update 8, and is in all releases of Solaris 11. Only call it in Solaris 11, since it makes the ifdefs easier, and there are no problems with calling vn_setpath on Solaris 10. Thanks to Frank Batschulat for all of the relevant information. Reviewed-on: http://gerrit.openafs.org/8894 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6c50960174f35d75fd50956e248318a9c826fca1) Change-Id: Ifdc5bb7785b791d36dc1523421badd29d8df2faa Reviewed-on: http://gerrit.openafs.org/8896 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 9754a288e7439413ae71f1d1e89e387224494dc8 Author: Andrew Deason Date: Fri Jan 4 14:18:40 2013 -0500 SOLARIS: Look for ncurses in ncurses/ncurses.h Solaris 11+ has ncurses.h in ncurses/ncurses.h. Look for it there. Without this, on Solaris 11.1 we will detect libncurses automatically (because it lives in /usr/lib), but not ncurses.h (since it is in ncurses/ncurses.h, not ncurses.h). So, we will fall back to curses.h, but will try to link to libncurses, which, as you might guess, fails with various undefined symbols. Reviewed-on: http://gerrit.openafs.org/8874 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 81dd4878e7a71b5acfd7a6e6f9be26cd6ab28972) Change-Id: I139296ae267ec057fc5ee11634d19ba36c8f8d6c Reviewed-on: http://gerrit.openafs.org/8890 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 5be413b079dfceae7b6881913c14a67561907db7 Author: Andrew Deason Date: Fri Jan 4 13:47:35 2013 -0500 SOLARIS: Avoid areq and auid conflict On new Solaris (11.1), nfs/auth.h #defines areq and auid to access some elements inside the nfsauth_arg structure more easily. We have a lot of functions that use those names as parameters, so the compiler throws an error (since we have a decl like "struct vrequest *areq_u.areq"). We cannot avoid including that header, since we need some NFS-related headers for the NFS xlator, and they pull in nfs/auth.h unconditionally. So, work around this by undefining areq and auid afterwards. Reviewed-on: http://gerrit.openafs.org/8873 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 936c2b02bf6fbeb3844c539665392ae89eb652fe) Change-Id: I54da96a48d163b6aa57bb8525ff4c80f10d70fa1 Reviewed-on: http://gerrit.openafs.org/8889 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 39dc50198e2cf61295e452d52536135a941d73d8 Author: Russ Allbery Date: Thu Jan 3 13:57:02 2013 -0800 Ensure MIN/MAX are defined in userspace builds of rx The include of was removed from rx_packet.h on Linux 2.6 and later to fix kernel builds with 3.7, which doesn't have that header in kernel space. However, while kernel space always provides MIN/MAX defines, userspace relied on the header. On at least powerpc, no other include chain includes sys/param.h, so MIN/MAX were left undefined. Fix this by only skipping the include of on Linux if building in kernel mode. Reviewed-on: http://gerrit.openafs.org/8870 Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fe2bae1c83a6d050e0afb88bad8fe02beae343e7) Change-Id: I4b2b123c493ab35cbeff309db7ff58354afc170b Reviewed-on: http://gerrit.openafs.org/8872 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit cf605455b3167f534efdf60931f80cfbf6beec64 Author: Russ Allbery Date: Thu Jan 3 09:13:26 2013 -0800 Fix spelling error (retreive for retrieve) in strings Caught by Lintian analysis of the compiled binaries. Reviewed-on: http://gerrit.openafs.org/8865 Reviewed-by: Ken Dreyer Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 2e5ef04e24c89e846af7aae7da57a0b0f5e200c3) Change-Id: Ied16661878edf39fb723e56c2ed997015e566b6e Reviewed-on: http://gerrit.openafs.org/8869 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 075893f250beaf3bb22cebc5fb1f936557cce50c Author: Andrew Deason Date: Fri Dec 28 16:39:15 2012 -0500 afs: Avoid unnecessary panic in ShakeLooseVCaches afs_vcount can change as we traverse the loop. If we successfully evict something from the cache, afs_vcount goes down, but our loop variable 'i' stays incremented. For example, if afs_vcount was 100 at the start of the loop and we kicked out 50 things, by the time we traverse the entire VLRU, we could have iterated over the loop 100 times, but afs_vcount would still be just at 50. So, remember what afs_vcount was at the start of the loop, and use that for our loop limit. Note that vcaches cannot be added to the VLRU during the execution of this loop, since we're just kicking stuff out. And nobody else can modify the VLRU but us, since we're holding afs_xvcache, and if we drop afs_xvcache, we restart the whole eviction process. The bug here was introduced by commit bc6dd950, but usually did not affect Linux until commit 696db866. FIXES 131553 Reviewed-on: http://gerrit.openafs.org/8849 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 1cee097b5bf44b0d8273712f0074b541f0f3f96e) Change-Id: I1bdbe41980e03522905217e55f745a96fb2bdc2d Reviewed-on: http://gerrit.openafs.org/8867 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 2e50eb38bfeda46bdafeada36140bebe06d29c9c Author: Andrew Deason Date: Fri Dec 28 16:36:42 2012 -0500 afs: Consolidate ShakeLooseVCaches retry init Don't duplicate the initialization code in effectively three separate places. Just goto the top of the loop again. This should incur no functional change; it's just reorganization. Reviewed-on: http://gerrit.openafs.org/8848 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 36959b50e513d4e9d4d2be93965eec2537943de5) Change-Id: If1277fd4f1cc4adb03695688bcc54ae65715f1a8 Reviewed-on: http://gerrit.openafs.org/8866 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit fa0c841d2b8fdf8bb77fac871358995271bedfda Author: Hans-Werner Paulsen Date: Fri Dec 21 09:04:19 2012 +0059 Do not call afs_MarinerLog when afs_mariner is not set When mariner log is not set up (afs_mariner=0), do not call afs_MarinerLog, otherwise a osi_NetSend() to hostaddress=0 is tried, which will give you ICMP messages in the socket error queue. Do not call afs_AddMarinerName, when afs_mariner is not set. (cherry picked from commit 41f8d6b9239d8ee1ca786c0485bea4251c96b9e5) Change-Id: Id9584b07a0d3726fdd2176ac04945f976255e2d4 Reviewed-on: http://gerrit.openafs.org/8801 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 7507bc7375d9cf908c1cc17ff821c41be84bf930 Author: Simon Wilkinson Date: Fri Apr 6 23:56:30 2012 +0100 shlibafsauthent: Add a load more objects The perl-AFS module needs to link against a pthreaded, PIC, library that contains all of the routines that it provides perl shims for. At the moment, libafsrpc_pic and libafsauthent_pic are the only such libraries that OpenAFS provides. Add all of the necessary objects to libafsauthent_pic such that the 2.6.2 version of perl-AFS can build with a minimal set of patches. Minimise the damage by only making these available through the static version of the libafsauthent_pic library. Reviewed-on: http://gerrit.openafs.org/7070 Tested-by: BuildBot Reviewed-by: Jeffrey Altman This is a 1.6 version of this change, which adds some additional symbols and objects to cater for differences between master and 1.6 The changes aren't relevant to master, as the whole shared library situation there is now completely different. Change-Id: Iad596cd92bc883e47c5d261886db61e9c7482112 Reviewed-on: http://gerrit.openafs.org/8811 Tested-by: BuildBot Reviewed-by: Andrew Deason Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Reviewed-by: Paul Smeddle commit 65568d6d5938489deb986d1365c8a7bd2029be27 Author: Simon Wilkinson Date: Fri Dec 21 13:09:22 2012 +0000 shlibafsrpc: More exports to support perl-AFS 2.6.3 Add some additional exports for perl-AFS 2.6.3 This patch isn't applicable on master, as our whole shared library infrastructure there has changed. Change-Id: Ie1f399c9fcb1638501533a45ff9a17f95bc98afc Reviewed-on: http://gerrit.openafs.org/8810 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Derrick Brashear Reviewed-by: Paul Smeddle commit 88c9f12fc6096af44204deb8003ff654afe0b348 Author: Simon Wilkinson Date: Thu Apr 5 15:43:23 2012 -0400 shlibafsrpc: Add additional XDR functions Export the afs_xdr_pointer and afs_xdr_u_char functions so that shlibafsauthent can make use of them. Reviewed-on: http://gerrit.openafs.org/7065 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 00992c66972aeab96cca9781b02a780ab49dce23) Change-Id: I48ef13427c53e8fe3ceca00eb5d9d35c2c4327d7 Reviewed-on: http://gerrit.openafs.org/8809 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Derrick Brashear Reviewed-by: Paul Smeddle commit ed0886ca6fd45e3f6d653f62328046195d8f3467 Author: Stephan Wiesand Date: Sat Dec 22 21:28:10 2012 +0100 make openafs 1.6.2pre2 prerelease for 1.6.2 Change-Id: Ic15db559c115f18528e05ced0080e489eadfb0b9 Reviewed-on: http://gerrit.openafs.org/8817 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit aeb42c44bc005b8935650351470020f2e715bcb8 Author: Andrew Deason Date: Wed Dec 19 16:57:20 2012 -0600 ihandle: Avoid FD cache in ih_sync_all If an ihandle is IH_REALLYCLOSE'd immediately before or during the IH_OPEN call in ih_sync_all, ih_sync_all can open a new file handle after the IH_REALLYCLOSE is complete. For a volume that has gone offline, this means that ih_sync_all can hold a file open for a volume that has gone offline, and is possibly being manipulated or deleted by an external program (e.g. the volserver for a clone operation). While the FdHandle_t is open, or after the handle has been closed and returned to the FD cache, another caller in the fileserver could try to open the same file and get back the cached FdHandle_t. If the file has been deleted by the volserver, this means the fileserver is writing to the 'wrong' file, as it has been deleted. This can result in a CopyOnWrite operation causing a file from the clients' point of view to suddenly become empty, or to revert to a previous version. To avoid this, prevent ih_sync_all from interacting with the FD cache entirely, and just open a file descriptor directly from the IHandle_t. This should prevent it from causing any problems with other users of the FD cache. This change is not intended for the master branch. The current intention for the master branch and future versions is to eliminate ih_sync_all entirely. FIXES 131530 Change-Id: I809a0e3ebfe4692eab01671fdf83bf58676453f6 Reviewed-on: http://gerrit.openafs.org/8796 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 140fb74331a6fda552d25bbf56dda5f9c785839a Author: Simon Wilkinson Date: Wed Aug 3 19:08:20 2011 +0100 libafsauthent: Add volser and vldb Add the volser and vldb families of functions to libafsauthent. This allows applications such as perl-AFS which are building pthreaded clients to use a single library, rather than trying to mix LWP and pthreaded code within the same process. Reviewed-on: http://gerrit.openafs.org/5157 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 55beacdc385424770c78cf055e8fd426075506f1) Change-Id: I60a35b3032f071a0a3ef4dc66221f22166942bfd Reviewed-on: http://gerrit.openafs.org/8799 Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Paul Smeddle commit c4dbf26d03defa781f54c59b2a8bf1acf98dca26 Author: Marc Dionne Date: Mon Aug 8 16:08:25 2011 -0400 venus depends on libafsauthent Add an explicit dependency on libafsauthent for src/venus, since it is needed to build afsio. This can cause parallel builds to fail. Reviewed-on: http://gerrit.openafs.org/5171 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 784a410d0f1d6b5649c5b4943eb1b945ef7d70e8) Change-Id: I8baf9008e4f59d916242e0a8ac9bda19522f0b0d Reviewed-on: http://gerrit.openafs.org/8800 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit 2bcb13eddefdccec2f18f4f30fd431e703a39bfd Author: Simon Wilkinson Date: Fri Dec 21 09:35:28 2012 +0000 tubik: Don't install ubik.h or ubik_int.h Both ubik and tubik try to install ubik.h and ubik_int.h. This leads to a race during which the header file may be missing, which upsets parallel builds. Just don't install them from tubik to solve this issue. This is 1.6 only - a similar fix was done as part of the libtool work on master in 035a2ea4a1a26141508cf3fa5918d40b7be6fc90 Change-Id: I18a7dcb425b2f805656ab8ff8c06b87bcca526c7 Reviewed-on: http://gerrit.openafs.org/8808 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit 7d6591870302e935e04db91b934082a49c9009bc Author: Michael Laß Date: Fri Dec 14 17:06:30 2012 +0100 Update configure help msg to match actual defaults The defaults for LINUX_KERNEL_PATH and LINUX_KERNEL_BUILD in acinclude.m4 were changed in 2cfd611, 94ff565 and 3f9d982 without updating the output of ./configure --help. Change the description of linux-kernel-headers and linux-kernel-build to show the correct defaults. Reviewed-on: http://gerrit.openafs.org/8759 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 986a8541518fb03a69cf5ece2055cb9cd50bda60) Change-Id: I2fc463fc3b5793d6125f7367de22631c8e52da21 Reviewed-on: http://gerrit.openafs.org/8805 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit efbcfd81599a0401dc6d95ceb04cc8f5c3f1837b Author: Stephan Wiesand Date: Sat Dec 15 15:36:24 2012 +0100 Linux: Restructure kernel header detection As of kernel 3.7, version.h has moved, and hence utsrelease.h was no longer found. Loop over candidate directories and locations within, and look for the files we're actually after. FIXES 131525 Reviewed-on: http://gerrit.openafs.org/8761 Tested-by: BuildBot Reviewed-by: Michael Laß Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 3f9d982ec25aa5f9cf32a1268d6883a9afa70b12) Change-Id: Ia9653405195d4c5f6592960375340553de1267c5 Reviewed-on: http://gerrit.openafs.org/8804 Reviewed-by: Michael Laß Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit bff5e77d97b2f2d26c783632c913451906533aab Author: Derrick Brashear Date: Tue Dec 18 09:04:15 2012 -0500 macos: avoid leaking iocount on synthetic fsevents in certain cases we could leak an iocount. clean up even if our event couldn't be run Reviewed-on: http://gerrit.openafs.org/8777 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit cf150252b688dff0224f32be66d88347d1d94b37) Change-Id: Id8c94bee3663507d31c0e0dc719693d82f90a151 Reviewed-on: http://gerrit.openafs.org/8791 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit f69aaf6914096077108b534aff8fd147cd6a65ae Author: Andrew Deason Date: Thu Dec 13 16:36:20 2012 -0600 LINUX: Avoid infinite d_invalidate loop If a reference is grabbed after we d_invalidate() a dentry, but before we dput() that dentry, the dentry can still be on the alias list for its inode. This will cause us to loop forever, since we'll get the same dentry back from d_find_alias, and d_invalidate() will return success, since it is a no-op. Avoid this by just limiting the number of times we loop. Leaving dentry aliases around is non-critical as long as we clear some each time. This change is not applicable to master, which will get a more robust fix for this issue. This change was discussed during the 19 Dec 2012 release-team meeting. Change-Id: Ief22ae9f8f6de62518604383c421772c25c5dc26 Reviewed-on: http://gerrit.openafs.org/8795 Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 5f7cf5fc22ac3ca62175c69c1a25139dde4b22b0 Author: Derrick Brashear Date: Wed Dec 19 10:59:24 2012 -0500 Windows: limit number of retries due to kdc repeat error don't retry forever. does not apply to master due to difference in sdk for kerberos Reviewed-on: http://gerrit.openafs.org/8792 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8c1288ed64714a3e136a644eac1e64466d5dfdbc) Change-Id: I67e20e302d09ebecec8e7856cafe7133333b89f4 Reviewed-on: http://gerrit.openafs.org/8798 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 7fd2d9ba8ba031308710c96c0c726f82e9b0b620 Author: Jeffrey Altman Date: Thu Jun 7 09:52:13 2012 -0400 Windows: KFW_AFS_klog() changes If an explicit 'realm' is specified as input: a. Do not duplicate a request for afs/cellname@REALM if the explicit realm matches the realm of the client principal. b. If afs/cellname@REALM fails, request afs@REALM for the explicit realm. This patchset does not apply to master due to Kerberos Compatibility SDK conversion. Reviewed-on: http://gerrit.openafs.org/8773 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit f9e9d9aebf2f671b099253ec847b0dd32ce5c686) Change-Id: I0cbf8f9a540159b5169e4cdf409dc7e875527d77 Reviewed-on: http://gerrit.openafs.org/8776 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 9b63f04eff7fe5b0b963172fa4b5b8e1522c999e Author: Jeffrey Altman Date: Thu Jun 7 09:27:00 2012 -0400 Windows: handle KRB5KRB_AP_ERR_REPEAT errors This patchset adds logic to handle a KRB5KRB_AP_ERR_REPEAT error sent by a KDC for the Windows aklog and the afskfw library. The KRB5KRB_AP_ERR_REPEAT is sent when the KDC detects a replay. However, the KDC replay detection is known to generate many false positives. If KRB5KRB_AP_ERR_REPEAT is received, wait one second and retry the request. This patchset does not apply to 'master' due to Kerberos Compatibility SDK conversion. Reviewed-on: http://gerrit.openafs.org/8772 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit c23664aff7a78010ba462317087e84f7ae3c8518) Change-Id: I806a3ede5f0fa6794f3ccaf8f2d514b0c8443ec1 Reviewed-on: http://gerrit.openafs.org/8775 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 5cfb72022a2647e04fd2a398b9623311a1716f5a Author: Derrick Brashear Date: Thu Mar 29 10:44:53 2012 -0400 linux: update spec requirements don't require things which don't exist on el5. do require them in el6. require kernel-devel if building modules don't do anything involving the kernel if not building modules if we can figure out that we don't have 2.4 based on the version, avoiding the need to depend on kernel-devel just to build an srpm. Reviewed-on: http://gerrit.openafs.org/6985 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 72f5d88acc752ff447a9e63327c135473326a34d) Change-Id: Ibcc53eb6a742de2101a054070e9b48607d0bce1d Reviewed-on: http://gerrit.openafs.org/8787 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 9cf0b0dcc6b4155aff7ed5bff5aea61e3a21f39c Author: Michael Meffie Date: Fri Aug 17 13:25:17 2012 -0400 LINUX: make d_automount work properly on rhel5 kernels Recent centos/rhel 5 kernels (2.6.18-308.*) started providing the d_automount operation, but renamed the DCACHE_NEED_AUTOMOUNT flag to DMANAGED_AUTOMOUNT. Reviewed-on: http://gerrit.openafs.org/8006 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 5daa08ea263b2a82b4a85abd61d72d4d1f48bbb6) Change-Id: I1ebc2a3cab52ff7294b03e1e82680a99d62013fc Reviewed-on: http://gerrit.openafs.org/8790 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 7ca98751976df92a8f91f5768754ff3c1b4980bf Author: Andrew Deason Date: Wed Aug 29 11:39:01 2012 -0500 LINUX: Use struct vfs_path on RHEL5 Some revisions of the kernel from RHEL5 (2.6.18-308.* and possibly others) renamed 'struct path' to 'struct vfs_path'. So, use 'struct vfs_path' when it exists. This introduces the afs_linux_path_t typedef, which is defined as either a struct path, or struct vfs_path. Reviewed-on: http://gerrit.openafs.org/8019 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 74c1881dff1593f4a8920ba8d8a2400760899fa5) Change-Id: I6eaf17ebe9a35b345c1fd5cebd490f8095a1b22b Reviewed-on: http://gerrit.openafs.org/8789 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 716cca7ed808aee2e639d06d8d5fcdd71de12b2b Author: Andrew Deason Date: Thu Aug 30 08:06:33 2012 -0400 autoconf: add AC_CHECK_LINUX_TYPE macro add a macro which looks for a given type in a given linux kernel header file Reviewed-on: http://gerrit.openafs.org/8021 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit f87d49cd17fbf6aa9465faadac823ed8d0510a16) Change-Id: Idc6cc79d9410149f6faeb867f878724beaa30793 Reviewed-on: http://gerrit.openafs.org/8788 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit cf59993d504e80f94ee1d9a56ee8b5b669810394 Author: Arne Wiebalck Date: Thu Dec 6 16:23:05 2012 +0100 Update 'vos shadow' man page Change the 'vos shadow' man page to say that updating the VLDB with shadow volumes does only work if the VLDB entries for the corresponding source volumes are deleted first. Reviewed-on: http://gerrit.openafs.org/8652 Tested-by: BuildBot Reviewed-by: Dan van der Ster Tested-by: Dan van der Ster Reviewed-by: Ken Dreyer (cherry picked from commit 83ccb62012d7b3b696dd48e05feb8adeb203463a) Change-Id: I59eacb7406e8bec9e5736afe32564a04be7ff72a Reviewed-on: http://gerrit.openafs.org/8786 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit cddc0c46696e25c590d85afcc71c7c018d42f6a3 Author: Derrick Brashear Date: Mon Jul 16 22:32:55 2012 -0400 macos: fix growlagent icon handling the whole of the api used for icon handling when you steal it from a resource fork is deprecated in new macos. fine. we'll just make an app bundle by cheating, move andy into a standalone icns file, install him into the "bundle" and open it the macos way. Reviewed-on: http://gerrit.openafs.org/7786 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 3dd230e8595e2b9635d6ec412a145ae3be229b7a) Change-Id: I9a439601058a4c2f32cbe687865a9143d56b92bf Reviewed-on: http://gerrit.openafs.org/8781 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit b64c45535b7d2f7e3fb65dc33d2767cd30633383 Author: Derrick Brashear Date: Tue Jul 17 00:15:56 2012 -0400 macos: native apps need 64 bit support the installer bundle, prefs pane and backgrounder all need to be 64 bit mode since the system uses them as plugins Reviewed-on: http://gerrit.openafs.org/7787 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 50009267bb6deaa431042dc99ac6e5d913b1412a) Change-Id: I7b6f8b011380f1ce8284f5c44656422405490dc7 Reviewed-on: http://gerrit.openafs.org/8780 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 8445c07524a76deaab19ca196c5783a16d0830d9 Author: Derrick Brashear Date: Sun Jul 15 03:03:00 2012 -0400 macos: next version support support things beyond 10.7 Reviewed-on: http://gerrit.openafs.org/7763 Tested-by: BuildBot Reviewed-by: Andrew Deason Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 73ff09513013ae3c6b29b1b7b0a6e76b4fd260f7) Change-Id: I0bbef00747b01b387989398557fb82be93fe28f9 Reviewed-on: http://gerrit.openafs.org/8785 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 64f1ed16c8f7e226ddcebcab2b575939a912108b Author: Derrick Brashear Date: Wed Jul 25 00:17:46 2012 -0400 macos: next version header add header for next macos Reviewed-on: http://gerrit.openafs.org/7868 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 3638ef30d0de7d82d919b046ec87986ad09442d3) Change-Id: Ia4ad32e66566c8d822a32ca51fae784293f7ac24 Reviewed-on: http://gerrit.openafs.org/8779 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 58c2a08b73e832330b9ff606bbcf3a30b454454f Author: Stephan Wiesand Date: Mon Dec 10 15:18:23 2012 +0100 make openafs 1.6.2pre1 prerelease for 1.6.2 Change-Id: I22fad3411c09644578c717c06cd7cb6b3469fe57 Reviewed-on: http://gerrit.openafs.org/8738 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 463e0d2049a10e13adad68d4615f9e6c87c5bca5 Author: Simon Wilkinson Date: Sat May 14 08:37:31 2011 +0100 rxperf: -S takes an argument The -S option to rxperf (which permits the maximum number of server threads to be set) takes a parameter. Update the getopt string so that we can give it one. Reviewed-on: http://gerrit.openafs.org/4801 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 80b3648e6d8fd96bdb57d47e56b28b30e42eb303) Change-Id: Ic1a8264d0471e9458ade11af00ed78871b390b34 Reviewed-on: http://gerrit.openafs.org/8423 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand commit 4c084a67e69d4c863e64bc38d5d6109a328b85da Author: Jeffrey Altman Date: Mon Nov 8 11:07:14 2010 -0500 rxperf: use parallel connections When the number of threads exceeds RX_MAXCALLS allocate additional rx connection objects. Reviewed-on: http://gerrit.openafs.org/3285 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit df682aa34170d285247c5486050db3ee7d3774f0) Change-Id: Ia699fe0230e6dde2bc1f270d766f512f2693c94f Reviewed-on: http://gerrit.openafs.org/8421 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand commit fb95823877f36500de181387e1f597e1cd253fc8 Author: Jeffrey Altman Date: Thu Nov 8 15:48:18 2012 -0500 NetIdMgr: Krb4 is optional 32-bit builds should not require the krb4 library. Reviewed-on: http://gerrit.openafs.org/8414 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 51021ac306c7b3b355c64c978a029537e3341a25) Change-Id: I8664140cd8e5d159789be94628a726e8c7ee5cb7 Reviewed-on: http://gerrit.openafs.org/8727 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2c1ba63df3cd59f378dc3e62b4786a1aedaa3f2a Author: Jeffrey Altman Date: Thu Nov 8 15:19:33 2012 -0500 Windows: Make krb4v32.dll and krb524.dll optional Permit afskfw.dll to be built with USE_KRB4 and USE_KRB524 without the requisite DLLs being available on the target machine. Reviewed-on: http://gerrit.openafs.org/8413 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3764cbfbc9f26738b5e6693e8729e79dbb0092c6) Change-Id: Ib546aa45a57bba40de02dc9499dd1ce6c2ef9d73 Reviewed-on: http://gerrit.openafs.org/8726 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4061aa47f1211d7d02fad4fbb88bbd07151039e7 Author: Jeffrey Altman Date: Sat Dec 8 18:39:40 2012 -0500 Windows: cm_RecycleSCache remove from hash table Remove the cm_scache_t object from the hash table during recycling. This step is performed on master and on 1_7_x. Did not get pulled onto 1.6.x previously. Change-Id: I2c50a08b8f0b191bd558ce344cb0ce594e13661c Reviewed-on: http://gerrit.openafs.org/8725 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ad7cfa94e61217ee46b52bdf0704cd2aeca127a9 Author: Jeffrey Altman Date: Sat Nov 17 21:44:52 2012 -0500 Windows: buf_CleanLocked protect against NULL bp->userp The cm_buf_t.userp field should never be NULL if the CM_BUF_DIRTY flag is set but apparently it sometimes is. cm_BufWrite() requires that the userp parameter be non-NULL. Otherwise, an assertion fails and afsd_service.exe panics. If bp->userp is NULL, use cm_rootUserp. The worst that will happen is the write will fail due to an access denied error. Reviewed-on: http://gerrit.openafs.org/8475 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f436fe03c80e21b6a58a6de962070841e00791ef) Change-Id: I33f5e73509cc2c6517ae4bf4214011383a341411 Reviewed-on: http://gerrit.openafs.org/8649 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c95d1aee53eb5f459e3cfff27bcdd08dbb00095a Author: Jeffrey Altman Date: Sat Nov 17 21:39:50 2012 -0500 Windows: do not adjust deleted scache LRU ordering Instead of moving deleted scache objects so that they are next in line to be recycled, do not move them at all. Making them next to be recycled results in the CM_SCACHEFLAG_DELETED flag value being lost. Reviewed-on: http://gerrit.openafs.org/8474 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 887cff5b0f84ad3b758bc4258b1f1302401c2c1d) Change-Id: I7a9377fdd1546f6e555afa4b2f714d8b74b26e87 Reviewed-on: http://gerrit.openafs.org/8648 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d23b655e7857a008b36147260972d76f4c5b1795 Author: Jeffrey Altman Date: Tue Nov 13 17:59:06 2012 -0500 Windows: Do not reset cm_buf.offset on error When an error occurs the cm_buf_t is not removed from the hash tables. Since the scacheHashTable hash is built from the fid and the offset it is not safe to reset the offset field. Resetting the offset field results in an assertion failure during buffer recycling. Reviewed-on: http://gerrit.openafs.org/8452 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f56c01d313140b625b4342feddfe464342d1ced4) Change-Id: I888e56c8c34bcae58c51ba965fd59e5539e1bab5 Reviewed-on: http://gerrit.openafs.org/8647 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 907e2f148f2dbb972675d9f39a752931fd798ec7 Author: Jeffrey Altman Date: Thu Nov 8 12:20:30 2012 -0500 Windows: Prevent SMB unitialized variable access smb_ReceiveNTTranCreate would make use of 'fidp' before it was allocated. Reviewed-on: http://gerrit.openafs.org/8411 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 6f79eb36593a2b20e712cf7e828e987e12f8e99f) Change-Id: Ifedf7887c76698ecb32a1c0fa9f4c01e3df74817 Reviewed-on: http://gerrit.openafs.org/8646 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6efa862c41e3d4b9644f407a9402fefeb7a166b3 Author: Jeffrey Altman Date: Tue Nov 6 06:39:39 2012 -0500 Windows: call MIDL_user_allocate instead of calloc In the RPC service routines do not call calloc() directly. All memory will be deallocated by a call to MIDL_user_free() so use MIDL_user_allocate() to perform the allocation. Modify MIDL_user_allocate() to call calloc() instead of malloc() to ensure that the memory is initialized to NUL bytes. Reviewed-on: http://gerrit.openafs.org/8365 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8c7846f4e1dd89db4ff3b03c558d97cd13cbb205) Change-Id: I5562dbac4977a5d23407cd62c3deb743e629c48c Reviewed-on: http://gerrit.openafs.org/8645 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 39da28383a2a9edc5ab864c188a87645354624b2 Author: Jeffrey Altman Date: Mon Oct 29 10:33:18 2012 -0400 Windows: mark server reference offline for VOFFLINE cm_Analyze() was not marking the cm_ServerRef_t reference to a volume instance as srv_offline in response to a VOFFLINE error. As a result the same volume instance is tried again and again. Reviewed-on: http://gerrit.openafs.org/8326 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit e59cf940ce1cb2ed72ccf05ce39f73019547d9b1) Change-Id: Iab79c0b2e0c885a0d9180c000f9cc9574fab11dc Reviewed-on: http://gerrit.openafs.org/8644 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a30a4dc2114aa2f7c319ecb7d213d658bd371af8 Author: Jeffrey Altman Date: Tue Sep 25 13:01:53 2012 -0400 Windows: Fix memory leak SRXAFSCB_GetCellServ In commit 19f1e0f7cf40c3da1d49c789358bd814f7e3b3eb strdup() was replaced by xdr_alloc() and memcpy(). Unfortunately, the patch was wrong and the pointer to which the result of xdr_alloc() was assigned was overwritten with zero. Reviewed-on: http://gerrit.openafs.org/8162 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 137ea396dbbcf302bce8200e3da7d4693b464ca7) Change-Id: Ia15bcbeec4ad3ff411fd599e2d57f1ead4c3be23 Reviewed-on: http://gerrit.openafs.org/8643 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d9b7f6154624b2f7bf675e3c7aa25ef160d83621 Author: Jeffrey Altman Date: Thu Aug 2 21:12:25 2012 -0700 Windows: remove sdk sample token.c The sdk sample is no longer applicable. Reviewed-on: http://gerrit.openafs.org/7932 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5a707645b7d14f37f3d7fd8d06685f3940631a44) Change-Id: Ic811e8b13c9ab5c3eef9e36ffb0cc38c896a7e89 Reviewed-on: http://gerrit.openafs.org/8642 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 441e6fc771a9063bcac2b68a094ad7c6cce99f7e Author: Jeffrey Altman Date: Fri Jul 6 15:07:13 2012 -0400 Windows: cm_MergeStatus unknown interface numbers Ignore status information if the interface number is unknown. Currently only version 1 is recognized. Reviewed-on: http://gerrit.openafs.org/7743 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8115841e2fc9d827a7207ddc18e5c84e466ed7e7) Change-Id: Iaa3eb3aae931ee65c991e2786d80a9a62eff76c6 Reviewed-on: http://gerrit.openafs.org/8641 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1cc48eeda92a516d2c30b1d68ede6112500a217e Author: Jeffrey Altman Date: Thu Jul 5 14:54:04 2012 -0400 Windows: cm_ConnByServer hold userp->mx only while necessary The cm_userp_t does not need to be locked while the cm_conn_t force new connection processing is taking place. Reviewed-on: http://gerrit.openafs.org/7718 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5b9e9265a0df707e9fb79842ab5aa94b59b8e88e) Change-Id: I0fb0f5b7ede676b4513e33fa664e66cafed18e01 Reviewed-on: http://gerrit.openafs.org/8640 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e6171f3e2f35db43d2f85951e631e6fc6cb7bef3 Author: Jeffrey Altman Date: Thu Jul 5 14:33:50 2012 -0400 Windows: cm_ConnByServer add conn to list after init Do not add a newly created cm_conn_t to the cm_server_t connsp list until after the object is fully initialized. Reviewed-on: http://gerrit.openafs.org/7717 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c3ce54e6b7be8c2996a0fda2d7ad9780fca2f0ef) Change-Id: I0209a82765b31ccc8a93316438ef12864dbc5339 Reviewed-on: http://gerrit.openafs.org/8639 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d5001acddda6864e7c3409f9286bc0bb907090ef Author: Jeffrey Altman Date: Thu Jul 5 11:03:35 2012 -0400 Windows: cm_HaveCallback optimize .readonly If the cm_scache_t has a registered callback, there is no reason to obtain a volume reference for a .readonly. Just use the callback. Reviewed-on: http://gerrit.openafs.org/7716 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f73aebbe8772e62bf8930d70e9edab2f82ff8984) Change-Id: Ibacb272fade3aa24beb0b7c9a966b9e769385669 Reviewed-on: http://gerrit.openafs.org/8638 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 431792e5155a598db568261b36b72f3baddba6a2 Author: Jeffrey Altman Date: Tue Jul 3 12:49:53 2012 -0400 Windows: HaveCallback vs OfflineRO Is Valid commit f716962ab41847af4450d0a361f5de9195b32ed0 inadvertently broke the offline .readonly is valid functionality when readonly volume versioning is disabled. Restore it. Reviewed-on: http://gerrit.openafs.org/7679 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c3485a35b7a548d850d55dde4634ba78e5330aa9) Change-Id: Ie7b4758fe14a0a695d7db1b04fc5039050891908 Reviewed-on: http://gerrit.openafs.org/8637 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2498cbbce8eb99c9d72536a37d9da87f5e9b3161 Author: Jeffrey Altman Date: Mon Jun 18 21:58:26 2012 -0400 Windows: afslogon cast away warnings cast away size_t to int warnings in 64-bit builds. Reviewed-on: http://gerrit.openafs.org/7634 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 76ae0f01b32d3e87273ff6d2c9c20eec59e22e16) Change-Id: I81ba08a273aedb412642c345cd4a2762fcf1edb7 Reviewed-on: http://gerrit.openafs.org/8636 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6ed24963f7b52ac57732c4349a6f86864ea33e3b Author: Jeffrey Altman Date: Sat Nov 24 20:10:49 2012 -0500 rx: set abort client_initiated flag to match direction In a recent incident involving packet reflection back to the file server, aborts were being sent by the file server in response to a server sent packet. The aborts sent in response also failed to set the CLIENT_INITIATED flag in the header which permitted the the actual client to confuse the Abort as applying to its client initiated connection. in rxi_SendRawAbort, set the CLIENT_INITIATED flag to the opposite of the packet the abort is being sent in response to. Thanks to Chaskiel Grundman for the suggestion. Reviewed-on: http://gerrit.openafs.org/8513 Reviewed-by: Chaskiel Grundman Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 8e68e08901b0ad003ad1e5114a155bfac83bdd83) Change-Id: Id34b50e91c54f6f984c67ed18fad58ebe225c635 Reviewed-on: http://gerrit.openafs.org/8609 Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Paul Smeddle commit 795a22793f454e3a1426c1546d255932f17e16d0 Author: Michael Meffie Date: Thu Apr 19 15:15:04 2012 -0400 configure: solariscc check update Add checks for recent versions of sunstudio for solaris. The installation paths are documented in the release notes of versions 12.1, 12.2, and 12.3. Reviewed-on: http://gerrit.openafs.org/7253 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fbc9599484850f7f9fc41a98d3bd2105001fd802) Change-Id: If63638bb9b88f0024156fc5547540837b665b301 Reviewed-on: http://gerrit.openafs.org/8654 Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle Tested-by: BuildBot commit b30ed5d2cae6a8a38a828e3e998595f98b3f52ea Author: Michael Meffie Date: Fri Apr 13 13:01:05 2012 -0400 Build: error if solariscc is not found Fail configure if the solariscc is not found and give the builder a message to cope with non-standard installation paths for sunstudio. Reviewed-on: http://gerrit.openafs.org/7204 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit c11d1c031940f298e96def822024d2857f603268) Change-Id: I123b887a66e8f9bad87144934e9cea62f63f2180 Reviewed-on: http://gerrit.openafs.org/8653 Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle Tested-by: BuildBot commit 026f73a0328acb3eda7d4f11a5dba1eeef8d6990 Author: Marc Dionne Date: Wed Dec 5 18:23:34 2012 -0500 cache bypass: fix afs_bypass_copy_page memcpy oops The two memory copy cases were inverted when the code was refactored, causing an oops when cache bypass is enabled. Reviewed-on: http://gerrit.openafs.org/8617 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Derrick Brashear (cherry picked from commit 5b2cc290f8e991b152411168cabd1c9e7f31deb4) Change-Id: Ia5eb577046895a2b38a6be5c4794db9a65893530 Reviewed-on: http://gerrit.openafs.org/8715 Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Paul Smeddle commit 75af57b38fd803f74319271dd6230a00e8ce0da4 Author: Jeffrey Altman Date: Sun Jul 1 22:19:08 2012 -0400 Windows: cm_UpdateVolumeLocation misplaced lock The volume->mx was obtained in the wrong place which resulted in the potential of a panic caused by obtaining the mutex when it was already held. Reviewed-on: http://gerrit.openafs.org/7654 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4707174938b92df189697a2b7e463438c37c1ed0) Change-Id: I151547ec9f90f17ae28397c77337b92ea7919754 Reviewed-on: http://gerrit.openafs.org/8635 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b24b7e0f6823ce273fbd03aad39a72a9d704ec29 Author: Jeffrey Altman Date: Tue Jun 19 18:48:31 2012 -0400 Windows: Freelance Short circuit all vol updates As long as the cell is the Freelance Cell ID the volume updates should be short circuited. There is no benefit to performing the extra work. Reviewed-on: http://gerrit.openafs.org/7636 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e0b9b89dd98d0bf449556e3f28b479dd61e7eb95) Change-Id: I95ffc34b9846cba82872aa2d1e308742cddb4727 Reviewed-on: http://gerrit.openafs.org/8634 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2b92fe44b837a807ca685a4c1c9047dc37948030 Author: Jeffrey Altman Date: Mon Jun 18 21:55:49 2012 -0400 Windows: AFS_Startup_Event must query Debug value For proper debugging to be performed within the AFS_Startup_Event processing, the "Debug" value must be queried from the registry. Reviewed-on: http://gerrit.openafs.org/7633 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7fd1dc6c887c3bf786632901bc72b8250298a98f) Change-Id: I0a58b45890a505ba9ddab24582deaf0c70571a66 Reviewed-on: http://gerrit.openafs.org/8633 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit bff302b604f46b9ee18c4decbfdb00008d7a570e Author: Jeffrey Altman Date: Mon Jun 18 21:49:18 2012 -0400 Windows: NPLogonNotify secure erase password The user's password is copied during the NPLogonNotify processing, be sure to erase it from the stack before the function completes. Reviewed-on: http://gerrit.openafs.org/7632 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 187af8d11350c2ff509244f216c72bdd4b88451a) Change-Id: I40f52324067597e4eb96bfd7ed19f18e154ef8ee Reviewed-on: http://gerrit.openafs.org/8632 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b5f45f313e97e2617683a05a2d6f3326fccbd3bd Author: Jeffrey Altman Date: Mon Jun 18 21:45:39 2012 -0400 Windows: afslogon make error dialog system modal Prevent error dialogs from getting lost behind the desktop during logon. Make them system modal. Add a warning icon as well. Reviewed-on: http://gerrit.openafs.org/7630 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ae5aba17cc5d45805f7d263fd645fba0d3bb5116) Change-Id: If5031c21b008306f1179cb460b39fc7d3662fbd0 Reviewed-on: http://gerrit.openafs.org/8630 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2c18559dcd1261972c00dd092b4dc59caff68dd6 Author: Jeffrey Altman Date: Mon Jun 18 21:39:51 2012 -0400 Windows: afslogon MapAuthError return WN_NET_ERROR (ERROR_UNEXP_NET_ERR) to indicate a problem with this network provider when an error occurs instead of returning WN_NET_SUCCESS. Reviewed-on: http://gerrit.openafs.org/7629 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7adb93cf51d56936d51b70758a959342728fea56) Change-Id: I35f455ff1068418336c4ac11cf57027f3afe4787 Reviewed-on: http://gerrit.openafs.org/8629 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fe623b97e1075080fc9999e803f3022b53a16c30 Author: Jeffrey Altman Date: Mon Jun 18 21:37:49 2012 -0400 Windows: afslogon OutputDebugString If the NetworkProvider "Debug" value has the 1th bit set (2), generate all debug values to the debugger via OutputDebugString(). Reviewed-on: http://gerrit.openafs.org/7628 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 43d53bed6f591257fee55c343699ee1d3b223ff6) Change-Id: I91610d3de7d176b8d237887a8eae4be77e185f00 Reviewed-on: http://gerrit.openafs.org/8628 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7c665f4e1ba84356b9d67c41229947c641df94b1 Author: Jeffrey Altman Date: Wed Nov 21 18:08:35 2012 -0500 Windows: smb_ReceiveTran2QFileInfo Pioctl support Similar to the QueryPathInfo support for _._AFS_IOCTL_._ the QueryFileInfo interface must respond to pioctl queries. When GetFileAttributes() on XP is called from the afslogon.dll the QFileInfo path is used instead of the QPathInfo path. Reviewed-on: http://gerrit.openafs.org/8491 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 42e812c7abf5fafbbfeebd40828978e8b4639860) Change-Id: I66d4b001f8f07b75cedb5cce9a80b1639546a45c Reviewed-on: http://gerrit.openafs.org/8627 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4408f4d4138656ace85169766dd622fd0a58c00f Author: Jeffrey Altman Date: Wed Nov 21 01:13:49 2012 -0500 Windows: Fix smb_ReceiveTran2QPathInfo Pioctl support The path check should needs to include the root directory slash when comparing to the \_._AFS_IOCTL_._ path to detect a pioctl request. Reviewed-on: http://gerrit.openafs.org/8488 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit eca3d56436c16e4634afe1954a2a15424b4ad5f1) Change-Id: I201179644168cbc09a194612b2faf5bd3a812796 Reviewed-on: http://gerrit.openafs.org/8626 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b1e196e23eeaec028c1ea9efb1292f525baa1f7a Author: Jeffrey Altman Date: Tue Jun 5 23:07:40 2012 -0400 Windows: SMB GetFileAttributes support commit 56a2cbb5fbdcab51bd5f4720e610796abbce5c41 added a GetFileAttributes query to the pioctl interface to protect against printing pages on printers with a broken smb protocol implementation. This patchset adds support for GetFileAttribute on _._AFS_IOCTL_._ files to the SMB implementation. Reviewed-on: http://gerrit.openafs.org/7524 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 371af87a23b61187ca9d54c8e6819f2121fbf1db) Change-Id: Id25d124a3c1f70c6506ebe8a1af6a4bad55f2b7f Reviewed-on: http://gerrit.openafs.org/8625 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 636312c905f7cab469bdec656fa5ab19f71b394b Author: Jeffrey Altman Date: Sun May 6 09:54:55 2012 -0400 Windows: cm_SetServerBusyState use cm_ServerEqual When the busy state of a server is set it must apply to all server references if the server is multi-homed. Use cm_ServerEqual() to do so. Reviewed-on: http://gerrit.openafs.org/7355 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 345d643729ed588c4e49e69607bee5793809b01d) Change-Id: Ibd96cecce936353ef639de3f0dafb32abb7b29af Reviewed-on: http://gerrit.openafs.org/8624 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c568b57c96f31b36e30dc673bf11b032ad2d634a Author: Jeffrey Altman Date: Sat May 5 20:46:08 2012 -0400 Windows: Make CM resilient to transient VNOVOL The 1.6.0 and 1.6.1 file servers send transient VNOVOL errors which are no indicative of the volume not being present. For example, VNOVOL can be sent during a transition to a VBUSY state prior to salvaging or when cloning a .backup volume instance. As a result the cache manager must attempt at least one retry when a VNOVOL is receive but there are no changes to the volume location information. This patchset records the VNOVOL error in the cm_req_t structure If the volume is replicated, the volume's server reference into a busy state. If the volume is not replicated, the thread is paused for two seconds. In both cases, the request is retried. If the VNOVOL error is received a second time from the same server, the volume server reference is deleted as before. This is done to prevent repeated requests to the VLDB server and the file server that are expected to fail. The server reference will be restored to the volume on the next volume location update. Reviewed-on: http://gerrit.openafs.org/7353 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 1af906799b2de90d41139dadaf2dd654e4fd2df3) Change-Id: Ib8ce6dc389be92c00e9519efb253be0ca9cec05f Reviewed-on: http://gerrit.openafs.org/8623 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d2614e34652ef9e9ddaa4fc36fd905171e3f9993 Author: Jeffrey Altman Date: Mon Apr 30 06:18:58 2012 -0400 Windows: VNOSERVICE error translation Translate VNOSERVICE as CM_ERROR_RETRY and not CM_ERROR_OFFLINE. Reviewed-on: http://gerrit.openafs.org/7307 Tested-by: BuildBot Tested-by: Chas Williams - CONTRACTOR Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f70a12adef9a915ada728350e0b9e1e5104f7ea7) Change-Id: I3f01144863c25a2081f7ea2890299bb509a10a4a Reviewed-on: http://gerrit.openafs.org/8622 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e6843414c8ce74d721d9d79b1192cfbe36f617c1 Author: Jeffrey Altman Date: Mon Apr 30 06:18:06 2012 -0400 Windows: VNOSERVICE message text correct message text to indicate that an rpc has not been serviced. Reviewed-on: http://gerrit.openafs.org/7306 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c87fe04a61a97d61859684d53bb2d3ef7ee65da8) Change-Id: I71fdb47e2ff0f1632b6534f890eed185d8b32ea4 Reviewed-on: http://gerrit.openafs.org/8621 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 82ba50932198f4bc7b0770b062a25dd5c31b4bf7 Author: Jeffrey Altman Date: Sun Apr 29 10:37:35 2012 -0400 Windows: correct cm_Analyze log message A VNOSERVICE log message takes three parameters and not one. Use the correct log macro. Reviewed-on: http://gerrit.openafs.org/7293 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cf0d53b06a42a21238f13d65feb8e5ebf602da4d) Change-Id: I71851a8b82eb28be2338a127f777a3e432945a78 Reviewed-on: http://gerrit.openafs.org/8620 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c0968b334e5e157cb2a30ad476fcfc18b811a695 Author: Jeffrey Altman Date: Mon Apr 2 06:57:53 2012 -0400 Windows FindACLCache must hold scp write locked In the SMB modules, calls to cm_FindACLCache() were not holding the cm_scache_t rwlock writed locked as required. Reviewed-on: http://gerrit.openafs.org/7015 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0896602f6e7c409990fcae40dd54f84260312472) Change-Id: I29313f479ae2487a615b065d601ee5d0ef994ccf Reviewed-on: http://gerrit.openafs.org/8619 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 76db51bc79ee3ce2ae2078dfc5b17fb762b28385 Author: Jeffrey Altman Date: Sun Apr 1 12:40:36 2012 -0400 Windows: Freelance HaveAccessRights Change the test in cm_HaveAccessRights related to Freelance mode. All objects in the freelance cell and root volume by definition have access rights. Reviewed-on: http://gerrit.openafs.org/7008 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit b84496b8593dd9c220022c78d8b9b571c7b78e8d) Change-Id: I54f319d5f7f9111c25589204ffb01f682dc97ca9 Reviewed-on: http://gerrit.openafs.org/8618 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 836c696dc38adc0ec03fff638704ea00d5ffd0da Author: Jeffrey Altman Date: Sat Nov 24 19:47:01 2012 -0500 rx: RX_INVALID_OPERATION abort unknown service only Patchset 1fbe83f9aacfc36a9c426ba1fd18ad7c72869dc1 introduced the sending of RX_INVALID_OPERATION aborts for connection attempts requesting a service not offered by the rx peer. By sending aborts for all failures of rxi_FindConnection() the set of incoming packets that are responded to is broader than simply those with non-matching serviceIds. This patchset restricts the transmission of RX_INVALID_OPERATION aborts only to the explicit case in which rxi_FindConnection() attempted to find a service and either failed to find a match or couldn't apply the requested security class/level to that service. Reviewed-on: http://gerrit.openafs.org/8512 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 81212b18b3411b538c4a1bb94732948902005beb) Change-Id: Ic732c013d6f77df991e97de7f1c5af88a194e81c Reviewed-on: http://gerrit.openafs.org/8608 Tested-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 14657f6bacb3607dc20d1846202744d2f6e83daf Author: Andrew Deason Date: Fri Nov 16 14:18:32 2012 -0600 afs: Fix VLRU traversal sanity check On non-Linux, the number of vcaches in the VLRU can easily exceed afs_maxvcount, since we allocate new vcaches when we run out. So, assume we only have afs_vcount vcaches on the VLRU, instead of assuming we have at most afs_maxvcount vcaches. Reviewed-on: http://gerrit.openafs.org/8471 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit bc6dd95016c63d0742698d902aebf73c01162c24) Change-Id: Id4884e45a52813eb33926958b11148a021ca3057 Reviewed-on: http://gerrit.openafs.org/8606 Reviewed-by: Michael Meffie Reviewed-by: Paul Smeddle Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 0776f5dadd9ee38940ccaf1287342884e8b318c8 Author: Marc Dionne Date: Tue Aug 14 19:37:00 2012 -0400 Linux: include kthread.h before afs includes We need to include kthread.h before the afs standard includes to avoid clashing with the printf -> printk mapping. Reviewed-on: http://gerrit.openafs.org/7988 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8b6926e43f31a30a95e5883fd4b9e72924b3371d) Change-Id: I0dbb696e3af5172c9a72d183f2acd10107bedcf5 Reviewed-on: http://gerrit.openafs.org/8605 Reviewed-by: Paul Smeddle Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit cd91bbac7647f768107a2e5c9524d7df23f9cddc Author: Tom Keiser Date: Tue Apr 10 16:26:42 2012 -0400 libafs: use kthread_run when available Use the kthread_run interface on linux to create kernel threads. This interface allows all the cpus to schedule afsd threads, instead of just inheriting the cpu affinity of the main afsd thread. Written by Tom Keiser. Reviewed-on: http://gerrit.openafs.org/7915 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit b440d8ffcbb0ac58ecaa34a9c60fe27a0fc91026) Change-Id: Id05360309db01ac13b8d887b1ef19596ed86b63a Reviewed-on: http://gerrit.openafs.org/8604 Reviewed-by: Marc Dionne Reviewed-by: Michael Meffie Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 7a6bc371f1c91d89e33cfee9143f5a5a600458dd Author: Andrew Deason Date: Tue Nov 13 22:46:34 2012 -0600 rx: Generate BUSY packets for error call channels Currently, if a call is error'd out but still active, we won't generate BUSY packets if another call comes in on the same channel. This is because we bail out earlier, here, before we get to the BUSY processing. The comments suggest that this is for if we enter an error state while waiting for TQ to clear. So, only do this if our error has changed. Reviewed-on: http://gerrit.openafs.org/8460 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry-picked from commit a84c6b0ece1fdee4f462c6ce27fa78c2e0d419f4) Change-Id: I50fda40b3f010f1b9d03f2d3e22ed00381ae0b33 Reviewed-on: http://gerrit.openafs.org/8548 Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit e1baf1af4c43654adb37a1daf6710159ab060844 Author: Michael Meffie Date: Thu Nov 3 17:09:28 2011 -0400 vol: rate-limit volume usage updates Add threshold and time rate-limit parameters for volume usage updates to disk. This reduces the amount of i/o needed for volume usage statistics on very busy fileservers. Set the default to limit updates to one every 5 seconds per volume. Reviewed-on: http://gerrit.openafs.org/5803 Reviewed-by: Derrick Brashear Reviewed-by: Tom Keiser Tested-by: BuildBot (cherry picked from commit 639ca379e47fbe550d090fff9e635ad24e8e34f0) Change-Id: I29b8240515afe5585b3eef000dbf40110fd4620f Reviewed-on: http://gerrit.openafs.org/8582 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit f13eaa0172320387bfa12cca2c6c1abbc1ce72c4 Author: Michael Meffie Date: Thu Aug 30 11:48:34 2012 -0400 bozo: dont lie when binding to any address Do not log the bosserver listening to just the loopback when it is actaully listening on any address. The loopback address is still written to the bosserver.rxbind file in this case to give local scripts an simple way to contact the bosserver. Fixes the log message introduces in commit 9133aa6ed3a7fe2ae55b2d3242366ae277c7f726 Reviewed-on: http://gerrit.openafs.org/8022 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 03b87dffee1383c3cd5b1fed0ac3116fd8564187) Change-Id: I1646a1fd81440aa23589ab46108c71a67bf5f6ea Reviewed-on: http://gerrit.openafs.org/8584 Tested-by: BuildBot Reviewed-by: Ken Dreyer Tested-by: Ken Dreyer Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit b431a9a8c1b6c62206864352f3cde54efa517d5d Author: Michael Meffie Date: Wed Feb 29 11:08:10 2012 -0500 viced: fix log message in hpr initialize The wrong dir object is used to log an error in hpr initialize. Reviewed-on: http://gerrit.openafs.org/6845 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit fc1c58910c5991fa9d132d171d1d976dbfc44a95) Change-Id: I3defc0687184885488f612f913555fc2c9189fac Reviewed-on: http://gerrit.openafs.org/8585 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Ken Dreyer Tested-by: Ken Dreyer Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 68c8f304d05ab77571f3674e00392740fa66988c Author: Marc Dionne Date: Thu Nov 15 17:49:53 2012 -0500 Linux 3.7: remove use of param.h and ioctl.h Header files param.h and ioctl.h have moved as part of the userspace API restructuring of header files. Nothing in those files is currently needed by the source, so just drop the includes. Reviewed-on: http://gerrit.openafs.org/8469 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 007ec3e25e6920d7036f70550bc44adefab0c170) Change-Id: I7caa7ee8e5bfc918d7121a2f1d826102ee03976c Reviewed-on: http://gerrit.openafs.org/8556 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Paul Smeddle commit 058c412040dc0e477734c228088a9696fd927de0 Author: Marc Dionne Date: Wed Sep 5 20:25:55 2012 -0400 Linux: drop GLOCK before calling dput Holding the GLOCK when calling dput can result in a deadlock when the kernel calls back into afs_dentry_iput. It should be safe to drop the lock here. Reviewed-on: http://gerrit.openafs.org/8046 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0dac4de8eee84a43ef06c56dfc867c2a1b9a9f0c) Change-Id: Ide1dfc73ebc5fa207c19be1c16db9910cf66bea3 Reviewed-on: http://gerrit.openafs.org/8561 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit bbc6ee905850a8288e89b256ff432836388592cc Author: Marc Dionne Date: Thu Nov 15 20:58:03 2012 -0500 Linux 3.7: key instantiate API change Adapt to the new parameters for the instantiate key operation. Reviewed-on: http://gerrit.openafs.org/8470 Tested-by: BuildBot Reviewed-by: Hans-Werner Paulsen Reviewed-by: Derrick Brashear (cherry picked from commit aeb2763b741a218ad6fd93adc6157a6a31f27e13) Change-Id: I9ff22683aaf6e1002bdb2bc7666fbc0d8d597d20 Reviewed-on: http://gerrit.openafs.org/8560 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit c21fded67cf3f0c7d5305931ac45ae5ab5fa836a Author: Marc Dionne Date: Wed Nov 14 22:12:13 2012 -0500 Linux: change test for new putname API Replace the existing test with a more robust one that checks for the existence of the new filename structure. Since older kernels are expected to fail this test, we'll get the correct result even if there is unrelated failure, for instance a missing/different header file. Reviewed-on: http://gerrit.openafs.org/8466 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2bafb2f99d85804459acb8994d4057be809f8729) Change-Id: I88536425612e39b2f7d4d09c51ce896bc8cf6d4f Reviewed-on: http://gerrit.openafs.org/8559 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Hans-Werner Paulsen Tested-by: Hans-Werner Paulsen Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit d7926d1701e2f21a30ccee5775cd62bd51a0271d Author: Michael Meffie Date: Wed Aug 1 11:42:34 2012 -0400 bozo: avoid canceling the sigkill timer for hung processes A sigkill signal is sent to fileserver processes when a timeout is exceeded for shutting down processes for the fs/dafs bnode. (Currently 30 minutes for the fileserver, 1 minute for the other server processes.) If the bnode goal is set to run before this timeout expires, the timer is incorrectly stopped, and a wedged process is never killed. Fix this by not canceling the timer when a fs/dafs process has been signaled to shutdown, regardless of the current goal. Reviewed-on: http://gerrit.openafs.org/7920 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 09f5a1e6053e6db3df581543875512d8cff259ae) Change-Id: I0d5fabed13e597d2571033468688457c38b49283 Reviewed-on: http://gerrit.openafs.org/8583 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Paul Smeddle commit a77ef357cb34d6a67c8ae3a8016be3f34bb46b9d Author: Andrew Deason Date: Tue Nov 13 23:30:41 2012 -0600 rx: Lock call for KeepAliveOn/KeepAliveOff rxi_KeepAliveOn/Off expect the call lock to be held after the call has been initialized. So, hold it in the rx_KeepAliveOn/Off callers. Reviewed-on: http://gerrit.openafs.org/8463 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 866c05825c9964aa92740bcb0f20f26b451e65ea) Change-Id: I2df1937f4098dde59a7fed344e1c975fdf0cdf1b Reviewed-on: http://gerrit.openafs.org/8551 Reviewed-by: Ken Dreyer Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Paul Smeddle commit 0b3b4e5d0430f8e00825d1b4359d2995ce3a6214 Author: Andrew Deason Date: Tue Nov 13 18:27:11 2012 -0600 afs: Handle VNOSERVICE as a timeout For whatever reason, the fileserver uses VNOSERVICE to indicate that an Rx call was killed due to an idledead timeout. It is not used for any volume errors, so treat it like the idle dead error codes. Reviewed-on: http://gerrit.openafs.org/8462 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 22da9ec896f651f066317a85268620a7d3ac46fa) Change-Id: I58fc7aaba65683f987387ff406bd575018b46d6b Reviewed-on: http://gerrit.openafs.org/8550 Reviewed-by: Ken Dreyer Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit fa646213829e018e96f792960ce433293afd583c Author: Andrew Deason Date: Tue Nov 13 18:15:21 2012 -0600 afs: Slight restructuring in afs_Analyze We test for acode < 0 && acode != VRESTARTING, but then immediately test for specific values for acode. Move this conditional down, and remove a level of indentation for the next couple of acode checks. This commit should introduce no functional change. Reviewed-on: http://gerrit.openafs.org/8461 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit db57dfd3798f09e77b5c49bed304cacc0c448f91) Change-Id: Idd836a5acba775c82f360ea1082ba50cc32914af Reviewed-on: http://gerrit.openafs.org/8549 Tested-by: BuildBot Reviewed-by: Hans-Werner Paulsen Tested-by: Hans-Werner Paulsen Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Ken Dreyer Tested-by: Ken Dreyer Reviewed-by: Paul Smeddle commit 68c72b661f85a3562297cba42d2f599fc347207a Author: Andrew Deason Date: Tue Jul 31 14:40:41 2012 -0400 LINUX: Always hold afs_xuser for unixuser read We were failing to hold the afs_xuser lock when we entered our unixuser traversal for the first time (when the given position is 0). This means we can release the lock without acquiring it, causing all kinds of weird behavior. Just always grab afs_xuser on entry. We could possibly do some tricks to avoid grabbing this lock until after we've printed the column headers, but it does not seem worth it. Reviewed-on: http://gerrit.openafs.org/7916 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 351d3b8a19314027b30cdc499ef48c95ba7903b6) Change-Id: I75e137e588fcbf973a5d564db3a077c4ec4f50e1 Reviewed-on: http://gerrit.openafs.org/8547 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit a9b0f975f67a50f33fa45dd49d395e718129865e Author: Andrew Deason Date: Tue Oct 23 15:47:06 2012 -0500 ptserver: Avoid inet_ntoa The ptserver uses inet_ntoa in a few places, such as for calculating host CPS. This isn't safe in pthreaded environments, so use afs_inet_ntoa_r instead. Reviewed-on: http://gerrit.openafs.org/8287 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 527f2ba00c1247ae7e8d6f355572c8635331bc0c) Change-Id: I3740a294bd93b000842ccd791f2a11cef5092a9a Reviewed-on: http://gerrit.openafs.org/8546 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit 3ce1c5394fd96dde5cfb4ad16b90489324bf51a6 Author: Andrew Deason Date: Wed Oct 31 15:55:35 2012 -0500 afs: Never use GetNewDSlot after init Currently there are two ways to get a dcache via a slot number: afs_GetNewDSot and afs_GetValidDSlot. afs_GetValidDSlot assumes that the given slot number refers to a dcache entry that is valid on disk; with afs_GetNewDSlot, the given slot may not be valid, and if it is not, an empty 'template' dcache is returned. afs_GetNewDSlot is useful for initializing cache files, since if a given dcache slot exists on disk and contains valid data, we use the dcache like normal. If it does not already exist or does not contain valid data, we fill in the missing data after afs_GetNewDSlot returns. However, for all other uses, afs_GetNewDSlot is incorrect, and causes various serious problems. After we have initialized our dcache entries, any attempt to read a dcache by slot number should succeed, since the number of dcache entries never changes after we are started, and we initialized all of them during client startup. Some code outside of afs_InitCacheFile was still using afs_GetNewDSlot; code that reads in a dslot from the free or discard list. In these cases, if there is any error reading the dcache slot from disk, we will be given a dcache that has some of its fields not filled in properly. Notably, we assume that the entry is not on the global hash table (we set tdc->f.fid.Fid.Volume to 0), and the tdc->f.inode field is not initialized at all, leaving it set to whatever was in memory for that tdc before we tried to read the slot from disk. This can cause cache corruption, since tdc->f.inode can point to the inoder for a different existing cache file, so writing to that dcache modifies the data for another cached file. To avoid this, modify the non-afs_InitCacheFile callers of afs_GetNewDSlot to avoid afs_GetNewDSlot. Since these callers read from the free/discard list, the contents of the dcache entries are not valid (the cell, volume, dv, etc are not valid), though they must exist on disk (we have a valid inode number for them). So, create a new function, afs_GetUnusedDSlot, to get a dcache that must exist on disk, but does not represent any valid data. Use this for callers that must get a dslot from the free/discard list. Add some comments to try and help explain what is going on. Reviewed-on: http://gerrit.openafs.org/8370 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 20b0c65a289e2b55fb6922c8f60e873f1f4c6f97) Change-Id: I0ed66c155ea5574fd88c288bdf9feb98161e5c45 Reviewed-on: http://gerrit.openafs.org/8545 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit 972cedc2e745f9be0e199183f692d91e17100d8a Author: Andrew Deason Date: Wed Oct 31 15:02:09 2012 -0500 afs: Log slot for GetDSlot read errors When we log that a disk read error occurred during GetDSlot, log which slot we were trying to read for convenience. Reviewed-on: http://gerrit.openafs.org/8368 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit b5d9e29e89c2a63c857c47f1fb9accae90b0a3aa) Change-Id: I0d5fffd3ef3af5d788db082e10c401afc0dd440a Reviewed-on: http://gerrit.openafs.org/8544 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit 94e3c06e46fc9cd3f4e68dac6d0a1797bf728fd2 Author: Andrew Deason Date: Wed Nov 21 10:39:51 2012 -0600 LINUX: Dir follow_link should set LAST_BIND For our faux-symlink directory follow_link operation, we leave the given nameidata struct with an invalid 'last' component. That is, nd->last is not changed or set to anything meaningful. Usually the callers of our follow_link op do not care about the last component of the nameidata. However, at least one caller does: the caller near the do_link label in open_namei(). This is called during processing for O_CREAT operations on symlinks, and since our directories look like symlinks, it gets called. It tries to use nd->last to look up the last component of the dereferenced path (so it can try to create it, as necessary), but since our nd->last is not set, this will not work. Specifically, our nd->last.name is not pointing into the names cache, so the subsequent putname/__putname on it will corrupt the names cache. However, even if this were not a problem, the actual contents of the last component do not seem meaningful so this would probably result in incorrect behavior anyway. To avoid all of this, set nd->last_type to LAST_BIND, so any callers know that the last component of the given nd is not valid, and we are pointing directly to the target component with a dentry. Reviewed-on: http://gerrit.openafs.org/8489 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit bd57c7d64844ca26d80f2b29db470dacd134fc56) Change-Id: I4defb55064a4452e437b8a6c3e600887b4749fff Reviewed-on: http://gerrit.openafs.org/8543 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit ed8af9f7d05c641716e7e281d0c00d06b22b3d27 Author: Andrew Deason Date: Wed Nov 14 18:29:35 2012 -0600 afs: Do not skip flushing pages for dv-0 files If the dv for a file is 0, we know the file is empty. Currently we skip flushing pages for such files, presumably the idea being there is no data in the file, so there should be no pages to flush. However, Linux seems to keep empty pages around for empty files. So, a future read can result in the application reading a page full of zeroes, unless we flush the page here. While this has only been found to happen on Linux 2.6.22 and later (and distribution-specific backports, like RHEL 2.6.18-128), other platforms could in theory also choose to do this. It would be difficult to find out when another platform started to behave like this, so just remove this skip for everyone so we never have to deal with this again. Replace this code with a comment with a quick explanation, in case anyone tries to add a similar optimization here in the future. Thanks to Richard Brittain. Reviewed-on: http://gerrit.openafs.org/8465 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ad4e634051e18fa5bd07016b6405e53e236c2f45) Change-Id: I76aed81e0d8acdbf13bc952ac8557b051d2869bf Reviewed-on: http://gerrit.openafs.org/8484 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit b2d17370ab68d818bdc8d04cb6d752c1be55f207 Author: Jeffrey Altman Date: Tue Nov 27 00:16:58 2012 -0500 Windows: cm_LookupInternal obtain type of target cm_LookupInternal needs to return the target of a mount point if the matching directory entry is a mount point. Therefore, if the target type is unknown the status information must be queried. Reviewed-on: http://gerrit.openafs.org/8528 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9ed02a628afd700a0e3c47ac92fa9c89d0827301) Change-Id: I02d09772df1ef32800736fd798f2f5f4b2997a86 Reviewed-on: http://gerrit.openafs.org/8532 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7472866c71fddd7f7954b683b2b147bfd671cf7f Author: Michael Meffie Date: Tue Oct 30 10:22:40 2012 -0400 vol: allow non-dafs volume utils to attach with V_READONLY again Allow non-fileserver, non-dafs, programs to attach volumes with the V_READONLY mode again. This was lost during the code changes for dafs. The caller sends a fssync request to the fileserver, which updates the on-disk contents of the volume headers, before the caller reads the volume headers, allowing the caller to have the most recent info about the volume. The fileserver still has the volume in use. Later in the attachment process, the inUse check is skipped for the case of a non-fileserver process which is attaching the volume using the V_READONLY mode, otherwise the attachment would incorrectly mark the volume as needing to be salvaged. Note: The mode checks in VMustCheckOutVolume() are correct. We must checkout the volume when attaching with the V_READONLY mode. This fix updates the VShouldCheckInUse(), in which an additional exception was added to cover the case for V_READONLY mode from a non- fileserver process. Note: A check is added in the dafs version of attach to avoid overwriting the inUse field when a volume utility is attaching a volume in V_READONLY mode. Currently, V_READONLY is not used by dafs, but this was done to avoid future errors. Reviewed-on: http://gerrit.openafs.org/8339 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 0eaa0d1baa8b8fe115301f188ce32176acc7b065) Change-Id: I584027e2104fd4928b16b591a2ab9e2613e49ec7 Reviewed-on: http://gerrit.openafs.org/8458 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason commit aecc87faf7f0975197abaf0b015a6b74a2ba95a1 Author: Michael Meffie Date: Tue Oct 30 10:41:12 2012 -0400 fix stale volume info from vos examine (non-dafs) A volume examine on a non-dafs volume server/fileserver can show old information, including old volume update time, for up to about 20 minutes. The non-dafs volume server reads the volume information from the volume headers, which are updated by the fileserver only periodically to avoid excessive i/o. Before dafs, when the volume server performed a volume examine, the volume server would send a fssync command to the fileserver with the request FSYNC_NEEDVOLUME and mode V_READONLY. The fileserver writes the current memory contents to disk on this fssync command. The volume server would then attach the volume, reading the current volume data. The dafs volume/fileserver avoids this extra i/o by using a new set of fssync commands to retrieve the volume information from the fileserver. However, the non-dafs volume server does not use the new fssync commands and reads the volume headers from disk. Revert the volume attachment processing for the non-dafs volume server to request the volume with the V_READONLY mode. This causes the fileserver to update the volume headers, allowing the volume server to read the up to date volume header data. Sadly, this adds another dafs ifdef to the already twisty maze of passages that all look alike. This changes the volserver to use the V_READONLY attachment mode only for the case of getting a single volume, as that what was done in 1.4.x. Reviewed-on: http://gerrit.openafs.org/8327 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit bcb077a00fb575e7beb92739646054ea67ca0b79) Change-Id: I5b5982efd5ee3aea13515add83b71d424dbd3a60 Reviewed-on: http://gerrit.openafs.org/8459 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Andrew Deason commit 85794b6561b132477aa74134ccce58c6eaa27f70 Author: Ben Kaduk Date: Wed Nov 7 10:08:33 2012 -0500 Catch up to FreeBSD non-MPSAFE deorbit All filesystems must have their own locking now. We have been MPSAFE for quite some time, but the preprocessor macro "MPSAFE" has been removed and we must catch up in order to compile. The MNTK_MPSAFE macro has not yet been removed, but it is toothless now, so we can preemptively stop using it. Reviewed-on: http://gerrit.openafs.org/8366 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f749f17fe1a2bc56a8129f5579e5cf5009f12d95) Change-Id: I35ad1c63bf3b1c91035bcdd29d7cfcb5603dfd12 Reviewed-on: http://gerrit.openafs.org/8374 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 90a29d82443ed2d5d95e22a8c6ba3bab2e73229a Author: Garrett Wollman Date: Fri Aug 12 00:39:54 2011 -0400 FBSD: coalesce three assignments to the same variable Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5233 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e3148c6bfad25fdcb86b7248bd6b05432502d4ce) Change-Id: I549bbeb4397d357257497179cd459f6034f93113 Reviewed-on: http://gerrit.openafs.org/8373 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 21ae26a93d0b9a3cd81c1b13af8bd3f82ae0d0cc Author: Jeffrey Altman Date: Fri Jul 20 10:20:02 2012 -0400 rx: fix abort on missing service patchset 1fbe83f9aacfc36a9c426ba1fd18ad7c72869dc1 introduced the possibility that a NULL connection pointer could be dereferenced. Prevent it. Reviewed-on: http://gerrit.openafs.org/7794 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 3ec1bdf9c74bd250d49065fa84475a5123461744) Change-Id: I1e01005a34e5d373b6810052d94fac8d96f40e4f Reviewed-on: http://gerrit.openafs.org/8371 Reviewed-by: Jeffrey Altman Tested-by: BuildBot commit 598e58ba6f2fe485a55233ec78811553f7dca5fe Author: Derrick Brashear Date: Thu Nov 1 14:15:27 2012 -0400 configure: check for poll() if we have code which uses HAVE_POLL, check for poll(). Reviewed-on: http://gerrit.openafs.org/8357 Reviewed-by: Chaskiel Grundman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7fe30bd28e62ad0ed717c24e8eccf5e563b9cd68) Change-Id: I99a25d20d0d98e516d72f885feef2a4d15ca01fb Reviewed-on: http://gerrit.openafs.org/8367 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit a73795479fb5d413f8766aede662d021df0848dd Author: Ben Kaduk Date: Thu Sep 13 17:28:17 2012 -0400 FreeBSD major version numbers are multi-character Do not assume that there is only a single character before the dot. Reviewed-on: http://gerrit.openafs.org/8106 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c4c51444ebd35fe0ceccde23512707ae693210ee) Change-Id: I4b9016af301c4e9393e87fa59d6fa9d19dcd9843 Reviewed-on: http://gerrit.openafs.org/8342 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 2a478d422fc3d0c0ee047702682bad6ce2bcf028 Author: Ben Kaduk Date: Wed Jun 27 22:04:24 2012 -0400 Patch up FreeBSD-10 support The auto-guessing code for sysnames produces *_fbsd_100, so we can't just claim that we'll be *_fbsd_1000 for kicks. Revert back to the old behavior so as to be less disruptive. Reviewed-on: http://gerrit.openafs.org/7595 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 44ca4aa90ef101fb13b3b5327ca19381b5464fb3) Change-Id: I302b9f36913b6cd86f65b7263c85d91745330ae6 Reviewed-on: http://gerrit.openafs.org/8341 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit b395e5183d124725ef614669f69ac739a863fa35 Author: Ben Kaduk Date: Fri Jun 22 21:33:50 2012 -0400 Catch up on fbsd releases Pull in the changes needed to even have a chance at supporting FreeBSD 8.3, 8.4, 9-stable, and 10-current. Conditionals for changed interfaces in a follow-up commit. Reviewed-on: http://gerrit.openafs.org/7581 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 58e7d52d0066a9f237971f39e7acdde02761172a) [Edited param.*.h files to add AFS_64BIT_ENV for 1.6.x] Change-Id: I3218a84a024011af573d64821a2599b1330b3f71 Reviewed-on: http://gerrit.openafs.org/8340 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit ca94c83c4a7b9c4482635cf49253b56255c95bf7 Author: Marc Dionne Date: Sat Oct 20 17:59:01 2012 +0100 Linux: Rework handling of names in the lookup functions Rework the name lookup functions in the kernel to deal more cleanly with the change of API for kernel 3.7 Reviewed-on: http://gerrit.openafs.org/8278 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit eca04c7e52d1e777cde423cdf673d7bf579c342b) Change-Id: I967c80fac754fbee1836b84dfb50dd5fdcba35f0 Reviewed-on: http://gerrit.openafs.org/8338 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cf3325236c785ec1c0212376b90479908feaf05a Author: Marc Dionne Date: Fri Oct 19 18:31:53 2012 +0100 Linux: fix afs_putname wrapper for pre-3.7 kernels Make the compatibility function use the right type for pre-3.7 kernels. Reviewed-on: http://gerrit.openafs.org/8276 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 115850076c09625e37d75da6dc29a68b0a2d638e) Change-Id: I820340058a6cdecbd438fdc13ed3d54a439340e0 Reviewed-on: http://gerrit.openafs.org/8337 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5aae6e0c183cf6dccf7dcf6511217b300d0f3767 Author: Marc Dionne Date: Mon Oct 15 12:26:09 2012 -0400 Linux 3.7: putname is no longer exported putname is unexported in kernel 3.7. Add a compatibility inline afs_putname function and open code it if necessary. Reviewed-on: http://gerrit.openafs.org/8237 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fa3116567e2998af73eb116751032713850c9459) Change-Id: Icf0e249f87bfe80a262e5599ab9958355ed9a90f Reviewed-on: http://gerrit.openafs.org/8336 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4c4075ade0d46087638bd8cc96aa9fac005e62f3 Author: Andrew Deason Date: Thu May 5 11:37:12 2011 -0500 libafs: Correct afs_LoopServers flags AFS_LS_DOWN was actually checking up servers, and AFS_LS_UP was checking down servers. Fix the handling of the 'adown' flag so we do the right thing. 1.6-only: Note that this does not contain the change to afs_FlushVCBs, since 1.6 does not contain change cee2c677, which introduced the relevant afs_FlushVCBs afs_LoopServers call. Reviewed-on: http://gerrit.openafs.org/4624 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 1f48bc7a30d5df88a1e5f539ee22df3952533a88) Change-Id: Ibf56812134800a047642455a528dae488c52bcf9 Reviewed-on: http://gerrit.openafs.org/8309 Tested-by: BuildBot Reviewed-by: Andrew Deason commit 2aab481dfa6416ff562d1a78e4cffda3acf1ec93 Author: Marc Dionne Date: Fri Oct 12 16:31:24 2012 -0400 libafs: Fix second pass in ShakeLooseVCaches Commit 3105c7ff introduced a two phase process for reclaiming vcache entries. First go through the list and do what's possible without sleeping (skipping aliased dentries on Linux), then do a second pass only if necessary, allowing sleeping. Unfortunately the test for the end of the VLRU scan is incorrect and can never trigger, so this second pass was effectively disabled and any code that is conditional on defersleep=1 was never exercised. The code to start the second scan also has issues. Fix the end of VLRU test, and also correctly set the variables needed to restart the scan. Change-Id: I8034cd3b79aab4f2976ab2559c13c102126480d7 Reviewed-on: http://gerrit.openafs.org/8234 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a7828d50a82384e6d0fb0ad5b5a702f768029581) Reviewed-on: http://gerrit.openafs.org/8247 commit 0506af9c058e22e3475f7e152c022571c0823253 Author: Marc Dionne Date: Fri Oct 12 16:25:43 2012 -0400 Linux: osi_vcache: Fix loop for the hlist case An hlist is not circular, and the end is marked by a NULL next pointer. Reviewed-on: http://gerrit.openafs.org/8233 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 78ae01fb9837d79e7bbdb2918872ab106d4c7e98) Change-Id: I7e4e3ed2515dd8c2ec765d8acbb97eba189d6aeb Reviewed-on: http://gerrit.openafs.org/8239 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 780e4c462bf35dfbcfc3d3c002568e425272e2ee Author: Derrick Brashear Date: Tue Sep 18 14:46:37 2012 -0400 libuafs: enable 64 bit mode on linux already safe and being used on other platforms; might as well here too. Reviewed-on: http://gerrit.openafs.org/8139 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 71a5f2965d6a6ff3113e7d2f9cab7d687b502793) Change-Id: I61673c179617377020aa95aa8d8d659f240f04e7 Reviewed-on: http://gerrit.openafs.org/8238 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4c24ac8f8a4e3939cbc5b5f6d5fb5032fdba50d9 Author: Michael Meffie Date: Sat Jul 28 13:17:55 2012 -0400 vlserver: use the logging function to log Use the logging function to log instead of printf. Change-Id: I377474881830152c93122bd3112e355ab5fd56ad Reviewed-on: http://gerrit.openafs.org/7895 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit beb8f07496f59a19621bb0db14b401107888de35) Change-Id: I246610abc3a6c2e164e0f368bc75a671f5f52e4d Reviewed-on: http://gerrit.openafs.org/8208 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0720095b09db766ef24cad9a74298a088c9defcc Author: Michael Meffie Date: Wed Jul 4 17:54:02 2012 -0400 vlserver: fix logging of ip addresses Remove the spurious dates surrounding IP addresess in the VLLog. Instead of multiple calls to the logging function for a given log line, format a string containing the addresses and call the log function once. Changes the log output from, ... The following fileserver is being registered in the VLDB: ... [Tue Jul 4 14:11:43 2012 192.168.10.128Tue Jul 4 14:11:43 2012 ] ... It will create a new entry in the VLDB. to, ... The following fileserver is being registered in the VLDB: ... [192.168.10.128] ... It will create a new entry in the VLDB. Reviewed-on: http://gerrit.openafs.org/7750 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 65a5e3ce92c47a87c3dca54cec456ae0337c78ef) Change-Id: I106556cda1046e6e8c971787ed8d056da70b77b9 Reviewed-on: http://gerrit.openafs.org/8207 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4071a3ec0ee21f16d3427b2233f010cbb768fb7f Author: Michael Meffie Date: Wed Aug 15 17:19:07 2012 -0400 vldb_check: fix cross-linked mh entries When run with -fix, consolidate server numbers in vl entries which point to the same multi-homed entry. Use the lowest server number from the set of server numbers which point to the same multi-homed entry. Remove unreferenced address entries which are duplicate multi-homed indexes. Two passes of vldb_check -fix may be required; first to fix the vl entry server numbers; then to remove the duplicate address entries. Reviewed-on: http://gerrit.openafs.org/7999 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 911f751d1edfb18ddd5f6a699746ba14730d553d) Change-Id: Iec977e25344ce1d5f93e3f107cc1b7ebc81d2c26 Reviewed-on: http://gerrit.openafs.org/8212 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit aa10a191f85c003614da615c4dd23db991f7ff13 Author: Michael Meffie Date: Thu Jun 28 17:12:24 2012 -0400 vldb_check: remove unreferenced mh entries with -fix When running vldb_check with -fix, clear any mh extent entries which are set but are not referenced by an address entry in the IpMappedAddr table. These unreferenced entries already generated a warning. This commit adds the feature to clear the unreferenced mh entries using vldb_check -fix option. Reviewed-on: http://gerrit.openafs.org/7616 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fdd3b0fb1f8e6948c651d7f1822d17a78668e5ff) Change-Id: I79c79b3499fce448ebf662246de9f623b1565995 Reviewed-on: http://gerrit.openafs.org/8211 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c84b0c197825d69ab9602e23121763b2ab80972f Author: Michael Meffie Date: Fri Jun 29 18:10:31 2012 -0400 vldb_check: warn about cross-linked mh entries Warn if an mh extent entry is referenced by more than one server number in the IpMappedAddr table. The serveraddr table is used to determine which server numbers have IP addresses. If, for some reason, multiple server numbers reference the same mh entry, currently, the correct serveraddr value is calculated only for the lowest server number in the set of server numbers which reference the same mh entry. Handle this case, and warn about the duplicated values in the IpMappedAddr table. Warn about IpMappedAddr entries which reference non-existent mh blocks. Reviewed-on: http://gerrit.openafs.org/7615 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 08e803bce3375bb69a01715b026d844b7a8e0ab3) Change-Id: I1d2a2d09ed468a247b4da6c07b5ecb4224a80c05 Reviewed-on: http://gerrit.openafs.org/8210 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2d750f7dce2d8be405a3bdff97f3f3f28fcac73b Author: Michael Meffie Date: Tue Jun 26 15:09:07 2012 -0400 vldb_check: off by one host address table error Fix several off-by-one errors when traversing the IpMappedAddr table in vldb_check. The last index (254) was not checked in several places. Reviewed-on: http://gerrit.openafs.org/7614 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a27a8a66c2c27a62afa566679ef9cf424e758d9f) Change-Id: I5fd5b452cafe641765247bdf11ef1a1b08cc1529 Reviewed-on: http://gerrit.openafs.org/8209 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9eb532ff9cc029533089a79473d3e154b28a7ea9 Author: Mark Vitale Date: Mon Aug 27 15:11:32 2012 -0400 vos: convertROtoRW - prevent VLDB corruption vos convertROtoRW incorrectly marks the first VLDB entry as the new RW if the converted RO is not in the VLDB. Correct this by creating a new valid RW site in the VLDB entry. Change-Id: I683ac10db90c2c41717c11c0d86eadc81a935e52 Reviewed-on: http://gerrit.openafs.org/8037 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f258e7dddeb4331d2cf4649541c1a3adfa7a416a) Reviewed-on: http://gerrit.openafs.org/8216 Reviewed-by: Derrick Brashear commit 38ad78ae0d8f014295bb1256bb3c10ed7936537e Author: Mark Vitale Date: Tue Sep 4 09:06:44 2012 -0400 vos: convertROtoRW incorrect warning when RO not in VLDB vos convertROtoRW will issue an incorrect warning about a partition mismatch if the RO to convert is not in the VLDB. Only check the partition if the RO is in the VLDB. Change-Id: Ib2726bc5bf6697898ad26dc1d817143da3286ba3 Reviewed-on: http://gerrit.openafs.org/8036 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit b650106e301ecefe2f5c8f4a34081af1f5f74901) Reviewed-on: http://gerrit.openafs.org/8215 Reviewed-by: Derrick Brashear commit a8ea5b8f74b14ab3f1a16a50e7d8d077b5115e10 Author: Mark Vitale Date: Mon Aug 20 17:39:06 2012 -0400 vos: convertROtoRW susceptible to VLDB changes during override prompt vos convertROtoRW obtains a VLDB entry, then peforms some setup logic (including a possible user prompt) before obtaining a volume lock. This exposes the code to possible time-of-check/time-of-use issues. After obtaining the volume lock, get a second copy of the VLDB entry and compare it to the first copy; if it has changed, fail the conversion with an error message asking the user to re-issue the vos convertROtoRW command. Change-Id: I9c1a634cea2e22188869d54b00b7831aed12b1cd Reviewed-on: http://gerrit.openafs.org/8008 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3c489db55811dfe3fdf5e555bf229989e5b58aa6) Reviewed-on: http://gerrit.openafs.org/8214 Reviewed-by: Derrick Brashear commit 361d391af98abb2517b73a2b040d5fc8995c3713 Author: Mark Vitale Date: Thu Aug 2 18:37:05 2012 -0400 vos: convertROtoRW may create 2nd RW on a fileserver If an RW is already present on disk on the target server (any partition), 'vos convertROtoRW' will still convert the RO, creating a second RW on the server. Detect this and refuse to convert the RO by returning EXDEV (invalid cross-device link). Change-Id: Ide15a7c39f2a975fd8597e497094b6a67b448e4f Reviewed-on: http://gerrit.openafs.org/7934 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0c77c0acabe0a0588ab0a9efab0124ee1e15ef6a) Reviewed-on: http://gerrit.openafs.org/8213 Reviewed-by: Derrick Brashear commit 097ec223d3f2dc9d345cdbce24967de4b0c92204 Author: Andrew Deason Date: Tue Sep 25 11:16:35 2012 -0500 RedHat: Avoid the DKMS escaping silliness Depending on the version of DKMS, the current MAKE[0] variable in the dkms.conf needs different numbers of backslashes. Commit 81a9a33e tried to address this by changing the contents of dkms.conf depending on whether or not we were on Fedora. However, the change occurred in DKMS 2.2, so if someone running RHEL tries to use a newer DKMS, this will fail. So instead of trying to guess at the level of escaping we need, just avoid needing to escape anything with backslashes. We can quote the heredoc marker to avoid variable expansion inside the heredoc, we can use a case statement instead of using backticks and local variables and such, and we can use single quotes for the outer MAKE assignment. With this, we should not need any backslashes when writing dkms.conf, so we should work with any DKMS version. Reviewed-on: http://gerrit.openafs.org/8156 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 72f1f345ece09b1fbd113af17c9e8e25ec9dffa5) Change-Id: Icbaa1fde7ea222b639a7e5a740f6b18a4a87c74a Reviewed-on: http://gerrit.openafs.org/8172 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 2e7f249e3fa165874a449d9deeb8515481e7375b Author: Andrew Deason Date: Tue Aug 21 17:03:30 2012 -0500 LINUX: Avoid symlink-y resolution limits Implementing the d_automount or follow_link function pointers for our directories means that we can hit symlink resolution limits during lookup, since we look like a "symlink". We can hit these limits pretty easily if there are just too many directories in the lookup path. Our pseudo-symlink directories cannot contribute to an infinite resolution loop, since our destination is always an actual directory, not a symlink that will result in more redirection. So, decrement the total_link_count counter when our d_automount or follow_link code is reached, so we do not contribute to hitting the max resolution limit. Note that this is not related to recursive symlink lookup (link_count) but only to the iterative symlink limit (total_link_count). Our lookups are not recursive here, and we are not causing more recursive lookups like a normal text-based symlink would do. Reviewed-on: http://gerrit.openafs.org/8009 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 238b88624a8fef39557d397cc336c88bd8efc5b1) Change-Id: Iec6e3fac25ab86ef5f10f359344908398bef8828 Reviewed-on: http://gerrit.openafs.org/8194 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6c22f2e1de91fa3080221df22fdcd05064b57307 Author: Marc Dionne Date: Tue Aug 14 18:26:24 2012 -0400 Linux 3.6: lookup inode operation API change The nameidata argument is replaced with an unsigned int flags argument. Reviewed-on: http://gerrit.openafs.org/7987 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ec48dca871ef98adb69792a34047c6be5818f1b2) Change-Id: Ic8be26141ede6e1c4062872c79a846efb0045bda Reviewed-on: http://gerrit.openafs.org/8084 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4ab59d7ee924a6be1d553f75a67b0b253cc85e88 Author: Marc Dionne Date: Tue Aug 14 18:08:51 2012 -0400 Linux 3.6: revalidate dentry op API change The nameidata argument is dropped, replaced by an unsigned flags value. The configure test is very specific; kernels with the older API with a signed int flags value should fall through. Reviewed-on: http://gerrit.openafs.org/7986 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7413cd09a53f89882a46fd100bf6c501348f2188) Change-Id: Ie68d70dcf414d24e7e980c8a8f35b83550d2da7c Reviewed-on: http://gerrit.openafs.org/8083 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5210d97865d974d5e14f68eec6a58b292d6b7893 Author: Marc Dionne Date: Tue Aug 14 17:28:50 2012 -0400 Linux 3.6: create inode operation API change The nameidata argument is dropped and a flag is added. Reviewed-on: http://gerrit.openafs.org/7985 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 020e32779c103817ca89caa51259fb53bc3dde79) Change-Id: Iae2a0301a1c4acb6835eb0bdca6ae22b143b2cda Reviewed-on: http://gerrit.openafs.org/8082 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Derrick Brashear commit aecd183acb34a0a9b850fb69eed472d2c9a27612 Author: Marc Dionne Date: Tue Aug 14 17:11:08 2012 -0400 Linux: fix variable used to test for the iop create API Use correct variable when testing for the create API to use. This is just for looks - there is no effect since mkdir and create were changed in the same kernel release. Reviewed-on: http://gerrit.openafs.org/7984 Reviewed-by: Alistair Ferguson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c633a92a1bc7881f18ee641082ff2efe7da1a8cb) Change-Id: Ib23fe9a34bc07227614c149b0f16d3b0a067501b Reviewed-on: http://gerrit.openafs.org/8081 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b5a66fb391b47848f023042e96c87a1b7d49b888 Author: Marc Dionne Date: Mon Aug 13 21:55:25 2012 -0400 Linux 3.6: d_alias and i_dentry are now hlists The d_alias pointer is now the head of an hlist. This means the iterator is a different macro and has no "reverse" version since hlists have no direct pointer to the list tail. inode->i_dentry gets the same treatment. Adjust where we use it. Reviewed-on: http://gerrit.openafs.org/7983 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6bea047fb404bde828c6358ae06f7941aa2bc959) Change-Id: I7e7b87e5f5c240f3f0ff25fa723c857ab9d0108c Reviewed-on: http://gerrit.openafs.org/8080 Reviewed-by: Derrick Brashear Reviewed-by: Ken Dreyer Tested-by: BuildBot commit 1bba9760b26bdb1ef1e17f9d1e15be9d565828cc Author: Marc Dionne Date: Mon Aug 13 21:36:15 2012 -0400 Linux 3.6: dentry_open API change dentry_open now takes a path argument that combines the dentry and the vfsmount pointers. Add a configure test and a new compat inline function to keep things cleaner in the main source file. Reviewed-on: http://gerrit.openafs.org/7982 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8766a65e97eb90cb6c97ccd35181c441ece14f8a) Change-Id: I2c0f59ad9aa6e544a2a613e902933d463f22a5b6 Reviewed-on: http://gerrit.openafs.org/8079 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 76ab286feb1570efa9763e076020fc43fb0a95fa Author: Marc Dionne Date: Tue Aug 14 16:34:42 2012 -0400 Linux 3.6: kmap_atomic API change kmap_atomic no longer requires a KM_TYPE argument. Test for this and adjust the affected code. Reviewed-on: http://gerrit.openafs.org/7981 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 049c485b4a39ba510035788b4959d839ef668c55) Change-Id: Iac8be7901da4b277864b1b6cc987cf5087992789 Reviewed-on: http://gerrit.openafs.org/8078 Reviewed-by: Derrick Brashear Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Ken Dreyer Tested-by: BuildBot commit 54db9af1a87c03d6f00ab70565c9d1f733813fc2 Author: Marc Dionne Date: Mon Aug 13 20:32:08 2012 -0400 Linux: bypass: consolidate copy_page macros into a single function The copy_page(s) macros are very similar; combine them into a single function that can be used for all cases. This will make it easier to add some pre-processor logic around the kmap_atomic calls to adapt to Linux API changes. Reviewed-on: http://gerrit.openafs.org/7980 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0a8256a26fafb490b454f2a857b0c15d859572c5) Change-Id: I6835a024428b26a8cd8d073f6304d0d0b3042b24 Reviewed-on: http://gerrit.openafs.org/8077 Reviewed-by: Derrick Brashear Reviewed-by: Ken Dreyer Tested-by: BuildBot commit 191df3d05770781d4a47ff210f9adf2712f8be07 Author: Derrick Brashear Date: Wed Sep 12 07:25:12 2012 -0400 1.6: fix warnings 1.6 only. fix warnings which do not exist on master Change-Id: I33927d1f3f3a45c26991bb9a60eb80bd0e6a9178 Reviewed-on: http://gerrit.openafs.org/8105 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5842f856652051a4386b1e0170f18dca911ca4c6 Author: Marc Dionne Date: Sat Jun 2 20:45:08 2012 -0400 afsd: include sys/resource.h in afsd_kernel.c With a recent glibc update, sys/wait.h no longer includes sys/resource.h unless __USE_SVID, __USE_XOPEN or __USE_XOPEN2K8 are set. Don't rely on the indirect inclusion to get the bits we need; include it directly in afsd_kernel.c. This include used to be there but was dropped when afsd_kernel.c was split off. Reviewed-on: http://gerrit.openafs.org/7522 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit bc3a32a84facb8114a8c7de87025f972d0281098) Change-Id: Ia5ba6a0e662607e680b4431f146c969b7069bcfd Reviewed-on: http://gerrit.openafs.org/8155 Reviewed-by: Ken Dreyer Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4e4801972798645ffd042b195cb4d489054b4990 Author: Marc Dionne Date: Tue Sep 11 16:39:55 2012 -0400 tptserver: Disable strict-aliasing warnings Disable the strict-aliasing warnings for a few files that have supergroups related code. This was already done in ptserver but not in tptserver. Change-Id: I8b3c8b5f5b19fd47fed949e7b2568678a5ffffd4 Reviewed-on: http://gerrit.openafs.org/8096 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit f86a38eb0b53297475152b9007c79498d3c8513a Author: Michael Meffie Date: Fri Aug 12 08:25:30 2011 -0400 volser: log host address of caller in extra logging When the volserver is running with extra logging (-log), log the address of the host running vos in addition to the user name. Change-Id: I040be71a84dede255e43c30dd7d8ae56f767f721 Reviewed-on: http://gerrit.openafs.org/5234 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit cbdca2996af06c57cb3ba953c1efb9e316d18f27) Reviewed-on: http://gerrit.openafs.org/8066 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 56f4e2da649b208296fb136ba7a22f5d03b5d7f1 Author: Michael Meffie Date: Thu Aug 2 17:24:02 2012 -0400 libafs: revert init req to use the real uid The commit to use wrappers for creditial structure access inadvertently changed the user id to be the effective uid instead of the real uid, when no PAG is present, on linux. Revert this so setuid programs continue to work. See commit eb8e55bba7740a87e07ef07bb4b789e6d4e36f0d Change-Id: I5d42b8caf90a042192ed39f26e55d70c9531f2e9 Reviewed-on: http://gerrit.openafs.org/7931 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1a1e87dcdf972519cd21970f7c78709e40f8e1e9) Reviewed-on: http://gerrit.openafs.org/7990 commit b623d13f0f95084a0502af2cd2ee1849f8f80654 Author: Andrew Deason Date: Thu Mar 22 10:42:38 2012 -0500 afs: Set DWriting when truncating a dcache entry When we truncate a file, we truncate the contents of the relevant dcache entry chunks, and prevent future FetchData operations from fetching data beyond the truncation offset. If we never write anything to that chunk, we never set DWriting, and so on disk it looks like that dcache entry has valid data for the specified DV. However, since the data is truncated, this is not true. If a process holds a file open, truncates it without writing to it, and then the client crashes (or we have trouble contacting the fileserver when we close the file), the dcache entry will appear valid on disk. So the next time we read the dcache entry, we will use the incorrect cache contents as if they were accurate for the specified DV. To avoid this, set DWriting when we truncate a chunk. Normally we only clear DWriting when we actually send data to the fileserver, so to clear DWriting in this case, add an additional line to clear it in afs_StoreAllSegments, after the StoreMini has completed. Reviewed-on: http://gerrit.openafs.org/6937 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b3b267d16eefb993f52f66bf44f3e659c1017e58) Change-Id: I5602db9687f3f005f68200a4208a3c7012933efa Reviewed-on: http://gerrit.openafs.org/7996 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8f0eed22c3eb03e5f376d2152112ae354481ab2c Author: Andrew Deason Date: Thu Mar 22 10:52:47 2012 -0500 afs: Slight adjustments in afs_GetDCache maxGoodSize is only used in one block, so move the decl to that block. Adjust some of the comments to more accurately reflect what's going on. Reviewed-on: http://gerrit.openafs.org/6936 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit d5c13a0f3ce7d9f0a01820ff9c12dfb1cbc12047) Change-Id: I2ba6574b88856d2f506663eafb984a9f3bea4cf8 Reviewed-on: http://gerrit.openafs.org/7995 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f899af247cba9fd9993e89040bff7157fc10de87 Author: Andrew Deason Date: Fri Mar 2 17:22:12 2012 -0600 afs: Do not limit fetches based on vcache length Currently, when we go to the fileserver to fetch some data, we try to make sure that we do not ask for data beyond the end of the file. For example, if our chunk size is 1M, and we need to get the first chunk for a file that is 4 bytes long, we will only ask the fileserver for 4 bytes. This can cause issues when the file is being extended at the same time as when we are trying to read the file. Consider the following example. There is a file named X that has contents "abcd" at dv 1, and we issue a FetchData64 request for X, only requesting 4 bytes. Right before the fileserver gets the FetchData64 request, another client writes the contents "12345" to file X. The client will then fetch the contents "1234" for that file, at dv 2, and store that as the contents of the first chunk for file X. On subsequent reads for file X, applications will now get "1234" as the contents, since the size of the file will be updated to 5, but the cache manager thinks that "1234" is the correct contents for the first chunk of X at dv 2. The cache manager will continue to think so until the cache entry is evicted or invalidated for whatever reason. To avoid this scenario, always request a full chunk of data if we have any data to fetch and the file has not been locally truncated. We can still avoid the fetch at all if it looks like we're fetching beyond end-of-file, since we know that at least at some point that was correct information about the file. If this results in us trying to fetch beyond end-of-file, the fileserver will respond with the correct length anyway. We still need to restrict the fetch request length based on avc->f.truncPos, since the dcache data after avc->f.truncPos needs to stay empty, since we don't track truncated data any other way. If we also avoided this restriction, extending a file via truncation after reducing a file's length via truncation could cause the old file data to appear again, instead of filling the new file range with NULs. Note that on at least Linux, with this fix an application can still read the contents "1234" on the first read in the above example, and "12345" on subsequent reads. This is just due to when we give the VFS updates about file metadata, and could be remedied by updating file metadata immediately from the FetchStatus information from the FetchData64 call. However, just reading the contents "1234" in the above example seems like a somewhat plausible outcome; at the very least, it is an improvement. Reviewed-on: http://gerrit.openafs.org/6882 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit e53221d9a82fd8e3d545704abae51cc844bc31a3) Change-Id: I81b5a3a6ff745f3f53988a1a4e5d3df20f5df6d3 Reviewed-on: http://gerrit.openafs.org/7994 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a17223f96ecd6bd0d536375f5d448a06c0690c00 Author: Andrew Deason Date: Fri Mar 2 17:18:25 2012 -0600 afs: Log a message on invalid FetchStatus receipt If we get an invalid AFSFetchStatus structure from a server, log a message to indicate as such. This serves as a warning to urge people to fix their fileservers, and to explain what is doing. Reviewed-on: http://gerrit.openafs.org/6881 Reviewed-by: Alistair Ferguson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 577d5d99fefb62f0b52a568207d2352946b36137) Change-Id: I10dc2dd94d2cd7277e48dfff1accb36e7cab8537 Reviewed-on: http://gerrit.openafs.org/7993 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0d8e4c7ffb41ece21db8bc1f19ebc735ba9e090c Author: Andrew Deason Date: Fri Mar 2 17:06:48 2012 -0600 afs: Sanity-check some AFSFetchStatus structures We currently do not do any sanity checking on the AFSFetchStatus structures returned from fileservers. Add some sanity checking for BulkStatus and FetchStatus calls, so we do not screw up our cache if a fileserver gives us bogus data. If we do get an invalid AFSFetchStatus structure, act as if the server gave us a VBUSY error code, so we will retry the request. For OpenAFS fileservers prior to 1.6.1 that yield this situation, VBUSY is likely the error code the fileserver should have responded anyway. Reviewed-on: http://gerrit.openafs.org/6880 Reviewed-by: Alistair Ferguson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5af63fabc553a2fecd4c3080b25fe14483f5bd98) Change-Id: I88922a75ada96d641bfd0078a8e7d6854c4ea699 Reviewed-on: http://gerrit.openafs.org/7992 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 55dbeea07680f11f0b39bd21bb64a87e5e506b9e Author: Andrew Deason Date: Mon Aug 27 14:33:47 2012 -0400 rx: dec rx_nWaiting on clearing RX_CALL_WAIT_PROC Currently, a couple of callers (rxi_ResetCall, and rxi_AttachServerProc) will decrement rx_nWaiting only if RX_CALL_WAIT_PROC is set for a call, and the call is on a queue (presumably rx_incomingCallQueue). This can cause an imbalance in rx_nWaiting if these code paths are reached when, in another thread, rx_GetCall has removed the call from its queue, but it has not yet cleared RX_CALL_WAIT_PROC (this can happen while it is waiting for call->lock). In this situation, rx_GetCall will remove the call from its queue, wait, and e.g. rxi_ResetCall will clear RX_CALL_WAIT_PROC; neither will decrement rx_nWaiting. This is possible if a new call is started on a call channel with an extant call that is waiting for a thread; we will rxi_ResetCall in rxi_ReceivePacket, but rx_GetCall may be running at the same time. This race may also be possible via rxi_AttachServerProc via rxi_UpdatePeerReach -> TryAttach -> rxi_AttachServerProc while rx_GetCall is running, but I'm not sure. To avoid this, decrement rx_nWaiting based on RX_CALL_WAIT_PROC alone, regardless of whether or not the call is on a queue. This mirrors the incrementing rx_nWaiting behavior, where rx_nWaiting is only incremented if RX_CALL_WAIT_PROC is unset for a call, so this should guarantee that rx_nWaiting does not become unbalanced. Backport of commit 660720d1f54a867e21f78b6ec4c024235e4c37b7 Change-Id: I3372e053d284e10702971769487a7580a6842ef2 Reviewed-on: http://gerrit.openafs.org/8015 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 339f8452e9a01af3fa0d026035561d8fdfc07447 Author: Michael Meffie Date: Mon Apr 23 14:42:24 2012 -0400 libafs: log server errors on hard mount retry Save the last errors seen during a request and log those errors if a hard-mount retry is done. Reviewed-on: http://gerrit.openafs.org/7275 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 94a8ce970d57498583e249ea61725fce1ee53a50) Change-Id: I9aec874fc525c823c095bb3647bd2561854dbab3 Reviewed-on: http://gerrit.openafs.org/8002 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 78d2ac3c0494fbc690a0ec5a0e36c2b2e4998296 Author: Simon Wilkinson Date: Thu Nov 24 17:43:45 2011 +0000 Unix CM: Log reason for marking server up or down When we mark a server up or down also log the error code that says why we did so, for help in debugging connection issues. Reviewed-on: http://gerrit.openafs.org/6116 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 33526acb56c1794838c6a8c02e9b8f5022a04ac1) Change-Id: If0318faf99f2a7582c93f74f3fc210c0c02fbaf7 Reviewed-on: http://gerrit.openafs.org/8001 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 56ed9bd7f65997eb02f844395aca503093a22268 Author: Derrick Brashear Date: Fri May 25 09:40:54 2012 -0400 libafs: initialize free dcache list for memcache reuse the disk cache dcache creation code for memcache, then call it to prime the list Reviewed-on: http://gerrit.openafs.org/7446 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 9bb876f6829f137e534b961f7374b310bfa8aa7d) Change-Id: I1c616521a9e518ac7e4e62006b3a327458263cae Reviewed-on: http://gerrit.openafs.org/7944 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit a1b1c97e8260c565faacafae68b11e582d91208b Author: Andrew Deason Date: Mon May 21 12:28:58 2012 -0500 afs: Add some comments explaining 'needvalid' Add some comments to try and help explain the meaning of the 'needvalid' parameter to GetDSlot, added in 1a672914ab050811c99b6307c657630ab9b5c8ee. Reviewed-on: http://gerrit.openafs.org/7429 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 6f6c799c4ba4d03c6c381738b2db8aafe741ba5e) Change-Id: If7d37d427f96f3607b6c3aea2487396666e41a03 Reviewed-on: http://gerrit.openafs.org/7943 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 4b68723f2efd2bb3f9f52ddb2fd455c1e977cd60 Author: Andrew Deason Date: Wed Dec 21 17:01:16 2011 -0500 afs: Add afs_WriteDCache sanity checks Writing a non-free non-discarded dcache entry with a zero volume id can easily cause hash table corruption later on, so make sure we don't do that. Also log something if the write itself fails, as this usually indicates an unusual situation involving I/O errors or something. Reviewed-on: http://gerrit.openafs.org/6419 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 79f69f2eb130c1c5cb6cdfa4e7a129f450a58339) Change-Id: I482ad6a1fef3896144855b58c70e73bdf896027f Reviewed-on: http://gerrit.openafs.org/7942 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 9a55866037f3742b0d418fc699424301cf7a27eb Author: Andrew Deason Date: Wed Dec 21 16:05:40 2011 -0500 afs: Cope with afs_GetValidDSlot errors Make callers of afs_GetValidDSlot deal with getting a NULL dcache, which can occur if an error is encountered. Some of these just panic at least for now, since a code path for recovery is complex, but this is at least better than dereferencing a NULL pointer. Reviewed-on: http://gerrit.openafs.org/6418 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9ed26da26f4a5a3fef3bf0a7b6f9dae751ce6659) Change-Id: I79c6fb3ae6279b5da482f95b4d4ed457beeaf1dd Reviewed-on: http://gerrit.openafs.org/7941 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit bacb835a60ede55b0cc5598f60021487bd0caf0c Author: Andrew Deason Date: Wed Dec 21 15:04:32 2011 -0500 afs: Do not always ignore errors in afs_GetDSlot Currently afs_UFSGetDSlot will silently swallow any error in reading the specified dslot from disk, and will return a "blank" dcache to the caller. However, many callers of afs_GetDSlot will be asking for a dcache that we know exists, and more importantly, we know is on the global hash table. If a disk error is encountered and we're given a "blank" dcache, we will erroneously believe the dcache entry is not on the hash table, causing corruption of the hash table later on. So instead, modify all callers of afs_GetDSlot to use either afs_GetValidDSlot or afs_GetNewDSlot. Calling afs_GetValidDSlot indicates that the given dentry index is known to be valid, and any error encountered while reading the entry from disk should result in an error (for disk I/O errors we have no control over, this results in a NULL dentry returned; for internal consistency errors we panic). Calling afs_GetNewDSlot indicates that the specified index may not exist or may not be valid, and so returning a "blank" dentry in that case is fine. For memcache, the situation is the same, except any time we go to "disk" it is an (internal) error, since there is no disk. Reviewed-on: http://gerrit.openafs.org/6417 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1a672914ab050811c99b6307c657630ab9b5c8ee) Change-Id: Ia30e7de919ccc14708112886e492e60f93fe6639 Reviewed-on: http://gerrit.openafs.org/7940 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 524a97a2be62770a601da31b518226119e8e202f Author: Andrew Deason Date: Wed Dec 21 17:25:29 2011 -0500 afs: Remove second argument to afs_GetDSlot All callers of afs_GetDSlot were passing NULL as the second argument to afs_GetDSlot. So, remove the argument, and behave as if tmpdc was NULL unconditionally. Reviewed-on: http://gerrit.openafs.org/6416 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 12177ba6fffaf8a693dd8c8e9445d5e7725ae743) Change-Id: Ic1ad6d35a7051e83a811692156b0da7207cb57f4 Reviewed-on: http://gerrit.openafs.org/7939 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 67a1e4069d387c4a2835f3f4dbe7d964fb7da32e Author: Chas Williams (CONTRACTOR) Date: Tue Oct 19 14:50:35 2010 -0400 afs: clean afs_osi_Alloc() usage Add asserts for any failures cases not explicitly handled and remove any casting. Reviewed-on: http://gerrit.openafs.org/3012 Reviewed-by: Simon Wilkinson Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 0e8cce457763b131de48395a9beed889fd529c1f) Change-Id: I23497ea7a75a66c01ba7b1013e01dfaa005c9892 Reviewed-on: http://gerrit.openafs.org/7936 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 85432bf0b44fa2e1f54dc9d1798642d5b8b40b95 Author: Andrew Deason Date: Fri Apr 6 14:56:07 2012 -0500 LINUX: Do not lookup immediately recursive mtpts On Linux, having a mountpoint in a volume root that points to the same volume can cause serious problems. By 'immediately recursive', I mean a situation like the following: fs mkm mtpt vol fs mkm mtpt/mtpt vol If there are multiple dentry aliases for the directory (which is possible if the directory is a mountpoint), an 'rmdir' on the recursive mountpoint can cause the client to deadlock. Since the 'rmdir' code path in Linux locks the parent directory inode to perform the rmdir, and locks the child directory inode after performing a couple of sanity checks. For an immediately recursive mountpoint, these two inodes are the same, and so we will deadlock. Reviewed-on: http://gerrit.openafs.org/7742 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d785abd5ec9302bdc1b3c33368246e573e0cd65d) Change-Id: I531adbf66cf6714e04811356b072b17335980aa3 Reviewed-on: http://gerrit.openafs.org/7952 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit dda3ea5f9ddda389955249e17a2e97b2e5ce7f1c Author: Andrew Deason Date: Fri Jul 6 16:37:39 2012 -0500 Linux: Make dir dentry aliases act like symlinks Currently, we try to invalidate other dentries that exist for a particular dir inode when we look up a dentry. This is so we try to avoid duplicate dentries for a directory, which Linux does not like (you cannot have hardlinks to a dir). If we cannot invalidate the other aliases (because they are being used), right now we just return the alias. This can make it very easy to panic the client, due to the sanity checks Linux performs when dong things like 'rmdir'. If we do something like this: mkdir dir1 fs mkm dir1/mtpt vol mkdir dir1/mtpt/dir2 fs mkm dir1/mtpt/dir2/mtpt2 vol cd dir1/mtpt rmdir dir2/mtpt2 For the 'rmdir', we will lookup 'mtpt2'. Since 'mtpt' and 'mtpt2' are mountpoints for the same volume, their dentries point to the same directory inode. So when we lookup 'mtpt2', we will try to invalidate the other dentry, but we cannot do that since it is the cwd. So we return the alias dentry (for 'mtpt'). The Linux VFS layer then does a sanity check for the rmdir operation, checking that the child dentry's parent inode is the same as the inode we're performing the rmdir for. Since the dentry we returned was for 'mtpt', whose parent is 'dir1', and the actual dir we're performing the rmdir for is 'dir2', this sanity check fails and we BUG. To avoid this, make the dentry alias act like a symlink when we encounter an uninvalidateable dentry alias. That is, we allow multiple dentry aliases for a directory, however, when the dentry aliases are actually used, we redirect to a common dentry (via d_automount where possible, and follow_link elsewhere). This means that such mountpoints will behave similarly to symlinks, in that we 'point' to a specific mountpoint dentry. This means that if we have multiple different ways to get to the same volume, and all are accessed at the same time, all but one of those mountpoints will behave like symlinks, pointing to the same mountpoint. So, the '..' entries for each path will all point to the parent dir of one mountpoint, meaning that the '..' entry will be "wrong", but for most cases it will still be correct. In order to try to make the 'target', pointed-to directory consistent, we add a new field to struct vcache: target_link. This points to the dentry we should redirect to, whenever that vcache is referenced. To avoid (possibly not-feasibly-solvable) problems with refcounting, this pointer is not actually a reference to the target dentry, but just serves as a pointer to compare to. FIXES 130273 Reviewed-on: http://gerrit.openafs.org/7741 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit de381aa0d39e88a1ca0c8ccbb2471c5cad5a964c) Change-Id: I68e1f0a3734f56db66e5fee3571597b5eb17eef8 Reviewed-on: http://gerrit.openafs.org/7951 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3127ec4e693d2a3efaf2bba7a000cac69c624452 Author: Andrew Deason Date: Thu Dec 22 15:01:52 2011 -0500 afs: Indicate error from afs_osi_Read/Write better Currently afs_osi_Read and afs_osi_Write just return -1 on any I/O error, even though they know the error code given from the OS VFS. Just return that code instead so the caller can see what the error was; but negate it, so it's clear that it is an error. Reviewed-on: http://gerrit.openafs.org/6412 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b5ca12ac4696c4049be14974f1e946bb55e1c440) Change-Id: Ib5a674af7e0424691887b20d24782a6740d11414 Reviewed-on: http://gerrit.openafs.org/7938 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6a48d79247cc259e3dbdddfd52e5afb4f6a54ac0 Author: Andrew Deason Date: Thu Dec 22 14:50:09 2011 -0500 afs: afs_osi_Read/Write returns negative on error afs_osi_Read and afs_osi_Write need to return negative values on error. EIO is not negative; return -EIO so we don't accidentally return "success" if someone requested to read or write EIO bytes. Reviewed-on: http://gerrit.openafs.org/6411 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 456ee898ae77b201275363f4efc0098c28e195d5) Change-Id: Idd2e6b85d27a914cac0169a6e8fdee49ff262dc0 Reviewed-on: http://gerrit.openafs.org/7937 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0f0805fb4da722758a7e7102aeab61f48d27b420 Author: Andrew Deason Date: Mon Apr 9 17:16:42 2012 -0500 vos: Do not try to remove backup volume id 0 Currently we always try to delete a BK volume if we're deleting the RW. If the BK volume id is 0, this is never going to do anything, so don't try to delete it. Reviewed-on: http://gerrit.openafs.org/7140 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 46bdb318c45b4e93a5b297e6fdee2b2acbed4b55) Change-Id: I6d5406d6e39513d3f38e7674fa726b627ca5f1f0 Reviewed-on: http://gerrit.openafs.org/7935 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0910046da6c0f08768d3d7cb983ce843572498d2 Author: Andrew Deason Date: Thu Jul 26 16:40:03 2012 -0500 LINUX: Hold GLOCK for proc traversal The functions that traverse unixuser structures for display via /proc (uu_start et al) call various libafs functions hold and release locks, etc. To do any of that, we need GLOCK. Amongst other issues, we can panic if we try to acquire a contested lock without GLOCK, since we assert glock is held when we sleep for the lock or try to wake other waiters. The same goes for the legacy CellServDB proc file. So, hold and release GLOCK as appropriate. Reviewed-on: http://gerrit.openafs.org/7885 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 5237d3d232f22aaf4f67f3a8727a293f4058a7ae) Change-Id: I5895b4bde32b8efa27abc83cc6b9dab7458d5c75 Reviewed-on: http://gerrit.openafs.org/7914 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 5b497f6bb4dba37f4768b1eae3abbe71e67b4d40 Author: Andrew Deason Date: Thu Jul 26 15:58:45 2012 -0500 LINUX: Fix osi_proc.c formatting osi_proc.c had a few formatting issues: - Several function definitions did not have the function name at the beginning of the line - A few preprocessor directives were not indented - A few areas used a tab character for each indentation level, as opposed to 4 spaces, then 1 tab, as the rest of the tree has - Struct definitions were aligned using tabs, not spaces, causing misalignments when the indentation was fixed Fix these. Reviewed-on: http://gerrit.openafs.org/7884 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 23f2f1232b03ed02f87582c12b4c4e8474bc9b5d) Change-Id: I0c1a595ae0599f522ee3681d33f7b82290778b7f Reviewed-on: http://gerrit.openafs.org/7913 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 90be7b32fd3a18db5fe9c10782500ff50e936236 Author: Andrew Deason Date: Mon Jun 18 15:02:09 2012 -0500 doc: Remove reference to NetRestrict wildcards Commit 80fc888a9223050481de932233fe7121a48df194 got some of this, but forgot the other reference. We don't support these anywhere, so remove it here, too. FIXES 125340 Reviewed-on: http://gerrit.openafs.org/7564 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4ae005062e2c927b77ea23d95934d5af463878b3) Change-Id: I2880b5a0caf283324290ffd8f9c25194551e58cd Reviewed-on: http://gerrit.openafs.org/7589 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fa649b4cbd8750fbb7fa5bb5ffd44fc79c77e40c Author: Andrew Deason Date: Thu Jun 28 18:56:47 2012 -0500 doc: Add fs bypassthreshold man page FIXES 130050 Change-Id: I0ffc7b93ed9dd93765a25efd60fe3430a86366cf Reviewed-on: http://gerrit.openafs.org/7602 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 828ef9c39a14af265796755718c10b63513f952c) Reviewed-on: http://gerrit.openafs.org/7735 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 26de4de491c19e3d855f53cfca08eb28d9a7ca50 Author: Derrick Brashear Date: Fri Jun 1 13:16:31 2012 -0400 rx: abort on missing service currently rx does not send an abort if a service does not exist; it quietly ignores the packet. provide a hint we have done so. Reviewed-on: http://gerrit.openafs.org/7563 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 1fbe83f9aacfc36a9c426ba1fd18ad7c72869dc1) Change-Id: Id3b4952e8d27479f16c950606cacc19c7e52cc02 Reviewed-on: http://gerrit.openafs.org/7593 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0ef80067255d95d6a46b1a711bf0998ea1488de9 Author: Niklas Jonsson Date: Wed Jun 20 10:03:54 2012 -0400 Auth: increase size of DNS resolver answer buffer This patchset increases the size of the res_search() answer buffer from 1024 octets to 4096 octets. This is not a proper long term solution but will permit sites with longer response lists to make use of SRV and AFSDB records. This patchset only impacts UNIX systems. Windows uses the Win32 DNS resolver which dynamically allocates memory based upon the size of the response. FIXES 130936 Reviewed-on: http://gerrit.openafs.org/7575 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 3c16a2b296722f548309b10e6744639608c0861b) Change-Id: Iac7fc7143ff48bd3eb2d3719902dd4549af25b50 Reviewed-on: http://gerrit.openafs.org/7592 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e7133b8a5ee6a2257a065b715e597402de04feff Author: Simon Wilkinson Date: Fri Jun 1 13:20:57 2012 -0400 rx: provide mechanism to send a bare abort packet simply put an abort on the wire Reviewed-on: http://gerrit.openafs.org/7562 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5019ecd5fad0846abcd92835411c7b0f3f2170ca) Change-Id: I21a8f2b5df84c49bda6b6fced5088cdeb3127017 Reviewed-on: http://gerrit.openafs.org/7591 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fbda6954ab1c4dabdb2b2677b1d186f9588f2041 Author: Andrew Deason Date: Mon Jun 18 15:06:49 2012 -0500 doc: Consolidate NetRestrict format docmentation We were specifying exactly the same format in two different places; consolidate them into one place. In addition, explicitly say there are is no way to specify a range of addresses, in case some people are confused by the previous versions of this man page that erroneously said you could use 255 as a wildcard. Reviewed-on: http://gerrit.openafs.org/7565 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d4bab02f023f53041c3ac58fd75cffd27ec92df0) Change-Id: Ie138f8b6e3070d0bc92adae7dae90a26cbd78001 Reviewed-on: http://gerrit.openafs.org/7590 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8540e8b80836d807091642e431c1b76100a84f3b Author: Derrick Brashear Date: Tue Jun 19 15:54:26 2012 -0400 libafs: put connection always in getcapabilities helper if we get a connection, we need to always put it back. here we exited with error before doing so. 1.6 only fix Change-Id: I67abec863c1d60d557277468a681847263d783a1 Reviewed-on: http://gerrit.openafs.org/7570 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear commit 8f7d44dc0fb50e198c9d58ced89dec3f29959420 Author: Derrick Brashear Date: Tue Jun 19 15:11:38 2012 -0400 libafs: put connection in analyze when conn srvr missing we need to putconn in all cases we can in afs_Analyze, but at least one case we didn't. fixed. (cherry picked from commit e2d094595fd76e76e4a5861114202f513d02c2b1) Change-Id: I04e2d0f8b1002b9a6a73b8ff6755157460504da9 Reviewed-on: http://gerrit.openafs.org/7569 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 141432033b205d6de2eac386e8c3e70690325911 Author: Andrew Deason Date: Thu Jun 28 15:43:27 2012 -0500 doc: Correct volume size CAUTIONS notes 2 terabytes is 2^41 bytes, not 2^31 bytes. Also clarify that volumes can be much larger than this. FIXES 130188 Reviewed-on: http://gerrit.openafs.org/7598 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 300cbb28b08c2fd3709942cc6c48e7d9369a3394) Change-Id: I762e18e83d4557c8fd4db3601426bcaaa845199a Reviewed-on: http://gerrit.openafs.org/7674 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8612ef45ef29cb76739e2fd14605b2e134a766a7 Author: Andrew Deason Date: Thu Jun 28 17:47:32 2012 -0500 doc: Fix whitespace errors Reviewed-on: http://gerrit.openafs.org/7599 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fcaa53a6d7289665b64037a0d96ae4c6cbf4f776) Change-Id: I69f90ca4d764a25720e8625443c0b86751914cca Reviewed-on: http://gerrit.openafs.org/7673 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fee0b7cdca46b4d90c1dd911dc0fdadfa3f774fe Author: Andrew Deason Date: Thu Jun 28 15:30:40 2012 -0500 doc: Consolidate CAUTIONS notes about volume size Reviewed-on: http://gerrit.openafs.org/7597 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3ff8ef499c56008f4d2ebf5b81e08e98eb0c0826) Change-Id: Ie29664d105e0f35140fdf3c164da78564f6b5e36 Reviewed-on: http://gerrit.openafs.org/7672 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d7428d0c685238d6584fdf6c3e7b83d008525b7a Author: Andrew Deason Date: Mon Jun 18 15:06:49 2012 -0500 doc: Consolidate NetRestrict format docmentation We were specifying exactly the same format in two different places; consolidate them into one place. In addition, explicitly say there are is no way to specify a range of addresses, in case some people are confused by the previous versions of this man page that erroneously said you could use 255 as a wildcard. Reviewed-on: http://gerrit.openafs.org/7565 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d4bab02f023f53041c3ac58fd75cffd27ec92df0) Change-Id: I7bae4786b6a0cc2115688bd54d1c1128dc0f5df2 Reviewed-on: http://gerrit.openafs.org/7671 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit eeaca85e80b0529af80dea3d8a3df2e1afde918e Author: Andrew Deason Date: Mon Jun 18 15:02:09 2012 -0500 doc: Remove reference to NetRestrict wildcards Commit 80fc888a9223050481de932233fe7121a48df194 got some of this, but forgot the other reference. We don't support these anywhere, so remove it here, too. FIXES 125340 Reviewed-on: http://gerrit.openafs.org/7564 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4ae005062e2c927b77ea23d95934d5af463878b3) Change-Id: I58e0fa2ea138a08b45d136abb9fcd43f9f3dc11a Reviewed-on: http://gerrit.openafs.org/7670 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 407e7c90a97143d436ad3a6af6bbfa431c849191 Author: Marc Dionne Date: Sat Jun 2 21:35:53 2012 -0400 Linux 3.5: encode_fh API change The encode_fh export operation now expects two inode arguments instead of a dentry and a "connectable" flag. Use the inode of the dentry we're interested in, and NULL as the parent inode which is the same as passing a 0 flag in the previous API. Change-Id: I05cf146fb2a4bacdca20a9f108d04ccb11530804 Reviewed-on: http://gerrit.openafs.org/7523 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5227148ae17949705487ea673d558ebfe143e635) Reviewed-on: http://gerrit.openafs.org/7579 commit 8de83579f7b374b03068b46f7cb38104f31a966c Author: Marc Dionne Date: Wed Jan 18 11:22:35 2012 -0500 Linux 3.3: use umode_t for mkdir and create inode ops The mkdir and create inode operations have switched to using umode_t instead of int for the file mode. Change-Id: Ib8bbf6eaa6e87d6a9692c45b1a3fe93fcc3eff7a Reviewed-on: http://gerrit.openafs.org/6567 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit beafc7f742ebad021bfcbed73884aecedee4e04b) Reviewed-on: http://gerrit.openafs.org/7577 commit 14d02a1e80868e3c1b96ab771ead2ecca1351a39 Author: Derrick Brashear Date: Tue Jun 12 13:46:46 2012 -0400 aklog: can't assume krb5_524_conv_principal based on convert_creds add probing for krb5_524_conv_principal directly instead of assuming finding a 524 library will find it. current heimdal does not include it. Reviewed-on: http://gerrit.openafs.org/7551 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 6d3390bc16281e6f889bb555abb1182985556287) Change-Id: Icc576d1a711fa771fda393c61a15082ffb94defc Reviewed-on: http://gerrit.openafs.org/7582 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cc63cbbc138f60d6b5964fa859dcd778717b24c2 Author: Marc Dionne Date: Mon May 28 21:43:12 2012 -0400 Linux 3.4: replace end_writeback with clear_inode end_writeback() is renamed to clear_inode(). Add a configure test and cope. Change-Id: Icaf5b6b54d0ee377fabcf0b295d690eaa6b4be5e Reviewed-on: http://gerrit.openafs.org/7503 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 2b33384a4a7b88842281021129ffccc837d91d36) Reviewed-on: http://gerrit.openafs.org/7578 commit 9bd5c20c21344b4078199b578d40b5f460ccd709 Author: Marc Dionne Date: Wed Jul 13 20:56:53 2011 -0400 Linux: remove unused variable endindex is not used, remove it Change-Id: I50a89e3f25828c05fd24f4fc6a1068007a68dbc2 Reviewed-on: http://gerrit.openafs.org/5012 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit a76e65034cf3feadfe2af5a20ddae705fda00aa0) Reviewed-on: http://gerrit.openafs.org/7580 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 93f9c397a22b6fa4ad0bf5b0c497380732b60165 Author: Andrew Deason Date: Fri May 18 17:40:38 2012 -0400 afs: Do not QueueVCB before osi_dnlc_purge* In afs_FlushVCache, when we QueueVCB, we might drop the afs_xvcache lock (as of 76158df491f47de56d1febe1d1d2d17d316c9a74). The vcache may still be on the DNLC, so a lookup while xvcache is dropped can cause someone else to grab a reference to the vcache while it is being flushed. This can cause panics and failed assertions, since someone will have a reference to the flushed vcache, which is effectively freed and many of the structure fields are no longer valid. So instead, do not call QueueVCB until we have purged the vcache from the DNLC. Reviewed-on: http://gerrit.openafs.org/7430 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0e81db38b549d79a3af5fce0f9f8fa48d9e6efeb) Change-Id: Idabad9076c6c36bede3faf459abb940aae5a975c Reviewed-on: http://gerrit.openafs.org/7502 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8c99f6de5d6a7701f6b2b7cd8ba5b9a808d79946 Author: Andrew Deason Date: Mon May 21 17:11:29 2012 -0500 afsd: Avoid dir interpolation for memcache memcache doesn't make use of fullpn_DCacheFile, fullpn_VolInfoFile, etc. Do not even try to generate these strings for memcache, since cacheBaseDir will be NULL, and so this can cause a segfault on some platforms including Solaris. Reviewed-on: http://gerrit.openafs.org/7442 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2e2bc535bd03df86f78b648f78d2d0a95d273fab) Change-Id: I46f2da9b2f0e5f8d004ebd3d799a3c1ac22c3e95 Reviewed-on: http://gerrit.openafs.org/7501 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b2079ef799f45efe2a59f4d20ef482ebf1d2b584 Author: Andrew Deason Date: Mon May 21 18:01:49 2012 -0500 afsd: Avoid printing cacheBaseDir for memcache cacheBaseDir is NULL when memcache is turned on; don't print it. Reviewed-on: http://gerrit.openafs.org/7443 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9eb924f16c6f3bb06d83ed281317f2ba29473202) Change-Id: Ie5dce3a3ae12b2725c90475cd3f6718f9df63134 Reviewed-on: http://gerrit.openafs.org/7500 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 321dda2d285243a45372a8a6eea59529698f15df Author: Mark Vitale Date: Tue May 8 15:03:46 2012 -0400 vos: volume lock not released on convertROtoRW error If an error occurs during convertROtoRW, the volume lock may not be released. Reviewed-on: http://gerrit.openafs.org/7389 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 33eff6597facc01bbcd5266fb83c8a6bfa40dfa8) Change-Id: I0b87fd3b99f178d99f997032c14673def111c1de Reviewed-on: http://gerrit.openafs.org/7499 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2a72c274119ee787d5ce4027d6b5a7dcd1de6960 Author: Mark Vitale Date: Tue May 8 14:45:16 2012 -0400 vos: convertROtoRW does not respect volume lock vos convertROtoRW was not checking the return code from ubik_VL_SetLock(). Reviewed-on: http://gerrit.openafs.org/7388 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 38ebd79bafee3c97323aa603906d1d5f279ec450) Change-Id: I391c5b0d3d385af08eb2aec245f943081c7b84e3 Reviewed-on: http://gerrit.openafs.org/7498 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f07737a27edacceb2a0e59abe9584df6f6f5e00a Author: Mark Vitale Date: Tue May 8 10:01:12 2012 -0400 vos: convertROtoRW may create two RW volumes If the RW volume is listed after the RO convert target in the VLDB, the code failed to detect that an RW is already present and would create a second RW volume. Reviewed-on: http://gerrit.openafs.org/7385 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9a728fd86c7add13e15dfa0d3062fa94cc77c53f) Change-Id: I7e4eaf0ffefedb3c665e28656a75959eb8677071 Reviewed-on: http://gerrit.openafs.org/7497 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit baaba2a334d3a97b7dd208c141c5d4b820310926 Author: Mark Vitale Date: Tue May 8 12:38:38 2012 -0400 vos: convertROtoRW misc error reporting problems Fixes a few inconsistencies and bugs in some error messages. Reviewed-on: http://gerrit.openafs.org/7387 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Tested-by: BuildBot (cherry picked from commit e1c6ad7d580041caf35f698c9b2241fb45f02361) Change-Id: Icee86e1750920d50b94e29acc5504bd1a2ea9e6e Reviewed-on: http://gerrit.openafs.org/7496 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 986a31722e5b6f3386392b97148abb9b075bcad2 Author: Derrick Brashear Date: Wed Apr 18 11:57:10 2012 -0400 macos: update AFS prefs pane modify afshelper to just run what it's told instead of offering fixed operations. this avoids having a setuid tool around. in spite of apple's suggestion this is correct, it's actually more dangerous. instead, elevate privilege only to run a small set of commands, then drop. allow unlocking of the prefs pane, but make the menu extra prompt for authentication when needed. deactivate controls in the prefs pane when locked. Reviewed-on: http://gerrit.openafs.org/7196 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0524e0d1915f519a76d62540b695abc16634d4c9) Change-Id: Iba4435829a57e91e45b0beea10a8d6573b62a214 Reviewed-on: http://gerrit.openafs.org/7495 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0efed9d21e9d36f92a0df9a24bd5f3b57185e4c7 Author: Mark Vitale Date: Wed May 2 13:55:16 2012 -0400 DOC: vos convertROtoRW security requirements They were copied from another command; corrected them. Reviewed-on: http://gerrit.openafs.org/7305 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Ken Dreyer Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit a2f523b50592e261fe9cd3ef32978e786011c3c7) Change-Id: I03101cec5bfd20555e33f639ce2c08cde873d646 Reviewed-on: http://gerrit.openafs.org/7494 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b6a07c5b10d5b4580c57cc51d3320208f0caa679 Author: Ken Dreyer Date: Fri Mar 16 13:37:20 2012 -0600 doc: add Windows section to fs newcell fs newcell works slightly differently on Windows. Document the differences in the man page. FIXES 125094 Reviewed-on: http://gerrit.openafs.org/6919 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 186158c9eb2379ec350831b8fb244c51ae234a6e) Change-Id: Ie0daa8631c45eb457c5eb7a1e80a1f70401127d6 Reviewed-on: http://gerrit.openafs.org/7493 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 78020ab61e4d2a8753c847ea731a1d31c7200571 Author: Andrew Deason Date: Thu May 3 16:36:03 2012 -0500 vol: Free vol header on attach_volume_header error In attach_volume_header, make sure we free the volume's header if we're returning an error. We take care of the locks and i/o handles in the immediately preceding block, but for an actual error we don't get rid of the header. Do so. Noticed by Tom Keiser. Reviewed-on: http://gerrit.openafs.org/7325 Reviewed-by: Tom Keiser Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ecfd9549fc29cdad8042e830c656caee1363c6cf) Change-Id: I1d49c18f23cd576dfcde114238ea2b41e1356039 Reviewed-on: http://gerrit.openafs.org/7492 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 29102b48c1c7224be8479f23605706e6fb3df65a Author: Andrew Deason Date: Wed May 2 12:07:49 2012 -0500 vol: Pay attention to specialStatus after VAVByVp attach2/VAttachVolumeByVp_r do not alter the yielded error code according to specialStatus. So, pay attention to specialStatus after receiving an error from VAttachVolumeByVp_r, to ensure we respond with the correct error code. Reviewed-on: http://gerrit.openafs.org/7303 Reviewed-by: Tom Keiser Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a81f9237bfa7b2e3a0567a930f3c49234b9a4376) Change-Id: I1d0cb429b9cd875fa43a3af2e8c5d5d96ee12f85 Reviewed-on: http://gerrit.openafs.org/7491 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a45a0eafb1b8e4a92318eaa7a89b645a2af03073 Author: Andrew Deason Date: Wed May 2 11:38:57 2012 -0500 vol: Avoid VBUSY/VRESTARTING trick for offline vop Currently, if GetVolume() finds that the volume we're trying to attach has a vol op that leaves the volume offline, we do the VBUSY/VRESTARTING trick as described in CheckVnode(). This doesn't make any sense for a couple of reasons. For one, VBUSY/VRESTARTING is not the correct error code to return to the client when an offline vol op is in progress and vp->specialStatus is not set everywhere else we yield VOFFLINE. Additionally, this block of code is only hit once for a particular vol op. Once we reach this section, the volume is in UNATTACHED state, and so on the next iteration of GetVolume we will immediately return VOFFLINE (or specialStatus). So the CheckVnode-like situation is not applicable, since we are not returning VBUSY to the same client for 15 minutes; we would return VBUSY once and then return VOFFLINE. Reviewed-on: http://gerrit.openafs.org/7302 Reviewed-by: Tom Keiser Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 21ed79aeaee2d3b2b47436db0491943829ac44a6) Change-Id: I183db2d337c999e9aafd1eba60a80eb5b84264c7 Reviewed-on: http://gerrit.openafs.org/7490 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 596ed7d29dd24e51c45ffef19dc2d05a45c2f29b Author: Andrew Deason Date: Thu May 3 12:40:40 2012 -0500 vos setaddrs: notice unexpected errors Currently 'vos setaddrs' only prints a message and errors out if the VL_RegisterAddrs call fails with certain error codes (VL_MULTIPADDR and RXGEN_OPCODE). But if we get something else like an access error, we should of course print that out, instead of reporting success. Reviewed-on: http://gerrit.openafs.org/7322 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Tom Keiser Reviewed-by: Derrick Brashear (cherry picked from commit 663185d62df501fb9d7a18e6ef329e4f53aa8854) Change-Id: I86b8729cd091007b84fb8b7bf19c58d477626686 Reviewed-on: http://gerrit.openafs.org/7489 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fe588efd2df9adb6d393f223a4359cdc46a16185 Author: Andrew Deason Date: Fri Apr 27 12:59:25 2012 -0500 vol: A GOING_OFFLINE volume should yield VOFFLINE Currently, GetVolume treats a volume in the VOL_STATE_GOING_OFFLINE state the same as VOL_STATE_SHUTTING_DOWN, and so returns VNOVOL for a GOING_OFFLINE volume, but these states are very different. GOING_OFFLINE indicates that a volume should soon be in the UNATTACHED state, so we should treat GOING_OFFLINE the same as UNATTACHED for returning errors to the user. For UNATTACHED, we return specialStatus if it's set, or VOFFLINE otherwise; so, just do the same for GOING_OFFLINE. Reviewed-on: http://gerrit.openafs.org/7290 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d10f71d44fddd7ea6e37481cffd7ee1be2a93217) Change-Id: I1f75992da7732596c78041e9eac3b1e3a12082e8 Reviewed-on: http://gerrit.openafs.org/7488 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bb6347a7a5b6ce04438a1d8ede56073a66982690 Author: Derrick Brashear Date: Thu Apr 26 09:24:25 2012 -0400 libafs: don't crash on no addresses in afs_Conn we try to avoid a crash on a missing serverHost; do the same on missing addrs in that host FIXES 130714 Reviewed-on: http://gerrit.openafs.org/7287 Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 868378cc00b9ac7016da3dc457abf3fa2016687c) Change-Id: If8f616002cc67cb865549b8b9ea83a6bd1f9256f Reviewed-on: http://gerrit.openafs.org/7487 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3bbd8eacf421c758b112e02d8fb24ac0419b9331 Author: Derrick Brashear Date: Sun Apr 22 22:45:09 2012 -0400 macos: remove mistyped vnode warning newborn vnodes are corrected if needed; don't worry about it. Reviewed-on: http://gerrit.openafs.org/7270 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit be1f110f3efb41a72278c7abc8a22cbfcfa8d0e3) Change-Id: I82485f348afe9adbd0dc5743a4f15f18b7e04420 Reviewed-on: http://gerrit.openafs.org/7486 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 99b15c9379fb6faaefc4f5bc480adf7917f9b1e0 Author: Derrick Brashear Date: Wed Apr 18 11:58:52 2012 -0400 libafs: stop bkg first because background daemons can have dependence on other subsystems, but are not needed for other operations, stop them first. Reviewed-on: http://gerrit.openafs.org/7246 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit e3c93b87b7fa751e9cf4c1356d606b7bb399b06c) Change-Id: I258519a2ad85af53784cf4db381a7f4a8b429dc8 Reviewed-on: http://gerrit.openafs.org/7485 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cfb91f59d72fa8fc22795ed20f9ef2a2e2f5f0fa Author: Derrick Brashear Date: Wed Apr 18 11:58:03 2012 -0400 macos: lock module against unload during shutdown during shutdown, once umount finished, it was possible to unload the module before shutdown completed. fix that. Reviewed-on: http://gerrit.openafs.org/7245 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit a08f9baa7620a6643f12f0b847c2bbab41a0b255) Change-Id: I6467b9ead03262a6ec8b0de673d2eeb664df1aef Reviewed-on: http://gerrit.openafs.org/7484 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cbf46115ea330c1fcb98f81dc9cd89bab642f0d5 Author: Derrick Brashear Date: Tue Feb 14 21:58:09 2012 -0500 libafs: dont handle outstatus on write error if a write errored, we can't trust the OutStatus we got. don't. Reviewed-on: http://gerrit.openafs.org/6714 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 4c8a3cd789a8495d0c0b3f8ff1a7ebb2a20f5336) Change-Id: I69b26330aca2e5fd0d2092b579a0fcf1514acb53 Reviewed-on: http://gerrit.openafs.org/7483 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1219b7617ecfe1d9eb0d7ec22f8e2e714732c51d Author: Derrick Brashear Date: Wed Dec 1 15:22:30 2010 -0500 refactor afs_CheckServers basically, we need the ability to reuse this function, so, let's make it work differently so we can. Reviewed-on: http://gerrit.openafs.org/3403 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e8d8a2240a57f9f4a11ee45b60c229d3f8447b86) Change-Id: I2ad9de15cc5471810abfecf0cbc504da7da624b0 Reviewed-on: http://gerrit.openafs.org/6341 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4aec9b18500f0749cac16463ef8a3ce18a61cb81 Author: Edward Z. Yang Date: Sun Nov 20 15:48:33 2011 -0500 Add OpenAFS to the dependencies of remote-fs. Signed-off-by: Edward Z. Yang Reviewed-on: http://gerrit.openafs.org/6093 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3328770612b7205abb92df5b5f4737eb3349c910) Change-Id: I16b7b0ac6e68bf91c48652faab339871f18549a5 Reviewed-on: http://gerrit.openafs.org/7449 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d88edd8dbd54baf3860787eae164167c5f8b8d29 Author: Michael Meffie Date: Fri Sep 30 12:22:27 2011 -0400 bozo: preserve all options over restart On unix, save all the bosserver command-line options and reuse them on bosserver restarts. On Windows, the SCM integrator saves the argument list, just use them. Reviewed-on: http://gerrit.openafs.org/5532 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit db472e730e3989dac1d49b54d7371b54b24cd63c) Change-Id: Ic6a8534f84f31f94e69c18fd970ecd368f7ee39e Reviewed-on: http://gerrit.openafs.org/7395 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a8eb0bfd04c4bc60cc37528b15f5a1e4cbe39b36 Author: Andrew Deason Date: Thu Apr 5 17:55:17 2012 -0500 viced: Do not offline volume on successful IH_DEC If we fail to CoW a file due to ENOSPC, we try to IH_DEC the new file copy, and if IH_DEC fails, we take the volume offline for salvaging. But IH_DEC returns 0 on success, not on error. So take the salvaging path when we get non-zero. Reviewed-on: http://gerrit.openafs.org/7054 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 613f14727fbb404fb7fc1cac953dda46b671222e) Change-Id: I207ffc4db59bdbd8b80fa4ffad9210d13d76b68f Reviewed-on: http://gerrit.openafs.org/7394 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 60d000794d7f00453817a34af4eac0b8b9f780a8 Author: Andrew Deason Date: Mon May 7 15:49:34 2012 -0500 fs: Report default storebehind when errors exist After 904c9fbe, we no longer print out the default store asynchrony when any of the supplied paths results in a pioctl error. However, if just one (or a few) of the paths supplied results in an error (such as, the path does not exist), this does not prevent us from reporting the default value. Instead, keep track of whether or not we have a valid value, and try to determine the default if we haven't already by the end of StoreBehindCmd, and print it out. Reviewed-on: http://gerrit.openafs.org/7376 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 427f53eea7f9c05e7b1913c91d57777d72bc30b2) Change-Id: I04bebe60fbb275ca44caeed9b8696283c4ded36b Reviewed-on: http://gerrit.openafs.org/7384 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b9c03fa6f8e696c64c90949cce34bb075aa2ae6f Author: Andrew Deason Date: Wed Jun 22 14:39:39 2011 -0500 afs: Use cell for md5 inode numbers When calculating the inode number for a file with md5 inodes, include the cell number in the calculation, in order to reduce collisions between cells. Reviewed-on: http://gerrit.openafs.org/4902 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 42943aead4db2bdf9b8ec01c3917eb1c9ac9eb76) Change-Id: I5cf88ecd30a5813697dbf3b86964d53bb1f3915a Reviewed-on: http://gerrit.openafs.org/7277 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e7ea7af6573cd03859b357387a3ee666e2a6ded5 Author: Andrew Deason Date: Wed Jun 22 13:44:38 2011 -0500 afs: Ensure afs_calc_inum yields nonzero ino afs_calc_inum can currently yield an inode of 0 if MD5-based inode numbers are turned on. Some userspace applications (and for some platforms, maybe even the kernel) make certain assumptions about the inode number for a file; in particular for example, 'ls' will not display a file with inode 0 in a normal directory listing. So, read the md5 digest until we get a non-zero result. Fall back to the non-md5 calculation if we still somehow end up with a 0. While this case may at first glance seem to be extremely rare, in practice it can occur, as the current calculation for volume 538313506, vnode 26178 does actually yield a 0. Reviewed-on: http://gerrit.openafs.org/4901 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 39083fe1edab784fcd75eacbdaaf7f6affa14c9f) Change-Id: I3d06a4b5dc76934b24ced883b1985bced35c893a Reviewed-on: http://gerrit.openafs.org/7276 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 07bc098589573927d9f085773c8b06d39c8f8389 Author: Andrew Deason Date: Mon Apr 2 16:16:37 2012 -0500 SOLARIS: Correct misplaced osi_machdep.h #endif Commit 64778fd7bece52360482f9a51f19b34dac1d2678 removed some '#ifdef KERNEL' blocks, but for one block in SOLARIS/osi_machdep.h, the wrong trailing #endif was removed. This effectively makes the last part of the file Solaris 10+ only, and bypasses the header guard. On systems before Solaris 10, this causes us to lose the osi_procname definition, which eventually shows up as an undefined symbol. So, reinstate the original #endif, and remove the correct #endif instead. Reviewed-on: http://gerrit.openafs.org/7042 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit a66268f69a2da0dc21957338eebe5c91b279ddda) Change-Id: I0edd54c9984c591d56531e4eb210e8374ed8b608 Reviewed-on: http://gerrit.openafs.org/7045 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit a64864529d1fca2b5a3f4d21ec598982be335368 Author: Jeffrey Altman Date: Mon Apr 2 22:35:41 2012 -0400 viced: AFSDisk, AFSFetchVolumeStatus Int31 PartSize The AFSDisk and AFSFetchVolumeStatus structures use signed 32-bit integers for representation partition size and available blocks. RoundInt64ToInt31() should be used instead of RoundInt64ToInt32() when assigning their values. Change-Id: I3834141fce2d54ce8bdfac3dc566074583bb305e Reviewed-on: http://gerrit.openafs.org/7022 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e8f6dfac59fe042a04a9ac5eb3c37356cb3a22a3) Reviewed-on: http://gerrit.openafs.org/7023 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c78b25ff5aab3acf159c9dcea6e8b811a9acdbc4 Author: Jeffrey Altman Date: Tue Mar 27 00:00:30 2012 -0400 Windows: Fix VNOSERVICE EventLog parameters Add missing volume and cell. Reviewed-on: http://gerrit.openafs.org/6969 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d1d51852be1daf45f92a8cbf5f294892141108f2) Change-Id: I86004a463b118493828c5296b684a019085e59fd Reviewed-on: http://gerrit.openafs.org/6974 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ad5650638291b4141833a2b01f3ed805fa1c9c60 Author: Derrick Brashear Date: Tue Mar 27 12:09:38 2012 -0400 macos: iterate mdfound packagemakers when spaces are present even if we get more than one match, and even if there's a space, work anyway Reviewed-on: http://gerrit.openafs.org/6971 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 745e1bb00350ac481cd0998b1623b6e040fc7312) Change-Id: Ibd4ca5cbd5cee45793735cede8cf488a944add3c Reviewed-on: http://gerrit.openafs.org/6972 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 06dd16f7611ff0863a15dd93af1715d8c8d91c74 Author: Derrick Brashear Date: Mon Mar 26 20:33:26 2012 -0400 macos: find packagemaker instead of assuming path in xcode 4.3, packagemaker is unbundled. make no assumptions about where it can be found; instead, let spotlight tell us Reviewed-on: http://gerrit.openafs.org/6966 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fba35ba4e1d933126c788824f464a78ca1c93bf8) Change-Id: I5d4083fa743ef181d680ffc2934a56d8429a75dc Reviewed-on: http://gerrit.openafs.org/6968 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a742a6d979f43c6c43bccc3c0c9079503956d146 Author: Derrick Brashear Date: Thu Mar 15 11:51:39 2012 -0400 osx: deal with more kerberos damage the number of things which can return success without succeeding is truly sad. Reviewed-on: http://gerrit.openafs.org/6911 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 59b57ff85acbef10bcec9724c42e3bad78538687) Change-Id: I487ece6f991157a95e200f7764027902a2402e7b Reviewed-on: http://gerrit.openafs.org/6965 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8d20dd4ddd95a850c0b920b61083f17ba4280595 Author: Andrew Deason Date: Fri Mar 2 14:55:04 2012 -0600 viced: Do not ignore all InlineBulkStatus errors InlineBulkStatus currently returns 0 unconditionally, no matter what errors are encountered. If we encounter an error early enough, from CallPreamble for example, we do not fill in the OutStats nor CallBacks structures at all. Since we return success anyway, this results in the client getting AFSFetchStatus structures full of zeroes (or garbage, before commit 726e1e13ff93e2cc1ac21964dc8d906869e64406). Since current OpenAFS clients do not perform any sanity checks on the information received, this can result in cache corruption of files being seen incorrectly as empty, and, before commit 726e1e, more arbitrary corruption. So instead, return an error if we encounter an error before we iterate over the given FIDs. We still of course do not return an error for any errors encountered during the actual metadata retrieval, as those are reflected in the individual per-fid status structures. Reviewed-on: http://gerrit.openafs.org/6871 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 690a4c144b53fd1f3538d83017ecf581a2bcded5) Change-Id: I364b35cfa865d88ab664e45a5d1fc9c542cffc1a Reviewed-on: http://gerrit.openafs.org/6957 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c381d4b1511a187ce8da9429d79dda4b1869eff6 Author: Jeffrey Altman Date: Sun Mar 25 09:56:48 2012 -0400 doc: correct implicit ACL permissions volume owner OpenAFS changed the behavior of implicit administrator permission for directory ownership. In OpenAFS only the volume root directory owner has implicit administrator permissions and they apply to all directories in the volume not just those with matching ownership. Reviewed-on: http://gerrit.openafs.org/6951 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 95ec152a850c0cde33829481b8e71e7e7e686a58) Change-Id: I33fd24db250ef03a60f7f24853715e6f76d297a8 Reviewed-on: http://gerrit.openafs.org/6952 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 97f8a000b9220606f5ebc420710aea33dca444da Author: Jeffrey Altman Date: Thu Mar 22 15:55:47 2012 -0400 Windows: Client handling of VNOSERVICE VNOSERVICE should not be grouped together with the volume status error codes. It is used to indicate that the RPC was not serviced. The file server issues it when its idle dead timeout period is reached while receiving rx call data. The client's existing status information is still valid and the client can retry the call. Reviewed-on: http://gerrit.openafs.org/6938 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 39964d08792f3a09694f97d7c7fa76a86ca213a7) Change-Id: I2baf441144d24411907760175cc7fa665dc33e41 Reviewed-on: http://gerrit.openafs.org/6940 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d356da74cfbe89a5552ae3c232e422ba4328c76a Author: Marc Dionne Date: Wed Mar 21 22:19:04 2012 -0400 Linux 3.4: Switch to d_make_root If d_make_root is available, use it instead of d_alloc_root. The helper was introduced in 3.3, and d_alloc_root gets removed in 3.4. Reviewed-on: http://gerrit.openafs.org/6931 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f246aa5f84a5233b6525ae43456a8da5b7e92984) Change-Id: I036a3845d72f99c8ba647975593da496c12a53c1 Reviewed-on: http://gerrit.openafs.org/6932 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 55eceee5dbee51eb82b8988ea187fde16b910e82 Author: Andrew Deason Date: Wed Feb 22 15:40:20 2012 -0600 LINUX: Use afs_convert_code in afs_notify_change afs_notify_change currently just returns "-code". This can cause a panic if the error code is negative, since we will return a positive error code, which may get interpreted as a valid pointer value in higher levels. Specifically, if we hit afs_notify_change via something like this code path: do_sys_open -> do_filp_open -> open_namei -> may_open -> do_truncate -> notify_change -> afs_notify_change (via inode->i_op->setattr) the positive error value will be interpreted by do_sys_open as a valid 'struct file' pointer, and will be dereferenced. So pass the return value through afs_convert_code, like all of the other vnode ops, so we ensure we return an error properly. Reviewed-on: http://gerrit.openafs.org/6776 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 634c6f184b17e30ade86c0a838ab55ddddc730d6) Change-Id: I5083f6ce4bea5b3bea551e5d47155453b7ff2328 Reviewed-on: http://gerrit.openafs.org/6918 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit b44bb369dedd979b22d3cdbcc49208620c17daaf Author: Andrew Deason Date: Wed Feb 22 15:36:37 2012 -0600 LINUX: move afs_notify_change to osi_vnodeops.c afs_notify_change is almost always used solely in inode_operations structs, and is more similar to the other per-vnode functions. Put it with the other per-vnode functions for better organization, and so they can use the same static functions. Move the helper functions iattr2vattr and vattr2inode along with it. Reviewed-on: http://gerrit.openafs.org/6775 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 620d4169b73088579e691aec2cfdafc7f44e2fee) Change-Id: If721c0b13518f8a925f39bcfa1dff005ce97a6cb Reviewed-on: http://gerrit.openafs.org/6917 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1f00da1a68e362ae1b308cc3332bc0b859c01fd7 Author: Andrew Deason Date: Wed Mar 7 16:36:57 2012 -0600 afs: Never #define away afsd_dynamic_vcaches Some versions of the Solaris Studio compiler on SPARC (at least 12.2 and possibly others, but not 12.3) get a little confused by code like this: extern int foo; int somefunc(void) { if (0) return foo; return 0; } When optimization is turned off, this results in an undefined symbol reference to 'foo' (which is normal), but the resulting object file lacks a relocation entry for the symbol 'foo', so the symbol remains undefined after linking. In the OpenAFS tree, this occurs in afs_daemons.c which references afs_vcount and afs_cacheStats in this manner due to afsd_dynamic_vcaches being defined as '0' on Solaris. The end result is that the libafs kernel module is not loadable, since it complains about afs_vcount and afs_cacheStats being undefined, even though the symbol definitions are also in the module. While this is a bug in Solaris Studio and has since been fixed, it is simple to work around this so we are usable with more compilers. If we just always declare afsd_dynamic_vcaches as a regular variable, it works around this issue and keeps the code a tiny bit simpler. So, do that. Reviewed-on: http://gerrit.openafs.org/6888 Tested-by: Michael Meffie Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit e5821239cde138f74f73bec1bd9a3880d08ac3df) Change-Id: I42073ebc7d6822f05de89f1c38370dd70e5c7508 Reviewed-on: http://gerrit.openafs.org/6910 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 81375aa2e48bbf437ab258fe76a326a4700bd095 Author: Simon Wilkinson Date: Wed Mar 14 10:56:06 2012 -0400 rx: hold call->lock across RXS_PreparePacket RX Security Classes have a right to assume that when RXS_PreparePacket is called that they have exclusive access to the rx_call structure. Commit e445faa68c5ec6e47d3fd9d7318ade71d98703a9 unintentionally failed to acquire the call->lock prior to RXS_PreparePacket being called. Reviewed-on: http://gerrit.openafs.org/6904 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0fdcf171a8d2b2153648b6b799096e09eb469beb) Change-Id: I184a3c71418eb78742fbf1bf609daca1aea57f26 Reviewed-on: http://gerrit.openafs.org/6909 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4ea64ceb0b1e45820646a7d310f1172d230bd4bf Author: Jonathan Billings Date: Thu Mar 8 09:23:40 2012 -0500 redhat: Don't replace modified configuration files during rpm update The previous setting for three %config files mentioned in the spec file: %config /etc/sysconfig/openafs %config %{_prefix}/vice/etc/ThisCell %config %{_prefix}/vice/etc/cacheinfo When using an unadorned %config, it's possible that these files will be replaced by the packaged version during a package update. Changing %config to %config(noreplace) means that the packaged file will be installed with the extension .rpmnew if there is already a modified (from the existing package's version) file with the same name on the installed machine. The concern here is that updating an existing system could potentially change the configuration if the person installing doesn't pay close attention. The Rule of Least Surprise indicates that we should try to preserve existing configuration changes whenever possible. Change-Id: Ie132c12a3c5defe9bf6fec9ec0f8bd08f3d98646 Reviewed-on: http://gerrit.openafs.org/6887 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/6889 Tested-by: BuildBot commit f73c1a028e1c900af6777d7dad71115851d560f8 Author: Jens Wegener Date: Tue Mar 6 07:28:32 2012 -0600 viced: fix inverted lockCount assignment FIXES 130605 Reviewed-on: http://gerrit.openafs.org/6884 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 7dce85e4e5db7420c5c359fdd02a8005a12fb29c) Change-Id: I518c753e04d0e23ef2da39b0773b5c12c2833551 Reviewed-on: http://gerrit.openafs.org/6891 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 90c36a504d292e1c3835362ee90285f60e16894d Author: Jeffrey Altman Date: Sun Mar 4 16:18:22 2012 -0500 Windows: 1.6.1pre4 change log Change-Id: Ie00cd79a113a3729b0318da1856962fc613a2259 Reviewed-on: http://gerrit.openafs.org/6872 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f1c3eb41e31c483d9adf9adb4276a582ccb46b35 Author: Derrick Brashear Date: Sun Mar 4 09:48:07 2012 -0500 macos: don't crash on krb5 damage if we get success but still no client, don't crash Reviewed-on: http://gerrit.openafs.org/6868 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0a3f0608fcf6c14b44484cfa6fe106c568aa1035) Change-Id: I6c3147ab45552d9f393a05de21cc06d2dcabcf38 Reviewed-on: http://gerrit.openafs.org/6870 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 08028745bc88c4a5c55776419342e877a276ae46 Author: Dave Botsch Date: Thu Mar 1 12:43:36 2012 -0500 Fixes dkms.conf for Redhat Enterprise commit 8e0aaae076f4cccfd2d6ed81ede4e355235b578e , while fixing dkms.conf for Fedora, broke dkms.conf for RHEL. In RHEL, you get a dkms.conf with too many backslashes in the "mv" line. The dkms.conf should have the mv line reading: mv src/libafs/MODLOAD-*/\$KMODNAME \$DSTKMOD" for Fedora. This change checks if we are building on Fedora, and if so, maintains the extra backslashes. Otherwise, not. modified: src/packaging/RedHat/openafs.spec.in Uses the dist tags as specified at http://fedoraproject.org/wiki/Packaging:DistTag Reviewed-on: http://gerrit.openafs.org/6851 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 81a9a33e0bc5455841ba105dab52735c64c7096b) Change-Id: I7b1e09700d9b17e6616be71ab9dd8bc0a760996d Reviewed-on: http://gerrit.openafs.org/6862 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4f6d061ac6e19504fe8bccd9bcc720c0479999c3 Author: Jeffrey Altman Date: Thu Mar 1 15:49:12 2012 -0500 unix: always retry RX_CALL_BUSY RX_CALL_BUSY is an indication that the call channel is busy not that the server is down or otherwise cannot respond. Unconditionally retry the RPC and do not alter state. We just want to force the use of a different call channel. Reviewed-on: http://gerrit.openafs.org/6852 Tested-by: BuildBot Reviewed-by: Hartmut Reuter Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 579976cf246bd55dea2dfd3bf8470fd8bb8bde0a) Change-Id: I1ab5ed69dc707f13620d91a01227679c47bb97df Reviewed-on: http://gerrit.openafs.org/6853 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 572b2782e0d61670b4d95ac1ff6d3c0e1466febb Author: Jeffrey Altman Date: Wed Feb 29 13:07:47 2012 -0500 Windows: Workaround Win7 SMB Reconnect Bug The SMB specification permits the server to save a round trip in the GSS negotiation by sending an initial security blob. Unfortunately, doing so trips a bug in Windows 7 and Server 2008 R2 whereby the SMB 1.x redirector drops the blob on the floor after the first connection to the server and simply attempts to reuse the previous authentication context. This bug can be avoided by the server sending no security blob in the SMB_COM_NEGOTIATE response. This forces the client to send an initial GSS init_sec_context blob under all circumstances which works around the bug in Microsoft's code. Do not call smb_NegotiateExtendedSecurity(&secBlob, &secBlobLength); As a result of the SMB 1.x bug, all attempts to reconnect fail due to SMB connection resets. The SMB 1.x redirector will retry indefinitely but all processes with outstanding requests to \\AFS will block until the machine is rebooted. Reviewed-on: http://gerrit.openafs.org/6846 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 28a33f8492098c23f7c3c58763ace93b82ea80a7) Change-Id: Iae19a76dfbcb95c5e3cdea046a97f26feba86b33 Reviewed-on: http://gerrit.openafs.org/6848 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c533e10d2bb5d6f22ee54e2c43af06f13db037d1 Author: Jeffrey Altman Date: Sun Feb 26 14:45:43 2012 -0500 Windows: disable Adv ICF support if not supported OpenAFS 1.6.x does not require the use of SDK 6.0 or above. Therefore the Advanced Internet Connection Firewall support may not be available. In particular, the 32-bit distribution for 1.6.x does not rely on SDK 6.0 or higher. This is a 1.6.x only change. Change-Id: I8ab5bbf4c5d6e4893d5389c04ec020114a3d5683 Reviewed-on: http://gerrit.openafs.org/6841 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 72df2820f0957dfae55685802c5ffcf08d0f3ca3 Author: Jeffrey Altman Date: Sun Feb 26 10:52:53 2012 -0500 Windows: ChangeLog for 1.6.1pre3 Change-Id: Ie2264743a69f330718c3ddedfd5dd93b43294a8c Reviewed-on: http://gerrit.openafs.org/6838 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a7bcd00051aead840f4d85a21f0ef36b6b9819d0 Author: Jeffrey Altman Date: Tue Jan 17 19:46:30 2012 -0500 Windows: failover and retry for VBUSY When a file server returns the VBUSY error for an RPC the cache manager records the 'srv_busy' state in the cm_serverRef_t structure binding that file server to the active cm_volume_t object. The 'srv_busy' was never cleared which prevents the volume from being accessed. Clear the 'srv_busy' flag whenever cm_Analyze() receives a CM_ERROR_ALLBUSY error which means that all replicas have been tried or whenever the error is not VBUSY or VRESTARTING. FIXES 130537 Reviewed-on: http://gerrit.openafs.org/6563 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9056d09887c84a480e0a9ee3457a9469fbb97064) Change-Id: Ifd8204a3bba83a893188e96f85b1ad3ba078fe49 Reviewed-on: http://gerrit.openafs.org/6831 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 68dc637db6d99a48d7be0556916a8cc084843286 Author: Jeffrey Altman Date: Fri Nov 25 09:28:18 2011 -0500 Windows: improved idle dead time handling RX_CALL_IDLE has been treated the same as RX_CALL_DEAD which is a fatal error that results in the server being marked down. This is not the appropriate behavior for an idle dead timeout error which should not result in servers being marked down. Idle dead timeouts are locally generated and are an indication that the server: a. is severely overloaded and cannot process all incoming requests in a timely fashion. b. has a partition whose underlying disk (or iSCSI, etc) is failing and all I/O requests on that device are blocking. c. has a large number of threads blocking on a single vnode and cannot process requests for other vnodes as a result. d. is malicious. RX_CALL_IDLE is distinct from RX_DEAD_CALL in that idle dead timeout handling should permit failover to replicas when they exist in a timely fashion but in the non-replica case should not be triggered until the hard dead timeout. If the request cannot be retried, it should fail with an I/O error. The client should not retry a request to the same server as a result of an idle dead timeout. In addition, RX_CALL_IDLE indicates that the client has abandoned the call but the server has not. Therefore, the client cannot determine whether or not the RPC will eventually succeed and it must discard any status information it has about the object of the RPC if the RPC could have altered the object state upon success. This patchset splits the RX_CALL_DEAD processing in cm_Analyze() to clarify that only RX_CALL_DEAD errors result in the server being marked down. Since Rx idle dead timeout processing is per connection and idle dead timeouts must differ depending upon whether or not replica sites exist, cm_ConnBy*() are extended to select a connection based upon whether or not replica sites exist. A separate connection object is used for RPCs to replicated objects as compared to RPCs to non-replicated objects (volumes or vldb). For non-replica connections the idle dead timeout is set to the hard dead timeout. For replica connections the idle dead timeout is set to the configured idle dead timeout. Idle dead timeout events and whether or not a retry was triggered are logged to the Windows Event Log. cm_Analyze() is given a new 'storeOp' parameter which is non-zero when the execute RPC could modify the data on the file server. Reviewed-on: http://gerrit.openafs.org/6118 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit f768fb95f3eb3815d6225e074c43341ed2ad5347) Change-Id: If7194292be0fc2350af9f26c397bd3a1e840abdc Reviewed-on: http://gerrit.openafs.org/6830 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 778d922cee9a73c7d829b87aacec2513433c6a23 Author: Jeffrey Altman Date: Fri Feb 24 12:21:46 2012 -0500 Windows: cm_UpdateCell never applies to Freelance mode The Freelance.Local.Cell is updated by the registry monitor thread and cm_UpdateCell should be a no-op. Make it so. Reviewed-on: http://gerrit.openafs.org/6791 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cfb7f205d8153899c0165594a29d91926a40425d) Change-Id: I2607ea87ebcc849474f4e0a183d7ad4eba121de9 Reviewed-on: http://gerrit.openafs.org/6829 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b6084f4ac95613cd02c3cec71b26be4bd19af85d Author: Jeffrey Altman Date: Fri Feb 3 11:21:45 2012 -0500 Windows: fix cm_DirOpDelBuffer assert In cm_DirOpDelBuffer() the data version field for a buffer in cm_dirOp_t.buffers[] can be CM_BUF_VERSION_BAD if the buffer was added to the buffer list but was never fetched from the file server. If the buffer was recycled by buf_Get() an attempt to remove an entry from the directory will be failed as opposed to fetching the buffer from the file server and performing the local removal. Reviewed-on: http://gerrit.openafs.org/6650 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 865f2442e682ff71b28a6b21363de8262f9e2bd1) Change-Id: I4d822d9286ca891fc50cf04fdd68272c0af2e38e Reviewed-on: http://gerrit.openafs.org/6828 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b0f1de7e8e21c675e5c9f4f58c524b91930dc319 Author: Jeffrey Altman Date: Fri Feb 3 11:17:40 2012 -0500 Windows: buffer DV ranges do not work for directories In cm_MergeStatus, always set cm_scache_t.bufDataVersionLow to the new data version because the cm_dir package does not support version ranges. All modified dir buffers have their dataVersion field set to the current data version value. Failure to update the bufDataVersionLow field can result in B+ Trees being constructed from out of date directory information. Reviewed-on: http://gerrit.openafs.org/6649 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 25142a9c2db933607507ee20e20216c635465d6d) Change-Id: I9bdad7bed4ce76e0425adff433982b9bf35ac15f Reviewed-on: http://gerrit.openafs.org/6827 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 96c2ebd1e84c396348cc7a6ff2a8cd471d182d14 Author: Jeffrey Altman Date: Sun Jan 22 18:38:49 2012 -0500 Windows: VIOC_GETUNIXMODE = smb_IoctlGetUnixMode VIOC_GETUNIXMODE pioctl should execute smb_IoctlGetUnixMode not smb_IoctlSetUnixMode. Reviewed-on: http://gerrit.openafs.org/6600 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1474b4a739c60f96a8d2e38546778ab9572c138d) Change-Id: I248effacd831849f33fe0fd9785d3c00117a2607 Reviewed-on: http://gerrit.openafs.org/6826 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 01c9004cecce0b45b01aaa1dd1c36ff76eb8368b Author: Jeffrey Altman Date: Sun Jan 22 18:37:14 2012 -0500 Windows: fix fs setcrypt help message Options are on, auth, and off. Reviewed-on: http://gerrit.openafs.org/6599 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 898930fc3ca81a5e5dde31967c00cdf5f4734ffa) Change-Id: I6ef9294554eeedc9f6963a92b815e118fff87139 Reviewed-on: http://gerrit.openafs.org/6825 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0a42fc8d9a57601cd1a7d1e5ac2abc7d544c0dda Author: Jeffrey Altman Date: Sun Jan 22 18:33:43 2012 -0500 Windows; release BIOD after status merge Releasing the BIOD permits the accumulated buffers to be accessed. Releasing the BIOD before the cm_MergeStatus() call creates a window where the buffer data version is larger than the cm_scache data version. Release the BIOD after the status merge. Reviewed-on: http://gerrit.openafs.org/6598 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 111de76ea8dac713247c99ebe2182ae16cc0a3c0) Change-Id: I7c8dd9f3e22e83b82679b9d3a4ee3aa5f45a49aa Reviewed-on: http://gerrit.openafs.org/6824 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 25b96acb42b197de32f8d02aeb3526fe0517ebad Author: Jeffrey Altman Date: Thu Jan 19 15:25:44 2012 -0500 Windows: cm_buf refcnt must hold buf_globalLock An assertion in buf_Recycle() was being triggered when a cm_buf_t object was supposed to be in the free buffer list but wasn't. buf_Recycle() was racing with another thread. The test for refCount == 0 was performed while holding the buf_globalLock exclusively but the InterlockedDecrement(refCount) in buf_Release() was performed without holding buf_globalLock at all. buf_globalLOck must be held at least as a read lock. Otherwise, the refCount can reach 0 prior to the thread blocking for exclusive access to the buf_globalLock. This provides buf_Recycle() which is holding buf_globalLock the opportunity to race. The solution is to make sure that buf_Release() always holds buf_globalLock as a read lock and then use buf_ReleaseLocked() to perform the actual decrement and test. Reviewed-on: http://gerrit.openafs.org/6576 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 22cba8e9702f3673c335bf834a9ee2c5e5fd9b6e) Change-Id: I82c6480859a85e00e8602421204dac9a9ce588ed Reviewed-on: http://gerrit.openafs.org/6823 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e42640ec102838c8de2185e9247ac504b04aea09 Author: Jeffrey Altman Date: Sat Jan 14 10:31:01 2012 -0500 Windows: restrict service to 2 cpus by default Performance drops off considerably when the number of processors increases due to lock contention and the cm_SyncOp wait processing. If the MaxCPUs registry value is not set, limit ourselves to two. Setting MaxCPUs to zero permits use of all CPUs. Reviewed-on: http://gerrit.openafs.org/6555 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 69196e41ec9c5a6ce8efd370fb8582f66667bcf7) Change-Id: I0cf2d2eeb3d8f7c708e7c365520f10fcd5f22d83 Reviewed-on: http://gerrit.openafs.org/6822 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 361148b688197f636d034a4e512a2af7796e9e2c Author: Jeffrey Altman Date: Tue Jan 3 21:10:32 2012 -0500 Windows: dir buffers out of date - mark them as such if cm_CheckForSingleDirChange() fails, mark the cm_scache_t bufDataVersionLow as the current data version so that old directory buffers are discarded. Reviewed-on: http://gerrit.openafs.org/6498 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e77b6858ee889ec9e4e3fe3bb62c23b1c1f5727f) Change-Id: I8b149d3655c249fc3ea034d179b919f4370f19a2 Reviewed-on: http://gerrit.openafs.org/6821 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e942f4cfa0d5d0e17121dd14e30034d6826425f3 Author: Jeffrey Altman Date: Wed Dec 28 17:07:01 2011 -0500 Windows: replace strdup with xdr_alloc in callback processing The CRT allocator cannot be used for memory that will be freed by afsrpc.dll. Use xdr_alloc() instead. Reviewed-on: http://gerrit.openafs.org/6439 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 19f1e0f7cf40c3da1d49c789358bd814f7e3b3eb) Change-Id: Ie2359b4df312d090f0579ecd6d50ee197b51d68a Reviewed-on: http://gerrit.openafs.org/6820 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 97e5b174b30d0987730bf983c5ba3504aea69aa2 Author: Jeffrey Altman Date: Sat Dec 24 15:16:12 2011 -0500 Windows: kauth search for kerberos iv port first Modify src/kauth/user_nt.c to match the service name search order of the Unix code: kerberos4 kerberos-iv kerberos The standard Windows SERVICES file includes "kerberos-iv" as port 750. FIXES 127907 Reviewed-on: http://gerrit.openafs.org/6430 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 2cdd59d8f318193d0ef7937910466531caf1c963) Change-Id: I936c35bbd45395f26ad6c523b72398584d1384f9 Reviewed-on: http://gerrit.openafs.org/6819 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8b80435a4619c599856b059df0bda63cf8daf232 Author: Jeffrey Altman Date: Sat Dec 24 03:11:04 2011 -0500 Windows: cm_BufWrite() must wait in cm_SyncOp() Now that it is permissible for more than one store data operation to construct BIOD lists in parallel, cm_BufWrite() must be willing to wait in cm_SyncOp(). Otherwise, the daemon threads will spin. Reviewed-on: http://gerrit.openafs.org/6423 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 17ce77f843e01ff96f66e05b4b932b0c6187493e) Change-Id: I8ae9d057413252e73774c5209465223fa5a36947 Reviewed-on: http://gerrit.openafs.org/6818 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 611d5564bd1c378a560c09451aa223af2d3cbf57 Author: Jeffrey Altman Date: Sun Dec 18 12:08:24 2011 -0500 Windows: terminate HOSTS/LMHOSTS with newline If the original file did not terminate with a newline, add one before appending the "AFS" entry. FIXES 130210 Reviewed-on: http://gerrit.openafs.org/6375 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2d8f9141fa98df50ce682364ef5a7958ce422613) Change-Id: I1a95a42b420b4695b52ae0c2e2de46cd97a5294a Reviewed-on: http://gerrit.openafs.org/6817 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5c5e47c0809a1c782b08d89028ea372c932e198b Author: Jeffrey Altman Date: Wed Dec 14 12:58:36 2011 -0500 Windows: Update Adv Firewall Rules Do not specify the Service Name property. According to feedback on openafs-info the Service Name blocks the rule from working properly. If the rule already exists, attempt to remove the Service Name filter and update NAT Edge Traversal and Permitted interface rules. Reviewed-on: http://gerrit.openafs.org/6332 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2d472f94ab1017724e56bcdd29b9ef451a13f182) Change-Id: I8184074adbd4c19426d87d48673402b3c8cd97a3 Reviewed-on: http://gerrit.openafs.org/6816 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 881ba096d2849707c26a7e0bd14d536a79fd5cc1 Author: Jeffrey Altman Date: Sat Dec 10 13:28:17 2011 -0500 Windows: memory leak when setting tokens via smb The SID string of the RPC used to set the token sessionKey was being leaked. Be sure to free it when it is no longer required. Reviewed-on: http://gerrit.openafs.org/6244 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f30d70ba5575753302be0a2b08c27a639898d4aa) Change-Id: I1133b50841919ca5957081c82625c2b1607c34ae Reviewed-on: http://gerrit.openafs.org/6815 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit aacc6f18ba5648e2f86276bc8bb88655a37caf4d Author: Jeffrey Altman Date: Sat Dec 3 17:49:47 2011 -0500 Windows: apply Nat Pings only to cm_rootUser connections Use CM_UCELLFLAG_ROOTUSER flag to identify the cm_rootUser connections and only apply Nat pings to those connections instead of examining the security state of the connection. Reviewed-on: http://gerrit.openafs.org/6208 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 01f55bbf14210ef3e4f4c0246409af370de3a383) Change-Id: Id26a955190aace50ca4740b910325474077941e1 Reviewed-on: http://gerrit.openafs.org/6814 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c162907bd09828fe26d84dd9202b81e87d235610 Author: Jeffrey Altman Date: Sat Dec 3 17:46:41 2011 -0500 Windows: track cm_rootUser connections Add CM_UCELLFLAG_ROOTUSER flag to cm_ucell_t for the purpose of tracking which connections belong to the cm_rootUser. Reviewed-on: http://gerrit.openafs.org/6207 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2495d02951fa1a9f6f48cc2a5bc7750f310dae75) Change-Id: Ie0014200d9e3ed3832bf875a9788aad1f55f29ec Reviewed-on: http://gerrit.openafs.org/6813 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7193b01dfa750b371de63a4003666773e15a84ae Author: Jeffrey Altman Date: Fri Dec 2 11:19:13 2011 -0500 Windows: fix buf_Recycle() comment buf_Recycle() does not return with a reference count to the cm_buf_t object held. Correct the comment. Reviewed-on: http://gerrit.openafs.org/6173 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7dccf17840a53e96b21f8c092910f3e4d7628b71) Change-Id: I0890439df967f8b2a87d5079adcd71a646500876 Reviewed-on: http://gerrit.openafs.org/6812 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 13c676b0ab44f4b369d43652c2e509201e5a4a8f Author: Jeffrey Altman Date: Fri Dec 2 11:14:11 2011 -0500 Windows: buf_CleanAsync is not async; rename it buf_CleanAsync() calls cm_BufWrite() which stores the dirty buffers synchronously. There is nothing asynchronous about buf_CleanAsync() so rename it to buf_Clean() and buf_CleanAsyncLocked() to buf_CleanLocked(). Update the comments to remove the references to the asynchronous processing which doesn't exist. That is not to say that the call to buf_Clean() in buf_GetNewLocked() should not be asynchronous; it should. There is no such functionality at the moment. One approach would be to modify buf_IncrSyncer to trigger on an event set by buf_GetNewLocked() instead of the call to buf_Clean(). Another approach would be registering a background store event. In any case, that is for another patchset. Reviewed-on: http://gerrit.openafs.org/6172 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c712403f192bd9932f3ec1dce5fb23461d3d0349) Change-Id: Ib8d5bb06b0c4ffa3e53d53e24ca9f970b7cb63b0 Reviewed-on: http://gerrit.openafs.org/6811 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit af58b42210a6976c512b746dd59dd63ceb0000e8 Author: Jeffrey Altman Date: Mon Nov 28 18:45:55 2011 -0500 Windows: Wix cell names can be greater than 120 chars Increase the permitted length in the UI to 255 characters. Reviewed-on: http://gerrit.openafs.org/6133 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit bf4f9f33dc55150d991d9eec4ea95d78208f6949) Change-Id: Ibf24b85990a054e84724c52e481c19098fe5cbe0 Reviewed-on: http://gerrit.openafs.org/6810 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 256a9f51c024680bc2898d73d72574c63c5cd220 Author: Jeffrey Altman Date: Mon Nov 21 13:14:40 2011 -0500 Windows: cm_GetSCache do not release unheld lock if cm_GetNewSCache() fails, an attempt would be made to release cm_scacheLock which is not held. However, it should be noted that cm_GetNewSCache() cannot fail without itself triggering a panic. Reviewed-on: http://gerrit.openafs.org/6103 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit d42db13152fb8fa374db6531020da6effca51ab4) Change-Id: Ibb3aff0a256c6846ac8b9336a50ea021f8a1e2f6 Reviewed-on: http://gerrit.openafs.org/6809 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2866c3f1b941840c54f5d5f05bd85cba9b997f94 Author: Jeffrey Altman Date: Tue Nov 15 18:35:26 2011 -0500 Windows: buf_CleanAsyncLocked dirty range only buf_CleanAsyncLocked() should not instruct cm_BufWrite() to write a full chunk if the current buffer is the only one that is dirty. cm_BufWrite() will determine if it is appropriate to fill a full chunk when storing. Instructing it to check a full chunk forces it to do more work than necessary. Reviewed-on: http://gerrit.openafs.org/6054 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fd42e08bf1882a02c3200e1c33a101e644aa046a) Change-Id: Ibbd823feb5fe18f0ab0ee54af8c9b8ccb531c8bc Reviewed-on: http://gerrit.openafs.org/6808 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 072397a05ed2115334f57c55460ad0cc68029700 Author: Jeffrey Altman Date: Tue Nov 15 19:00:05 2011 -0500 Windows: cm_SetupStoreBIOD use firstModOffset chunk When cm_SetupStoreBIOD attempts to store a chunk to the file server it should not use *inOffsetp as the start of the range. There is no guarantee that the buffer at *inOffsetp is dirty. Instead use firstModOffset which refers to the first known dirty buffer in the range specified by the caller. Attempt to fill a chunk of consecutive dirty buffers from that point. Reviewed-on: http://gerrit.openafs.org/6057 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 320c7292e6ae014e44e89b0da736bcc04ef42b2b) Change-Id: I26f7fc9e0c7281ca2118205d7916102c2471bb43 Reviewed-on: http://gerrit.openafs.org/6807 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2c9be3970bbb8ce83904c9db29045ff01942eae2 Author: Jeffrey Altman Date: Sat Nov 12 18:33:18 2011 -0500 Windows: smb_ReceiveNTCreateX create smb_fid earlier smb_ReceiveNTCreateX() calls cm_CheckNTOpen() which now requires the smb_fid_t allocated fid value for use in share mode locking. Move the allocation of the smb_fid earlier in the function and apply necessary cleanup in error paths. Reviewed-on: http://gerrit.openafs.org/6004 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 38fbf93fcc21aaecbf9a7e27d19131b9de4c3839) Change-Id: I9399d8f16ee236b4724a0ec825fca1ce72f363ce Reviewed-on: http://gerrit.openafs.org/6806 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 78e38ffb2ab56e0f7db732c92087b23842c6e46d Author: Jeffrey Altman Date: Sat Nov 12 13:41:30 2011 -0500 Windows: fix locking hierarchy in service The smb username lock and the daemon global lock can be requested while the scache dirlock is held if there are no free buffers and the service is forced to claw back extents from the redirector. Adjust the locking hierarchy accordingly. Reviewed-on: http://gerrit.openafs.org/6000 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2fc9edc6e34ebef60413fad9a2af2aa73ea1681f) Change-Id: I74e87494c1360c61812908e3b4fb012829f71cf3 Reviewed-on: http://gerrit.openafs.org/6805 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cdec970530b720feafe3f79c255466bd13d13807 Author: Jeffrey Altman Date: Sat Sep 3 18:17:21 2011 -0400 Windows: log SMB or RDR in use at startup SMB only in 1.6 Reviewed-on: http://gerrit.openafs.org/5338 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit b861e17c0bc34ea2042879bc705f5d26a7e0a77f) Change-Id: I67569c2d261a8afbbffbe7777e360139d25c73ca Reviewed-on: http://gerrit.openafs.org/6804 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a9f90d49c5790dbb86a0ebc348288b4f66c8253f Author: Jeffrey Altman Date: Sun Oct 24 00:21:26 2010 -0400 Windows: Add version number to event log start pending message LICENSE MIT Reviewed-on: http://gerrit.openafs.org/3034 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b743b32b8b715edf673833a150f9f3d5a72b0b39) Change-Id: Id7fb16cc9b7d00cb0a880bbdad9dff7bfffff78b Reviewed-on: http://gerrit.openafs.org/6803 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 15f3a7ed4ef9cd47a291cca2ad877d1214c02eaf Author: Jeffrey Altman Date: Sun Aug 28 12:03:53 2011 -0400 Windows: afslogon network provider debug registry value create a new TransarcAFSDaemon\NetworkProvider "Debug" value to be used for activating the network provider debugging. The overlapping use of TransarcAFSDaemon\Parameters "TraceOption" is just too confusing. Permit both methods to be used. Reviewed-on: http://gerrit.openafs.org/5316 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3d4e111dd6c4201476e7447fdfaa27ed630032c5) Change-Id: Ibc8b56d64aa843076b191afa42c4a3e93cf7a26f Reviewed-on: http://gerrit.openafs.org/6802 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 91f98123ae7eb1a12b17a0b07d7a2f11066cfbff Author: Jeffrey Altman Date: Fri Aug 26 13:57:15 2011 -0400 Windows: afslogon.dll is not a file system interface Do not return a file system network type that corresponds to a real file system inter since afslogon is in fact not associated with a file system interface. We can't return WNNC_NET_NONE (0) because that prevents NPLogonNotify() from being executed. However, if we return an in use file system value that can confuse the system when the actual file system's network provider is also installed. Reviewed-on: http://gerrit.openafs.org/5313 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9052974812e33d186613c31e318673f9268467c6) Change-Id: I60bc66440b548c3901914df8193c3999c3388abc Reviewed-on: http://gerrit.openafs.org/6801 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1f5f00810ab9cc48e3bc1a290253373b167f61bf Author: Jeffrey Altman Date: Fri Aug 26 09:36:04 2011 -0400 Windows: torture error reporting When LeaveThread() is called and GetLastError() has already been called, pass the last error value to LeaveThread(). Otherwise, the GetLastError() call in LeaveThread() may return an inaccurrate result. Reviewed-on: http://gerrit.openafs.org/5312 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 209d59a61ba9614a8b9d231d828f74a3e9bdaa27) Change-Id: I8f1b5b6431bad4413e7d81c95835ed852fbba16f Reviewed-on: http://gerrit.openafs.org/6800 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d1630cabac0631bc47b21f11eecb376261a02756 Author: Jeffrey Altman Date: Tue Aug 23 16:02:28 2011 -0400 Windows: change buf_Find*() signature to accept cm_fid_t The buf_Find*() functions require a cm_fid_t to match with the cm_buf_t objects not a cm_scache_t. Change the signature so that the cm_scache_t is not required. It should be possible to search for a buffer even if the cm_scache_t is not present in the cache. Reviewed-on: http://gerrit.openafs.org/5304 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c23b27a69322f4c9963a532d5cbcb136b23bb20c) Change-Id: Ie4546de582e0ffe9103f1bb01e05cf387265da49 Reviewed-on: http://gerrit.openafs.org/6799 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d3360cbbe6f5538abcac87ad279081aac8046d8a Author: Jeffrey Altman Date: Sun Aug 21 00:37:34 2011 -0400 Windows: do not drop lock unnecessarily do not drop cm_serverLock for a cm_PutServer call since it will only reacquire it. use cm_PutServerNoLock() instead. Reviewed-on: http://gerrit.openafs.org/5302 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b804e027f1a9d8dfaad3d348390a83493b53a6c7) Change-Id: Ic9c4f1550636555568e3c67b2bb5f9e772116e9f Reviewed-on: http://gerrit.openafs.org/6798 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 73ce89e84fe31635c02bb20b1abd3e77b4425e97 Author: Jeffrey Altman Date: Sun Aug 21 00:36:44 2011 -0400 Windows: cm_serverLock read required not write Reviewed-on: http://gerrit.openafs.org/5301 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit bca64c70467afd00ca02290a4236bc295ec4633c) Change-Id: I9c0c04ce619f2f85ae821621f9468715ba7deefe Reviewed-on: http://gerrit.openafs.org/6797 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3abed6bdbbc08c8362a327fd6ede493a08798cc5 Author: Jeffrey Altman Date: Thu Aug 18 21:57:12 2011 -0400 Windows: be explicit when mapping sharing violation Only one lock acquistion failure should be mapping to CM_ERROR_SHARING_VIOLATION. That is CM_ERROR_LOCK_NOT_GRANTED. Make it clear that is what we are doing. Reviewed-on: http://gerrit.openafs.org/5299 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a576ff1e53a539e88b9f3fa6b8132d4f161b0bd4) Change-Id: I558c6989a2a8f4042129e2a60bcd340a7863222c Reviewed-on: http://gerrit.openafs.org/6796 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4078a389959d3aacb805e62edef0891db7e44306 Author: Jeffrey Altman Date: Tue Aug 9 14:26:33 2011 -0400 Windows: avoid duplicate volume update queries If multiple volume update queries have stacked up in cm_UpdateVolumeLocation() and the active query failed, do not re-issued the blocked queries. Instead, prevent new queries for 60 seconds and fail those that blocked during the active query. Reviewed-on: http://gerrit.openafs.org/5296 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 21acdd92c8510a9f99243588388a2a1078547533) Change-Id: I7f0bc97ca7c194624ac854558bbed6b93a13ce63 Reviewed-on: http://gerrit.openafs.org/6795 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 36120d812be2a86a094135a9c37a460ec67d7035 Author: Jeffrey Altman Date: Thu Aug 4 17:21:59 2011 -0400 Windows: fix condition calls to osi_Log The osi_Log macro is if(foo) osi_AddLog() If osi_Log macros will be conditionally called, the conditonal needs to have bracing. Reviewed-on: http://gerrit.openafs.org/5160 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4e42d6fd18097d0c8d2e4b455d3c540743d7dbda) Change-Id: Ic8063144a5069736c95a57965a28d6a101749b3e Reviewed-on: http://gerrit.openafs.org/6794 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 344f7fc6087d1ecf0a76be300700b72122d14467 Author: Andrew Deason Date: Thu Feb 23 18:28:21 2012 -0600 Rewrite make_h_tree.pl in shell script The current usage of make_h_tree.pl adds a build requirement of /usr/bin/perl that we did not have prior to commit 1d6593e952ce82c778b1cd6e40c6e22ec756daf1. Do the same thing in a bourne shell script instead, so we don't need perl. Note that this is not as generalized as make_h_tree.pl, but it doesn't need to be. Specifically, this does not strip a leading ../ from found include directives (nothing in the tree that includes h/* files uses this), and header filenames containing whitespace almost certainly do not work correctly. The h => sys mapping is also much more hardcoded, but that's all we were using this for anyway. Reviewed-on: http://gerrit.openafs.org/6790 Reviewed-by: Russ Allbery Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fb03b1380f82a6bdc8a78ad92069da38b4e98c26) Change-Id: If6bfedea0b563dce6135fbf2f4554ee602ee822c Reviewed-on: http://gerrit.openafs.org/6793 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bea2a94610335939d6ef869489ce5bd19d1a11da Author: Andrew Deason Date: Tue Feb 21 15:28:08 2012 -0600 salvager: Do not abort on large volume IDs We have already checked that 'vid' is valid; no need to check if it is negative. Also change vid to be a VolumeId. This is partially cherry-picked from 0884e9d0fddf2be81abf6468209048331efa8a1e. The commit 4d691ae10903e01db4d6b24a4eb02da536cadf7c is comprised of changes from both ce5e263b488f8cb85662031ee08eea448dab2d27 and 0884e9d0fddf2be81abf6468209048331efa8a1e, but it missed a few things from 0884e9d0fddf2be81abf6468209048331efa8a1e. This commit brings in the rest of the changes from 0884e9d0fddf2be81abf6468209048331efa8a1e. Change-Id: I8e001bfe81128b2e2214b3b2fa83e4797374022b Reviewed-on: http://gerrit.openafs.org/6778 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8a0bc72693cf7e735539f10e55b292f59ca0ad6f Author: Derrick Brashear Date: Wed Feb 22 15:57:46 2012 -0500 libafs: retry retriable RPCs instead of abandoning if we get e.g. an idle dead error we should retry retriable actions, namely data stores. in order for writing files to work correctly given how the writeback code is structured it's important that this not interfere with analyze's shouldRetry decision on those RPCs Reviewed-on: http://gerrit.openafs.org/6749 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 75a3dabe66a9fbc232b05e2f744ad5b867e18262) Change-Id: I9c611eeb9a71298e9725268392cdf94074324bf1 Reviewed-on: http://gerrit.openafs.org/6777 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fcdd20e389282607616b23f912a22ff5c352ce70 Author: Derrick Brashear Date: Sun Feb 12 22:45:59 2012 -0500 libafs: ensure one nat ping connection per srvAddr track the natping conn with the srvAddr, ensuring exactly one. Reviewed-on: http://gerrit.openafs.org/6706 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2378895fc66a19a050f302711f2e18dbbf2e3d6f) Change-Id: I5e74ec3f46f9af335653b6910d2c31c788181c5c Reviewed-on: http://gerrit.openafs.org/6772 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit 3cc6da964e3705b070f8886686484d6a1eb700c8 Author: Marc Dionne Date: Mon Feb 20 17:56:29 2012 -0500 volser: Remove unused variable tid is now unused - remove it to avoid a warning. Reviewed-on: http://gerrit.openafs.org/6743 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fd19b39b151e3dddd18b4280252ac3e0fdf3964d) Change-Id: Ib402c84689d61baefed3b76138f7fac7c2b36de0 Reviewed-on: http://gerrit.openafs.org/6771 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit a498e1ff26fe01cc0a60474f76ff8fa32e0086ba Author: Andrew Deason Date: Fri Feb 17 17:12:46 2012 -0600 viced: Relax "h_TossStuff_r failed" warnings Currently, h_TossStuff_r bails out and logs a message if we detect that somebody grabbed a reference or locked the host while we tried to h_NBLock_r. The reasoning for this is that it is not legal for anyone to h_Hold_r a host that has HOSTDELETED set (but the error is detectable and recoverable); callers are supposed to check for HOSTDELETED and not hold a host in that case. However, HOSTDELETED may not be set when h_TossStuff_r is called, since we call it if either HOSTDELETED _or_ CLIENTDELETED are set. If CLIENTDELETED is set and HOSTDELETED is not, it's perfectly fine (and necessary) for callers to grab a reference to the host. So, if that's what is going on, don't log a message, since that's normal behavior. Check for HOSTDELETED before we h_NBLock_r, since it is technically possible (and legal) for someone to grab a reference to the host and somehow set HOSTDELETED while we wa