backport: metadata: add back code to fill creds data.
orignal hash : 7bde48f293f5207ba5820c80bd473012aa453ba0

origial message
It was overlooked that metadata is also used for connection info calls.
Until we find a nicer way, just do the creds assigment in this item twice:
once at metadata creation time, and again when we deliver the message.

	modified:   metadata.c
kdbus: do the audit loginuid translation as late as possible

Do the namespace translation just before pushing into the receiver's
slice, so we map to the receiver's user namespace.

Patch tested.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
test: use audit.loginuid and audit.sessionid when dumping the audit item

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
metadata: kdbus_meta_append_auxgroups(): actually set the group ids

As we need metadata in other context than queue items, we don't want
to rely on the queue item logic to clean up after us and fix up the
values. For now, add back the code to actually fill the payload. We
might add code to make the queue patching conditional later.
connection: drop unused argument of kdbus_conn_payload_add()
connection: check policy for reply-awaiting messages as well

The current logic in bogus. We need to call kdbus_conn_check_access()
for messages that require a message as well. Also, teach
kdbus_conn_check_access() a mode in which not to look up expected
replies of a connection.
policy: indent
test: update policy tests to handle user namespaces

Upstream kernels allow unprivileged users to create user namespaces
and change their uid/gid.

These patches update kdbus policy logic to handle this case and
improve our current checks across user namespaces.

So this patch adds:

* kdbus_test_waitpid() to get exit code of childs.
* kdbus_clone_userns_test() that performs the test inside a new
  user namespace.
* Converts all the other tests to return CHECK_OK, CHECK_SKIP or
  CHECK_ERR so we are consistent.

Currently we fail at kdbus_clone_userns_test() test #8. The next patch
will fix this issue.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
connection: rename 'entry' variable in kdbus_conn_kmsg_send()