Linux-Development-Sys Digest #517, Volume #6     Mon, 22 Mar 99 19:14:04 EST

Contents:
  Re: Building Linux Shared Libraries (Scott Ratliff)
  Re: Restoring a Win95 (VFAT) filesystem from tape ([EMAIL PROTECTED])
  Re: no setuid for scripts (Thomas Zajic)
  Re: Barclays Internet banking under Linux? (how to change uname()) (Julian T. J. 
Midgley)
  Re: what "rc" scripts exist for linux? (Nix)
  Re: no setuid for scripts (Preston F. Crow)
  PC104 BUS support? (Tony Mendoza)
  Re: Threads and clone() (Miquel van Smoorenburg)
  Anyone around with knowledge about memory barriers in SMP environments? (Aurel 
Balmosan)
  Re: Any Insure++ Users? (Devin Reade)
  Vendor Specific SCSI commands (David Price)
  Re: Vendor Specific SCSI commands (Viljo Hakala)
  Where should I look for the source for 'cp'? ("Taro Ikai")
  Re: Where should I look for the source for 'cp'? (Viljo Hakala)
  Kernel APM 2.2.2 Not blanking display (Bryan Mayland)
  initrd limit size ([EMAIL PROTECTED])
  Re: Where should I look for the source for 'cp'? (David T. Blake)
  Re: ncurses port for vc? (bill davidsen)
  ANNOUNCE: Linux Router ( 3 1/2 " size hardware) ("Jack Levin")
  getting a signal when there's data available (Modemch)
  Re: SMP: slicing by -process- or -thread- ? (bill davidsen)
  Re: Configuring Linux as mail server ... (bill davidsen)

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

From: [EMAIL PROTECTED] (Scott Ratliff)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Building Linux Shared Libraries
Date: 22 Mar 1999 16:07:31 GMT

John Burton ([EMAIL PROTECTED]) wrote:
: I just use :-

: 'gcc -shared -o lib.so lib.o'

: Then I link my apps :-

: 'gcc -o testapp testapp.c ./lib.so'

: Seems to work for me.

That works for me too when I am creating a stand-alone library.
However, ..., I'm trying to do something similar to:

'gcc -shared -o /mylibpath/lib1.so lib1.o'
'gcc -shared -o /mylibpath/lib2.so lib2.o'
'gcc -shared -o liball.so liball.o /mylibpath/lib1.so /mylibpath/lib2.so'
'gcc -o testapp testapp.c /mylibpath/liball.so'

Using the '-shared' in this scenario allows the 'liball.so' to be
created but when I link 'testapp' I get undefined reference errors
from functions that are contained in 'lib1.so' and 'lib2.so'.

: Does anyone know what happens if you DON'T build your shared library using
: the position
: independent code flag for gcc? I asked on comp.unix.programmer but so far no
: replies.

FWIW,
On some platforms, the linker won't allow you to build the library.
Linux/GNU seems to build it anyway.

Scott

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

Subject: Re: Restoring a Win95 (VFAT) filesystem from tape
From: [EMAIL PROTECTED]
Date: Mon, 22 Mar 1999 16:59:52 GMT

Thanks for all you help. What I eventually did was to do a format c:
/s to create the filesystem, using the Win95 rescue disk. I then
booted Linux, mounted the filesystem as vfat, and restored everything
except io.sys and command.com.

I could then fire up '95, look at a file with Word, fire up AccPac and 
play StarCraft. That's about all I ever do with it anyway, so it looks 
to be fully functional !-}
--
Tony Lill,                         [EMAIL PROTECTED]
President, A. J. Lill Consultants        fax/data (519) 650 3571
539 Grand Valley Dr., Cambridge, Ont. N3H 2S2     (519) 241 2461
=============== http://www.ajlc.waterloo.on.ca/ ================
"Welcome to All Things UNIX, where if it's not UNIX, it's CRAP!"

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

From: Thomas Zajic <[EMAIL PROTECTED]>
Subject: Re: no setuid for scripts
Date: Mon, 22 Mar 1999 18:44:57 GMT

Nix wrote:
> [ ... ]
> sudo, and similar programs, is your friend, as is a little suid C
> wrapper that execs the script you want.           ^^^^^^^^^^^^^^^
  ^^^^^^^

This is something I donīt quite get, yet - how is the proverbial suid
C wrapper more secure than a shell script (except for the fact that
any user can write a shell script, but not everybody might be allowed
to access a C compiler on a given system)?

It also took me a while to understand how & why exactly the typical
shell script, thatīd give one a nice root shell if suid shell scripts
were allowed, works, so cut me some slack here. :-)

If you can be bothered, thereīs an article on DejaNews describing
how such a shell script works, and Iīd be highly interested in how
exactly a suid C wrapper would help in this case. The article is on

http://x9.dejanews.com/[ST_rn=ps]/getdoc.xp?AN=380556168&CONTEXT=922127245.851443730&hitnum=7

It was originally posted by Donovan Rebbechi - Donovan, if youīre
around somewhere ... :-) I understand that this specific case as
outlined in the article could be easily avoided by calling ī/bin/lsī
from the script instead of just īlsī, but Iīm interested in the
general idea & concept of how & why C wrappers are safer - if
possible, a nice example like the one in that article would be great!
:-)

Thomas
-- 
=---------------------------------------------------------------------=
-        Thomas Zajic aka ZlatkO ThE GoDFatheR, Vienna/Austria        -
-        Spam-proof e-mail: thomas(DOT)zajic(AT)teleweb(DOT)at        -
=---------------------------------------------------------------------=

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

From: [EMAIL PROTECTED] (Julian T. J. Midgley)
Crossposted-To: uk.finance,uk.comp.os.linux
Subject: Re: Barclays Internet banking under Linux? (how to change uname())
Date: 22 Mar 1999 18:12:21 -0000

In article <[EMAIL PROTECTED]>,
Paul Ashton  <[EMAIL PROTECTED]> wrote:
>Robert Billing wrote:
>> 
>> Paul Ashton wrote:
>> 
>> > Personally, I use lloyds online with Linux. They don't use any java
>> > or javascript but force me to accept one cookie which I find acceptable.
>> 
>>  Can you tell me how? It just gives me "incorrect browser".
>
>Whilst registering or whilst using it? When I use it I don't need to
>masquerade my browser or do anything special. I can't remember whether
>I had to masquerade as win95 when I registered. If so, then I would
>have modified the junkbuster config file to do so.

I registered from Linux without modifying anything.  (I'm currently
waiting to hear from them for the password.)

Julian Midgley


-- 
Julian T J Midgley      |                       [EMAIL PROTECTED]
Trinity Hall, Cambridge |  Excession: http://excession.ucam.org
"For every complex problem, there is a solution that is simple,
neat, and wrong."  (H. L. Mencken)

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

From: Nix <$}xin{$@esperi.demon.co.uk>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: what "rc" scripts exist for linux?
Date: 22 Mar 1999 16:22:18 +0000

[EMAIL PROTECTED] (Alexander Viro) writes:

> In article <7d4sd5$[EMAIL PROTECTED]>,
> david parsons <o r c @ p e l l . p o r t l a n d . o r . u s> wrote:
> >     Basically because of the registry;  it's an interesting idea to use
> >     make, though, and the only problem I could see with doing that is
> >     that the current rc setup has each file call in its prerequisites,
> >     while make puts the prerequisites elsewhere -- for additional
> >     packages, like syslog, dhcpd, and xdm/xterm, all I need to do is
> >     drop the rc files into /etc/rc.d/init.d/ and build the symlinks
> >     into /etc/rc.d/rc.m, while a makefile based system would require
> >     that I also tweak the makefile.
> 
> include /etc/rc.d/rc.m/*.mk

Yep, this is basically what I am doing :)

Great minds think alike and all that.

-- 
`Anything else just amounts to repeatedly hitting yourself on the head
 with a virtual icepick, and is just about as useful.' - Linus Torvalds
 on linux-kernel

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

From: [EMAIL PROTECTED] (Preston F. Crow)
Subject: Re: no setuid for scripts
Date: 22 Mar 1999 19:03:21 GMT

I like suid shell scripts.  On my home systems, I'm the only user, so
I figure that my acount is just as secure as the root acount.  The
trick to hacking the kernel is that the kernel doesn't disable suid
shell scripts!  Instead, it just doesn't include the code to enable
them.  The suid handling is an additional operation within the binfmt
handling code, and it is simply not there for scripts.  I hacked it
in, based on the ELF code, for my use.  The patch may be a bit out of
date now, but it shouldn't be hard to update it:

http://www.linuxhq.com/patch/20-p0291.html

Someday, I'll get ambitious and make a real patch that includes a
config option.  Maybe.

But remember, suid scripts are easy to hack in some not so obvious
ways.  I wouldn't use them on a system where you don't give all the
users the root password.

--PC

--
   "Everything is permissible"--but not everything is beneficial.
   "Everything is permissible"--but not everything is constructive.
                                                      --I Corinthians 10:23

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

From: Tony Mendoza <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: PC104 BUS support?
Date: Mon, 22 Mar 1999 13:57:10 -0600

I am looking to put together a machine that uses the PC104 bus for
embedded systems.  Does anyone know if the kernel supports this
architecture?

Tony


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

From: [EMAIL PROTECTED] (Miquel van Smoorenburg)
Subject: Re: Threads and clone()
Date: 18 Mar 1999 10:11:04 +0100

In article <[EMAIL PROTECTED]>,
Stefan Monnier  <[EMAIL PROTECTED]> 
wrote:
>>>>>> "Mike" == Mike Delaney <[EMAIL PROTECTED]> writes:
>> Now, what I'd like to know is: Are we going to see the threads start sharing
>> the same PID, as the POSIX draft dictates?
>
>I've heard rumors (months ago) of maybe (who knows) at some point potentially
>start considering the eventual possibility of perhaps setting up a mailing-list
>to decide whether or not someone should take a look at the realizability
>of a study that might lead later to a prototype implementation of 32bit PID
>split into 16bit processID and 16bit threadID.

Ofcourse you could also introduce a new group - we already have a "session"
(setsid()), a "process group" (setpgid) why not add a "thread group" (settid())
Signals should be sent to the "thread group leader".

Mike.
-- 
Indifference will certainly be the downfall of mankind, but who cares?

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

From: Aurel Balmosan <[EMAIL PROTECTED]>
Subject: Anyone around with knowledge about memory barriers in SMP environments?
Date: Mon, 22 Mar 1999 20:29:19 GMT

Well I know I should buy a book about it but I hope that my actual 
question is quiet simple to answer. 

Is it neccessary to use memory barriers when I write an aligned 4 byte
integer in a SMP environment? I would guess no. I thought about double 
the integer and using only the value if both parts are equal. I do not
want to use semaphores for the readers because a possible old value
seen by some process is still valid for about 10 seconds. That should
be enough for the cache on each CPU to sync again. 

On Alpha machines there is a machine instruction 'write memory barrier'.
I wonder if I have to use it to be safe?

Anyway can it happen that a 4 byte value correctly aligned is seen 
differently in a part (i.e. the first 2 bytes) on different CPU's?
Or is that impossible the the current SMP boards for Intel or
Alpha CPU's?


Regards,

        Aurel.

-- 
================================================================
Aurel Balmosan                |  [EMAIL PROTECTED], [EMAIL PROTECTED] 
http://gaia.owl.de/~aurel/    |                                 
================================================================

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

From: [EMAIL PROTECTED] (Devin Reade)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Any Insure++ Users?
Date: 22 Mar 1999 13:59:37 -0700

In article <[EMAIL PROTECTED]>, Mark Riehl  <[EMAIL PROTECTED]> wrote:
>Guys,
>
>We're looking at purchasing a copy of Insure++ for Linux.  It's pretty
>expensive ($2900 per user), we can't get an evaluation copy, and the
>only source of info is the Parasoft web page.  
>
>So I'd like to hear from some people who have actually used it.  Any
>good or bad experiences?  

I've used Insure on Solaris.  For corporate s/w development, it's 
well worth the price.  We don't use it very often, but when we do
it finds problems that would be _very_ difficult to otherwise track
down.  There is also something to be said for running test cases
on a regular basis with the insure stuff compiled in, as part of your
nightly (weekly, whatever) test bed.  Your programs may take quite
a bit longer to run, though.

If you have a s/w budget, buy it.

I would like to get a copy for personal use on Linux, but it's a bit
expensive for personal non-profit use.  C'est la vie.

(My opinions are my own, yadda, yadda ...)

-- 
        Devin Reade             [EMAIL PROTECTED]

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

Date: Mon, 22 Mar 1999 21:00:30 +0000
From: David Price <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Vendor Specific SCSI commands

I am trying to develop a CD writing tool on a propriatry system, and all we have
is an obsolete YAMAHA 400t-NB 4x CD-R drive.

Does anybody know where I can get the vendor specific commands for this or
similar drives ?




please remove 123 from e-mail address to contact me
david


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

From: [EMAIL PROTECTED] (Viljo Hakala)
Subject: Re: Vendor Specific SCSI commands
Date: 22 Mar 1999 21:36:23 GMT

David Price <[EMAIL PROTECTED]> wrote:
>I am trying to develop a CD writing tool on a propriatry system, and all we have
>is an obsolete YAMAHA 400t-NB 4x CD-R drive.
>
>Does anybody know where I can get the vendor specific commands for this or
>similar drives ?

I'd see if the cd-r drive in question would be supported by any of the 
software or OS which has source available. Also you could try
to get the specs from the vendor.. cdrecord and cdwrite are well known in
*bsd/linux world.. Sorry I can't remember by offhand if your
drive is supported or not.   


-vh




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

From: "Taro Ikai" <[EMAIL PROTECTED]>
Subject: Where should I look for the source for 'cp'?
Date: Mon, 22 Mar 1999 21:48:24 GMT

Wise ones,

I don't know where to find the source for the 'cp' command.
Is it supposed to be part of the shells? 
I installed (via RedHat's RPM) the source for bash, but I cannot
find the relevant code. 

Taro


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

From: [EMAIL PROTECTED] (Viljo Hakala)
Subject: Re: Where should I look for the source for 'cp'?
Date: 22 Mar 1999 22:22:24 GMT

On Mon, 22 Mar 1999 21:48:24 GMT, Taro Ikai <[EMAIL PROTECTED]> wrote:
>Wise ones,
>
>I don't know where to find the source for the 'cp' command.
>Is it supposed to be part of the shells? 
>I installed (via RedHat's RPM) the source for bash, but I cannot
>find the relevant code. 

cp belongs to the gnu file utilities, you can always get the latest 
.tgz from the gnu ftp/mirror site. 

-vh


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

From: Bryan Mayland <[EMAIL PROTECTED]>
Subject: Kernel APM 2.2.2 Not blanking display
Date: Mon, 22 Mar 1999 17:40:58 -0500

Hiya folks!  I've been having a problem with the APM in linux since I
left the 2.0.36 kernel on my Dell Inspiron 3200 laptop.  When the kernel
tries to blank the display, I get a message that says "Unable to enter
requested state".  The kernel's .config file hasn't changed since my
2.0.36 build.

I tracked this error down to arch/i386/kernel/apm.c:
apm_set_display_power_state.  the set_power_state(0x0100, state) is
returning APM_BAD_STATE, not APM_BAD_DEVICE as the code would expect.  I
modified the next line from
if (error == APM_BAD_DEVICE)
to
if ((error == APM_BAD_DEVICE) || (error == APM_BAD_STATE))
and now it works fine.  Seems like the Inspiron 3200 might not be
retuning the right error code to the APM BIOS call.  Is this something
that anyone else has encountered?  Should it be included in 2.2.4?

Bry



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

From: [EMAIL PROTECTED]
Subject: initrd limit size
Date: Mon, 22 Mar 1999 22:00:30 GMT

I am trying to create an 32megs initrd ram disk.  The system goes in infinite
loop somewhere in an i/o access for the block 16000 (this number is not the
real one because i cannot catch the real one in in the screen.

I am using the different kernels availaible for RedHat 5.2 in the CDROM and
my initrd is a rebuild ext2 32 megs partition with a full linux on it. Then i
am starting the monsters from a dos partition with the loadlin command, and
with the ramdisk set to 32megs (in K blocks of course) The systems where i
tested this have all 64 megs of ram and loop in the same way


Any ideas? I am very stuck....

Is there a limit in the ramdisk size.

Ici et maintenant
Henri


ref: @hjinitrd

============= Posted via Deja News, The Discussion Network ============
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

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

From: [EMAIL PROTECTED] (David T. Blake)
Subject: Re: Where should I look for the source for 'cp'?
Date: 22 Mar 1999 14:34:42 -0800

"Taro Ikai" <[EMAIL PROTECTED]> writes:

>Wise ones,
>
>I don't know where to find the source for the 'cp' command.
>Is it supposed to be part of the shells? 
>I installed (via RedHat's RPM) the source for bash, but I cannot
>find the relevant code. 

(in bash)

$ rpm -qf $(which cp)
fileutils-3.16-10

fileutils is what you want. It is a gnu package available
at ftp.gnu.org

-- 
Dave Blake
[EMAIL PROTECTED]

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

From: [EMAIL PROTECTED] (bill davidsen)
Crossposted-To: linux.dev.c-programming,microsoft.public.vc.3rdparty
Subject: Re: ncurses port for vc?
Date: 22 Mar 1999 23:21:44 GMT

In article <[EMAIL PROTECTED]>,
David Arcoleo  <[EMAIL PROTECTED]> wrote:
| I am developing a a program on Linux and am also porting it to 95/NT.
| Does anyonw know if ncurses has been ported it 9/NT?

There is/was a package called PCcurses which allowed simple stuff to run
in a DOS or DOS window environment. I have no idea where it is on the
net, but I believe I have a copy on tape somewhere. Unfortunately I
don't even have time to recover my own stuff from tape, much less
that:-(

Oops, my search engine says:
  ftp://ftp.gu.net/pub/cdrom5/misc/volume10/pccurses14/
and this puppy is *old* so it's not ncurses.

-- 
  bill davidsen <[EMAIL PROTECTED]>  CTO, TMR Associates, Inc
Politicians and diapers have one thing in common. They should both be
changed regularly and for the same reason.
        --Ted Symons(?)


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

From: "Jack Levin" <[EMAIL PROTECTED]>
Subject: ANNOUNCE: Linux Router ( 3 1/2 " size hardware)
Date: Mon, 22 Mar 1999 14:45:28 -0800

Hi all.
Most of us have dreamed of having a linux router a size of 3 1/2 floppy
(and it would not be a palm pilot).
Calibri-133, is a compact, diskless, programmable blackbox.
The linux OS stored on high performance flash chip (DiskonChip),
boots under 30 seconds.  During boot - up, the image is trasferred
onto Ramdisk.

Here are the specifications of the box:

             CPU:  Embedded AMD DX5-133 (5x86-133) processor
             BIOS:  AWARD 128 KB Flash Memory
             System memory:  One 72-pin socket (accepts 1 - 32 MB)
             Enhanced IDE hard disk drive interface: Supports up to two IDE
             hard disks.
             Serial ports: 2 ports: one RS-232, one RS-232/422/485
             Parallel port: One parallel port, supports SPP/EPP/ECP mode
             Infrared port:  Shared with COM2.  Transfer rate up to 115 kbps
             On Board mini-DIN PS/2 kerboard/mouse connector
             Supports M-Systems' DiskOnChip 2000 Flash disk up to 144 MB
             NE2000 compatible on-board ethernet interface. (10 MBits/s)
             Upgradable with  PC/104 module.

What can you do with it?
It is ideal for use at home as firewall/router/NAT;  connect it to your
internet
gateway and you can have a lan of computers that can browse internet,
all in the same time.
It is great if you are working on a project, and want to have a low
profile programmable device.

For more info,
check out http://yulia.com/hardware/index.html

Your comments are welcome.
Thanks,
-Jack




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

From: Modemch <[EMAIL PROTECTED]>
Subject: getting a signal when there's data available
Date: 22 Mar 1999 17:47:55 +0000

Hi All.

I'm wondering whether it's possible to receive a signal when there's data
available to be read on a filehandle.  select() can block until there's
data present, but I'd like to receive a signal instead, sort of to
simmulate an I/O interrupt.  I've tried doing it through fork(), where the
other process would just do a select() in an endless loop, and send a
signal when data becomes available, but that doesn't work too good - it
just crashes after a while.  Is there a standard way of doing it, or do I
have to keep playing with fork-select-kill kind of thing? 

Thanks a lot in advance.

--
Regards, 
Modemch

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

From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: SMP: slicing by -process- or -thread- ?
Date: 22 Mar 1999 23:11:38 GMT

In article <7ba3f5$472$[EMAIL PROTECTED]>, BL  <[EMAIL PROTECTED]> wrote:
| simple question: does linux smp work at the thread level or only at the
| process level?
| 
| I notice that my window manager is a single process (old twm).  yet when I
| move windows around on the desktop, sometimes cpu0 is used and othertimes
| cpu1. 

Whichever is available is used, however there's a tunable parameter
which makes the kernel use the last processor on which you ran when it
can.

| when I'm in the process of moving the window (for example) and I don't
| complete the move (the mouse button is not released yet), the work is done by
| only one cpu.  when I release the mouse and start a new window move, the other
| cpu is used.
| 
| am I correct in believing that each move is calling a different thread and
| that cpu's take turns in sharing work down to this level?

I believe that if your system were fairly loaded the CPU would change on
the fly as you moved the window, resulting in a less smooth movement.

Finally, note that there are two kinds of threads for Linux, one library
uses the clone() call to create kernel level threads, which are
dispatched by the kernel. This is most common, and allows multiple CPUs
to be used in multiple threads.

There is also a library which does all this at user level, so that you
have a single process being scheduled by the kernel, which then
dispatches to various user level threads. On systems with higher
overhead than Linux this can result in a saving, particularly if you
only have one CPU to use anyway.

In the common case the kernel is doing all the dispatching of CPUs and
and ping pong use of CPUs is probably due to other things running.

-- 
  bill davidsen <[EMAIL PROTECTED]>  CTO, TMR Associates, Inc
Politicians and diapers have one thing in common. They should both be
changed regularly and for the same reason.
        --Ted Symons(?)


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

From: [EMAIL PROTECTED] (bill davidsen)
Subject: Re: Configuring Linux as mail server ...
Date: 22 Mar 1999 23:35:12 GMT

In article <[EMAIL PROTECTED]>,
Raghavendra B K  <[EMAIL PROTECTED]> wrote:
| Hello,
| 
| I have a Linux server (DLD 5.4 kernel 2.0.33) which is on a LAN. This is
| part of a bigger intranet. Now I would like to configure my system as a
| mail server so that I can send/receive mails from the outside world
| (outside intranet).

Start by getting the latest version of sendmail and configuring it to
prevent relaying, or you will become yet another blocked site which
allows spammers to relay.

-- 
  bill davidsen <[EMAIL PROTECTED]>  CTO, TMR Associates, Inc
Politicians and diapers have one thing in common. They should both be
changed regularly and for the same reason.
        --Ted Symons(?)


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


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