Sponsored Content
Operating Systems Linux Red Hat process fails if setuid bit is set Post 302476479 by DGPickett on Wednesday 1st of December 2010 07:48:16 PM
Old 12-01-2010
Set uid / grpid exec() turns of LD_LIBRARY_PATH so the program cannot be attacked by a bogus dynamic lib. Either it must be statically linked or compiled with lib path in -R.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

setuid sticky bit

I have a binary. It is having the following permissions rws rws rwx mqm:mqm runmqtrm The same program on another machine is rws rws rwx root: mqm runmqtrm This program is a setuid program. This is what my understanding is. Whatever user the program is started under, it will finally be... (0 Replies)
Discussion started by: bandaru
0 Replies

2. Programming

setuid bit on user + dynamically linked libraries

hi all, i have a critical and specific problem with respect to set uid bit on user and the dll's for a binary, (under the userid A) it needs libraries from /usr/lib and informix libraries from $INFORMIXDIR/lib/esql but this binary should be kicked off from id B, hence s-bit on user is... (5 Replies)
Discussion started by: matrixmadhan
5 Replies

3. HP-UX

setuid bit - error

hi i have written small script which will login 2 two different users with su but if we run from normal user it prompts for password so i chnaged the owner of script to root and added setuid bit with chmod u+s <script_name> but when i run the script i get following message Warning:... (3 Replies)
Discussion started by: zedex
3 Replies

4. UNIX for Dummies Questions & Answers

How can we set the Sticky bit in the umask itself

How can we set the Sticky bit in the umask itself. Please help me :confused: (3 Replies)
Discussion started by: geniman2004
3 Replies

5. UNIX for Dummies Questions & Answers

setuid & sticky bit

Can anyone explain me difference between setuid and sticky bit? and also between setuid and chown? (3 Replies)
Discussion started by: kkalyan
3 Replies

6. Linux

Please explain setuid bit clearly!

Dear all, I am newbie with linux, i dont understand any code. I have googled a long time. Please help me explain about setuid bit on linux (Centos 6) Here: 1/ I chmod u+s for /sbin/iptables but normal user still cannot perform command (ex: /sbin/iptables -L) 2/Someone says : setuid only... (6 Replies)
Discussion started by: all4cfa
6 Replies

7. Programming

c program to set the m-bit to n-bit

I have a 32bit number and without using for loop,I want to set mbit to n bit. Say m bit may be 2nd or 5th or 9th or 10th.n bit may be 22nd or 27or 11th bit. I assume m<n. Please help me.Thanks acdc (6 Replies)
Discussion started by: acdc
6 Replies

8. Shell Programming and Scripting

Setuid not working in Linux as script fails to write to file.

Hi, I have the following 3 test files to test setuid bit which if it works I would like to implement in our application. However setuid doesnot seem to be having any impact on my test below.Following are the 3 files of interest in /tmp/ folder. $ ls -ltr *env* -rw------- 1 g332008 users 6... (23 Replies)
Discussion started by: waavman
23 Replies

9. UNIX for Beginners Questions & Answers

What keeps me from abusing setuid(0) and programs with setuid bit set?

Just learning about the privilege escalation method provided by setuid. Correct me if I am wrong but what it does is change the uid of the current process to whatever uid I set. Right ? So what stops me from writing my own C program and calling setuid(0) within it and gaining root privileges ? ... (2 Replies)
Discussion started by: sreyan32
2 Replies

10. UNIX for Beginners Questions & Answers

Java 32 bit installation fails on an AIX platform

Hello. It is my first to deal with Java installation on an AIX platform. I am now trying to install Java 32bit using installp command. However, it throws back the message that the installation media cannot be found. I need to install Java 32bit to proceed with an installation of Oracle JD... (0 Replies)
Discussion started by: EJ2019
0 Replies
MrmOpenHierarchy(library call)											    MrmOpenHierarchy(library call)

NAME
MrmOpenHierarchy -- Allocates a hierarchy ID and opens all the UID files in the hierarchy SYNOPSIS
#include <Mrm/MrmPublic.h> Cardinal MrmOpenHierarchy( MrmCount num_files, String file_names_list[], MrmOsOpenParamPtr *ancillary_structures_list, MrmHierarchy *hierarchy_id); DESCRIPTION
This routine is obsolete and exists for compatibility with previous releases. It is replaced by MrmOpenHierarchyPerDisplay. MrmOpenHierar- chy is identical to MrmOpenHierarchyPerDisplay except that MrmOpenHierarchy does not take a display argument. num_files Specifies the number of files in the name list. file_names_list Specifies an array of character strings that identify the UID files. ancillary_structures_list A list of operating-system-dependent ancillary structures corresponding to items such as filenames, clobber flags, and so forth. This argument should be NULL for most operations. If you need to reference this structure, see the definition of MrmOsOpen- ParamPtr in the MrmPublic.h header file for more information. hierarchy_id Returns the search hierarchy ID. The search hierarchy ID identifies the list of UID files that MRM searches (in order) when per- forming subsequent fetch calls. Each UID file string in file_names_list can specify either a full pathname or a filename. If a UID file string has a leading slash (/), it specifies a full pathname, and MRM opens the file as specified. Otherwise, the UID file string specifies a filename. In this case, MRM looks for the file along a search path specified by the UIDPATH environment variable or by a default search path, which varies depending on whether or not the XAPPLRESDIR environment variable is set. The UIDPATH environment variable specifies a search path and naming conventions associated with UID files. It can contain the substitution field %U, where the UID file string from the file_names_list argument to MrmOpenHierarchyPerDisplay is substituted for %U. It can also contain the substitution fields accepted by XtResolvePathname. The substitution field %T is always mapped to uid. The entire path is first searched with %S mapped to .uid. If no file is found, it is searched again with %S mapped to NULL. If no display is set prior to calling this function, the result of this function's call to XtResolvePathname is undefined. For example, the following UIDPATH value and MrmOpenHierarchy call cause MRM to open two separate UID files: UIDPATH=/uidlib/%L/%U.uid:/uidlib/%U/%L static char *uid_files[] = {"/usr/users/me/test.uid", "test2"}; MrmHierarchy *Hierarchy_id; MrmOpenHierarchy((MrmCount)2,uid_files, NULL, Hierarchy_id) MRM opens the first file, /usr/users/me/test.uid, as specified in the file_names_list argument to MrmOpenHierarchy, because the UID file string in the file_names_list argument specifies a full pathname. MRM looks for the second file, test2, first as /uidlib/%L/test2.uid and second as /uidlib/test2/%L, where the display's language string is substituted for %L. After MrmOpenHierarchy opens the UID hierarchy, you should not delete or modify the UID files until you close the UID hierarchy by calling MrmCloseHierarchy. If UIDPATH is not set but the environment variable XAPPLRESDIR is set, MRM searches the following pathnames: o %U%S o $XAPPLRESDIR/%L/uid/%N/%U%S o $XAPPLRESDIR/%l/uid/%N/%U%S o $XAPPLRESDIR/uid/%N/%U%S o $XAPPLRESDIR/%L/uid/%U%S o $XAPPLRESDIR/%l/uid/%U%S o $XAPPLRESDIR/uid/%U%S o $HOME/uid/%U%S o $HOME/%U%S o /usr/lib/X11/%L/uid/%N/%U%S o /usr/lib/X11/%l/uid/%N/%U%S o /usr/lib/X11/uid/%N/%U%S o /usr/lib/X11/%L/uid/%U%S o /usr/lib/X11/%l/uid/%U%S o /usr/lib/X11/uid/%U%S o /usr/include/X11/uid/%U%S If neither UIDPATH nor XAPPLRESDIR is set, MRM searches the following pathnames: o %U%S o HOME/%L/uid/%N/%U%S o HOME/%l/uid/%N/%U%S o $HOME/uid/%N/%U%S o $HOME/%L/uid/%U%S o $HOME/%l/uid/%U%S o $HOME/uid/%U%S o $HOME/%U%S o /usr/lib/X11/%L/uid/%N/%U%S o /usr/lib/X11/%l/uid/%N/%U%S o /usr/lib/X11/uid/%N/%U%S o /usr/lib/X11/%L/uid/%U%S o /usr/lib/X11/%l/uid/%U%S o /usr/lib/X11/uid/%U%S o /usr/include/X11/uid/%U%S These paths are defaults that vendors may change. For example, a vendor may use different directories for /usr/lib/X11 and /usr/include/X11. The following substitutions are used in these paths: %U The UID file string, from the file_names_list argument. %N The class name of the application. %L The display's language string. This string is influenced by XtSetLanguageProc. The default string is determined by calling set- locale(LC_ALL, NULL). %l The language component of the display's language string. %S The suffix to the filename. The entire path is first searched with a suffix of .uid. If no file is found, it is searched again with a NULL suffix. RETURN
This function returns one of the following status return constants: MrmSUCCESS The function executed successfully. MrmNOT_FOUND File not found. MrmFAILURE The function failed. RELATED
MrmOpenHierarchyPerDisplay(3) and MrmCloseHierarchy(3). MrmOpenHierarchy(library call)
All times are GMT -4. The time now is 09:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy