Linux-Development-Sys Digest #123, Volume #7 Mon, 30 Aug 99 12:14:11 EDT
Contents:
Re: kernel-2.2.12 ppp error messages (Champ Clark III)
MySQL, chroot and shared libs ("Sean O'Dell")
libproc? (James Stevenson)
Re: restricted acces for users... (M. Buchenrieder)
kernel-2.3.15 on PC ([EMAIL PROTECTED])
Re: why not C++? ([EMAIL PROTECTED])
Re: MySQL, chroot and shared libs ([EMAIL PROTECTED])
Re: Compile Kernel with ROOT NFS support... - fail ("Mingxiao Dou")
need help on ptrace (Virginie Galtier)
Re: why not C++? ("Bill Zimmerly")
Re: kernel and -m486 (Graham Murray)
Re: Kernel compile problem with (P)GCC 2.95 (Graham Murray)
Avoid Zombies (Sven Heursch)
Re: why not C++? (Don Waugaman)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Champ Clark III)
Subject: Re: kernel-2.2.12 ppp error messages
Date: 30 Aug 1999 04:00:52 -0500
In article <[EMAIL PROTECTED]>, Hans-Detlev Fink wrote:
>Same with me here with 2.1.11 for lo:1, lo:2, ...
>and for eth0:1, eth0:2, ...
>
Usually eth0:1, eth0:2 represent "aliase" devices... That is,
so that you can bind more the one IP address to a "network" device.
I'm betting that ip_aliases module is loaded and not needed. Remove it,
and I guessing (stress guessing here) that you'll stop seeing those
errors..
- Champ
>-Hans-
>
>XuYifeng wrote:
>>
>> Hi,
>>
>> I am using redhat 6.0, I have just upgrade kernel from 2.2.10 to 2.2.12,
>>
>> anything is ok except that ppp has some minor problems, after I dialed
>> up to my ISP,
>> many error messages report to /var/log/messages, the message like these:
>>
>> Aug 23 1999,... xu : can't locate module ppp0:1
>> Aug 23 1999, ...xu : can't locate module ppp0:2
>> Aug 23 1999, ...xu : can't locate module ppp0:3
>>
>> but ppp link is OK, I can use my browser as before, and no any problem.
>>
>> Any help will be appreciated,
>> ---
>> XuYifeng
--
startsig()
{
"One World, One Web, One Program" - Microsoft Promotional Ad
"Ein Volk, Ein Reich, Ein Furer" - Adolf Hitler
}
------------------------------
From: "Sean O'Dell" <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux.development.apps,comp.os.linux.networking,comp.os.linux.security
Subject: MySQL, chroot and shared libs
Date: Mon, 30 Aug 1999 03:57:56 -0700
Here's one for the gurus. I have a program that uses mysql. It works just
dandy. However, now, for security reasons, I need the program to chroot
somewhere when it runs. (this is not a security question, the program is
just fine...I know chroot gets a lot of people agitated, but this is not
that question) Now it spits out an error saying it can't connect to the
local mysql server (error 111). Take out chroot, it works; put the chroot
back in, error message. I'm sure this is a shared library issue somehow,
but I can't find any definitive information. I've tried recreating almost
the entire /usr/lib directory off of the chroot directory (including the
/usr/lib/mysql directory), but I still get the error. Also, just for the
heck of it, I tried linking my program statically. It linked, but now it
won't run at all and it was titanic in size so I abandoned that route
altogether.
So, what could this be? Shared lib issue with mysql? Anyone have any
advice on how I can work around this? Maybe hard link the libs in the
chroot directory like I tried; maybe I did something wrong? Any advice to
shove me in the right direction would be greatly appreciated.
-Sean
------------------------------
From: [EMAIL PROTECTED] (James Stevenson)
Subject: libproc?
Reply-To: [EMAIL PROTECTED]
Date: Mon, 30 Aug 1999 01:11:44 +0000
Hi
does anyone know where i could find some
documentation on using libproc
thanks
James
--
=============================================
Check Out: http://www.users.zetnet.co.uk/james/
E-Mail: [EMAIL PROTECTED]
1:10am up 3 days, 11:55, 3 users, load average: 2.44, 2.37, 2.30
------------------------------
From: [EMAIL PROTECTED] (M. Buchenrieder)
Subject: Re: restricted acces for users...
Date: Mon, 30 Aug 1999 06:24:45 GMT
Tristan Wibberley <[EMAIL PROTECTED]> writes:
>x256 wrote:
>>
>> 1) how can i deny users acces to / ? so they can only see what is in their
>> home dirs and not what is in /, /etc, /usr, /bin, etc
>>
[...]
>Many file in those directories *must* be readable because users programs
>need to see them to get details of your setup so they know how to do
>things.
[...]
Depends. Use a restricted shell, and the users will not be able to leave
their home directories. Try rbash (or bash -r) .
Michael
--
Michael Buchenrieder * [EMAIL PROTECTED] * http://www.muc.de/~mibu
Lumber Cartel Unit #456 (TINLC) & Official Netscum
Note: If you want me to send you email, don't munge your address.
------------------------------
From: [EMAIL PROTECTED]
Subject: kernel-2.3.15 on PC
Reply-To: [EMAIL PROTECTED]
Date: 30 Aug 1999 11:28:10 GMT
Does anyone know if there might be a fix for these undefined symbol
errors yet? BTW where are the kernel mailing list archives located?
How can I fix these two errors? It looks like the affs error should
be relatively simple, if I can find the replacement function for
update_vm_cache.
ld -m elf_i386 -T /drives/work3/src/linux-2.3.14/arch/i386/vmlinux.lds -e stext
arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o init/version.o \
--start-group \
arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o
ipc/ipc.o \
fs/filesystems.a \
net/network.a \
drivers/block/block.a drivers/char/char.o drivers/misc/misc.o
drivers/parport/parport.a drivers/net/net.a drivers/scsi/scsi.a drivers/cdrom/cdrom.a
drivers/pci/pci.a drivers/pnp/pnp.a drivers/video/video.a \
/drives/work3/src/linux-2.3.14/arch/i386/lib/lib.a
/drives/work3/src/linux-2.3.14/lib/lib.a
/drives/work3/src/linux-2.3.14/arch/i386/lib/lib.a \
--end-group \
-o vmlinux
fs/filesystems.a(hpfs.o)(.rodata+0x2398): undefined reference to `hpfs_writepage'
fs/filesystems.a(affs.o): In function `affs_file_write':
affs.o(.text+0x3c5d): undefined reference to `update_vm_cache'
fs/filesystems.a(affs.o): In function `affs_file_write_ofs':
affs.o(.text+0x3ec5): undefined reference to `update_vm_cache'
make: *** [vmlinux] Error 1
--
Fred
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: why not C++?
Date: Mon, 30 Aug 1999 11:24:05 GMT
From: [EMAIL PROTECTED] (Don Waugaman) wrote:
>>My point was that he's added even more pointless and obscure things to C++
>>such as reference variables. What the hells the point of those when you
>>already have pointers?
>
>References are extremely important for use with operator overloading
>and templates. I'll moan about operator overloading later; the use of
>templates and generic programming is quite possibly the most powerful
>and farthest-reaching use of the C++ language, and the absence of
>reference variables would weaken templates to the point of near-uselessness.
We'll just have to agree to disagree on that one. I've used templates
many a time without a sniff of a reference variable.
>C++ I/O is considerably more powerful and less error-prone than the
>various C equivalents. It provides a number of capabilities that are
>extremely difficult to engineer code for in C:
>
>- type-safe I/O
If you want a typesafe language don't use a typed one. Besides which you'll
soon know if you've sent the wrong type to printf/scanf.
>- I/O of user-defined types is syntactically equivalent to that of
> builtin types
And fprintf and sprintf arn't syntactically equivalent to printf?
>- redirecting I/O to user-created data sinks / data sources is
> syntactically identical to I/O builtin data sinks/streams
Ah , so fprintf(file_ptr,"... is different to fprintf(stdout,"..." ?
>- facilitated error checking, including delaying error checking/reporting
So wrap printf etc in a wrapper function.
>impossible to engineer in any maintainable manner - a few short lines of
>code can redirect output of an array of user-defined types to a pipe,
>string, network socket, or serial port, utterly impossible in C without
>major reengineering, after which you'd get a set of functions and structs
And where does the code in C++ to do this come from? The tooth fairy? You
still have to write it yourself just in a different part of the code.
Admittedly a lot of C++ I/O is already set up but thats more to do with
libraries than the language itself. Theres nothing stopping anyone writing
equivalent libraries in C which could be called by other C coders.
>Operator overloading is, in a sense, an unfortunate part of the C language,
Excuse me? Sure C has some operator overloading but no user defined stuff
which exacerbates the problem.
>What if there were a class where those member functions would make more
>sense in another context? Perhaps a PhotoCopier object that had a member
>function to make a copy of a piece of paper rather than a copy of the
>object. The best member function name has been taken by the language.
There could always be a way of over overiding it or maybe a keyword that
declares the function to be the constructor etc so allowing it to have any
name.
>Using the class name as the name of the constructor seems like a perfectly
>suitable decision to me. Given that the tilde symbol is a commonly used
Not to me , you end up with the class name being splatted all over the class
definition making reading it rather hard.
NJR
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To:
comp.os.linux.development.apps,comp.os.linux.networking,comp.os.linux.security
Subject: Re: MySQL, chroot and shared libs
Date: 30 Aug 1999 11:25:46 GMT
Have you done "chroot /cage /sbin/ldconfig" ? If you haven't, you should.
------------------------------
From: "Mingxiao Dou" <[EMAIL PROTECTED]>
Crossposted-To:
alt.os.linux,alt.uu.comp.os.linux.questions,comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.networking,comp.os.linux.setup,net.computers.os.unix.linux
Subject: Re: Compile Kernel with ROOT NFS support... - fail
Date: Mon, 30 Aug 1999 21:56:42 +1000
Tried "make config" with /usr/src/linux as current directory ?
Barrow Kwan <[EMAIL PROTECTED]> wrote in message
news:7ptd2h$bg2$[EMAIL PROTECTED]...
> I cannot compile the kernel with NFS root support....
>
> I put
>
> CONFIG_ROOT_NFS=y in the config file, but can't compile
>
> I am using RedHat 6.0...
>
> any idea??
>
>
>
------------------------------
From: Virginie Galtier <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development,comp.os.linux.help
Subject: need help on ptrace
Date: Mon, 30 Aug 1999 09:49:43 -0400
Hi,
I try to understand how does strace work and I wanted to write a very
simple version of strace by myself. But I don't even manage to control a
process with ptrace. Can anyone tell me why does the following program
always end up with the ESRCH error?
Thanks you
Virginie
#include <stdio.h>
#include <sys/ptrace.h>
#include <errno.h>
int main(argc, argv)
int argc;
char *argv[];
{
int pid = (int)(argv[1]);
printf ("pid of the process to trace: %s\n", pid);
if ( ptrace(PTRACE_ATTACH, pid, 0, 0) == -1) {
switch (errno) {
case EIO:
printf("pb to attach %s: EIO\n", pid);
break;
case EPERM:
printf("pb to attach %s: EPERM\n", pid);
break;
case ESRCH:
printf("pb to attach %s: ESRCH\n", pid);
break;
default:
printf(" error\n");
break;
}
} else {
printf("%s attached\n", pid);
}
return 0;
}
------------------------------
From: "Bill Zimmerly" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: why not C++?
Date: Mon, 30 Aug 1999 09:02:38 -0500
Spike! <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Tristan Wibberley <[EMAIL PROTECTED]> wrote:
> > [Snip]
> > Aren't we getting close the realms of forth now?
>
> Doesn't look like it... Remember, in forth, all the values are push onto
the
> stack and only popped off when evaluated, so the above would be more like
>
> z c * b y * a x * + + .
>
> The '.' popping Top Of Stack and printing it to screen.
> (can't remember the syntax for stuffing the TOS into a variable... I
haven't
> dabbled in forth for years)
z c * b y * a x * + + result !
^^^^^^^
Here's how.
- Bill
------------------------------
From: Graham Murray <[EMAIL PROTECTED]>
Subject: Re: kernel and -m486
Date: 30 Aug 1999 13:55:03 +0000
[EMAIL PROTECTED] (Jacek Pop=B3awski) writes:
> In every kernel I compile it's -m486 option. My question is - is it good
> to compile kernel with that option? Why not -m586 ? I thought, that 486
> optimisation for pentium is worse than no optimisation...
The 2.3.x development series of kernels (or at least the latest ones)
will use -march=3Di586 for pentium builds if the compiler will support
it. (and for pentium pro it uses -march=3Di686)
--=20
ICQ 10305586
------------------------------
From: Graham Murray <[EMAIL PROTECTED]>
Subject: Re: Kernel compile problem with (P)GCC 2.95
Date: 30 Aug 1999 14:01:02 +0000
Andreas Spengler <[EMAIL PROTECTED]> writes:
> Hi folks,
>
> I recently upgraded my compiler to GCC 2.95 and now whenever
> I try to compile a kernel (tried it with 2.3.11-15 and 2.2.9) and do
> a make bzlilo, towards the end I get the warnings
>
> Warning; using %eax instead of %ax due to ..... ???
>
I think that these warnings are benign. Though I seem to remember that
it was a binutils update that started them rather than the upgrade to
gcc 2.95.
These should not cause your kernel not to boot.
--
ICQ 10305586
------------------------------
Date: Mon, 30 Aug 1999 16:31:41 +0200
From: Sven Heursch <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Avoid Zombies
Hello,
I have now idea how do avoid Zombies which are created from threads over
the pthread_exit() call.
Any ideas?
TIA
S. Heursch
------------------------------
From: [EMAIL PROTECTED] (Don Waugaman)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: why not C++?
Date: 30 Aug 1999 07:48:28 -0700
In article <[EMAIL PROTECTED]>,
<[EMAIL PROTECTED]> wrote:
>From: [EMAIL PROTECTED] (Don Waugaman) wrote:
>>>My point was that he's added even more pointless and obscure things to C++
>>>such as reference variables. What the hells the point of those when you
>>>already have pointers?
>>References are extremely important for use with operator overloading
>>and templates. I'll moan about operator overloading later; the use of
>>templates and generic programming is quite possibly the most powerful
>>and farthest-reaching use of the C++ language, and the absence of
>>reference variables would weaken templates to the point of near-uselessness.
>We'll just have to agree to disagree on that one. I've used templates
>many a time without a sniff of a reference variable.
I'll agree that it's possible to use templates without references, but
much of the power of templates comes from argument deduction, which
would be a rather painful process without the use of references. C++'s
containters/iterators/algorithms libraries are incredibly powerful, but
would become rather painful to use without references.
>>C++ I/O is considerably more powerful and less error-prone than the
>>various C equivalents. It provides a number of capabilities that are
>>extremely difficult to engineer code for in C:
>>- type-safe I/O
>If you want a typesafe language don't use a typed one. Besides which you'll
>soon know if you've sent the wrong type to printf/scanf.
I don't understand the first sentence above. C++ is a typed language,
and I/O in C++ is type-safe.
There's no guarantee that "you'll soon know" that you have mismatched
format strings, particularly as such strings become more complex via the
maintenance process. As a general principle, I prefer that errors be
caught at compile time, as early in the process as possible, rather than
tested out during the debugging stage.
>>- I/O of user-defined types is syntactically equivalent to that of
>> builtin types
>And fprintf and sprintf arn't syntactically equivalent to printf?
Given an object of a certain type (say, ComplexNumber) with a defined
output inserter operator (i.e. ostream& operator<<(ostream&, ComplexNumber))
you send it to cout by:
ComplexNumber my_complex;
cout << my_complex;
This looks just like how you send an object of a builtin type to cout:
int my_int;
cout << my_int;
Using printf, and substituting a C struct for the ComplexNumber type, you
would have to output the elements individually:
printf("(%f,%f)", my_complex.real, my_complex.imaginary);
for which the syntax is a lot different than outputting an int:
printf("%d"), my_int);
The format string argument makes the printf family of functions look
similar, but the fact that you have to use several different kinds of
functions which have to be selected differently based on the type of
data sink makes it cumbersome to redirect I/O from/to a different family
of functions. In C++, it's done for you via the streambuf type (the
back end of istream/ostream) and the virtual function mechanism.
I might add that there are some hidden gotchas in the use of printf
format strings with regards to similar scanf format strings - for example,
%f can write a double, but it can only read a float. In C++, the coder
just writes so that whatever is output by << can be input by >>.
>>- redirecting I/O to user-created data sinks / data sources is
>> syntactically identical to I/O builtin data sinks/streams
>Ah , so fprintf(file_ptr,"... is different to fprintf(stdout,"..." ?
No, but fprintf(file_ptr, ...) is different from sprintf(string, ...),
and you have to know the difference between the different sinks you are
using for output. For that matter, using printf(...) doesn't allow you
to redirect the data in any way ("Printf considered harmful!" :-)
>>- facilitated error checking, including delaying error checking/reporting
>So wrap printf etc in a wrapper function.
And call the wrapper rather than printf. However, you can't get a
library to use your wrapper - it will still be calling printf.
(Yes, I like open source software too, and using it would allow changes
to the library. However, I also like to spend time at home with my wife,
and going through a library changing printf() calls takes away from the
time I can spend with her.)
>>impossible to engineer in any maintainable manner - a few short lines of
>>code can redirect output of an array of user-defined types to a pipe,
>>string, network socket, or serial port, utterly impossible in C without
>>major reengineering, after which you'd get a set of functions and structs
>
>And where does the code in C++ to do this come from? The tooth fairy? You
>still have to write it yourself just in a different part of the code.
To redirect output to a different streambuf, you inherit from the streambuf
class, override two member functions, write those and you're done. The
complexity of those functions will depend on the complexity of the data
sink, but I've written, debugged, and built tests for some fairly simple
ones in about an hour. Once that's written, it takes one line of code to
redirect an ostream object to use that streambuf - also in one place. You
won't have to go around changing printfs to fprintfs to sprintfs all over
your code.
>Admittedly a lot of C++ I/O is already set up but thats more to do with
>libraries than the language itself.
If we're divorcing the language from the libraries we shouldn't be talking
about I/O in the first place. I would posit that given the use of the
libraries in both languages and their places in the respective ISO
standards, that libraries are certainly a valid topic for discussion
regarding the merits of the languages. I also think it's particularly
pertinent to discuss the libraries - especially the C++ library - as an
example of a good design which uses references and operator overloading.
Granted that both can be abused, the I/O system shows how (when used
correctly) they can create a much more flexible and maintainable system.
> Theres nothing stopping anyone writing
>equivalent libraries in C which could be called by other C coders.
Sure, like libio. The differences are that such libraries aren't standard
and as such won't be used for the bulk of code, and the syntax of those
libraries will be rather tortured in C.
>>Operator overloading is, in a sense, an unfortunate part of the C language,
>Excuse me? Sure C has some operator overloading but no user defined stuff
>which exacerbates the problem.
True. I miswrote the line - it should have said "the C++ language".
User-defined operator overloading can obfuscate code significantly. The
answer is to not let pointy-haired bosses (or their larval stage) write
serious C++ libraries.
>>What if there were a class where those member functions would make more
>>sense in another context? Perhaps a PhotoCopier object that had a member
>>function to make a copy of a piece of paper rather than a copy of the
>>object. The best member function name has been taken by the language.
>There could always be a way of over overiding it or maybe a keyword that
>declares the function to be the constructor etc so allowing it to have any
>name.
C++ has too many keywords already :-) and if e.g. 'constructor' became a
keyword that would torpedo using that name for a member function!
>>Using the class name as the name of the constructor seems like a perfectly
>>suitable decision to me. Given that the tilde symbol is a commonly used
>Not to me , you end up with the class name being splatted all over the class
>definition making reading it rather hard.
Then we would have to agree to disagree.
--
- Don Waugaman ([EMAIL PROTECTED]) O- _|_ Will pun
Web Page: http://www.cs.arizona.edu/people/dpw/ | for food
In the Sonoran Desert, where we say: "It's a dry heat..." | <><
Know what I hate most? Rhetorical questions.
------------------------------
** 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
******************************