+ if ((flags & BB_GETOPT_ERROR)
+ /* Don't allow -n -r -nr */
+ || (flags <= 3 && flags > 0)
+ /* Don't allow more than one username */
+ || (argc > optind + 1))
+ bb_show_usage();
+
+ /* This values could be overwritten later */
+ uid = geteuid();
+ gid = getegid();
+ if (flags & PRINT_REAL) {
+ uid = getuid();
+ gid = getgid();
+ }
+
+ if(argv[optind]) {
+ p=getpwnam(argv[optind]);
+ /* my_getpwnam is needed because it exits on failure */
+ uid = my_getpwnam(argv[optind]);
+ gid = p->pw_gid;
+ /* in this case PRINT_REAL is the same */
+ }