Linux-Development-Sys Digest #296, Volume #6     Sun, 17 Jan 99 21:14:32 EST

Contents:
  problem with 2.2.0pre6 /SMP/NFS (null chars in NFS files) (Peter Hatch)
  Re: Secuity hole with perl (suidperl) and nosuid mounts on Linux (Ilya Zakharevich)
  6 questions on disk files ([EMAIL PROTECTED])
  Re: Quicktime ("Arne K. Haaje")
  Re: 2.2.0pre7 dowsnt load modules (Frank Hale)
  Re: PS2 mouse driver missing in 2.2.0pre7 (mlw)
  Re: 2 stacks? (David Wragg)
  Re: mmap problem (Richard Jones)
  Re: disheartened gnome developer (Navindra Umanee)
  Re: Quicktime (Dr H. T. Leung)
  Dynamically linked library (Vlad Doubrov)
  Re: PS2 mouse driver missing in 2.2.0pre7 ("Arne K. Haaje")
  Re: Secuity hole with perl (suidperl) and nosuid mounts on Linux (Frank Sweetser)
  Re: 2 stacks? (Stefaan A Eeckels)
  Quicktime ([EMAIL PROTECTED])
  Re: disheartened gnome developer ([EMAIL PROTECTED])
  PS2 mouse driver missing in 2.2.0pre7 (David Natkins)

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

From: Peter Hatch <[EMAIL PROTECTED]>
Subject: problem with 2.2.0pre6 /SMP/NFS (null chars in NFS files)
Date: Sun, 17 Jan 1999 16:23:29 -0600

I'm having a bear of a time with a problem we're having with a RedHat
5.1 system (4 PPro 180).  While running SMP and doing compiles we
notice  the (probable) introduction of null characters into some files
if the compile directory is located in NFS space.  We can avoid/fix the
problem by compiling only in local directories, or by using a non-SMP
kernel.

Has anyone seen this behavior?  Like I said, it only shows up while
running SMP and then only with NFS mounted files.  The problem seems to
exist in other kernels too (I forgot which and don't have access to the
machine right now...).


-- 
______    _______________    _____
      \  /Peter W. Hatch \  / 
       >< Zen Smalltalker ><  
______/  \_______________/  \_____

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

From: [EMAIL PROTECTED] (Ilya Zakharevich)
Crossposted-To: comp.os.linux.misc,comp.lang.perl.misc
Subject: Re: Secuity hole with perl (suidperl) and nosuid mounts on Linux
Date: 18 Jan 1999 00:03:33 GMT

[A complimentary Cc of this posting was sent to Frank Sweetser 
<[EMAIL PROTECTED]>],
who wrote in article <[EMAIL PROTECTED]>:
> > Somehow I'm lost on this description (I have seen Linux several times,
> > but have no idea how perms in a removable media can work).
> > 
> > Did I understand it correct: you chown/set-suid script.pl while it is
> > in your laptop, insert it in a server floppy, and run user-level perl
> > on it and it bombs?  How so?
> 
> right.  you see, on machine machines, there's an entry in /etc/fstab
> allowing any user to mount the local cdrom or floppy drive. by default, the
> user option also implies nosuid, which means that the setuid bit on any
> exe's on that mount will be ignored.
> 
> the problem here is with the way that perl handles setuid perl scripts.
> linux, like some other unices, simply ignores the setuid bit on scripts
> outright, due to a race condition in the way they're handled.  so, when
> perl is invoked on a script, among other things, it checks for the setuid
> bit.  if the bit is present, then the regular perl interpreter re-invokes
> the script under a sepreate setuid perl interpredir (typically named
> suidperl).  the script then runs as a regular setuid program.  

But my understanding is that this will happens only on very old
systems which do not have secure suid scripts.  How did suidperl
appear on a contemporary clone of Unix?

Ilya

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

From: [EMAIL PROTECTED]
Subject: 6 questions on disk files
Date: Sun, 17 Jan 1999 19:20:55 GMT

Hello! This is the first time I need to write code squeezing a good
performance out of a PC I/O subsystem, and I have a few questions concerning
the filesystem, the disks and the controller. If this is the wrong group to
post these questions, please forgive me and redirect me somewhere else:). Any
help on one or more of these would be greatly appreciated.

1) Exactly what policies does Linux employ to keep fragmentation of the
filesystem to a minimum?

2) When data is moved from the disk buffer into RAM through a DMA/ SCSI
controller, how many times is it moved from one buffer to the next before it
finally finds its way into user-space? I believe this is what happens, though
I'm not terribly sure. First, the device driver allocates (in kernel-space) a
chunk of physically sequential RAM and the controller transfers data into it.
Second, the data is moved into the appropriate file-buffer, also in
kernel-space. Finally, the data is moved into the appropriate area of
user-space. I guess that, by using mmap(), one could avoid the last step. I
was wondering whether it was possible to somehow "merge" into a sigle entity
the DMA buffer and the file buffer (perhaps by using mmap()?), so that one
ends up with just one contiguous kernel-space buffer (to which DMA transfers
are made) mmapped directly onto user space, and eventually how dirty one
needs to get one's hands at this (i.e. I would avoid hacking the device
drivers and the kernel if at all possible).

3) I'd like "allocate contiguous uninitialized space" on disk. That is, I
want to create a few very large (a few hundred MB) files and "fill" them with
data at a later time. However, I will not be able to first fill the first
file, then the second etc., rather, I'll write some data to the first file,
then some to the second, etc. and then return to the first, etc. However, I
want each of the files to be on a contiguous area of physical space on the
disk, so that sequential access to it at a later time can be done more
efficiently. One solution to this could be to first fill each file with
useless data (say, zeros) before creating the next, and then overwrite the
useless data at a later stage. However, I would really like to skip this
first useless writing stage; is it possible to allocate the (uninitialized)
space in negligible time?

4) Suppose I'm employing a SCSI disk/disk controller, and I want to access
four small chunks of data, A, B, C and D, on the same track, and I've made my
requests in that order, A, B, C and D. Suppose, however, that the chunks lie
on the track in REVERSE order, first D, then C, then B, then A. Does the
device driver or the controller manage to collect them in just one
revolution, or does it need four (actually from three and a little bit to
four)? Does the answer change with an UDMA disk/disk controller?

5) Again, in the two situations of SCSI and UDMA, suppose I want to read a
large sequential file and update it with new data. Assume the data are
already available before the read phase begins. Is it possible to have the
disk read the contents of a track, then IMMEDIATELY update that track before
moving the head to the next one? This would spare one out of two head
movements, compared to the case of, say, reading the file completely and then
starting over and overwriting it.

6) Is it possible to create a file which corresponds exactly to one physical
track (i.e. is contained in a single track and comprises all blocks of that
track)? Of course, the size of the file/track would depend (on modern disks)
on its position: those closer to the outer edge would be larger.

Thanks a lot in advance for any help on this stuff

Enoch

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

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

From: "Arne K. Haaje" <[EMAIL PROTECTED]>
Subject: Re: Quicktime
Date: Mon, 18 Jan 1999 01:21:07 +0100

[EMAIL PROTECTED] wrote:
> 
> Are there any plans to port Quicktime to Linux?  It would be a kick
> ass idea!
> 
> -Adam

I can watch the StarWars-trailer in .mov format with xanim.

Arne

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

From: Frank Hale <[EMAIL PROTECTED]>
Subject: Re: 2.2.0pre7 dowsnt load modules
Date: 17 Jan 1999 20:12:37 GMT

Staffan Nilsson wrote:
> 
> Hello
> 
> I know this problem, or similar ones, have been discussed already, but I
> still have no luck running 2.2.0pre7 on a standard redhat 5.2
> installation. The problem is that the kernel doesnt load any modules,
> and therefore is rather useless. I tried installing modutils 2.1.121
> from rahide, but they didnt would (see previous discussion). Someone
> suggested getting the source rpm and recompiling,so I did. It compiled
> fine, but after installation, my standard 2.0.36 kernel didnt find its
> modules. I didnt even bother trying to run 2.2.0.
> 
> So now I am back to the old standard 2.0.36.
> 
> Can anybody help?
> 
> /Staffan

Well I have been through this all last week and I have seen the light. I
installed 2.2.0pre7 just the other day on a fresh install of RH 5.2. The
only package I needed to update was sysklogd to version 1.3.28 you can
download it from the contrib.redhat.com site. The version in rawhide is
old. Okay as for the modules not loading did you have an initrd image in
your boot? If so then you need to create another one for your new
kernel. Make sure you compile in initrd support and support for ram
disks. After you compile the kernel do this

/sbin/mkinitrd /boot/initrd-2.2.0pre7.img 2.2.0pre7

this will create your initrd file.

Now edit lilo again and make sure you have something like this

image=/boot/vmlinuz-2.2.0-pre7-ac4
        label=linux
        root=/dev/hdb1
        initrd=/boot/initrd-2.2.0-pre7-ac4.img    # this line here
        append="mem=128M hdd=ide-scsi"
        read-only


now rerun /sbin/lilo to make the changes and reboot. It should load
modules now. If you get messages that say it can't find net-pf modules
or can't file ppp modules then do something like the following in you
/etc/conf.modules


alias pf-3 off  
alias pf-4 off  
alias pf-5 off  
alias net-pf-3 off 
alias net-pf-4 off 
alias net-pf-5 off 
alias ppp-compress-21 bsd_comp 
alias ppp-compress-24 ppp_deflate 
alias ppp-compress-26 slhc
alias ppp-compress-1 off 


Hope this helps!!!

-- 
From:      Frank Hale
Email:     [EMAIL PROTECTED]   
ICQ:       7205161                      
Homepage:  http://members.xoom.com/frankhale/  
Jade:      http://jade.netpedia.net/

"Excuse my english I went to a US public school"

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

From: mlw <[EMAIL PROTECTED]>
Subject: Re: PS2 mouse driver missing in 2.2.0pre7
Date: Mon, 18 Jan 1999 00:34:50 +0000

David Natkins wrote:
> 
> Can't find psaux.c anywhere in 2.2.0pre7.
> psaux is the PS2 mouse driver.
> 
> --
> David Natkins
> Computer Group of Princeton
> email:  Home:  [EMAIL PROTECTED]

I can't find that file either, however, I am using a PS2 mouse, with
pre7.
-- 
Mohawk Software
Windows 95, Windows NT, UNIX, Linux. Applications, drivers, support. 
Visit the Mohawk Software website: www.mohawksoft.com

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

From: David Wragg <[EMAIL PROTECTED]>
Subject: Re: 2 stacks?
Date: 18 Jan 1999 00:30:47 +0000

Richard Jones <[EMAIL PROTECTED]> writes:
> David Wragg <[EMAIL PROTECTED]> wrote:
> : C9X adds variable length arrays too, but the details are significantly
> : different from the gcc facility.
> 
> That's interesting. Can you tell us more or
> point to an online resource about this? I
> heard (pure rumour and speculation :-) that
> a lot of C++ features like default arguments
> and overloaded functions might be added ...

No, neither of them are in. (I've heard the committee rejected many
"feature X from C++" proposals. The only C++ism I've noticed is //
comments.)

You can download the final committee draft at
<URL:http://osiris.dkuug.dk/jtc1/sc22/wg14/>.

New features over C89 I can think of:

- long long
- C++-style // comments
- inline functions
- complex numbers
- variable length arrays
- variadic macros
- labelled elements in initializers
- floating point environment control (FP exceptions, rounding, etc.)
- unicode character escapes
- standard bool type

Most of those already exist as gcc extensions, but usually there are
significant differences in the details.

Dave Wragg

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

From: Richard Jones <[EMAIL PROTECTED]>
Subject: Re: mmap problem
Date: Sun, 17 Jan 1999 18:53:35 +0000

Marcin Szyllo <[EMAIL PROTECTED]> wrote:
: Hi there,

: I'm battling to understand why mmap (as in the attached example) does not 
: allow me to mmap a block device - a partition... Why NOT?

:   int fd = open ("/dev/hdb8", O_SYNC | O_RDWR);

: mmap: Operation not supported by device

Could it be because ... the Operation is not
supported by the device?

Seriously though, look at drivers/block/ide.c.
You'll see that the mmap operation in the
operations table is NULL, and you'll find this
piece of code in mm/mmap.c completes the
picture of what's happening:

        /* Determine the object being mapped and call the appropriate
         * specific mapper. the address has already been validated, but
         * not unmapped, but the maps are removed from the list.
         */
        if (file && (!file->f_op || !file->f_op->mmap))
                return -ENODEV;

(ENODEV is the error which corresponds to
`operation not ...').

Rich.

-- 
-      Richard Jones. Linux contractor London and SE areas.        -
-    Very boring homepage at: http://www.annexia.demon.co.uk/      -
- You are currently the 1,991,243,100th visitor to this signature. -
-    Original message content Copyright (C) 1998 Richard Jones.    -

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

From: Navindra Umanee <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.development.apps,comp.os.linux.x
Subject: Re: disheartened gnome developer
Date: 18 Jan 1999 01:20:19 GMT

[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>   Navindra Umanee <[EMAIL PROTECTED]> wrote:
> 
>> Okay, Qt handles/captures destroy and delete events by default so I'll
>> quote code that shows you how to write your own slots.
>>
> 
> FYI, GTK, captures destroy and delete events by default as well. The example

Actually, this isn't true at all or at least it captures the events
and doesn't do anything with them (GTK 1.0.0).  Try removing
delete_event() and destroy() for yourself or specify what version you
are using.

> [slot example snipped]
> 
> FWIW, your slot example is not completle. The line "public slots:" is not C++

Yes it is complete: there is no more code to write.  I didn't bother
making or posting a makefile.  You might as well claim that the GTK
example isn't complete either since I didn't post a makefile for that.

> and needs to be processed by a special pre-processor. You must configure your
> make file to call that preprocessor. The pre-processor will then generate an
> additional cpp and header file that also need to be handled by the make file.

It doesn't generate a header file.

> I don't know how well GNU automake can handle this stuff, perhaps a couple of
> extra m4 macros all that's needed.

Well, the KDE folks seem to have no problem.

> But were still comparing apples to oranges. In Gtk, I have no need to create
> slots. I can connect an object's signal to a callback that can operate on any
> other object.

I know you have no need to create slots in GTK.  I just posted that so
that you could compare.  What it takes to create a slot is to declare
the function a slot in the class declaration and pass the headers
through moc.  You can still use the function like any other function.

> Gnome is a work in progress. It's not even at 1.0 yet. While the Gnome

Correct, it's at 0.99.x.

> respective languages than they are in enhancing Gnome in particular. Gnome
> just happens to be the easiest path to a toolkit binding for their language.
> And that's exactly what the Gnome developers wanted. But since Gnome is not
> complete, it follows that the bindings are even less complete.

Fair enough.

> Linux is about freedom, Navindra. Do what you want and let others do
> what they want.

And when the fsck did I ever say otherwise?  Nice try.

-N.
-- 
"These download files are in Microsoft Word 6.0 format.  After unzipping, 
these files can be viewed in any text editor, including all versions of 
Microsoft Word, WordPad, and Microsoft Word Viewer."  [Microsoft website]
           < http://www.cs.mcgill.ca/~navindra/editors/ >

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

From: [EMAIL PROTECTED] (Dr H. T. Leung)
Subject: Re: Quicktime
Date: 18 Jan 1999 01:29:32 GMT


An application (xanim) already exists, which can play quicktime files.

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes:
|> Are there any plans to port Quicktime to Linux?  It would be a kick
|> ass idea!
|> 
|> -Adam
-- 
          --------------------------------------------------
"What you don't care cannot hurt you."            Chap. 7a, AMS-NS

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

From: Vlad Doubrov <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Dynamically linked library
Date: Tue, 12 Jan 1999 22:09:23 +0300

Hi All!

Perhaps I'm a stupid dummy in linux programming, but anyone could say me
how can I create dynamically linked libraries, link some of them at a
runtime of my application, use some of their functions and then unload?
And after some time just change the libraries without recompiling the
main program. Just like dynamic DLLs in win32... Under Linux, i don't
even know what to start from and what manpage to read in this case :(

PS. I need this to be able to add some plugins into my app later.

Bye All!

--
 Vlad aka 2:5097/49 aka 2:5020/1025.28  [Team MSTU]
 E - mail: [EMAIL PROTECTED]




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

From: "Arne K. Haaje" <[EMAIL PROTECTED]>
Subject: Re: PS2 mouse driver missing in 2.2.0pre7
Date: Mon, 18 Jan 1999 01:10:09 +0100

David Natkins wrote:
> 
> Can't find psaux.c anywhere in 2.2.0pre7.
> psaux is the PS2 mouse driver.
> 
> --
> David Natkins
> Computer Group of Princeton
> email:  Home:  [EMAIL PROTECTED]

It has merged with the keyboard driver.

Arne

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

From: Frank Sweetser <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc,comp.lang.perl.misc
Subject: Re: Secuity hole with perl (suidperl) and nosuid mounts on Linux
Date: 17 Jan 1999 16:34:39 -0500

[EMAIL PROTECTED] (Ilya Zakharevich) writes:

> Somehow I'm lost on this description (I have seen Linux several times,
> but have no idea how perms in a removable media can work).
> 
> Did I understand it correct: you chown/set-suid script.pl while it is
> in your laptop, insert it in a server floppy, and run user-level perl
> on it and it bombs?  How so?

right.  you see, on machine machines, there's an entry in /etc/fstab
allowing any user to mount the local cdrom or floppy drive. by default, the
user option also implies nosuid, which means that the setuid bit on any
exe's on that mount will be ignored.

the problem here is with the way that perl handles setuid perl scripts.
linux, like some other unices, simply ignores the setuid bit on scripts
outright, due to a race condition in the way they're handled.  so, when
perl is invoked on a script, among other things, it checks for the setuid
bit.  if the bit is present, then the regular perl interpreter re-invokes
the script under a sepreate setuid perl interpredir (typically named
suidperl).  the script then runs as a regular setuid program.  

so, user A mounts a floppy in his own machine, and writes a malicious
setuid perl script on it.  he then goes and mounts it as an unprivileged
user on the target machine, and runs the malicious program.  the kernel
sees it's mounted nosuid, and so ignores it.  however, then perl comes
along, sees the setuid bit, and, not knowing that it should be ignored,
happily invokes suidperl.  since suidperl is on a partition not mounted
nosuid, it gets root privs, hence the script runs with root privs - boom,
malicious script has a field day.

-- 
Frank Sweetser rasmusin at wpi.edu fsweetser at blee.net  | PGP key available
paramount.ind.wpi.edu RedHat 5.2 kernel 2.2.0pre5ac1 i586 | at public servers
checking for mass_quantities_of_bass_ale in -lFridge... no
checking for mass_quantities_of_any_ale in -lFridge... no
Warning: No ales were found in your refridgerator.
        We highly suggest that you rectify this situation immediately.
  -- from configure script of enlightenment 0.14

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

From: [EMAIL PROTECTED] (Stefaan A Eeckels)
Subject: Re: 2 stacks?
Date: 17 Jan 1999 21:30:12 GMT

In article <[EMAIL PROTECTED]>,
        Richard Jones <[EMAIL PROTECTED]> writes:
> David Wragg <[EMAIL PROTECTED]> wrote:
>: Richard Jones <[EMAIL PROTECTED]> writes:
>:> In fact, with gcc and pure C, alloca isn't necessary
>:> either because gcc extends C to provide useful (albeit
>:> non-portable) ways to allocate variable-sized arrays
>:> on the stack.
> 
>: C9X adds variable length arrays too, but the details are significantly
>: different from the gcc facility.
> 
> That's interesting. Can you tell us more or
> point to an online resource about this? I
> heard (pure rumour and speculation :-) that
> a lot of C++ features like default arguments
> and overloaded functions might be added ...
That would be *stoopid*, and I mean it. 'C' is a useful
language in its current form, and IMHO doesn't need to
be brought closer to C++. If the latter's features are
deemed necessary, we can always use it - no need to
bloat 'C'.

There are enough 'C' like languages that add various
levels of object-orientedness. There's no need to
add love handles to 'C' - I like it as it is, lean
and mean :-)

-- 
Stefaan
-- 

PGP key available from PGP key servers (http://www.pgp.net/pgpnet/)
___________________________________________________________________
Perfection is reached, not when there is no longer anything to add,
but when there is no longer anything to take away. -- Saint-Exupéry


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

From: [EMAIL PROTECTED]
Subject: Quicktime
Date: Mon, 18 Jan 1999 00:16:55 GMT

Are there any plans to port Quicktime to Linux?  It would be a kick
ass idea!

-Adam

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

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.development.apps,comp.os.linux.x
Subject: Re: disheartened gnome developer
Date: Tue, 12 Jan 1999 18:42:20 GMT

In article <[EMAIL PROTECTED]>,
  [EMAIL PROTECTED] wrote:
> On Mon, 11 Jan 1999 17:13:58 GMT, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> posted:
> >>    You'll have to be more specific.
> >>
> >>    All I've found so far in the Redhat control-panel are like thus:
> >>
> >> Red Hat Linux netcfg 2.18
> >> Copyright (C) 1996, 1997 Red Hat Software
> >> Redistributable under the terms of the GNU General Public License
> >
> >Gee, so the control panel is owned by Red Hat, and they could rerelease them
> >tomorrow under a proprietary license. Just like I said they could (and said
> >they wont do it) when you called me a liar.
> >
> >I suppose you wont apologize, of course.

> You miss the consideration that the third line of that comment shows
> a *really big stick* that strongly discourages Red Hat Software from
> doing a proprietary release.
<Snip reasons why Red Hat wont do it>

No, I didn´t miss anything.
That is why I said they would not do it. All I said is that they *can*
do it. Going back to what I actually said a few posts ago:

Red Hat does own software, unlike Jedi said, and they could rerelease
that software in a proprietary manner if they wanted (but they won´t), and
Troll Tech is the only company I know that has taken measures to guarantee
it wont do such a thing (Even if some believe those measures wont be
effective).

I suppose everyone agrees those things are correct, so as long as replies
go in the lines of "netcfg is not a library" or "Red Hat will not do
that" or "Qt is not GPL"... sure, I agree with you all :-)

--
Roberto Alsina (KDE developer, MFCH)&#137;

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

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

From: [EMAIL PROTECTED] (David Natkins)
Subject: PS2 mouse driver missing in 2.2.0pre7
Date: 17 Jan 1999 22:54:48 GMT

Can't find psaux.c anywhere in 2.2.0pre7.
psaux is the PS2 mouse driver.

--
David Natkins  
Computer Group of Princeton
email:  Home:  [EMAIL PROTECTED]

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


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