[OpenAFS-devel] patch: make jafs work again (at least the libadmin portion)
Adam Megacz
megacz@cs.berkeley.edu
Fri, 14 Dec 2007 13:11:28 -0800
--=-=-=
This patch fixes some problems with jafs; after applying it I'm able
to use the portion that corresponds to libadmin.
Changes:
- Add a Token(cellname) constructor which extracts the token from
the kernel cache manager (assumes we're on a system that has a
cache manager). This calls afsclient_TokenGetExisting(). Use
this if you're in a non-kaserver cell.
- Updates to make the Java 1.5 compiler happy.
- Updates to command-line include options
- Link with libafsutil.a (for strlcpy())
--=-=-=
Content-Type: application/octet-stream
Content-Disposition: attachment;
filename=openafs-jafs-token-from-kernel-patch
Content-Transfer-Encoding: base64
PyBjb25mLnNoCj8gbm9odXAub3V0Cj8gc3JjL2NvbmYuc2gKPyBzcmMvSkFWQS9jbGFzc2VzL29y
Zy9vcGVuYWZzL2phZnMvQUNMJEVudHJ5LmNsYXNzCj8gc3JjL0pBVkEvY2xhc3Nlcy9vcmcvb3Bl
bmFmcy9qYWZzL0FDTC5jbGFzcwo/IHNyYy9KQVZBL2NsYXNzZXMvb3JnL29wZW5hZnMvamFmcy9B
RlNFeGNlcHRpb24uY2xhc3MKPyBzcmMvSkFWQS9jbGFzc2VzL29yZy9vcGVuYWZzL2phZnMvQUZT
RmlsZUV4Y2VwdGlvbi5jbGFzcwo/IHNyYy9KQVZBL2NsYXNzZXMvb3JnL29wZW5hZnMvamFmcy9B
RlNMaWJyYXJ5TG9hZGVyLmNsYXNzCj8gc3JjL0pBVkEvY2xhc3Nlcy9vcmcvb3BlbmFmcy9qYWZz
L0FGU1NlY3VyaXR5RXhjZXB0aW9uLmNsYXNzCj8gc3JjL0pBVkEvY2xhc3Nlcy9vcmcvb3BlbmFm
cy9qYWZzL0FGU1NodXRkb3duSGFuZGxlci5jbGFzcwo/IHNyYy9KQVZBL2NsYXNzZXMvb3JnL29w
ZW5hZnMvamFmcy9DZWxsLmNsYXNzCj8gc3JjL0pBVkEvY2xhc3Nlcy9vcmcvb3BlbmFmcy9qYWZ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