HDTenEightyP/NetNews huggingface dataset:
Newsgroups: comp.unix.programmer,comp.mail.mh
Subject: Re: setuid programs and calls...
From: guenther@stolaf.edu (Philip A Guenther)
Date: 6 Nov 92 15:46:22
Organization: Academic Computing Center, St. Olaf College

In article <1992Nov5.220832.3217@spectrum.xerox.com> leisner@wrc.xerox.com ( Marty Leisner) writes:

<text showing that a program that worked normally, couldn't find a
library when made setuid root>

   I don't understand why it can't find the shared library doing
   setruid instead of setuid (I see nothing else different (except for
   the i).  

   What am I missing?  This doesn't make sense to me...

ld.so is the name of the runtime linker.  It is invoked before main()
to finish linking in any unresolved symbols.  There is a danger
inherent in runtime linking.  If someone runs a dynamically linked
program with LDLIBRARYPATH set to have ~/lib first, he make his own
insecure version of libc.so.  By then running a setuid root program,
he could do *anything*.  To prevent this, ld.so doesn't even look at
LDLIBRARYPATH when ivoked by a setuid program.  It will only use those
libraries in /usr/lib /usr/local/lib and those specified by -L on the
compilation command line.  The exact set of directories it will always
look in is system dependent, so check the manpage on your system for
ld.so for the *full* story.

Philip Guenther
--
guenther@stolaf.edu (Philip Guenther)       | The ACC might agree with me,
Student Sys Prog, Academic Computing Center | but with that bunch, (and me)
St Olaf College, Northfield, MN 55057-1001  | you never know... :-) :-| :-(
"Life makes sense?  LIFE MAKES SENSE!!?  Where do people get these ideas?"-me
Newsgroups: comp.unix.programmer,comp.lang.c
From: hoesel@igc.ethz.ch (Frans van Hoesel)
Subject: accessing huge amount of data in 3D
Organization: University of Groningen, the Netherlands
Date: Tue, 10 Nov 1992 10:09:29 GMT

hi,

I'm working on a program that needs to access huge data files (~100MB)
in 3D.
The problem is that i want to read abitrary rows (columns) in
any of the thre dimensions. What is the best data format to use for
these files. Sequentially certainly not, because this will cause very
slow acces to a row in the non-sequential direction.

I could divdide the data in small cubes and store the data in the cubes
sequentially. This makes sure that I need only to access a limited 
numbr of diskblocks to read the data in any direction.

Are there any other methodsd that I ought to look into?
I'm sure many people face the same problem and it must have been solved
in the literature, so any reference would be welcome. Even better when
you could make the algorithm clear to me in a few lines. Given enough
response I will summarize the result to the net.

thanks.

-- frans

hoesel@igc.ethz.ch

-- 
===========================================================================
===  frans van hoesel               scientific research programmer      ===
===  hoesel@igc.ethz.ch             seeking a JOB in europa             ===
===========================================================================
Xref: sparky comp.unix.programmer:5243 comp.programming:3107
From: jhgreen@cs.sandia.gov (Jethro H. Greene)
Newsgroups: comp.unix.programmer,comp.programming
Subject: Is an talk-answering machine possible?
Date: 11 Nov 92 01:35:50 GMT
Article-I.D.: cs.1992Nov11.013550.5884
Followup-To: poster
Organization: Sandia National Laboratories, Albuquerque, NM
Originator: jhgreen@cs.sandia.gov

Is this possible?



	finger jhgreen@cs.sandia.gov
	.
	.
	.
	.
	jhgreen@cs.sandia.gov is not currently available.  Please leave
	you name and mess........


I am root, but it would be nice if that weren't a requirement.

Thanks in advance

--------------------------- |\_/| --------------------------------------------
| Jethro H. Greene (Jed) | \`0.0'/ | Massively Parallel Comp. Research Lab., |
| jhgreen@cs.sandia.gov  | =(_-_)= | Sandia National. Lab., Albuquerque, NM  |
---------------------------   U   --------------------------------------------
Newsgroups: comp.unix.programmer
From: sppp@hippo.ru.ac.za (Prof P Piacenza)
Subject: Unix driver for TS60 tape.
Keywords: Archive Tape
Organization: Rhodes University, Grahamstown, South Africa
Date: Wed, 11 Nov 1992 15:09:05 GMT


I have several ARCHIVE Corp. FT60 tape streamers (60 Mb).  These have
both DOS and SCO XENIX drivers.  Has anyone managed to get them to work with
Unix (specially SCO Unix)?  Since we are chronically short of funds we
cannot afford a new tape streamer and I would really like to use one
of these to backup our INTERNET Unix server.

I would appreciate the required information, preferably by email.

	 L.Piacenza - Chemistry Department - University of Transkei
	 Internet: sppp@hippo.ru.ac.za  Tel. 27-471-3022384
  
-- 
	 L.Piacenza - Chemistry Department - University of Transkei
	 Internet: sppp@hippo.ru.ac.za  Tel. 27-471-3022384
	 Internet: chpp@unitrix.utr.ac.za
From: tasos@cs.bu.edu (Anastasios Kotsikonas)
Newsgroups: comp.unix.programmer
Subject: Re: SO_REUSEADDR (was: Re: Socket Programming Help)
Date: 8 Nov 92 19:04:42 GMT
Organization: Computer Science Department, Boston University, Boston, MA, USA

In article <1992Nov7.023043.19007@wuecl.wustl.edu> pete@arl.wustl.edu writes:
>There is a discussion of this subject going on in comp.unix.internals.  Someone there
>had access to the source code, and in checking the coding of the SO_REUSEADDR
>flag, determined that it doesn't work, which corresponded with my experiences in
>attempting to use it as well.  If anyone else has any insights into this problem of 
>closing sockets so that they can be immediately re-used, I'd be very interested 
>in hearing them.  
>

I am sorry but this is nonsense. I have used SO_REUSEADDR on BSD 4.1.1, AIX
3.1.5 and up, HP UX 8.05 and up, SGI OS 4.0 and up and pure SVR4 systems,
quite successfully I might add, for both privileged and non-privileged
ports.

Tasos
Xref: sparky comp.unix.programmer:5214 comp.mail.mh:1267
From: leisner@wrc.xerox.com ( Marty Leisner)
Newsgroups: comp.unix.programmer,comp.mail.mh
Subject: Re: setuid programs and calls...
Date: 9 Nov 92 03:11:12 GMT
Reply-To: leisner.henr801c@xerox.com
Organization: Xerox
X-Newsreader: TIN [version 1.1 PL6]

Well, I think what I'm doing now works...

	#include <stdio.h>

	main()
	{
		int i;

		if(0 != setruid(220)) {
			perror("Can't set real uid");
			exit(2);
		}

		/* this runs setuid on the destination mailfile account UID */
		i = system("inc +zombi -file /net/zombi/files5/spool/mail/leisner -truncate");
		system("id");
		exit(i);
	}

I found I have to be setuid to root and change the real ID -- just changing
the effective UID will let me read the remote mail file, but not truncate it.

I also moved libmh* into /usr/lib.  After a reboot (I forgot to run ldconfig...),
it worked fine...

It seems I should cron ldconfig...
	--
	marty
	leisner.henr801c@xerox.com  
	Member of the League for Programming Freedom
Xref: sparky comp.unix.programmer:5232 comp.unix.questions:13200 comp.windows.x.intrinsics:513
From: brad@SSD.CSD.HARRIS.COM (Brad Appleton)
Newsgroups: comp.unix.programmer,comp.unix.questions,comp.windows.x.intrinsics
Subject: Need info on X Courses
Summary: Please e-mail any info you have
Date: 10 Nov 92 16:58:12 GMT
Organization: Harris Computers Systems Division, Fort Lauderdale,FL
NNTP-Posting-Host: hcx1.ssd.csd.harris.com

I need to find out information about companies that offer 
training courses in X and/or Motif Programming.

If you know of such a company, please tell me the company name
and the phone-number or e-mail address to contact.

If you are associated with such a company, please e-mail me
information regarding your various X/Motif courses including
the following:

   1) a list of training site locations

   2) course descriptions (goals, duration, prerequisites)

   3) course costs

   4) course dates?


advTHANXance!
______________________ "And miles to go before I sleep." ______________________
 Brad Appleton           brad@ssd.csd.harris.com       Harris Computer Systems
                            uunet!travis!brad          Fort Lauderdale, FL USA
~~~~~~~~~~~~~~~~~~~~ Disclaimer: I said it, not my company! ~~~~~~~~~~~~~~~~~~~
Newsgroups: comp.unix.programmer
From: scstech@solomon.technet.sg (Fong Khai Yin)
Subject: Thanks: Socket Help
Organization: Singapore Computer Systems Ltd
Date: Thu, 5 Nov 1992 14:49:04 GMT

Hi ! Thanks for all the replies. The information, esp the sample codes are
very useful. My deamon works OK now. Its "re-startable".

BTW, may I know where is the FAQ for network programming ? Thank you.

Regards,
Kenneth Soh
Singapore
From: achoi@soda.berkeley.edu (Andrew Choi)
Newsgroups: comp.unix.programmer
Subject: How to Detect being fingered on NFS?
Date: 5 Nov 1992 22:27:19 GMT
Organization: U.C. Berkeley, CS Undergraduate Association
Distribution: world
NNTP-Posting-Host: soda.berkeley.edu

OK, this is not yet another "used a named pipe for your .plan"
article, so, please don't jump into conclusion immediately.

Here's the problem.  I can be fingered at one of the serveral
machines, i.e. "apple", "orange", "grape" ... etc. for the sake
of argument.  Note that everything under my home directory is
NFS-mounted (this includes my .plan).

If I have a process running on "apple" writing to my named pipe,
it will detect if someone fingers me on "apple".  However, if
someone fingers "orange", it will just hang forever because
NFS does not really recognize named pipe and so the write from
process at "apple" does not respond to a read from "orange".

There are several solutions to this problem:

1)  Have processes running on all the machines, and have a
    shared file recording the date and time I was fingered
    so that all process can read and modify this file to update
    change (this needs locking, of course).

2)  Have a process which periodically checks the last access time
    for my ".plan".  If the last access time has been changed,
    assume that I am fingered and modify ".plan" accordingly.

The latter approach is the one I am using now.  I am just wondering
if there is a better way to solve this problem that I don't see.

One of the problem with the last approach is that it won't be
accurate, i.e., fingered several times between last check, and
I don't want to make it check too frequently (like once a second)
because that's too expensive.

Any ideas?  Anyway to have an accurate but yet non-polling approach?

-- Andrew Choi


Newsgroups: comp.unix.programmer
From: dkeisen@leland.Stanford.EDU (Dave Eisen)
Subject: Re: Creating a background process from within C prog
Organization: Sequoia Peripherals, Inc.
Date: Wed, 11 Nov 92 03:29:50 GMT

In article <HUANG1.92Nov10171831@husc10.harvard.edu> huang1@husc10.harvard.edu (Howard Huang) writes (with vertical space compressed):
>     kiddo = fork ();
>     if (kiddo == 0) {
>	 system("ls > /tmp/myfile");
>	 exit(0);
>     }  

If you're going to use system, you might as well take the shell
you spawn for all it's worth and write:

      system ("ls > /tmp/myfile &");
   


-- 
Dave Eisen                               Sequoia Peripherals: (415) 967-5644
dkeisen@leland.Stanford.EDU              Home:                (415) 321-5154
       There's something in my library to offend everybody. 
          --- Washington Coalition Against Censorship
From: David.Martland@brunel.ac.uk (David Martland)
Newsgroups: comp.unix.programmer
Subject: UNIX SPREADSHEETS?
Date: 12 Nov 92 11:25:30 GMT
Organization: Brunel University, Uxbridge, UK
X-Newsreader: TIN [version 1.1 PL6]

I am interested in decent spreadsheet programs which run under Unix - preferably with
X or OpenLook.

There are some simple visicalc type programs available - they're OK, but not really
acceptable these days. Does anyone know of decent tools like this.

In particular, I want to be able to store text in the spreadsheet, and to sort columns
etc - rather like Excel - I really don't care too much - I have got Excel and Claris
running on Macintoshes, but since I use Unix in a Windowing environment most of the
day it'd be useful to have good applications tools in Unix.

I'm surprised that there isn't more demand for this type of tool.

If this is the wrong newsgroup, please cross post as appropriate.
-----------------------------------------------------------------

Dave Martland, Dept of Computer Science
Brunel University, UK


-- 
                       David Martland
                  Dept. of Computer Science
                      Brunel University
                       United Kingdom

                  David.Martland@brunel.ac.uk
Newsgroups: comp.unix.programmer,comp.mail.mh
From: mdw@theory.TC.Cornell.EDU (Matt Welsh)
Subject: Re: setuid programs and calls...
Organization: Cornell Theory Center
Date: Tue, 10 Nov 1992 02:22:39 GMT

In article <BxG21C.n38@cck.coventry.ac.uk> champion@cch.coventry.ac.uk (Alun) writes:
>I didn't see the beginning of this thread so I don't know exactly what
>you are trying to do.
>But doesn't system(arg) runs "sh -c arg" and therefore has some of the security
>problems of a setuid shell script. You have not specified the full path to
>"inc" so someone could write their own version of "inc" and as long as the
>environment variable $PATH was configured properly it would run their version
>of "inc" and not the intended on - same with "id". 
>Even if you did specify the full path it would still be susceptible to attacks
>with $IFS.

Yeah, I agree. I generally stay away from "system" and instead do a
fork-and-execv, which is more numinous, and doesn't have the security and
overhead of executing a shell just to run a single command.

Using system() does make it easier to redirect output and run pipes via
sh's > and | operators. If you use execv you'll have to "roll your own" to
get that functionality.

mdw

-- 
Matt Welsh    mdw@tc.cornell.edu        +1 607 253 2737
Systems Programmer, Cornell Theory Center
  "She's like jelly roll, like sculpture!"
Newsgroups: comp.unix.programmer
From: buck@netcom.com (Charles Foreman)
Subject: How to broadcast using TCP/IP ?
Organization: Netcom - Online Communication Services (408 241-9760 guest)
Date: Fri, 6 Nov 1992 00:19:07 GMT


I would like to write a daemon, one of its functions being
to broadcast a message to all the other like daemon running
on my little net of Unix machines (a mix of SunOS, Ultrix,
and ISC). I have the Stevens Network Programming Book, but if
my answer is in there, I can't seem to find it.

I guess what I want is the equivalent of the Ethernet broadcast
functions from the (TCP or UDP)/IP level. If it's a lengthy
explanation, maybe you could just point me toward the right book
or doc. 

Reply via email or post.

Thanks in advance !

	Buck Foreman
	buck@netcom.com

Newsgroups: comp.unix.programmer
From: css@tron.stx.com (Chris Shenton)
Subject: UNIX/Shell/Tools reference card available?
Organization: Hughes/STX, Lanham, MD
Date: Fri, 13 Nov 1992 19:48:27 GMT

I'm trying to get a non-tech friend into UNIX, basically to read mail,
create files, edit letters, the basic stuff. I've picked up the Emacs
reference card (don't try and sell me `vi' :-) and was wondering if
there was a similar thing for the other normal things.

I was trying to come up with something off the top of my head, and
came up with the following essential shell commands:

	pwd
	ls 	[-l]	<pathname>
	cd	[<pathname>]
	emacs	[<pathname>]
	mail/Mail/xmail 	[<emailpath>]
	elm
	mv	<oldpathname>	<newpathname>
	rm	<pathname>
	exit

Now trying to explain what [<optional-argument>] and <symbol> syntax
was supposed to mean was real fun. 

Is there anything out there which would be like a 1-5 page reference
card, hopefully with simple explanations of the unix filesystem's tree
structure, pathnames, etc?

Thanks!


PS: and how do you explain to someone that when they hit `e' in one of
    the mailreaders, that all they have to do to get out is type

	<ESC>:q!

Newsgroups: comp.unix.programmer
From: jdm1@vogon1.pasen.gov (Jonathan D McCown)
Subject: SysV Message Queues - Use in TP - (rambling comment/question)
Summary: SysV Message Queues - Use in TP - (rambling comment/question)
Keywords: Bogus SysV Message Queues Whatever
Organization: Vogon Poets Society
Distribution: na
Date: Thu, 12 Nov 92 15:42:53 GMT



I've been fiddling with a client/server configuration based around
System V message queues.  Somewhere in my reading I found that their
development had come out of some Bell Labs (or whatever) Transaction
Processing work, and I thought it would bear investigation.  This post
is to solicit comments, suggestions or increased news traffic.

My prototype looks like this:

--------- <------- SRVQUE <------ Client-1...n (write requests to server)
MSERV   |
________| -------> CLIQUE ------> Client-1...n (read requests from server)

Messages to the server are coded by message-type (part of message queue
structure) as to their transaction type. In this way should multiple
specialized servers be reading the same queue, no conflict arises as
they "read their own thing", this can have interesting effects if one
spawns additional servers to handle traffic increases.

Responses from the server are enqueued with a message-type == PID of
the client, so clients may either block on read or poll for their
responses.

Since the processing is all "in core" the prototype is wonderfully fast.
Initially ~230 "transactions" per second, using a non-optimized single
threaded server.  Naturally, adding IO heavy functions to the server slows
things down. (I am linking in Informix ESQL funcs).

I realize that this may not be bleeding edge for some, but it is an
interesting study (and actually approaches a solution for some system
bottlenecks in our environment).  In my case, a lot of Informix system
overhead can be overcome via one "informix q-server" servicing hundreds
of _inquiry_ based applications. (informix has an "engine" proc for each
client app in its standard implementation, many many many procs) 

Comments, suggestions welcome.  Multi-threading would be great here...
My environment is a Sequent (4 CPUs) under PTX 1.3 so some of the Sequent
concurrent processing stuff may become involved (yeah..!).

- J.D. McCown
	"It ain't CICS.. yet."

Domain in transition, best mailpath may be "psuvax1!vogon1!jdm1"

-- 
            J.D. McCown - Computer Services - Senate of Pennsylvania  
psuvax1!vogon1!jdm1                    "You don't want to get locked into   
jdm1@vogon1.pasen.gov                   'open systems'." -anonymous IBM Rep.
From: jxv3790@hertz.njit.edu (Jake Vogelaar)
Newsgroups: comp.unix.programmer
Subject: Need help with signal handling !
Keywords: SIGCLD & wait()
Date: 10 Nov 92 05:26:31 GMT
Organization: New Jersey Institute of Technology, Newark, N.J.

I'm writing a simple shell that needs to output info on the event of the
death of any of its children.  I have been trying to implement this by
writing a function that caught SIGCLD did a wait3 and than a wait for 
the death of the child.  Since this is system V (or Ultrix) I reset the
signal handler in the function every time.

In the main program I have a loop like this:
                  if ((frk=fork())==0) 
                    /* child execlp */
                  else if frk==-1 error();
                  else if (!ampersand) wait(&status);
no problems with this if the command line has no '&', but if it does than
both the child and the parent shell exit.  (gdb reports a SEGV error)

Anybody know what I'm doing wrong, or how to implement this in a better way?

Thanks,

-jake
-- 
/////////////////////////////////////////////////////////////////////////
Jake Vogelaar, jxv3790@hertz.njit.edu
Computer Vision R&D, Warner-Lambert Manufacturing Development Laboratory
New Jersey Institute of Technology
From: sinan@bcsaic.boeing.com (Sinan Karasu)
Newsgroups: comp.unix.programmer
Subject: Realtime "Fast"Scheduling in Solaris2.0/2.1
Date: 11 Nov 92 20:21:21 GMT
Distribution: comp.unix.programmer,comp.unix.misc
Organization: Boeing Computer Services AI Center, Seattle

Hi,
I am porting an application that requires very fine
timing control to Solaris 2.0/2.1. I need to be able to schedule
my program at given time increments. The time increment can be
anywhere from 1 millisecond to 50 milliseconds. I gave played
with setitimer and SIGALRM , they do work fine except I can not
get better than 10 millisecond granularity. So I decided
to try something more hardware oriented and noticed that there are
2 timer/counters in the MMU chip.
Questions:

1) Does the OS use either or both of these counters?
2) Are there other timers available on the Sparc platform?
3) Does the equation change if I use a VME based SparcEngine?
4) Does/Has anybody done/? any work in this area and give me some
   pointers?
5) Are there other calls in Solaris 2.0 and derivatives that would
   allow me to what I am trying to do ????

Thanx for any and all answers/pointers/criticism/etc...
Sinan Karasu
sinan@mtesol.boeing.com
From: haley@husc11.harvard.edu (Elizabeth Haley)
Newsgroups: comp.unix.programmer
Subject: Named pipes and mknod...
Summary: How do you make one, what is the use of this thing...
Keywords: named pipe mknod FIFO
Date: 5 Nov 92 09:46:42 GMT

HiHo:
The documentation is as clear as mud so I'll ask:

How does one use mknod either in a shell or in C?  Please give
examples.

The man pages suggest how exactly one uses it to make that damned dir
entry, which tells me nothing of the mechanism for connecting a driver
to it...
--
When life seems to be getting you down...
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
======David Charles Todd, tHE mAN wITH tHREE fIRST nAMES======
-------------------- David misses eBeth ----------------------
=-=-=-=-=-=-=-=-=-hacksaw@headcheese.daa.uc.edu=-=-=-=-=-=-=-=
			   ...ask it why it is torturing geese

-- 
=---------------------------------------------------------------------------=
=The author of this letter is a fabulously intelligent person and is very   =
=Silly. She is also remarkably well loved, by the author of this signature. =
=---------------------------haley@husc9.harvard.edu-------------------------=
From: jeff@BofA.COM (Jeff Tate)
Newsgroups: comp.unix.programmer
Subject: Mail from a daemon
Date: 7 Nov 92 15:12:52 GMT
Distribution: usa
Organization: Bank of America, Capital Products, RMTG #5906

I wish to have a daemon process know 'instantly' if new mail turns up in
the mailbox of the uid under which it is running.

I am not a mail expert, so all help will be gratefully received.  I am going
on vacation for two weeks, so please e-mail to:

	jeff@bofa.com

and I will summarise to the net when I return.

Thanx in advance, Jeff Tate
-- 

  +------------------------------------------------------------------+
  +  Jeff Tate                            Voice:  (415) 622 0890     +
  +  Manager, RMP Systems                 Fax:    (415) 622 2892     +
Newsgroups: comp.unix.programmer