From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org)
	by nuthatch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-54493-garchives=archives.gentoo.org@gentoo.org>)
	id 1Ghvyv-0008QU-4T
	for garchives@archives.gentoo.org; Wed, 08 Nov 2006 22:33:17 +0000
Received: from robin.gentoo.org (localhost [127.0.0.1])
	by robin.gentoo.org (8.13.8/8.13.8) with SMTP id kA8MV03O028676;
	Wed, 8 Nov 2006 22:31:00 GMT
Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.184])
	by robin.gentoo.org (8.13.8/8.13.8) with ESMTP id kA8MSKYh002434
	for <gentoo-user@lists.gentoo.org>; Wed, 8 Nov 2006 22:28:21 GMT
Received: by nf-out-0910.google.com with SMTP id c31so868353nfb
        for <gentoo-user@lists.gentoo.org>; Wed, 08 Nov 2006 14:28:21 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
        s=beta; d=gmail.com;
        h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth;
        b=JRE8iQAgnhBaXmc2Ik1bx3Jyn9pJT5vs631Uq6jgOIaDI3wJZx1lhPhKXMwZ5sFRFD0Jf/j9f30Y4DoX8rqIkLuksG4TbALs2AP/PXdw2oWAy6FopWuGhG9TVEqyoQInWSdLE9kfBV9tSFSVD6xQz5I/4WAJWdO6iVAgpzE6/Lw=
Received: by 10.82.142.9 with SMTP id p9mr25971bud.1163024900297;
        Wed, 08 Nov 2006 14:28:20 -0800 (PST)
Received: by 10.82.106.3 with HTTP; Wed, 8 Nov 2006 14:28:19 -0800 (PST)
Message-ID: <7573e9640611081428j33fd8e3eo7c88202ef85e186f@mail.gmail.com>
Date: Wed, 8 Nov 2006 15:28:19 -0700
From: "Richard Fish" <bigfish@asmallpond.org>
Sender: richard.j.fish@gmail.com
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] WinXP under VMWare: no sound
In-Reply-To: <200611082224.42678.sp_rm_it@yahoo.it>
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <200611042241.56613.sp_rm_it@yahoo.it>
	 <200611080831.20344.sp_rm_it@yahoo.it>
	 <20061108170408.006c6f33.hilse@web.de>
	 <200611082224.42678.sp_rm_it@yahoo.it>
X-Google-Sender-Auth: ca765a7a3aae2996
X-Archives-Salt: 9beb6268-e0a3-46a4-923e-15bbadd7385f
X-Archives-Hash: 053c8c13879a582ed1c55d72d9aaaa07

On 11/8/06, Sergio Polini <sp_rm_it@yahoo.it> wrote:
> > Sergio,  try doing chmod +s on /emul/linux/x86/usr/lib/libaoss.so
> There is no such file!

Hold up.  Previously you posted:

----
LD_PRELOAD=${exec_prefix}/lib/libaoss.so${LD_PRELOAD:+:$LD_PRELOAD}

[...]

[sp ~]$ ERROR: ld.so: object '/emul/linux/x86/usr/lib/libaoss.so' from
LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/emul/linux/x86/usr/lib/libaoss.so' from
LD_PRELOAD cannot be preloaded: ignored.
----

If this file doesn't exist, then *that* is why preloading doesn't
work.  If instead you have "emul/.../libaoss.so.0.0.0", then change
the LD_PRELOAD in aoss32 to:

LD_PRELOAD=${exec_prefix}/lib/libaoss.so.0.0.0${LD_PRELOAD:+:$LD_PRELOAD}

I would also add an echo for debugging after that:

echo "running with LD_PRELOAD=$LD_PRELOAD"

> i) I can't understand why root can't open /dev/dsp when running
> vmwarearts. I can only guess that aoss works better ;-)

Since preloading appears to work in this case (no error from that), I
am going to assume that this is actually a failure to contact artsd as
root.  Note that the effect of preloading is to fool vmware into
contacting artsd instead of opening /dev/dsp...so the error can
actually be slightly misreported.

Are you actually logged into KDE as root, or as your normal user?
What happens when you run "artsplay
/usr/kde/3.5/share/sounds/KDE_Startup_1.ogg" as root?  under your user
account?


> ii) suid and sgid bits look insignificant (!)
>
> look very interesting, because, as far as I can understand....
>
> testing ~ # cd /opt/vmware/workstation/bin
[snip]
> -rwxr-xr-x 1 root root     4570 Nov  1 00:20 vmware*

This is a shell script (your clue is the size).  The actual binary
that executes the virtual machine (and this needs to produce sound) is
in /opt/vmware/workstation/lib/bin, and is named vmware-vmx.  It is
almost certainly setuid.

(BTW, I should have said "vmware _uses_ setuid executables")

> my vmware *is not* setuid!
> However, nothing changes if I do chmod +s on libaoss *and* vmware:

No, don't make the shell script setuid.  That would be a security hole.

> sound only works when I am root, otherwise libaoss is not preloaded.

I really don't understand why aoss would only work as root.  I suspect
a path or environment issue here, possibly a different library is
actually being loaded.  I suspect this has more to do with the actual
path to the library being loaded as root versus your user account.

I'm going to try installing workstation on my amd64 desktop and see what I get.

-Richard
-- 
gentoo-user@gentoo.org mailing list