Linux-Development-Sys Digest #109, Volume #8     Tue, 29 Aug 00 14:13:19 EDT

Contents:
  Re: root password (Kevin Lacquement)
  Re: root password (Michel Talon)
  Embedded Linux ("Steven Soenens")
  Re: Q: SMP question (Holger Eitzenberger)
  Linux Kernel changes for threading (was Re: all threads in a process share the same 
pid?) (Tony Gale)
  Re: root password (Rene van Paassen)
  Re: Signal to a process (Wolfgang Draxinger)
  Resolution of select timeout (Peter Mueller)
  Resolution of select timeout (Peter Mueller)
  Re: (YASP) Seagate Barracuda (ST318416W) Incompatibility (Henry_Barta)
  Re: Signal to a process ("Z")
  Re: Signal to a process ("Z")
  Filesystem implementation problem (Elizabeth Clarke)
  Re: root password (Michel Talon)
  Re: "xtime" and "jiffies" (Bruno Ascenso)
  Re: (YASP) Seagate Barracuda (ST318416W) Incompatibility ("D. Stimits")
  Re: where is "make" in linux ("Paul D. Smith")
  Re: adding a module (Bruno Ascenso)

----------------------------------------------------------------------------

From: Kevin Lacquement <[EMAIL PROTECTED]>
Subject: Re: root password
Date: Tue, 29 Aug 2000 06:52:23 GMT

[EMAIL PROTECTED] wrote:
> 
> In article <8od7t4$2e6k$[EMAIL PROTECTED]>,
>   "Alexei Sinitsyn" <[EMAIL PROTECTED]> wrote:
> > > What i can do to login as a root if i fergot my root password??
> > If you have a PC machine you can type in LILO prompt something like
> this:
> >     linux single
> > or
> >     linux init=/bin/bash
> >
> > and then change your root password
> >
> > sincerely,
> > Alex
> > Thanks Alex for the replay
> But at Lilo prompt if system will not ask for my root password than any
> one can change it. What's about sequrity?
> A person who knows this can go and destroy any Linux system!!!!
> Thanks again.
> Bharat.
> 
> >
> 
> Sent via Deja.com http://www.deja.com/
> Before you buy.

IIRC, there is a password option in LILO, which requires a password to
use any non-default options with a given image.  This allows you to
require a password to enter single-user mode via LILO.  Take a look at
the manpage for lilo.conf.  There's still the issue of using a boot
disk, but you can probably prevent that with a BIOS option.

Cheers,
Kevin

------------------------------

From: Michel Talon <[EMAIL PROTECTED]>
Subject: Re: root password
Date: Tue, 29 Aug 2000 09:41:39 +0200

[EMAIL PROTECTED] wrote:
> In article <8od7t4$2e6k$[EMAIL PROTECTED]>,
>   "Alexei Sinitsyn" <[EMAIL PROTECTED]> wrote:
>> > What i can do to login as a root if i fergot my root password??
>> If you have a PC machine you can type in LILO prompt something like
> this:
>>     linux single
>> or
>>     linux init=/bin/bash
>>
>> and then change your root password
>>
>> sincerely,
>> Alex
>> Thanks Alex for the replay
> But at Lilo prompt if system will not ask for my root password than any
> one can change it. What's about sequrity?
> A person who knows this can go and destroy any Linux system!!!!
> Thanks again.
> Bharat.

When you hoose your root passwd you are happy to have this backdor to restore
your system (boot single user). This is a security hole but, if you have
access to the machine you can as well boot on a floppy, mount the hard disk
and change root passwd. So as soon as you have physical access to the machine
there is no way to secure it, so why bother?


-- 
Michel Talon

------------------------------

Date: Tue, 29 Aug 2000 10:32:27 +0200
From: "Steven Soenens" <[EMAIL PROTECTED]>
Subject: Embedded Linux

Hi,

Has anyone experience with BlueCat embedded Linux or any other distribution
? Any experience, hint on the best distribution is very welcome.

BR,

Steven.



------------------------------

From: [EMAIL PROTECTED] (Holger Eitzenberger)
Subject: Re: Q: SMP question
Date: 29 Aug 2000 10:44:54 GMT

In article <[EMAIL PROTECTED]>, Hugo Varotto wrote:

[...]

>When I was in grad school I did some research on binding tasks to different
>CPUS, disallowing the inherent global migration, migrating tasks to certain
>CPUS, reserving CPU time for particular tasks, mixing "bounded" tasks and
>regular tasks,  etc. It's a very interesting topic.
>
>I'll recommend that you get a copy of the excellent book "Linux Core Kernel
>Commentary", which explains these topics in detail.

Thanks Hugo, this is the book i was looking for.

Holger

-- 
+++ Debian GNU/Linux <[EMAIL PROTECTED]> +++ ICQ: 2882018 +++

------------------------------

From: [EMAIL PROTECTED] (Tony Gale)
Crossposted-To: comp.programming.threads,comp.os.linux.development.apps
Subject: Linux Kernel changes for threading (was Re: all threads in a process share 
the same pid?)
Date: 29 Aug 2000 11:58:18 GMT

In article <6L7p5.44224$[EMAIL PROTECTED]>,
        [EMAIL PROTECTED] writes:
> In comp.os.linux.development.apps Tony Gale <[EMAIL PROTECTED]> wrote:
>> Coincidentally, Linus was asked what form of fix for the shared PIDs
>> problem would be acceptable, he replyed:
> 
> This is _great_ news. Do you happen to have a pointer to the original
> text? The reason I ask is that from what I've seen, and what everyone
> I've talked this over with privately, Linus was dead set against any
> pthreads patches. Or, more accuratly, it seemed a long shot that any
> solution wouldn't be too ugly. ;)

Linus has released 2.4-test8-pre1 which has some changes to help
pthreads with the single PID and signal handling 'problems':

==============================
Ok, there's a test8-pre1 out there in testing. This is mainly for two
reasons:

<snip>

 - talk is cheap. The thread group stuff is there. But it will be removed
   unless somebody actually takes a look at whether it really makes
   pthreads easier and more efficient. 

   Most of the thread group code is trivial. The biggest impact was on
   signal.c, and even that wasn't because the new code is hard, it's just
   because I split up the "signal sending function from hell" into many
   smaller functions.

Whatever.

                Linus
==============================

So now the people who have been complaining about this can do something
about it.

-tony
-- 
E-Mail: Tony Gale <[EMAIL PROTECTED]>
The views expressed above are entirely those of the writer
and do not represent the views, policy or understanding of
any other person or official body.


------------------------------

From: Rene van Paassen <[EMAIL PROTECTED]>
Subject: Re: root password
Date: 29 Aug 2000 14:39:18 +0200

Michel Talon <[EMAIL PROTECTED]> writes:

> [EMAIL PROTECTED] wrote:
> > In article <8od7t4$2e6k$[EMAIL PROTECTED]>,
> >   "Alexei Sinitsyn" <[EMAIL PROTECTED]> wrote:
> >> > What i can do to login as a root if i fergot my root password??
> >> If you have a PC machine you can type in LILO prompt something like
> > this:
> >>     linux single
> >> or
> >>     linux init=/bin/bash
> >>
> >> and then change your root password
> >>
> >> sincerely,
> >> Alex
> >> Thanks Alex for the replay
> > But at Lilo prompt if system will not ask for my root password than any
> > one can change it. What's about sequrity?
> > A person who knows this can go and destroy any Linux system!!!!
> > Thanks again.
> > Bharat.
> 
> When you hoose your root passwd you are happy to have this backdor to restore
> your system (boot single user). This is a security hole but, if you have
> access to the machine you can as well boot on a floppy, mount the hard disk
> and change root passwd. So as soon as you have physical access to the machine
> there is no way to secure it, so why bother?

You might check out the bastille linux project, 
        www.bastille-linux.org

Basically, you can require the root password before dropping into the 
shell in runlevel 1. Then you can also protect lilo options with a password, 
and to prevent people putting their floppy disks in and booting, 
e.g. tomsrbt (see metalab.unc.edu/pub/Linux/system/recovery), set your
BIOS to boot only from the hard disk, and protect that with a BIOS password.

Don't forget your BIOS, or you will have to pry open your machine, and 
remove the BIOS battery for a few seconds. 

------------------------------

From: Wolfgang Draxinger <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Signal to a process
Date: Tue, 29 Aug 2000 14:47:39 +0200



Marco Fabiani schrieb:

> Hello,
> I would send a sort of signal to a specific process in order to increase
>
> a variable inside of it:
> process A:
> ...
> if (a>0)  increase the variable N inside process B
> ....
>
> How can I do it?
> Thanks in advance
> marco
>

Signals are sent using the kill()-function.
See "man 2 kill" ;)

To recognize on signals you're writing a signal handler in the form
void handler(int);
and use
signal(>SIGNAME<,handler);
to set it. Thats all!
But be carefull of use of signals! There only 32 signals on a 32-Bit system
since every signal corrsponds to
a bit on an unsigned integer.

C.U.


------------------------------

From: Peter Mueller <[EMAIL PROTECTED]>
Subject: Resolution of select timeout
Date: Tue, 29 Aug 2000 14:41:01 +0200

Hi,

I use select to get notefied of some timeouts. I found that the resolution of
the timeout time is 10 milli seconds. Is my measurement true? If yes, can I
change this anywhere (e.g. in the kernel) and how? Any experience with this?

Thank you very much,
Peter


------------------------------

From: Peter Mueller <[EMAIL PROTECTED]>
Subject: Resolution of select timeout
Date: Tue, 29 Aug 2000 15:22:05 +0200

Hi,

I use select to get notefied of some timeouts. I found that the
resolution of
the timeout time is 10 milli seconds. Is my measurement true? If yes,
can I
change this anywhere (e.g. in the kernel) and how? Any experience with
this?

Thank you very much,
Peter




------------------------------

From: Henry_Barta <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware
Subject: Re: (YASP) Seagate Barracuda (ST318416W) Incompatibility
Date: 29 Aug 2000 13:34:07 GMT

D. Stimits <[EMAIL PROTECTED]> wrote:
> Is the drive terminated correctly?

    I am running into what sounds like the same problem with a
    Seagate Barracuda and a several year old AHA 2940UW. I'm quite
    certain termination is correct. I've tried this drive alone
    (on the wide bus, still have a CD-ROM and DAT on the narrow
    portion of the bus) with termination enabled and with two other
    drives with termination supplied by another drive. (Before
    trying to add the drive, I had a working system with three IBM
    Ultrastor UW drives runnning the 2.2.12 Kernel with no apparent
    problems. Until one of the drives failed, that is.)

    I was able to format the drive under Windows NT and copy files
    to it, so it seems that the hardware works. There must be
    something different about how the Linux driver handles the
    drive that triggers this problem.

    The first error message I see before the endless loop of SCSI
    bus resets starts has text something along the line of 'Testing
    Unit Ready'

    There seem to be others experiencing the same problem, so it
    does not appear to be a sample defect with the drive.

-- 
Hank Barta                            White Oak Software Inc.
[EMAIL PROTECTED]                   Predictable Systems by Design.(tm)
                Beautiful Sunny Winfield, Illinois

------------------------------

From: "Z" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Signal to a process
Date: Tue, 29 Aug 2000 15:43:32 +0100

Once upon a while Wolfgang Draxinger <[EMAIL PROTECTED]> wrote:

> 
> 
> Marco Fabiani schrieb:
> 
>> Hello,
>> I would send a sort of signal to a specific process in order to increase
>>
>> a variable inside of it:
>> process A:
>> ...
>> if (a>0)  increase the variable N inside process B
>> ....
>>
>> How can I do it?
>> Thanks in advance
>> marco
>>
> 
> Signals are sent using the kill()-function.
> See "man 2 kill" ;)
> 
> To recognize on signals you're writing a signal handler in the form
> void handler(int);
> and use
> signal(>SIGNAME<,handler);
> to set it. Thats all!
> But be carefull of use of signals! There only 32 signals on a 32-Bit system
> since every signal corrsponds to
> a bit on an unsigned integer.
> 
> C.U.
> 

How is this a reason to be carefull with signals?

        Z


-- 
LISP is worth learning for the profound enlightenment experience you 
will have when you finally get it; that experience will make you a 
better programmer for the rest of your days.         Eric S. Raymond

------------------------------

From: "Z" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Signal to a process
Date: Tue, 29 Aug 2000 16:10:34 +0100

Once upon a while Marco Fabiani <[EMAIL PROTECTED]> wrote:

> Hello,
> I would send a sort of signal to a specific process in order to increase
> 
> a variable inside of it:
> process A:
> ...
> if (a>0)  increase the variable N inside process B
> ....
> 
> How can I do it?
> Thanks in advance
> marco
> 
> --
> ---------------------------------------------
>  ....and God said:
>                   "Pkunzip Universe.zip"
>                    and the Universe was ! .
> ----------------------------------------------
> 
> 

Your program should catch a signal and handle it in a function
where it would increase a global or static variable every time
it is called.
It's probably best to use one of the user defined signals.
signal(5) should be a good place to look for the right
signal to handle.
Now use the signal(2) function call to connect your handler
with the signal number. In Linux the normal implementation
will reset a signals behaivior to default after one
occurance so one has to call signal int the handler
again to reconnect it:

long int sigcounter;

void sighndlr(int s)
{
        if(SIGUSR1 == s)
                sigcounter++;

        signal(SIGUSR1, sighndlr);
}


int main()
{
        sigcounter = 0;

        signal(SIGUSR1, sighndlr);

        while(1) {...}
        return 0;

}

with this example you still have to make some error checking!


In the sending program use kill(2) to issue a signal.

        Z

(In the text of this post all numbers in parantheses are
used to indicate the man section where the documentation
to that function can be found. This is not the case inside
the code snippet!)

-- 
LISP is worth learning for the profound enlightenment experience you 
will have when you finally get it; that experience will make you a 
better programmer for the rest of your days.         Eric S. Raymond

------------------------------

From: Elizabeth Clarke <[EMAIL PROTECTED]>
Subject: Filesystem implementation problem
Date: 29 Aug 2000 15:23:15 +0000


I'm trying to implement a (proprietry) filesystem and having a little trouble 
when I get to the stage of reading my root directory. I see in my 
super_operations->read_inode function the request for the root inode number 
of my filesystem, and I get to my super block inode->i_sb is pointing to my
super_block. But between there and the call to the inode_operations->readdir
call the inode is cleared. That is inode->i_sb is no longer valid, nor 
inode->u.generic_ip. I suspect that the inode is being freed, or something, 
hence everthings being set to sero. But FTLOM I can't see why it would be freed
or vaped in this way. The VFS is not easy to follow!

Does anyone here know what I'm talking about and can give me pointers to
what I may be not be doing, or are doing wrongly. 

Ta muchly,
Beth

------------------------------

From: Michel Talon <[EMAIL PROTECTED]>
Subject: Re: root password
Date: Tue, 29 Aug 2000 18:46:53 +0200

Rene van Paassen <[EMAIL PROTECTED]> wrote:
> e.g. tomsrbt (see metalab.unc.edu/pub/Linux/system/recovery), set your
> BIOS to boot only from the hard disk, and protect that with a BIOS password.

> Don't forget your BIOS, or you will have to pry open your machine, and 
> remove the BIOS battery for a few seconds. 

You have given yourself the solution to crack the machine BIOS protected, if
you have physical access. Even if this does not work, you can remove the disk,
put it on an other machine, and edit the passwd file. Be sure there is no way
to protect a machine if you have physical access. The best protection is to
put all sensitive data on removable disks, and remove them when you are going
away.
Moreover there are enough root exploits to break into a machine through the
net and install trojaned kernel modules or similar, that you will never
discover.
When you consider all that, no need to be paranoid.

-- 
Michel Talon

------------------------------

From: Bruno Ascenso <[EMAIL PROTECTED]>
Subject: Re: "xtime" and "jiffies"
Date: Tue, 29 Aug 2000 18:16:00 +0100

Marco Fabiani wrote:

> Hello,
> if I understood good the global xtime and jiffies variables contains the
> current
> time but with two different  measurement. The first one with "struct
> timeval" and the second one meauseres the time in "jiffies". Is it true?

I believe that is true, but if someone knows the exact meaning of
'jiffies', please speak up...

>
> How can I convert a "struct timeval" variable in "jiffies"?

#include <linux/sched.h> for the constant HZ
jiffies = tv.tv_sec * HZ + tv.tv_usec * HZ / 1000000

> How can I yield the difference between two "struct timeval" variables?

check sys/time.h where you have the macros timeradd, timersub and timercmp

>

>
> I need to do this inside a kernel module.

Inside a module I believe you should use struct timespec (check
linux/time.h) and then use the funcs timespec_to_jiffies and
jiffies_to_timespec.

>
>
> Thanks.
> marco

Hope this is useful.
--Bruno


------------------------------

Date: Tue, 29 Aug 2000 11:29:30 -0600
From: "D. Stimits" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.hardware
Subject: Re: (YASP) Seagate Barracuda (ST318416W) Incompatibility

Henry_Barta wrote:
> 
> D. Stimits <[EMAIL PROTECTED]> wrote:
> > Is the drive terminated correctly?
> 
>     I am running into what sounds like the same problem with a
>     Seagate Barracuda and a several year old AHA 2940UW. I'm quite
>     certain termination is correct. I've tried this drive alone
>     (on the wide bus, still have a CD-ROM and DAT on the narrow
>     portion of the bus) with termination enabled and with two other
>     drives with termination supplied by another drive. (Before
>     trying to add the drive, I had a working system with three IBM
>     Ultrastor UW drives runnning the 2.2.12 Kernel with no apparent
>     problems. Until one of the drives failed, that is.)
> 
>     I was able to format the drive under Windows NT and copy files
>     to it, so it seems that the hardware works. There must be
>     something different about how the Linux driver handles the
>     drive that triggers this problem.
> 
>     The first error message I see before the endless loop of SCSI
>     bus resets starts has text something along the line of 'Testing
>     Unit Ready'
> 
>     There seem to be others experiencing the same problem, so it
>     does not appear to be a sample defect with the drive.
> 
> --
> Hank Barta                            White Oak Software Inc.
> [EMAIL PROTECTED]                   Predictable Systems by Design.(tm)
>                 Beautiful Sunny Winfield, Illinois

I have heard of some particular drives being a problem, or at least with
certain mixes. I don't know which drives those are though, so I couldn't
say if the Seagate Barracuda itself has known compatibility problems. It
is possible though. Someone else with a Seagate Barracuda might mention
if it is a problem or not.

------------------------------

From: "Paul D. Smith" <[EMAIL PROTECTED]>
Subject: Re: where is "make" in linux
Date: 29 Aug 2000 13:58:50 -0400
Reply-To: [EMAIL PROTECTED]

%% "Ross Crawford" <[EMAIL PROTECTED]> writes:

  rc> I was referring to the quote from the previous post:

  rc> "I end up reinstall the latest version of RedHat, which solved the
  rc> problem."

  rc> This seems to be the solution for most Windoze problems as
  rc> well. (Re-install latest version, not necessarily RedHat!!)

Indeed.  It's "a" solution for almost any problem, with almost any OS.

However, with Windows it's often your only solution, unless you're a
wizard with DLL's, Windows registry, etc. etc.  And sometimes not even
then.

With Linux, all you need to know is a command to install/uninstall the
package.

But, some people feel more comfortable re-installing the entire
operating system than learning a new command ;).  You're right, that is
a very Windows-based attitude.

-- 
===============================================================================
 Paul D. Smith <[EMAIL PROTECTED]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
===============================================================================
   These are my opinions---Nortel Networks takes no responsibility for them.

------------------------------

From: Bruno Ascenso <[EMAIL PROTECTED]>
Subject: Re: adding a module
Date: Tue, 29 Aug 2000 19:01:50 +0100

Susukita Ryutaro wrote:

> What is the standard way of adding a module to kernel 2.2.x?
> I copied a self-made character device driver (mydriver.o) to
> /lib/modules/2.2.5-15/misc. But when I tried to open /dev/mydriver0,
> "modprobe: can't locate module char-major-254". The 254 is a
> dynamically allocated major number. If I add
> alias char-major-254 mydriver
> to /etc/conf.modules, I can open /dev/mydriver0. But 254 is variable.
>
> Computational Science Division
> The Institute of Physics and Chemistry (RIKEN)
> SUSUKITA Ryutaro

If you use kerneld (a daemon that handles module requests buy the
kernel) you just add the line:
alias name mydriver
where name is the module's id in register_chrdev() or whatever call you
use.

Never use char-major-xxx because of what you said: the major changes!

--Bruno


------------------------------


** 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
******************************

Reply via email to