From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,6005161a21304bbf,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1995-01-24 03:00:31 PST Newsgroups: comp.unix.osf.osf1 Path: nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!Germany.EU.net!EU.net!sun4nl!stleembu From: stleembu@inter.NL.net (S. Leemburg) Subject: LD_LIBRARY_PATH Message-ID: Organization: NLnet X-Newsreader: TIN [version 1.2 PL2] Date: Tue, 24 Jan 1995 11:00:31 GMT PROBLEM DESCRIPTION: - On OSF/1 version 3.0 running on an ALPHA 2100 A500, using shared libraries, I cannot execute an root-setuid-program using a shared library specified by the LD_LIBRARY_PATH environment-variable. for example, when executing the below program, which calls a program using a LD_LIBRARY_PATH specified shared library, I get this error: '19133:/usr/users/unims/progs//men: \ /sbin/loader: Fatal Error: cannot map libunims.o' ( -rwsr-xr-x 1 root users 24608 Jan 24 10:59 a.out ) INFORMATION OBTAINED SO FAR: - In 'Design of the OSF/1 Operating System', Prentice Hall, New Jersey; chapter 8.12 is explained that a privileged program with any privilige bits set wil allways be loaded with the default loader, for security reasons. Chapter 15 explores the security architecture even more. In these chapters there is mentioning of a tool 'lib_admin', with which packages can be registered. This tool is not available on (DEC) OSF/1, however. A search through the manual pages gives no leads to an other name. Inquiries at DEC- Holland, thusfar, has had no result. LOOKING FOR: - How to register alternative shared libraries which I, as superuser, can install, mark secure an still specify by means of LD_LIBRARY_PATH. ANSWERS TO: - Please reply to S.Leemburg@inter.nl.net NB: - Posting is new to me, please forgive any errors. TEST PROGRAM: #include #include #include #define CMDSIZE 1024 #define EXECUTE(cmd) { fprintf(stderr, "%s\n", #cmd); cmd; } main(argc, argv) int argc; char **argv; { uid_t ruid = getuid(); uid_t euid = geteuid(); gid_t rgid = getgid(); gid_t egid = getegid(); char cmd[CMDSIZE + 1]; /* to store the command */ /* show id settings */ EXECUTE(fprintf(stdout, "euid=%d (uid=%d), egid=%d (gid=%d)\n", euid, ruid, egid, rgid)) /* compose command */ for( *cmd='\0', ++argv, --argc; argc > 0; ++argv, --argc ) EXECUTE(sprintf(cmd, "%s%s%s", cmd, *cmd ? " " : "", *argv)) /* switch back to original id's */ EXECUTE(setgid(rgid)) EXECUTE(setuid(ruid)) /* and show them again */ EXECUTE(fprintf(stdout, "euid=%d (uid=%d), egid=%d (gid=%d)\n", euid, ruid, egid, rgid)) /* show the command */ EXECUTE(fprintf(stdout,"going to execute: %s\n", cmd)) /* ask for enter (give time to see statements) */ EXECUTE((void) fgetc(stdin)) /* fork and exec the command */ EXECUTE(system(cmd)) /* finish */ EXECUTE(exit(0)) } -- Stephan Leemburg S.Leemburg@inter.nl.net < alles op persoonlijke titel > -- ___ ___________________________ | --------- / | | /\ Muller Air Freight B.V. \ | ___\/|\ _\_____________/ | | / ) ) <|| \ \ \ That's Wright / \ ( Stephan Leemburg (