Add an atomic shm rename operation, similar in spirit to a file rename. Atomically unlink an shm from a source path and link it to a destination path. If an existing shm is linked at the destination path, unlink it as part of the same atomic operation. The caller needs the same permissions as shm_unlink to the shm being renamed, and the same permissions for the shm at the destination which is being unlinked, if it exists. If those fail, EACCES is returned, as with the other shm_* syscalls.
I've included truss support, but not audit support yet. I have an email from Robert Watson about how to do that. I don't want to propose OpenBSM changes until I get some agreement that this syscall is even sane, which I'm doing with this review. If it seems fine, I'll do the audit bits in a subsequent review.
I've included the sysent-generated bits here for completeness, but will commit them as a separate rev, as recommended: https://wiki.freebsd.org/AddingSyscalls