From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96076335021236.tru64-unix-managers.marc@archive.invalid> From: "Paul N. Youngblood" Date: Tue, 02 Jul 1996 21:04:08 +0000 To: tru64-unix-managers Subject: Question about C2 Security and a C Program X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96076335021236 Hello, Does anybody know what the consequences could be if run a C program that alters argv[2] BEFORE calling the function set_auth_parameters? The man pages warn against doing this, but I don't understand the given explanation. (I'm running DU 3.2d-1 with C2 Security.) I have a C program that I want to use to lock the accounts of several hundred users whose names it reads from a text file. It works by reading one name from the input file, "stuffing" that username into argv[2], and THEN calling set_auth_parameters(), getprpwnam(), putprpwnam(), and endprpwent() to lock the account. This program seems to work ok on small "test" input files, but I hesitate to use it on a list of several hundred usernames for fear (because of the warnings I don't understand) of somehow doing some sort of damage to the C2 secure database. The man pages for functions that manipulate protected password database entries (Enhanced Security) like getprpwnam() and putprpwnam() say "Programs must call set_auth_parameters() before any other action in main()." Also, the man page for set_auth_parameters says: Programs must call set_auth_parameters() before any other action in main(). The program must always call set_auth_parameters(argc,argv) before doing anything that changes argc or argv; the other functions in identity.c depend on this happening. The argc parameter must be at least 1. The argv[0] parameter determines the command name for auditing and the command line is preserved for subsystem auditing purposes. Thank you in advance if you are able to shed any light on this for me. Paul Youngblood youngbp@email.uah.edu Information Services University of Alabama in Huntsville Information Services