+ /* get USER env from env or our own uid */
+ username = tmp = getusername_malloc();
+
+ switch (specifier) {
+ case 'u':
+ printed = strdup(username);
+ break;
+ case 'U': {
+ /* fish username from passwd */
+ uid_t uid;
+ int r;
+
+ r = get_user_creds(&username, &uid, NULL, NULL, NULL);
+ if (r < 0)
+ return r;
+
+ if (asprintf(&printed, UID_FMT, uid) < 0)
+ return -ENOMEM;
+ break;
+ }}
+
+
+ *ret = printed;
+ return 0;