Bug 109854

Summary: Segmentation fault if used after sudo -u auser -s -H
Product: Red Hat Enterprise Linux 2.1 Reporter: Neil Prockter <prockter>
Component: dialogAssignee: Harald Hoyer <harald>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: 1.0.20040731-3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-16 12:49:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Neil Prockter 2003-11-12 14:25:47 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5)
Gecko/20031007 Firebird/0.7

Description of problem:
after using

sudo -u auser -s -H

dialog gives a segmentation fault

I'm guessing it can't access the terminal (permissions problem?)

the segmentation fault is presumably a dialog problem. a permission
denied message would be more friendly

the permissions might be an sudo problem?

Version-Release number of selected component (if applicable):
dialog-0.9a-5

How reproducible:
Always

Steps to Reproduce:
1.sudo -u auser -s -H
2.dialog --yesno test 20 10
3.
    

Actual Results:  Segmentation fault

Expected Results:  a dialog box

Additional info:

running from gdb gives-

GNU gdb Red Hat Linux (5.1-1)
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...(no debugging symbols
found)...
(gdb) run --yesno test 20 10
Starting program: /usr/bin/dialog --yesno test 20 10
(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
fputc (c=27, fp=0x0) at fputc.c:38
38      fputc.c: Permission denied.
        in fputc.c

Comment 1 Harald Hoyer 2004-01-28 14:52:32 UTC
seems to be s.th. like /dev/pts/[0-9]+ which /proc/self/fd/1 is
pointing to... so, you have to chown this before. 
yes, this seems to be a problem of dialog..