/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/* a sample program that prints current username. */
#include <stdio.h>
#include <unistd.h>
#include <pwd.h>

int main() {
    struct passwd *user;
    uid_t euid;

    euid = geteuid();
    user = getpwuid(euid);
    printf(" the current user's name is '%s' \n",user->pw_name);
}
