Bart Blanquart wrote: > > Updated code at http://cr.opensolaris.org/~bartbl/6251549/ ; testing > output at http://cr.opensolaris.org/~bartbl/6251549-testing/. >
Much better. Thanks for addressing all the suggestions I made earlier. A few more minor issues: * Lines 131-135 will be easier to follow if you reduce them to if (status != EXIT_OK && status != EXIT_UNAUTHORIZED) status = EXIT_FATAL; * Now that you've moved the get_default_auths() call, you should move the declarations of defauth_cnt and defauths to show_auths(). * As Gary already said, it's better to use strdup() in get_username() instead of reimplementing it yourself. In fact, you can just return uspw->pw_name (without copying the string) as long as you don't try to keep using the old value after the next time you call get_username(). Don't forget to remove the free() at line 231. Scott -- Scott Rotondo Principal Engineer, Solaris Security Technologies President, Trusted Computing Group Phone/FAX: +1 408 850 3655 (Internal x68278)