Linux-Development-Sys Digest #921, Volume #7     Wed, 31 May 00 15:13:17 EDT

Contents:
  Re: How do I GET Linux (Keith Kyzivat)
  Problen with gcc (Jose Manuel Rodriguez Garcia)
  Re: linking problem ("Duke Lee")
  Re: Need ideas for university funded project for linux (David Steuber)
  Re: Winmodems )Re: Need ideas for university funded project for linux) (David 
Steuber)
  conventions (Arnaud Westenberg)
  Re: Need ideas for university funded project for linux (JEDIDIAH)
  Re: System integrity check (was Re: ps does not show all processes) 
([EMAIL PROTECTED])
  Re: Need ideas for university funded project for linux (Yarick Rastrigin)
  Re: Technical advantages/disadvantages of Linux (Mario Klebsch)
  Re: viruses on Linux (Mario Klebsch)
  help: programs complain about unknown user id (dominik)
  a DIAMOND SPEEDSTAR A55 work with REDHAT 6.1. ("Jean-Claude MEILLAND")
  Re: help: programs complain about unknown user id (Lew Pitcher)

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

From: Keith Kyzivat <[EMAIL PROTECTED]>
Subject: Re: How do I GET Linux
Date: Wed, 31 May 2000 05:15:03 GMT

Joe Pfeiffer wrote:
> 
> Firepole803 <[EMAIL PROTECTED]> writes:
> 
> > I've been reading all about Linux for days, but nowhere does it say "click
> > here to get Linux".  Do I download kernels, or what?  A little help,
> > please?
> 
> The most convenient way is to go down to a book- or software-store,
> and a buy a distribution like RedHat, SuSE, Mandrake, or any of the
> others you come across.

First note: This is not really the appropriate newsgroup to post this
kind of question to.  Next time you should post in comp.os.linux for
this type of question.

This newsgroup is for linux development.

Another option, if you have a CD-ROM burner (or a friend has one), is to
download an ISO CD image for one of the Linux distributions.  You can
find these really easily at http://www.linuxiso.org/   CAUTION: this
will be a REALLY big download (usu. ~600 or so megs i.e. size of a
cdrom).  Once you have the image, most CDR software will take ISO cd
images as input.

Yet another option which is a bit more expensive than the
burn-it-yourself approach, but less expensive than a full fledged boxed
version, is to buy a distribution from something like
http://www.cheapbytes.com/ unlike the full boxed versions, these CDs of
the distributions don't come with any installation call-in help, extra
commercial software (which you usually don't need), etc...

hope that helps,
Keith

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

From: Jose Manuel Rodriguez Garcia <[EMAIL PROTECTED]>
Subject: Problen with gcc
Date: Wed, 31 May 2000 17:59:24 +0200


==============9D457D697500A893D6D26B65
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Hello

    I am writing a thread library, and I have many funtions
working correctly. Now I am writing pthread_mutex_lock(). I compile a
small
program, linked with my library, whitout error,  but in the execution
an error arise. I trace the program with ddd and the result is
surprising,
at least for me, the program call ptrhead_mutex_lock() before the main()
funcion. The window backtrace of ddd at the moment of the segmentation
fault is:

_init()
__libc_global_ctors()
__register_frame_info()
pthread_mutex_lock()
=2E...

The data structures handled by my phtread_mutex_lock() aren't
inicialized at this moment, and the program don't call
pthread_mutex_lock().
The program is:

/*
  Ejemplo muy sencillo de crecion de hilos
*/

#include <stdio.h>
#include "../cabeceras/interno.h"

#define NUM_HILOS 10

void *hacer(int *nombre)
{
  int i;

  for(i=3D0;i<10;i++)
    printf("Hola soy el hilo %d  en la vuelta %d\n",nombre, i);

}

int main()
{
  int i;
  pthread_t t1;
  pthread_t t2;

  int nombre[NUM_HILOS];

  h_iniciar();

  printf("Hola. Creo un hilo y espero a que acabe\n");

  /* Creo un hilos */
  t1=3D(pthread_t)0;
  t2=3D(pthread_t)0;
  for(i=3D0;i<10;i++)
    nombre[i]=3Di;
  printf("Creo el hilo 1\n");
  pthread_create(&t1  , NULL, (void *)hacer, (void*)nombre[0]);
  printf("Creo el hilo 2\n");
  pthread_create(&t2  , NULL, (void *)hacer, (void*)nombre[1]);
  printf("Voy a hacer join\n");
  pthread_join(t2,NULL);
  /* Han acabado y estoy aqui otra vez */
  printf("Hola, los hilos han acabado y estoy aqui otra
vez\nAdios...\n");
  return(0);
}

It can see that there is not any call to the funcion
pthread_mutex_lock().
    Can anyone help me? Thanks in advance
--
Jos=E9 Manuel Rodr=EDguez Garc=EDa



==============9D457D697500A893D6D26B65
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hello<br>
<br>
&nbsp;&nbsp;&nbsp; I am writing a thread library, and I have many funtions&nbsp;<br>
working correctly. Now I am writing pthread_mutex_lock(). I compile a small<br>
program, linked with my library, whitout error,&nbsp; but in the execution<br>
an error arise. I trace the program with ddd and the result is surprising,<br>
at least for me, the program call ptrhead_mutex_lock() before the main()<br>
funcion. The window backtrace of ddd at the moment of the segmentation<br>
fault is:<br>
<br>
<tt>_init()<br>
__libc_global_ctors()<br>
__register_frame_info()<br>
pthread_mutex_lock()<br>
</tt>....
<p>The data structures handled by my phtread_mutex_lock() aren't&nbsp;
inicialized at this moment, and the program don't call pthread_mutex_lock().
<br>The program is:
<p><tt>/*</tt>
<br><tt>&nbsp; Ejemplo muy sencillo de crecion de hilos</tt>
<br><tt>*/</tt>
<p><tt>#include &lt;stdio.h></tt>
<br><tt>#include "../cabeceras/interno.h"</tt>
<p><tt>#define NUM_HILOS 10</tt>
<p><tt>void *hacer(int *nombre)</tt>
<br><tt>{</tt>
<br><tt>&nbsp; int i;</tt>
<p><tt>&nbsp; for(i=0;i&lt;10;i++)</tt>
<br><tt>&nbsp;&nbsp;&nbsp; printf("Hola soy el hilo %d&nbsp; en la vuelta
%d\n",nombre, i);</tt>
<p><tt>}</tt>
<p><tt>int main()</tt>
<br><tt>{</tt>
<br><tt>&nbsp; int i;</tt>
<br><tt>&nbsp; pthread_t t1;</tt>
<br><tt>&nbsp; pthread_t t2;</tt>
<p><tt>&nbsp; int nombre[NUM_HILOS];</tt>
<p><tt>&nbsp; h_iniciar();</tt>
<p><tt>&nbsp; printf("Hola. Creo un hilo y espero a que acabe\n");</tt>
<p><tt>&nbsp; /* Creo un hilos */</tt>
<br><tt>&nbsp; t1=(pthread_t)0;</tt>
<br><tt>&nbsp; t2=(pthread_t)0;</tt>
<br><tt>&nbsp; for(i=0;i&lt;10;i++)</tt>
<br><tt>&nbsp;&nbsp;&nbsp; nombre[i]=i;</tt>
<br><tt>&nbsp; printf("Creo el hilo 1\n");</tt>
<br><tt>&nbsp; pthread_create(&amp;t1&nbsp; , NULL, (void *)hacer, 
(void*)nombre[0]);</tt>
<br><tt>&nbsp; printf("Creo el hilo 2\n");</tt>
<br><tt>&nbsp; pthread_create(&amp;t2&nbsp; , NULL, (void *)hacer, 
(void*)nombre[1]);</tt>
<br><tt>&nbsp; printf("Voy a hacer join\n");</tt>
<br><tt>&nbsp; pthread_join(t2,NULL);</tt>
<br><tt>&nbsp; /* Han acabado y estoy aqui otra vez */</tt>
<br><tt>&nbsp; printf("Hola, los hilos han acabado y estoy aqui otra 
vez\nAdios...\n");</tt>
<br><tt>&nbsp; return(0);</tt>
<br><tt>}</tt>
<p>It can see that there is not any call to the funcion pthread_mutex_lock().
<br>&nbsp;&nbsp;&nbsp; Can anyone help me? Thanks in advance
<br>--
<br>Jos&eacute; Manuel Rodr&iacute;guez Garc&iacute;a
<br>&nbsp;
<br>&nbsp;</html>

==============9D457D697500A893D6D26B65==


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

From: "Duke Lee" <[EMAIL PROTECTED]>
Subject: Re: linking problem
Date: Wed, 31 May 2000 08:54:25 -0700

Thank you it worked.

duke

Jerome Tollet <[EMAIL PROTECTED]> wrote in message
news:8h2giq$sgm$[EMAIL PROTECTED]...
> I wrote severals modules and i already got this message (unresolved
symbol).
> I resolved this problem by adding in my makefile the gcc option -O2. If
you
> don't enable this option, inlined functions are not inlined.
>
> Jerome Tollet
> [EMAIL PROTECTED]
>
> Duke Lee <[EMAIL PROTECTED]> wrote in message
> news:8h1u18$eu7$[EMAIL PROTECTED]...
> >
>
>



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

Crossposted-To: 
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.setup,comp.os.linux.advocacy
Subject: Re: Need ideas for university funded project for linux
From: David Steuber <[EMAIL PROTECTED]>
Date: Wed, 31 May 2000 15:59:59 GMT

[EMAIL PROTECTED] (JEDIDIAH) writes:

' >A database is the only way to really solve this problem with any
' >speed.  Sure, you could find(1) all executables and ldd them to see
' >which libraries they use, but what a waste of time.  It won't even
' 
'       No it isn't. Such a practice would tell you what is ACTUALLY
'       on the system rather than what has been made known to the debian
'       or rpm databases.

I use updatedb and locate rather a lot.  Updatedb is run from
cron.daily ( I think ).  It doesn't seem like such a stretch to then
do a file command on each entry in the locate database to see if it is 
an elf and if so what it ldds.

Seems like something a sh script can do.

-- 
David Steuber   |   Hi!  My name is David Steuber, and I am
NRA Member      |   a hoploholic.

All bits are significant.  Some bits are more significant than others.
        -- Charles Babbage Orwell

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

Crossposted-To: 
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.setup,comp.os.linux.advocacy
Subject: Re: Winmodems )Re: Need ideas for university funded project for linux)
From: David Steuber <[EMAIL PROTECTED]>
Date: Wed, 31 May 2000 16:00:00 GMT

[EMAIL PROTECTED] writes:

' Maybe I'm a special case, but I already ruined a motherboard by
' driving it from an inadequate PS.  And I burn through roughly one
' PS per year.  Bear in mind that, with that one exception, all the PSes
' have been at or above the rated level.  I don't want to think how fast
' I'd be flying through 'em if I started hooking in all the other crap
' I've got.

Maybe what you need to do is buy a power supply that is actually rated 
for the load you put on it. ;-)

I've never burned out the power supply that came with a computer.

-- 
David Steuber   |   Hi!  My name is David Steuber, and I am
NRA Member      |   a hoploholic.

All bits are significant.  Some bits are more significant than others.
        -- Charles Babbage Orwell

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

Date: Wed, 31 May 2000 16:19:56 +0200
From: Arnaud Westenberg <[EMAIL PROTECTED]>
Subject: conventions

Hi all,

During the programming of my driver the following question came to mind:
What are the/your conventions for wich data to put in the hardware
device structure?

What are your custums? How about buffers, queues, locks, flags,
interrupt nrs., IO base, major, global vars, etc 

I would also like to know your customs regarding header files, what do
_you_ put in them? Obvious some function prototypes and defines but when
is one overdoing it?

These are rather trivial questions but I like to keep my code as
readable as possible for others.

Thanks

Arnaud

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

From: [EMAIL PROTECTED] (JEDIDIAH)
Crossposted-To: 
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.setup,comp.os.linux.advocacy
Subject: Re: Need ideas for university funded project for linux
Date: Wed, 31 May 2000 16:10:59 GMT

On Wed, 31 May 2000 15:59:59 GMT, David Steuber <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] (JEDIDIAH) writes:
>
>' >A database is the only way to really solve this problem with any
>' >speed.  Sure, you could find(1) all executables and ldd them to see
>' >which libraries they use, but what a waste of time.  It won't even
>' 
>'      No it isn't. Such a practice would tell you what is ACTUALLY
>'      on the system rather than what has been made known to the debian
>'      or rpm databases.
>
>I use updatedb and locate rather a lot.  Updatedb is run from
>cron.daily ( I think ).  It doesn't seem like such a stretch to then
>do a file command on each entry in the locate database to see if it is 
>an elf and if so what it ldds.
>
>Seems like something a sh script can do.

        Certainly. Just rebuild the db at 3am when the system is idle
        and the end user is asleep...

        I was also thinking that this could be added to the filesystem
        in some way. Applications could create a sort of hard link to
        any file that was dependent on. Of course that 'hard link' would
        go away with the file that owned it. This could serve as a reference
        counter exposed to the OS at the lowest level possible.

-- 

    In what language does 'open' mean 'execute the evil contents of'    |||
    a document?      --Les Mikesell                                    / | \
    
                                      Need sane PPP docs? Try penguin.lvcm.com.

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

From: [EMAIL PROTECTED]
Subject: Re: System integrity check (was Re: ps does not show all processes)
Reply-To: [EMAIL PROTECTED]
Date: Wed, 31 May 2000 16:54:58 GMT

[EMAIL PROTECTED] (Neal Tucker) writes:

>How about this:
>For each critical file, get the checksum after running the file through
>crypt, and store the checksums somewhere.  To check validity, do the
>same and compare the results.In order to modify the checksum files so
>that the validity check passes, the hacker would need your passphrase
>for the crypt stage.

>You still need to protect the validity checker program, such as by
>storing it on read-only media.

You also need to protect the "read" and "exec" functionality of your
kernel somehow.  There is nothing stopping a determined intruder from
modifying the kernel in such a way that "read" sees a different file
from "exec". If this is done by manipulating the "exec" part, even booting
with a clean kernel to do the compares won't help.

For example, imagine a modification to the "exec" system call along these
lines:

   void exec(char* name)
   {
      if (check_for_file_in_dir("/.my_hidden_directory",basename(name))) {
        char* tmp=kmalloc(strlen(basename(name))+25);
        strcpy(tmp,"/.my_hidden_directory");
        strcat(tmp,basename(name));
        name=tmp;
      }
      /* Normal exec() functionality here */
    }

Bernie

-- 
The acid test of any political decision is, 'What is the
    alternative?'
Lord Trent
British Cabinet Secretary 1963-73

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

From: Yarick Rastrigin <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.setup,comp.os.linux.advocacy
Subject: Re: Need ideas for university funded project for linux
Date: Wed, 31 May 2000 21:52:40 +0400
Reply-To: [EMAIL PROTECTED]

Hello !
> >
> >Seems like something a sh script can do.
> 
>         Certainly. Just rebuild the db at 3am when the system is idle
>         and the end user is asleep...
I for myself always hate this behavior. It's not uncommon in our company
to work through 
the night, and updatedb slowing things down usually in the middle of
hard debugging session
pisses me off. And when it runs throuhg network mounts with 20 to 100
Gb's SMB-mounted disks
all across our local network - it's waay too long to complete, so it's
better to 
killall find. Or servers, running database speed test (1 million of
insert/select) show strange and different results, especially if all
session uses 10-12 hours  - depending of when it was started...

> 
>         I was also thinking that this could be added to the filesystem
>         in some way. Applications could create a sort of hard link to
Certainly, could be. I think some unused bits in filedescriptor could
hold at least major
info about filetype. But it would add an unneeded complicacy to fsck ,
and in case of 
fs corruption this could create a mess.
>         any file that was dependent on. Of course that 'hard link' would
>         go away with the file that owned it. This could serve as a reference
>         counter exposed to the OS at the lowest level possible.
> 
> --
> 
>     In what language does 'open' mean 'execute the evil contents of'    |||
>     a document?      --Les Mikesell                                    / | \
> 
>                                       Need sane PPP docs? Try penguin.lvcm.com.

-- 
With all the best, [EMAIL PROTECTED] AKA 2:5025/17

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

From: [EMAIL PROTECTED] (Mario Klebsch)
Subject: Re: Technical advantages/disadvantages of Linux
Date: Wed, 31 May 2000 18:57:06 +0200

steve@n writes:
>As was said, you come up of list of functionalities a product provides,
>and then see if it provides what you want. The original poster was
>asking for technical features of linux (read the title befor you
>respond next time), he was not asking if Linux is good run some specific
>applicatin on.

He did not ask about features but about advantages/disadvantages. Lets
take an Example:

- Linux doe have /dev/ttyI* as character devices for ISDN.
- *BSD do have /dev/rbch (Raw B CHannel).

These two are features, but whioch one is better or at least
technically better? There are lots of other exaples, where Linux and
other UNIXes differs, somtimes each UNIX is different in this
points. But the only practical judgement often is the application.

To give an exaple judgement on the ISDN device, the Linux sollution
gives easy ISDN access to programs, that are used to communicate using
a tratitional modem. However the BSD aproach enables the build an
answering maching only with standard utilities like cat and dd.

Which one is better?

If you need X75, Linux probably is better, since it does have X75
build in. If OTOH, you need your own B channelprotocol, *BSD is
better, since AFAIL Linux does not offers raw B channel data access.

73, Mario
-- 
Mario Klebsch                                           [EMAIL PROTECTED]

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

From: [EMAIL PROTECTED] (Mario Klebsch)
Subject: Re: viruses on Linux
Date: Wed, 31 May 2000 19:00:07 +0200

[EMAIL PROTECTED] (Mike Dowling) writes:

>I'm curious.  Are there any mail user agents for Linux out there that
>can automatically execute programs?

It is not a user agent, but sendmail has already been (mis)used to execute
program (with root permission) several times. :-(

73, Mario
-- 
Mario Klebsch                                           [EMAIL PROTECTED]

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

From: dominik <[EMAIL PROTECTED]>
Subject: help: programs complain about unknown user id
Date: Wed, 31 May 2000 17:56:55 GMT

hi!

i have to create a bootdisk which runs several programs completely
automatically. my solution was to start a script right away instead of
getty - at runlevel 1. the problem with this is, when i want the system
to reboot via script it complains: "go away. you don't exist."
that's probably due to not being logged in!?! but i can run programs
that are executable by root only. what's wrong - and more importantly:
how can i get around this?
i also tried to substitute a handwritten program just calling int19h or
jmp 0000:ffff for the system reboot/shutdown commands. by this results
in a segmentation fault.

thanks in advance for any help.

dominik


Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: "Jean-Claude MEILLAND" <[EMAIL PROTECTED]>
Subject: a DIAMOND SPEEDSTAR A55 work with REDHAT 6.1.
Date: Wed, 31 May 2000 18:17:41 GMT

Hello,

I can't manage to get my graphic card a DIAMOND SPEEDSTAR A55 work with
REDHAT 6.1.
Any help appreciated.

Thanks,
mailto:[EMAIL PROTECTED]





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

From: [EMAIL PROTECTED] (Lew Pitcher)
Subject: Re: help: programs complain about unknown user id
Reply-To: [EMAIL PROTECTED]
Date: Wed, 31 May 2000 18:27:44 GMT

On Wed, 31 May 2000 17:56:55 GMT, dominik <[EMAIL PROTECTED]>
wrote:

>hi!
>
>i have to create a bootdisk which runs several programs completely
>automatically. my solution was to start a script right away instead of
>getty - at runlevel 1. the problem with this is, when i want the system
>to reboot via script it complains: "go away. you don't exist."
>that's probably due to not being logged in!?!

No, that's a problem due to programs that use utmp (i.e. the
getutent() function, etc) not being able to locate your logon record
in utmp. Programs like 'login' and 'bash' properly set the utmp file
with your 'login' record, so such functions can work properly.
Programs like 'who' or 'last' use utmp to determine their processing.

There are remedies for your problem. Either
a) code your script to properly set up utmp at startup, or
b) remove the programs/functions that require utmp functions

>but i can run programs
>that are executable by root only. what's wrong - and more importantly:
>how can i get around this?

>i also tried to substitute a handwritten program just calling int19h or
>jmp 0000:ffff for the system reboot/shutdown commands. by this results
>in a segmentation fault.

Of course. Linux doesn't expose those 'entrypoints' to user programs. 


Lew Pitcher
System Consultant
Toronto Dominion Financial Group

([EMAIL PROTECTED])


(Opinions expressed are my own, not my employer's.)

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


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