Linux-Development-Sys Digest #301, Volume #8 Sun, 26 Nov 00 02:13:14 EST
Contents:
Re: Linux vs Windows vs. Firewall (Jon)
Adding a system call (Macro)
Re: XFree 4 crashes kernel 2.4.0-test5 (Otto Wyss)
Re: injecting keystrokes into virtual console (Mike McDonald)
Microcrap WinNT documentation decoder rings here !! the worlds only 400 mb Virus
(byteme)
Re: [Q] How to get the Ethernet address ? ([EMAIL PROTECTED])
Re: [Q] How to get the Ethernet address ? (scz)
Problems with system logger (syslogd) (Rui Antunes)
Re: none (Graham Wilson)
Re: C++ thread lib wanted ("D. Stimits")
Re: [Q] How to get the Ethernet address ? ([EMAIL PROTECTED])
Re: injecting keystrokes into virtual console ([EMAIL PROTECTED])
----------------------------------------------------------------------------
From: Jon <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux.suse,comp.os.linux.x
Subject: Re: Linux vs Windows vs. Firewall
Date: Sat, 25 Nov 2000 20:11:28 +0000
msbssk wrote:
> Hello,
>
> I would like to constract a firewall with "ipcains" under SuSe 7.0.
>
> How can I do the connection between Linux and Win98 / NT in order to get a
> connection to the Internet via a Suse-PC and firewall ?
>
> Where can I find information or help to my problem ?
> Is there "howto" for this subjekt ?
>
>
> Ciao Marcus
>
>
Hi.
I personally use pmfirewall. It takes the hard work out of it.
You can get it from www.pmfirewall.com
Hope this helps.
------------------------------
From: Macro <[EMAIL PROTECTED]>
Subject: Adding a system call
Date: Sun, 26 Nov 2000 04:15:23 +0800
I tried to add a system call using the following method. I succeed in
Redhat 6.1 but I failed in Redhat 7.0. After compiling the new kernel in
Redhat 7.0. The system blocks on the statement "Starting system
logger..." when bootup. Would anyone tell me the reason ???
Thanks,
Marco.
First, search for the include file: /usr/include/asm/unistd.h and add
the following:
#define __NR_test 191
under the line
#define __NR_vfork 190
Then add the following line to /usr/include/bits/syscall.h
#define SYS_test __NR_test
After that, search for the source file: /usr/src/linux/kernel/sys.c and
add a function as following:
asmlinkage int sys_test(int a)
{
return a*2;
}
Note that this function is just a test, and it will return twice of the
input value (int a). Now, it comes to a difficult step, goto a
source file: /usr/src/linux/arch/i386/kernel/entry.S Search for the last
few lines, it should be like this:
.long SYMBOL_NAME(sys_sigaltstack)
.long SYMBOL_NAME(sys_sendfile)
.long SYMBOL_NAME(sys_ni_syscall) /* streams1 */
.long SYMBOL_NAME(sys_ni_syscall) /* streams2 */
.long SYMBOL_NAME(sys_vfork) /* 190 */
.rept NR_syscalls-190
.long SUMBOL_NAME(sys_ni_syscall)
.endr
Right, you should change the code to:
.long SYMBOL_NAME(sys_sigaltstack)
.long SYMBOL_NAME(sys_sendfile)
.long SYMBOL_NAME(sys_ni_syscall) /* streams1 */
.long SYMBOL_NAME(sys_ni_syscall) /* streams2 */
.long SYMBOL_NAME(sys_vfork) /* 190 */
.long SYMBOL_NAME(sys_test)
.rept NR_syscalls-191
.long SUMBOL_NAME(sys_ni_syscall)
.endr
Another thing need to note is the last few lines, it defines the
remaining
space for the system call symbol table. NR_syscalls is the
maximum system call. Therefore, to fill up the remaining space of the
table, we need to modify the last few lines to
.rept NR_syscalls-191
.long SYMBOL_NAME(sys_ni_syscall)
.endr
------------------------------
From: [EMAIL PROTECTED] (Otto Wyss)
Crossposted-To: linux.debian.devel
Subject: Re: XFree 4 crashes kernel 2.4.0-test5
Date: Sat, 25 Nov 2000 23:21:27 +0100
> > I have upgraded to XFree86 version 4.0.1e on my computer (i386) running
> > kernel 2.4.0-test5 with framebuffer support. While XFree86 version 3.3.6
>
> Upgrade to 2.4.0-test11. This is a known issue. BTW if you'd like
> to reproduce it could you check if there are alot of shm segments
> cludging in your system before the crash?
>
I'll going to get test-11, but a 20MB download is not that easy for me,
I only have a 56k modem line.
> > until my 30GB disk was repaired, desparatly watching if nothing got
>
> Install reiserfs.
>
Later, now I just unmount any unnecessary partitions. Currently I only
need just my 2GB root which I have mirrored to a second partition.
> 2.4.0-test11 includes quite stable and reliable vm-patches from rik.
> Between 2.4.0-test5 and 2.4.0.test11 there were some issues with the
> ext2-fs and the oom-killer and much more. Trying out a development
> kernel implies being up to date so get a newer kernel release.
>
My reasons to use development kernels are:
- needs USB support for my keyboard/mouse
- likes to have framebuffer support for console mode
- likes to play around with a rather uptodate system
> > utility which gathers any information at the next boot so I can send
> > them to the developers? I guess there are still some bugs in the kernel
>
> Depends on what you encountered. There is dmesg, ksymoops or if you're
> really up to debugging output you might install a kdb.
>
dmesg is useless, doesn't give any more informations. kdb is out of
questions since don't know enough of the sources. ksymoops might be
right, I'll try it. But I guess it won't help. Form what I've gathered
sofar, the crash is so bad the kernel doesn't even generate an Oops. Is
there a switch either in the kernel and/or XFree86 which produces more
log messages?
> > Besides dexter is a really nice tool to setup XFree86 but couldn't it
>
> you mean xfree 3.x config files? Despite the fact that they changed quite
> a lot in the new XF86Config you might be lucky. But I'd suggest you go
> with the supplied tools and read the README and man-pages downloaded with
> XFree4.0.
>
Of course since dexter doesn't detect the correct name of my USB-mouse
and also isn't able to produce modelines.
O. Wyss
------------------------------
Reply-To: [EMAIL PROTECTED]
From: [EMAIL PROTECTED] (Mike McDonald)
Subject: Re: injecting keystrokes into virtual console
Date: Sat, 25 Nov 2000 23:59:53 GMT
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] writes:
> On Wed, 22 Nov 2000 17:30:16 GMT Mike McDonald <[EMAIL PROTECTED]> wrote:
>| In article <[EMAIL PROTECTED]>,
>| [EMAIL PROTECTED] writes:
>|> On Tue, 21 Nov 2000 18:52:26 GMT Mike McDonald <[EMAIL PROTECTED]> wrote:
>|>
>|>| If you're using bash as your shell (I'm not), you could have your special
>|>| getty program gather up the init commands into a temp file and then exec bash
>|>| as 'bash -rcfile /tmp/fooy -i'. That'll cause bash to execute the init
>|>| commands first and then continue on as an interactive shell. You might be able
>|>| to do a similar thing with other shells too.
>|>
>|> That could be really messy with more than one going at the same time.
>|
>| Huh? /tmp/fooy was an example temp file name. You'd actually want to use
>| mktemp() and have the script remove its self as its last action. I don't see
>| how it's "messy" at all. Please explain what you mean.
>
> It would have to mix these with the normal init commands from .bashrc
> since with -rcfile, .bashrc is not used.
So you put a ". ~/.bashrc" as the first line, big deal.
> Then there remains the issue of how to inject the input into the program
> being started AND have that program accept input from the keyboard and
> not get an EOF when there's no more initializing input.
So you want to start some arbitrary program on some arbitrary virtual
console with some arbitrary keystrokes preinserted into that app's input to be
followed by the normal keystrokes? If so, then you're going to have to hack
the kernel to do that keystroke insertion.
Mike McDonald
[EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (byteme)
Subject: Microcrap WinNT documentation decoder rings here !! the worlds only 400 mb
Virus
Date: Sat, 18 Nov 2000 00:40:09 GMT
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To: comp.sys.sun.misc,comp.os.linux.setup
Subject: Re: [Q] How to get the Ethernet address ?
Date: Sun, 26 Nov 2000 00:52:10 -0000
In comp.os.linux.development.system Pillonel C?dric, NWS-PD-71
<[EMAIL PROTECTED]> wrote:
| How can I get the Ethernet address from my C++ application ?
"The" ethernet address? What if the machine has 2 or more
ethernet interfaces, or has 2 or more addresses per ethernet,
or has interfaces that are not ethernet, or combinations of
these?
Or maybe you want the address associated with the name the
machine is called? And what if there are multiple of those?
What if the machine has many alias hostnames? You want those,
too?
Do you want ethernet MAC addresses, or IP addresses? Do you
want IPv4 addresses or IPv6 addresses?
Will your program become corrupt if a syscall returns an array
of over 20000 addresses (yes, I've had that many on one machine)?
I hope you're still in the specification design phase of your
application.
--
=================================================================
| Phil Howard - KA9WGN | Dallas | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/ |
=================================================================
------------------------------
From: scz <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: [Q] How to get the Ethernet address ?
Date: Sun, 26 Nov 2000 02:33:40 GMT
[followups trimmed]
[EMAIL PROTECTED] wrote:
>
> In comp.os.linux.development.system Pillonel C?dric, NWS-PD-71
><[EMAIL PROTECTED]> wrote:
>
> | How can I get the Ethernet address from my C++ application ?
>
> "The" ethernet address? What if the machine has 2 or more
> ethernet interfaces, or has 2 or more addresses per ethernet,
> or has interfaces that are not ethernet, or combinations of
> these?
Since the original post reads "the Ethernet address", one might
infer that the machine has one (1) Ethernet interface. Tricky,
eh?
Note also the domain from which the original post was sent:
swisscom.com. A quick perusal of www.swisscom.com shows that
content is available in a number of languages. Perhaps Cedric
is not a native speaker of English, and he meant "an" vice "the".
Why don't you ask him for clarification instead of providing
empty (and nitpicky) rhetoric in response?
> Or maybe you want the address associated with the name the
> machine is called? And what if there are multiple of those?
> What if the machine has many alias hostnames? You want those,
> too?
He didn't ask for hostnames or hostids, either. Why is this
so confusing [to you]?
> Do you want ethernet MAC addresses, or IP addresses? Do you
> want IPv4 addresses or IPv6 addresses?
Let's ask a few more farfetched and irrelevant questions. The
answer to all of your rambling is, of course, mu. 'Mu' is the
correct response to a question predicated upon an incorrect
assumption.
> Will your program become corrupt if a syscall returns an array
> of over 20000 addresses (yes, I've had that many on one machine)?
That would be up to him, I imagine. And I'm sure he is mightily
impressed by the size of your array.
> I hope you're still in the specification design phase of your
> application.
I hope you take a deep breath (or a Midol) before you provide
another obnoxious response to a succinct question. At the very
least you could behave with a bit more politesse in a public
forum. Everyone has bad days, but each person must decide what
to do with his.
Just an observation. Cheers!
Scott
------------------------------
From: [EMAIL PROTECTED] (Rui Antunes)
Crossposted-To: alt.os.linux
Subject: Problems with system logger (syslogd)
Date: Thu, 23 Nov 2000 01:03:23 GMT
I'm developping a kernel module (RH7.0) that intercepts a few system
calls. I'm having some problems and I think that it's due to the
system logger - syslogd.
First, I'm intercepting the socket function recv() -
socketcall(SYS_RECV,...). The interception function just print(k)s a
message to the terminal and calls the original socketcall()...
but the syslogd just keeps on calling the recv() function (all the
time! - and with sockfd==0 !) so I get a unusable terminal. I had to
make a if(sockfd==0) return original_socketcall() (that is, I didn't
ouput any message if I suspected that it was syslogd() that was
invoking the syscall).
Now, I'm trying to use user-space system calls in the kernel by doing
something like
{ mm_segment_t oldfs = get_fs(); set_fs(get_ds());
fd = original_open("debug.txt",O_RDONLY,0);
set_fs(oldfs); }
The problem was that:
- the code worked if called on init_module() or cleanup_module()
- the code didn't worked otherwise - if used on a intercept
function (that was what I thought)
However, I found out (after a Oops that killed the system logger
syslogd) that indeed the code worked everywhere (I made a user program
that call some intercepted functions and the module worked fine!)
So, it just didn't work when "called" by the syslogd - maybe it
doesn't allow opening files?!?
I just wanted someone to explain me what does the system logger do
(what is it for?), if it is used in other Linux versions and if it's
okay to remove it (and how!?)
Thanks in advance,
Rui Antunes
------------------------------
From: Graham Wilson <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux.powerpc,comp.os.linux.misc,de.comp.os.unix.linux.misc,no.it.os.unix.linux.diverse,uk.comp.os.linux
Subject: Re: none
Date: Sat, 25 Nov 2000 19:49:06 -0800
nitin sharma wrote:
> i am extremely sorry for reposting the same querry on the forum. this is because i
>am unable to get the newsgroup site on my network. so kindly also copy the response
>to my mail account as in the abouve situation this is the only way the requested
>information can reach me. kindly bear with me.
> my querry was:
> i want to install the flavours of linux on my system.kindly specify the files i
>should download from the respective sights.
>
> linuxppc from http://download.sourceforge.net/mirrors/linuxppc/
>
> yellowdoglinux from
> ftp://ftp.yellowdoglinux.com/pub/yellowdoglinux
>
> debianlinux from
>
> http://www.debian.org/
>
> how to install the operating system from the files downloaded from the sites.
>
> Chequemail.com - a free web based e-mail service that also pays!!!
> http://www.chequemail.com
Don't post to so many groups.
------------------------------
Date: Sat, 25 Nov 2000 21:43:14 -0700
From: "D. Stimits" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Re: C++ thread lib wanted
Yingfei Dong wrote:
>
> hi, folks,
>
> I am looking for a C++ wrapper of thread on RedHat 6.1 or FreeBSD4.1?
> Please let me know if you have any inputs. Thanks.
>
> pthread is supported in C. But I didn't find any info about similar info
> for C++.
>
> Yingfei Dong
I'm have no idea if the reference I'm going to give is what you are
looking for or not, nor whether the quality is good or not, but there
are some thread wrappers in:
http://corelinux.sourceforge.net/
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: [Q] How to get the Ethernet address ?
Date: Sun, 26 Nov 2000 06:36:50 -0000
On Sun, 26 Nov 2000 02:33:40 GMT scz <[EMAIL PROTECTED]> wrote:
| Since the original post reads "the Ethernet address", one might
| infer that the machine has one (1) Ethernet interface. Tricky,
| eh?
Or one might infer that the original poster could not imagine
a machine having more than one, because (as you so kindly point
out) his has only one, but that he may be faced with a program
he is developing that needs to have "the Ethernet address".
| Note also the domain from which the original post was sent:
| swisscom.com. A quick perusal of www.swisscom.com shows that
| content is available in a number of languages. Perhaps Cedric
| is not a native speaker of English, and he meant "an" vice "the".
| Why don't you ask him for clarification instead of providing
| empty (and nitpicky) rhetoric in response?
The response was quite far from empty. It was full of advice
on how to understand the complexity of computer concepts that
frequently escape people who make limited observations of just
a few sample machines. Of course he might have mean "an".
In that case my response might be slightly rephrased because
just "an" address suggests one of many. But which one? The
one the application currently has a socket open with?
|> Or maybe you want the address associated with the name the
|> machine is called? And what if there are multiple of those?
|> What if the machine has many alias hostnames? You want those,
|> too?
|
| He didn't ask for hostnames or hostids, either. Why is this
| so confusing [to you]?
I believe you are the one who is confused. Why do you insist on
responses being very narrow and, in the case of an ill-formed
question, possibly being misleading?
|> Do you want ethernet MAC addresses, or IP addresses? Do you
|> want IPv4 addresses or IPv6 addresses?
|
| Let's ask a few more farfetched and irrelevant questions. The
| answer to all of your rambling is, of course, mu. 'Mu' is the
| correct response to a question predicated upon an incorrect
| assumption.
Utterly useless.
|> Will your program become corrupt if a syscall returns an array
|> of over 20000 addresses (yes, I've had that many on one machine)?
|
| That would be up to him, I imagine. And I'm sure he is mightily
| impressed by the size of your array.
There are way too many poorly designed (indeed too often not even
designed at all) programs out there to just stand by and let yet
another misunderstanding go by. In your case, I won't bother.
But the original poster has not offended me in any way, so I am
willing to help him and point out all the issues he may need to
consider (in his development project I suspect he may be doing).
|> I hope you're still in the specification design phase of your
|> application.
|
| I hope you take a deep breath (or a Midol) before you provide
| another obnoxious response to a succinct question. At the very
| least you could behave with a bit more politesse in a public
| forum. Everyone has bad days, but each person must decide what
| to do with his.
I had a good day today. I take it you didn't.
--
=================================================================
| Phil Howard - KA9WGN | Dallas | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/ |
=================================================================
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: injecting keystrokes into virtual console
Date: Sun, 26 Nov 2000 06:40:52 -0000
On Sat, 25 Nov 2000 23:59:53 GMT Mike McDonald <[EMAIL PROTECTED]> wrote:
| So you want to start some arbitrary program on some arbitrary virtual
| console with some arbitrary keystrokes preinserted into that app's input to be
| followed by the normal keystrokes? If so, then you're going to have to hack
| the kernel to do that keystroke insertion.
I guess so. I was just checking to make sure there wasn't already a
feature to do this. It would have been rather silly to develop one
when some other way to do it, implemented in some other part of the
kernel I might not have suspected, had already been done. You know,
the old wheel inventing thing :-)
--
=================================================================
| Phil Howard - KA9WGN | Dallas | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/ |
=================================================================
------------------------------
** 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
******************************