bos: remove smail-notifier smail-notifier is a sample program that is undocumented and has not been well maintained. It produces copious compiler warnings, and would require effort to bring the code up to decent coding practices. The bosserver provides a -notifier feature that can be used for notifications, but that feature does not depend on this sample program. Removed the code, cleaned up the Makefiles and .gitignore. Change-Id: I6bd56559121d12ad007acc571b6653aa934eb97f Reviewed-on: https://gerrit.openafs.org/13509 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
build: declare test targets as phony Modern versions `make` will not build the 'test' target since a directory exists with the same name. $ grep -C1 '^test:' Makefile test: cd test; $(MAKE) $ make test make: 'test' is up to date. Declare these targets as .PHONY to force make to build the test programs even when the 'test' directory is present. Also use '&&' to concatenate commands instead ';' to avoid running the second command when the first fails. Change-Id: Id561d7610f80b87b59c632801fa0a4b216feb42d Reviewed-on: https://gerrit.openafs.org/13419 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
build: remove trailing whitespace from makefiles Remove trailing whitespace from the makefiles, except for trailing whitespace in the boilerplate comment headers. Change-Id: Ib8ee87a51f00633ba15e1974ac0b311969bef1bf Reviewed-on: http://gerrit.openafs.org/11456 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil> Reviewed-by: D Brashear <shadow@your-file-system.com> Tested-by: D Brashear <shadow@your-file-system.com>
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. Change-Id: I804ff553e08d411a1cfe20a4ef4e57da9d321837 Reviewed-on: http://gerrit.openafs.org/10370 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil> Reviewed-by: D Brashear <shadow@your-file-system.com>
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 Change-Id: I14c056606084f80270e05592d3d09a600f804e24 Reviewed-on: http://gerrit.openafs.org/10237 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Reviewed-by: Derrick Brashear <shadow@your-file-system.com> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Use rfc3961 library to decrypt kerberos 5 tickets Decrypt tickets with non-des enctypes by calling out to the rfc3961 library. This requires the security object to be given an enhanced get_key callback that supports looking up keys by enctype. Include a wrapper around afsconf_GetKeyByTypes so rxkad doesn't have to know anything about libauth internals/interfaces Change-Id: Id2b085fb41e2ed3576ec66b2914c03e78c0077ec
Build: link libaudit before util libaudit depends on util symbols, so link it first to avoid unresolved symbols. Include libaudit in the list of libs instead of making it a special case. Change-Id: Ide6d5f7e3ce8fd76b504088dcae3110872a87092 Reviewed-on: http://gerrit.openafs.org/6847 Tested-by: Derrick Brashear <shadow@dementix.org> Reviewed-by: Derrick Brashear <shadow@dementix.org>
bozo: build notifier sample program Build the smail-notifier sample program. Change-Id: Ida2fd16e486934c984b2431c95c3a24966b3b2b7 Reviewed-on: http://gerrit.openafs.org/5555 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
Move string manipulation functions out of util Some functions in libafsutil depend upon the RX libraries, which means that pulling in other functions in this library can create a dependency upon RX. This is less than ideal for low-level libraries such as cmd and comerr. So, create a new low-level library (currently named 'opr') which can contain low-level functions from util, and elsewhere. This library should have no dependencies other than on system libraries and libroken. Change-Id: I703db3da4d8faf79ee82bf572af09d07152d9b25 Reviewed-on: http://gerrit.openafs.org/5363 Reviewed-by: Derrick Brashear <shadow@dementix.org> Tested-by: Derrick Brashear <shadow@dementix.org>
Build system: Move install definitions to include Move the definitions of the INSTALL_* variables out to Makefile.config rather than replicating them in each file. Change-Id: I5f74dcbf544a93716994418bee3be2c51a2a82d0 Reviewed-on: http://gerrit.openafs.org/4781 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>
Rename libcom_err to libafscom_err We no longer provide a compatible libcom_err, and in fact we renamed the symbols in our libcom_err several years ago to reflect this fact. When we build on a system where KRB5_LIBS includes -lkrb5 -lcom_err , the new Unix build system will pick up our libcom_err (as $(AFS_LDFLAGS) is the first argument in AFS_LDRULE and pulls in a linker search path for our libcom_err) which does not provide all the needed symbols for libkrb5. Fully rename our libcom_err away to avoid these conflicts. FIXES 128640 Change-Id: Ifdd677609f432d42252b1716fc5e8755f3a44640 Reviewed-on: http://gerrit.openafs.org/3547 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
bozo: Fix linker problem on Linux Some unconnected changes break the Linux linker when faced with this library list. librx is included too early, and liblwp isn't included after the second inclusion of librx. Reorder the library list to fix this problem, and so it matches the library order in the rest of our modules. Change-Id: Iba19111f613c70c8a6e66539b437a99d58faf7f4 Reviewed-on: http://gerrit.openafs.org/3775 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>
Remove extra trailing \s in Makefiles Remove a few extra trailing \s in Makefiles in viced and bozo. Some 'make's (such as the make on HP-UX) interpret this to e.g. include the following "headers=" stuff to be included in LIBS, which obviously causes problems. Change-Id: I7a49ce5b8d40636bb3b4fe7978aa25b5411c7eed Reviewed-on: http://gerrit.openafs.org/3575 Tested-by: BuildBot <buildbot@rampaginggeek.com> Tested-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Derrick Brashear <shadow@dementia.org>
Remove local crypto This change removes all of the local crypto use in userspace, in favour of using our shiny new afshcrypto library. Change-Id: Iac21b42e49bac424cc28c449a31f2da44121b7e5 Reviewed-on: http://gerrit.openafs.org/2577 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>
libroken: Build on windows A minimal change set to get libroken to build on Windows. Sadly, libroken contains definitions for a number of platform compatibility macros which were previously scattered throughout the windows code. These scattered macros have to be removed in order to build libroken. The impact of this removal is that a very large number of files throughout the tree require the addition of "roken.h" to pick up the new compatibility code. The bulk of this change is adding these includes. In addition, some of the added includes add roken dependencies to the Unix build. So, also add libroken to the build rules in affected Unix Makefiles. Change-Id: Ifba431bd37e67b1e273fbc6f69b805a232193456 Reviewed-on: http://gerrit.openafs.org/3205 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>
Unix: Rework build system Rework the unix build system so that we support taking CFLAGS and LDFLAGS from the command line, and don't replace them with our own settings. Also, take the opportunity to bring some sanity and consistency into our Makefiles. The standard Makefile.config now defines rules for LWP, pthreaded and shared library builds. The CFLAGS settings for these are called LWP_CFLAGS, PTH_CFLAGS and SHD_CFLAGS, respectively. Similarly named variables are provided for LDFLAGS. A module may select to use a particular build type for its suffix rule by including either Makefile.lwp, Makefile.pthread or Makefile.shared from src/config. This creates an appropriate .c.o suffix rule, defines AFS_CFLAGS and AFS_LDFLAGS as appropriate, and creates two rules AFS_CCRULE and AFS_LDRULE, which can be used to build, and link objects. For example: foo.o: foo.c $(AFS_CCRULE) foo.c foo: foo.o $(AFS_LDRULE) foo.o If a you wish to override the CFLAGS or LDFLAGS for an object build using these rules (or through the .c.o suffix rule) you can do so, by defining CFLAGS_<object> or LDFLAGS_<object>. For example: CFLAGS_foo.o= -DDEBUG LDFLAGS_foo = -ldebugging A module may also alter the behaviour of the compile and link steps module wide by defining MODULE_CFLAGS or MODULE_LDFLAGS. This functionality is now used throughout the tree: *) Suffix rules are used wherever possible, removing a number of unecessary build rules. *) All link steps are replaced with AFS_LDRULE *) All standard compile steps are replaced with AFS_CCRULE *) Unusal compile steps are defined, as far as possible, int terms of the LWP_ PTH_ and SHD_ variables. *) The use of $? has been removed entirely, as it makes it impossible to provide build rules with dependency information Change-Id: If76207e45da402a0ed9d7c1bdbe83c58c911a4f2 Reviewed-on: http://gerrit.openafs.org/2896 Tested-by: BuildBot <buildbot@rampaginggeek.com> Tested-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Derrick Brashear <shadow@dementia.org>
Eliminate $< outside of pattern rules The $< variable in makefiles is not portable when used outside of pattern rules. Replace each usage with the actual name of the file we want. Change-Id: Idc9309e7d7bd3b1bd93e8225507b8b53c9433d69 Reviewed-on: http://gerrit.openafs.org/2523 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
generated file target in order to cross compile, allow a way to generate generated files on the host Change-Id: I9639f350b179dbeb3d45802e8685da88a3b06c83 Reviewed-on: http://gerrit.openafs.org/2147 Tested-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Derrick Brashear <shadow@dementia.org>
Warning fixes - key handling Various warning fixes related mostly to the different types used to handle keys. This should clear most of the remaining warnings in this area. The technique of inline converter helpers is extended to cover a few more cases. README.WARNINGS is adjusted to reflect the current status. Fixes: - bos: define and use an inline converter from a ktc key to a bozo key - bos.c and bos_utils.c should no longer have warnings - adjust Makefile - define a ktc key to char * converter and use it in a few places - define kas key to bozo key ptr converter and use it in a few places (afs_bosAdmin) - cast a few arguments to ka_StringToKey which expects non-const pointers Change-Id: I1c19869ac232d78209126d4eeeb11af8bcb95815 Reviewed-on: http://gerrit.openafs.org/860 Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Fix des key type issue in bosoprocs The call to afsconf_AddKey was using 'akey' rather than 'akey->data'. As data is the first element of the akey structure, these are actually identical, but the compiler sees it as a type error. Fix to use the correct name, and remove the warning inhibition. Change-Id: Id4775a836276ddd6f5ae105c298dcc3c68b92145 Reviewed-on: http://gerrit.openafs.org/810 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>