Linux-Development-Sys Digest #938, Volume #7 Wed, 7 Jun 00 16:13:10 EDT
Contents:
DHCP Parameters (Colin Ford)
Re: Process Control (Mikko Rauhala)
Re: [ext2fs] what are fragments ? (Marc SCHAEFER)
Re: RedHat 6.2 Autofs Broken (H. Peter Anvin)
Re: Looking for Linux system trace utility (Michel Dagenais)
Re: RedHat 6.2 Autofs Broken (Bob Tennent)
Re: RedHat 6.2 Autofs Broken (David Highley)
Re: RedHat 6.2 Autofs Broken (Bob Tennent)
Linux (unix) on a AS/400 (Pascal van bakkum)
Re: Where to get Java Compiler (Bob Koss)
exception handling ([EMAIL PROTECTED])
How to make capabilities work for non-root (execve() considered broken) (Juha
Niskanen)
UNIX upgrading
I'm need to send computer to sleeping mode (2.2x kernel) ("My name")
Yamaha XG724 soundcard driver? ("Erich Mercado")
Re: UNIX upgrading (Toby Haynes)
Re: finding filename from file descriptor ([EMAIL PROTECTED])
Re: <defuct> and linuxthread ( a bit long) (Kaz Kylheku)
----------------------------------------------------------------------------
From: Colin Ford <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: DHCP Parameters
Date: Wed, 07 Jun 2000 10:22:42 +0100
Dear All,
could any tell me if there is a way to
programably get the DHCP parameters such as
IP address, Subnet Mask, TFTP server, Default
Route etc....
Many thanks,
Col.
------------------------------
From: [EMAIL PROTECTED] (Mikko Rauhala)
Subject: Re: Process Control
Date: 7 Jun 2000 09:53:26 GMT
Reply-To: [EMAIL PROTECTED]
On Tue, 6 Jun 2000 13:08:00 -0700, M Dipperstein <[EMAIL PROTECTED]> wrote:
>I have program which creates several processes using the clone command.
>However, it is not necessary that every process run all of the time. I
>would like to allow some processes to be idle until one of the other
>processes recognizes an event which requires one of the idle processes to
>do something.
>
>Does Linux provide a means for one process to suspend and resume another
>process?
Your best bet is probably to use SysV semaphores (man semctl for more info)
or pipes (create pipes between the processes, and make the controlling
process send a message through the pipe to the waiting process; the
wait itself could be implemented by using select() or poll()).
You could probably kludge together something with signals too, but
it'd probably be less clean.
On the other hand, you specify the use of clone. If you're using it for
threading rather than creating processes with different address spaces,
you might want to consider using the posix thread api implementing
LinuxThreads library, which provides mutexes and conditions for this
purpose.
--
Mikko Rauhala - [EMAIL PROTECTED] - http://www.iki.fi/mjr/
------------------------------
From: Marc SCHAEFER <[EMAIL PROTECTED]>
Subject: Re: [ext2fs] what are fragments ?
Date: 7 Jun 2000 07:48:38 GMT
Juergen Heinzl <[EMAIL PROTECTED]> wrote:
: Correct me - not yet used by ext2fs and comes from BSD. Instead
: of using one block per file the FS can use fragments to decrease
: the waste of space.
This is not supported on ext2. On ext2, the typical message of
fsck about fragmentation (which was changed recently to `non
contiguous') is really the MS-DOS meaning of fragmentation: the fact
that because of either a bad allocation policy (MS-DOS FAT), or
because the disk is nearly full (ext2), files will be scattered in
small parts, thus the access will be less efficient.
------------------------------
From: H. Peter Anvin <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.portable
Subject: Re: RedHat 6.2 Autofs Broken
Date: 7 Jun 2000 05:17:00 -0700
Followup to: <[EMAIL PROTECTED]>
By author: David Highley <[EMAIL PROTECTED]>
In newsgroup: comp.os.linux.development.system
>
> Has anyone come up with a fix for the broken autofs in RedHat 6.2. In
> /var/log/messages:
> automount: can not open lookup module auto.home
> (/usr/lib/autofs//lookup_auto.home.so: can not open shared object file:
> No such file or directory)
>
> Message is correct, file is not there. I did a ln -s to
> /usr/lib/autofs/lookup_userhome.so. But when I try and list the home
> directory a symbolic link gets created to its self, /home/dhighley ->
> /home/dhighley. I see that the path in the log file has a doubled / in
> it also.
>
> There were no fixes posted on the RedHat site.
>
Sounds like you have a seriously messed up auto.master file.
-hpa
--
<[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
------------------------------
Subject: Re: Looking for Linux system trace utility
From: Michel Dagenais <[EMAIL PROTECTED]>
Date: Wed, 07 Jun 2000 12:42:17 GMT
> record a trace file containing process dispatch events, and also allows
> a user process to record events in the same trace file.
>
> I'm aware of the Linux Trace Toolkit package
> (http://www.opersys.com/LTT/) which does record process dispatch events.
Anything a process does through the kernel can appear in the trace. It thus
indirectly allows the "user process" to put data in the "same trace file".
------------------------------
From: [EMAIL PROTECTED] (Bob Tennent)
Crossposted-To: comp.os.linux.portable
Subject: Re: RedHat 6.2 Autofs Broken
Date: 7 Jun 2000 13:11:14 GMT
Reply-To: [EMAIL PROTECTED]
On Tue, 06 Jun 2000 20:10:28 -0700, David Highley wrote:
>Has anyone come up with a fix for the broken autofs in RedHat 6.2.
I'm using autofs in RedHat 6.2 and there's no problem.
Do man autofs and check your configuration.
Bob T.
------------------------------
From: David Highley <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.portable
Subject: Re: RedHat 6.2 Autofs Broken
Date: Wed, 07 Jun 2000 06:43:34 -0700
Bob Tennent wrote:
> On Tue, 06 Jun 2000 20:10:28 -0700, David Highley wrote:
> >Has anyone come up with a fix for the broken autofs in RedHat 6.2.
>
> I'm using autofs in RedHat 6.2 and there's no problem.
>
> Do man autofs and check your configuration.
>
> Bob T.
This was all working under RedHat 6.1. I did a reformat install so I
can't be running mixed versions. The
auto.master file has this entry:
/home auto.home
The logged messages are telling me that automountd can not find a shared
library.
--
Regards,
David Highley
Highley Recommended, Inc.
2927 SW 339th Street
Federal Way, WA 98023-7732
Phone: (206) 669-0081
FAX: (253) 838-8509
Email: [EMAIL PROTECTED]
WEB: http://www.highley-recommended.com
------------------------------
From: [EMAIL PROTECTED] (Bob Tennent)
Crossposted-To: comp.os.linux.portable
Subject: Re: RedHat 6.2 Autofs Broken
Date: 7 Jun 2000 14:21:01 GMT
Reply-To: [EMAIL PROTECTED]
On Wed, 07 Jun 2000 06:43:34 -0700, David Highley wrote:
>The auto.master file has this entry:
>/home auto.home
>
Try
/home /etc/auto.home
And then an /etc/auto.home should be created to specify
the mount points, fs types and devices. And remember to
create the specified mount points in /home.
Bob T.
------------------------------
From: Pascal van bakkum <[EMAIL PROTECTED]>
Subject: Linux (unix) on a AS/400
Date: Wed, 07 Jun 2000 14:30:03 GMT
Does anybody know of there is an linux distribution for as/400 ?
gr,
Pascal van Bakkum
[EMAIL PROTECTED]
--
Posted via CNET Help.com
http://www.help.com/
------------------------------
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: Where to get Java Compiler
From: Bob Koss <[EMAIL PROTECTED]>
Date: Wed, 07 Jun 2000 14:55:34 GMT
[EMAIL PROTECTED] (Timothy Murphy) writes:
> May be worth noting that IBM have a port of JDK-1.3 --
> you can find a pointer to it at http://www.alphaworks.ibm.com/ .
>
Does anyone have VisualAge Java 3.0 for Linux ?? I've managed to
download the winblows version (and it's impressive!), but I can't for
the life of me navigate ibm's website to get the Linux version.
--
Robert Koss, Ph.D. | Object Mentor, Inc. | Tel: (800) 338-6716
Senior Consultant | 14619 N Somerset Cr | Fax: (847) 918-1023
[EMAIL PROTECTED] | Green Oaks IL 60048 | www.objectmentor.com
------------------------------
From: [EMAIL PROTECTED]
Subject: exception handling
Date: Wed, 07 Jun 2000 14:52:43 GMT
I am looking for a GNU C/C++ API that facilitates exception handling.
i've ran into the GNU site and found that there is an API:
__raise_exception(void ** address,void *id)
but can't find any further documentation, neither on it, nor on other
subjects concerning exception handling, such as setting the error mode,
or exception filters.
Ali Al-Khalidi
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: [EMAIL PROTECTED] (Juha Niskanen)
Subject: How to make capabilities work for non-root (execve() considered broken)
Date: 7 Jun 2000 16:00:15 GMT
Hi!
I'm currently porting a commercial testing environment for realtime and
embedded systems to Linux. This consists of multiple processes (simulation
"targets" and the simulator interface proper), all of which use SCHED_RR
realtime scheduling. I've tried to use capabilities to run this set of
processes without excessive privilege. Obviously, the only capability I
need is CAP_SYS_NICE, so I can set scheduling priorities.
For this change to be useful, all targets must be running as a uid other
than 0, otherwise they could overwrite files owned by root even if they
had no other capabilities beside CAP_SYS_NICE. Furthermore, the targets
are written by simulator user, so they cannot be trusted. (I can live
with the possibility of DOS-attack by abusing realtime features, but not
hacking root)
I started by writing a tool similar to sucap, but as a setuid-root binary
with the capabilities hardwired so it drops its privileges by calling
setuid(getuid()), which also gets rid of capabilities, then sets them
back using sucap's stupid child-process-calls-capsetp-on-ppid hack. (*)
Now I have a process with uid != 0 and the desired capability in its
capability sets, but when I call exec() to start a shell
that is setuping the simulation environment, it gets called with all
capabilities stripped from its permitted and effective sets. Is this
a feature or a bug?
I can understand that stripping capabilities when exec'ing can prevent
stack-smashing attacks on privileged daemons, but surely there must be
a mechanism to implement different security policy for normal application
programs? In particular, has anyone tried to write a trusted daemon
or perhaps a kernel module that could authtenticate its clients requesting
capabilities and use capsetp(2) on them?
It seems I have only a few choices:
1) Patch the kernel and somehow convince customers (and linus)
to install my patch. Not very likely to succeed ;)
2) Write the above mentioned daemon/module.
3) Fix the above scheme somehow in user space. Remember that
this is a RTOS-simulator, so each target process can
spawn others, and change their priority.
Also, it would be nice to run non-capability-aware
programs like shells that use high rt-priority, in
case the tested application deadlocks.
4) Say hell to security, and run the hole system suid0.
Also convince managers that Linux lacks capability
(excuse the pun!) to do something which is trivial under
HP-UX or Solaris. (Just kidding ;) )
Any constructive comments are welcome.
Juha
Foornotes:
(*) Yes, my init has CAP_SETPCAP, overriding the IMHO too strict
default setting of CAP_INIT_EFF_SET and CAP_INIT_INH_SET in
the kernel. Still wondering how to do this to customer's
machines during product install...
(**) I think kernel module doesn't need to worry about (*), so
this would be easy to set up by non-hackers.
--
Juha Niskanen <[EMAIL PROTECTED]>
(For email, remove NOSPAM)
------------------------------
From: <[EMAIL PROTECTED]>
Subject: UNIX upgrading
Date: Wed, 07 Jun 2000 16:30:07 GMT
Hey all,
I'm new to the Linux world, so this might be a very naive question.
But here we go....
After suffering through the wasteland of DOS/Windows for a long time,
how often will it be necessary to upgrade my Redhat Linux? In other
words, if I still had Windows 3.1 on my system, I would be out of luck as
far as new software is concerned. Yet if I keep RH 6.1 on my system for a
while, will it always be able to run newer software with its regular
kernal? As far as older kernals, are they still viable for running new
software? Thanks for your help!
--
Posted via CNET Help.com
http://www.help.com/
------------------------------
Reply-To: "My name" <[EMAIL PROTECTED]>
From: "My name" <[EMAIL PROTECTED]>
Subject: I'm need to send computer to sleeping mode (2.2x kernel)
Date: Wed, 7 Jun 2000 21:03:10 +0400
I'v got problem doing the subj under 2.2x kernel while migrating from 2.0x.
Any kind of help appreciated (docs, sources, ideas, concepts, etc).
Please send a copy of reply to my mail address.
------------------------------
From: "Erich Mercado" <[EMAIL PROTECTED]>
Subject: Yamaha XG724 soundcard driver?
Date: Thu, 8 Jun 2000 01:40:13 +0800
Do anyone know where can I get the drivers for this particular soundcard?
thanx.
------------------------------
From: Toby Haynes <[EMAIL PROTECTED]>
Subject: Re: UNIX upgrading
Date: 07 Jun 2000 13:39:30 -0400
!! "MJM" == <[EMAIL PROTECTED]> writes:
MJM> Hey all, I'm new to the Linux world, so this might be a very
MJM> naive question. But here we go.... After suffering through
MJM> the wasteland of DOS/Windows for a long time, how often will it
MJM> be necessary to upgrade my Redhat Linux? In other words, if I
MJM> still had Windows 3.1 on my system, I would be out of luck as
MJM> far as new software is concerned. Yet if I keep RH 6.1 on my
MJM> system for a while, will it always be able to run newer
MJM> software with its regular kernal? As far as older kernals, are
MJM> they still viable for running new software? Thanks for your
MJM> help!
Good question. The answer to your question is ... it depends.
If you are running on the same hardware, then kernel upgrades are
probably not necessary, although they may be desirable. A large chunk
of the changes in new releases of the kernels goes towards new
hardware. Other kernel upgrades include new filesystems, faster
implementations of current algorithms, and so forth.
As to new software, new software often requires new libraries, so you
can expect to have to periodically update various bits and pieces
around the system. However, using a packaging system like RPM makes
this pretty painless, and as most software released nowadays comes in
RPM packs this is not the DLL-Hell that occurs in Windows. RPM uses a
versioning system to help keep tabs on the versions of the libraries
in use, and will tell you if a package requires a new library. It is
very unusual to *have* to patch the Kernel to run new software.
Cheers,
Toby Haynes
--
Toby Haynes
The views and opinions expressed in this message are my own, and do
not necessarily reflect those of IBM Canada.
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: finding filename from file descriptor
Date: Wed, 07 Jun 2000 19:08:54 GMT
My intent is very simple.
I have an API that takes an fd (file descriptor) as input.
Once I have received an fd I want to open the fd (I mean the same file)
in another process.
So I should be either able to share the fd or be able to open the file
in the second process.
the two processes have no parent child relationship.
regards
jeseem
In article <8hk36u$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Alexander Viro) wrote:
> In article <[EMAIL PROTECTED]>,
> John Reiser <[EMAIL PROTECTED]> wrote:
> >When the /proc filesystem is installed, then each open file
descriptor
> >has a symbolic link named /proc/self/fd/j where 'j' is the decimal
> >representation of the file descriptor number; and this is also
accessible
> >as /proc/pid/fd/j where 'pid' is the decimal representation of the
> >processs ID number. In some common cases, this knowledge can be
exploited
> >to provide what many people want, but probably not with the speed
that
> >some might expect. See the utility 'lsof' ("ls open files").
>
> That still does not address the issue with unlinked files. Try and
you will
> see. Open a file, unlink it and look into proc/<pid>/fd. Think a bit
and you'll
> see why it is so.
>
> Again, "name of the opened file" is a nonsense on UNIX. Why do you
need it,
> BTW?
>
> --
> "You're one of those condescending Unix computer users!"
> "Here's a nickel, kid. Get yourself a better computer" - Dilbert.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: <defuct> and linuxthread ( a bit long)
Reply-To: [EMAIL PROTECTED]
Date: Wed, 07 Jun 2000 20:03:11 GMT
On Tue, 06 Jun 2000 08:38:30 GMT, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>Hi,recently,I found linuxthread a bit fuzzy to me.
>I am testing a piece of software not written by myself.
>The program just hangs when I give it a heavy load.
>The program is a multithreaded one.The pstree output
>before the program hangs looks as follows:(a is the
>programs name,the number in braket is the process id
>or thread id)
>
> |-a(27731)---a(27734)-+-a(27737)
> | `-a(27738)
>
>In fact,in this process tree,only a(27737) and a(27738)
>are created by pthread_create(), a(27734) is created by
>linux itself when the first pthread_create() is called.
>I don't know why linux must create a(27734),
>just let a(27737) and a(27738) have parent?(This is my
>first question).
That is the primary reason. The 27734 process is the LinuxThreads thread
manager. It's job is to act as the parent for other threads created with
pthread_create, to allocate and deallocate their stacks and to enqueue and
dequeue them in a global list, among other things. It also plays a role in
debugging.
>
>Then, for a reason I havn't found out yet,a hangs.Now,
>the process tree looks like this:
>
> |-a(27731)---a(27734)<defunct>
> |-a(27737)
> |-a(27738)
This is trouble!
>As I knows, <defunct> is caused by a call of exit().
Incorrect: <defunct> indicates a zombie process; one that terminated
for *any* reason and whose parent has not collected it.
The children of a dead process become adopted by the init deamon, so
that's what happened to 27737 and 27738.
What happened is that due to a bug in your application---or due to a bug
in LinuxThreads itself, perhaps---the thread manager has hit a fault and
died. When the thread manager unexpectedly dies, any thread which relies
on its services will hang, waiting indefinitely for a reply to a request
sent to the pipe.
Your program has unfortunately hit upon an Achilles' Heel in LinuxThreads:
namely that its reliance on user space data structures make it somewhat
fragile, which in turn makes bugs harder to debug.
If you are using glibc-2.1.2 or earlier, I suggest you upgrade to 2.1.3. If
you can still reproduce the problem, try to make a small program which
demonstrates it and submit a message to comp.programming.threads.
--
#exclude <windows.h>
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************