HDTenEightyP/NetNews huggingface dataset:
From: gjn@cs.uq.oz.au (Geoff (cbird) Newton)
Newsgroups: comp.unix.questions
Subject: Re: How to prevent a large core-dump
Date: 29 Aug 92 04:19:24 GMT
Reply-To: gjn@cs.uq.oz.au

In <118390009@hpcupt3.cup.hp.com> aakash@hpcupt3.cup.hp.com (Aakash Sahai) writes:

>In article <1992Aug25.173056.13401@utwente.nl> soos@math.utwente.nl (Adwin Soos) writes:
>| A few weeks or even months ago I have read some discussion about the problem
>| of preventing a core-dump.

>Two simple solutions are -

>(i)	Run the core-dumping program from a directory where the user does
>	not have permission to create file.

>(ii)	Set the Effective-User-ID of the program different from its
>	Real-User-ID.

Most systems have a ulimit command which allows you to set resource limits.

bash has a builtin ulimit command, 'ulimit -c <num>' specifies the max size
of a corefile. <num> == 0 means no coredumps.

csh has a similar feature with its builtin 'limit' (limit coredumpsize <num>).

gjn
gjn@cs.uq.oz.au
(-|


Newsgroups: comp.unix.questions
From: forrie@morwyn.uucp (Forrie Aldrich)
Subject: Define needed
Organization: Vision Graphics
              Dover NH
              USA
Date: Sun, 23 Aug 1992 17:40:26 GMT

Can someone email me a define for S_IAMB?  This should be in <stat.h>
or <sys/stat.h>.  My system doesn't define it, and I need it to port
a program.

Thank you.

-- 
	   -----------	      Forrest Aldrich	      -----------
	   -------     morwyn!forrie@unhtel.unh.edu	  -------
	   ----						     ----
	   --	     VISION GRAPHICS --	Dover, NH - USA	       --
	   ------------------------------------------------------
From: chris@ctmnix.UUCP (Chris Matthews)
Newsgroups: comp.unix.questions
Subject: Re: How can I allow access to a subdirectory without risking other files?
Date: 28 Aug 92 03:11:59 GMT
Reply-To: chris@ctmnix.UUCP (Chris Matthews)
Organization: Underground Nixbox Creations

Subject: Re: How can I allow access to a subdirectory without risking other files?

In article <92Aug26.165308.27634@acs.ucalgary.ca> barker@enel.ucalgary.ca writes:
>It seems that my original post wasn't clear enough, so I'll try to rephrase:
>
>I know how to give group/other access to a subdirectory without risking my
>other files, however, I want people to be able to read/write to ANY file in
>the subdirectory. 
>
>Then again, it may just be impossible. If anyone can help, I would appreciate
>it.
>
>--

I would use:
find ./ -perm 644 -exec chmod 666 {} \;   :-}

chris
Genisys Corp.
Thu Aug 27 23:03:26 EDT 1992
=-=-
=-=-  Out   
=-=-


............................................................................
From: actize@garnet.berkeley.edu ()
Newsgroups: comp.unix.questions
Subject: Help with dbx
Date: 28 Aug 1992 16:18:33 GMT
Organization: University of California, Berkeley
Distribution: ba
NNTP-Posting-Host: garnet.berkeley.edu
Summary: How to use dbx with makefiles, object files not compiled, and command
Keywords: dbx, make
Originator: actize@garnet.berkeley.edu

Hello, below is a makefile I use:   
prog: prog.o do_f.o    
	cc -o prog prog.o do_f.o mylib.o 
prog.o: prog.c  BigZ.h 
	cc -c prog.c 
do_f.o: do_f.c BigZ.h p.h
	cc -c do_f.c

mylib.o is an object file which I don't compile.  I want to use dbx with the
above so I tried the following:
prog: prog.o do_f.o    
	cc -og prog prog.o do_f.o mylib.o 
prog.o: prog.c  BigZ.h 
	cc -cg prog.c 
do_f.o: do_f.c BigZ.h p.h
	cc -cg do_f.c	

When I do % dbx prog I recieve the message "main not compile with -g option".
What am I doing wrong ?  Also, prog takes command line arguments.  How to I
enter these ?

Please mail your reply to this account,
David Rapoport	actize@garnet.berkeley.edu
Newsgroups: comp.unix.questions
From: kleung@esk.compserv.utas.edu.au (Kam  Leung)
Subject: implement semaphores in unix 
Organization: University of Tasmania at Launceston
Date: Thu, 27 Aug 92 11:53:07 GMT


Dear guys,
      I have a difficulty in enforcing the mutual exclusion between
5 philosophers because I couldn't effectively change the global 
variables such as the major semaphore (me), and the private semaphore
(s[i]).  Could anybody suggest an answer for me or comment on my logic
below.  Your kind attention is much appreciated.  Thanks...

  kleung@esk.compserv.utas.edu.au

#include <stdio.h>
#include <sys/types.h>
#define N              6
int  s[N], me;
enum status {nthinking,vhungry,neating} ;
enum status p[N];
main()
{
  int i, ;
  void  PHILOSOPHER(), 
        think(), eat(), hungry();

  me = 1;    /* initial open state of main semaphore */

  for (i=1;i<N;i++) /*initialise 1-5 philosophers to thinking*/
      { s[i] = 0; p[i] = nthinking;}  /* private semaphore s[i]=0,close*/

  for (i=1; i<N; i++){
	if (fork() == 0) PHILOSOPHER(i);
  }
        ..
        ..
  kill(0,9);
}
void PHILOSOPHER(i)
int i;
{
		think(i);
      -----------waitfor(me); 
      !     /* see whether the sem. is open(me=1) or close(me=0)
      !        if me=1, pass thru, and set the me back to 0   */ 
      !		hungry(i);
      !         philosopher i = hungry
      !         printf("\nphil %d has gone into c.s.",i);
      !         check if the lefthand and righthand philosopher 'not eating'  
      !         if it is so,  set itself = eating, release private sem.
      !         of itself : signalto(p[i]) -- supposed to set p[i] = 1
      !         but didn't...... 
      ---------	signalto(me);
		waitfor(s[i]);
		eat(i);
      --------	waitfor(me);
      !           ..
      !           ..
      !         activate the neigbouring philosophers (ready to eat)
      !           ..
      !           .. 
      ----------signalto(me);
                printf("phil %d has finished eating and asking other to eat" );

waitfor(i)
int i;
{
	if (i >= 1)   {  i--; }
	else
	  {  waitfor(i); } 
	return i;
}
signalto(i)
int i;
	{return i++;}

Newsgroups: comp.unix.questions,comp.unix.bsd,alt.suit.att-bsdi
From: iwsbarke@acs.ucalgary.ca (I W Scott Barker)
Subject: How can I allow access to a subdirectory without risking other files?
Date: Tue, 25 Aug 92 20:08:14 GMT
Organization: The University of Calgary, Alberta, Canada
X-Newsreader: Tin 1.1 PL5

Does anyone know how I can allow access to all of the files I have in one of
my subdirectories, without risking someone damaging files in other
directories? The only method I know is to set the setuid bit for the 
directory, but as far as I know, this will allow others to compile programs
in that directory and execute them as if they were me. I just want them to
be able to modify and add files in the directory, without being able to run
anything as me (it's ok if they run programs as themselves).

Does anyone have any ideas? (BTW, I have no way of creating a new user group,
so that option is out as well).

--
Scott Barker
barker@enel.ucalgary.ca

"Logic is the beginning of wisdom, not the end."
   - Spock, Star Trek VI: The Undiscovered Country
Newsgroups: comp.unix.questions
From: jruschme@nyx.cs.du.edu (John Ruschmeyer)
Subject: Re: question about Env. Variable "TAE and WS"
X-Disclaimer: Nyx is a public access Unix system run by the University
	of Denver for the Denver community.  The University has neither
	control over nor responsibility for the opinions of users.
Organization: Nyx, Public Access Unix at U. of Denver Math/CS dept.
Date: Thu, 3 Sep 92 18:14:53 GMT

In article <3501@babcock.cerc.wvu.wvnet.edu> hongman@cathedral.cerc.wvu.w
net.edu (Guo Hongman) writes:
>
> Can any tell me what's TAE and WS meaning ? What are they used for ? Ho
 to
>
> use them ?
>
>
> Thanks in advance !!


The Transportable Application Environment Plus (TAE+) is an X11-based
GUI builder which was developed by NASA and runs on a variety of
platforms.

$TAE should be the root of the TAE+ directory tree.
 
<<<John>>>
From: kelley@kelley.nist.gov (Mike Kelley)
Newsgroups: comp.unix.questions
Subject: UNIX-like OS for PC's ???
Date: 4 Sep 92 21:22:47 GMT
Reply-To: kelley@epg.nist.gov
Organization: NIST

I am looking to put a UNIX-like operating system on a PC-compatible
computer.  As this is for personal use, expense is a major
consideration.  Could someone please tell me where to find information
concerning the advantages or disadvantages of the various UNIX and
UNIX-like (e.g. COHERENT, QNX, ... ) systems currently available?

My system is currently a 286 class machine. However, as I am looking to
upgrade to a 386 or 486 in the near future anyway, information on the
software available on any of these would be useful.

Thanks in advance for whatever help you might be able to provide.


-- 
Mike Kelley
Bldg 220, Rm B206
National Institute of Standards and Technology
Gaithersburg, MD 20899
(301) 975-3722  FAX (301) 926-2746
INTERNET:	kelley@epg.nist.gov
BITNET:		mkelley@nbsenh.BITNET
From: ian@centric.com (Ian Macky)
Newsgroups: comp.unix.questions
Subject: Password generator / checker?
Date: 3 Sep 92 23:01:49 GMT
Organization: Centric Engineering Systems
Originator: ian@raven

I recently rank the 'crack' program on our firewall machine and had some nasty
surprises!  Yikes!

So, does anyone have a password generator program?  The kind that makes 'typable',
pronounceable passwords, but ones that are meaningless?  I'd like to make it
available to my users for those who can't make up random gubbish on their own.

Also, what about a version of the passwd program that applies crack-style rules to
the user's choice and refuses to let them enter obviously crackable passwords in
the first place?

--ian
Newsgroups: comp.unix.questions
From: dwight@hyphen.com (Dwight Ernest)
Subject: Re: How do i find out the address of the addtional ehternet card
Organization: Hyphen, Inc., Wilmington, MA 01887 USA / +1 508 988-0880
Date: Thu, 27 Aug 1992 21:36:55 GMT

barmar@think.com (Barry Margolin) writes:

>In article <BtJrzr.8J8@acsu.buffalo.edu> chen-m@acsu.buffalo.edu (Mingteh Michael Chen) writes:
>>     Is there a way to find out the ethernet address of an additional
>>ethernet card on my sun 4/60 on line?

>Sun sets the addresses of all its ethernet interfaces to that of the first
>one.

Yes, but they may have been changed.  Use 'ifconfig le1', for instance,
to see the Ethernet address for the second Lance Ethernet controller.

There's also an IOCTL that'll read it.


-- 
--Dwight A. Ernest   Special Projects Engineer   I speak only for myself.
  Hyphen, Inc. / 187 Ballardvale St. / Wilmington, MA 01887 / +1 508 988 0880
  dae@world.std.com		dwight@hyphen.com
Newsgroups: comp.unix.questions
From: b130778@hp9000.csc.cuhk.hk (MA NGAI LING)
Subject: Specifing range in awk
Organization: The Chinese University of Hong Kong
Date: Thu, 27 Aug 1992 03:36:34 GMT
From: tmilner@hprpcd.rose.hp.com (Tom Milner)
Newsgroups: comp.unix.questions
Subject: Re: I want a program that prints out base gid's of any user
Date: 26 Aug 92 20:12:40 GMT
Organization: Performance Technology Center, Roseville

In comp.unix.questions, bzg52408@uxa.cso.uiuc.edu (Benjamin Z. Goldsteen) writes:


|       I have been trying to write a program that prints out the
|    base gid of a user (given on the command line).  I have tried
|    using awk and perl, but I can not get anything decent.
|    Can show me how to do this.  One thing I have tried
|    [ gid username ]
|    #! /usr/bin/awk -f
|    BEGIN { FS=":"; FILENAME="/etc/passwd" }
|    ARGV[1] == $1 {print $4}
|
|    I am not sure if 1 if right for ARGV, but whatever...anyway, it 
|    won't read from /etc/passwd - it only reads from stdin.  I can;t
|    make it do otherwise.
|
|    I don't really understand perl...
|
|    Thanks

Try the "id" command ... as in 
id | sed "s/.*(\(.*\))/\1/"
                                  _____________________________________
                                 /_______________  ___________________/
                                                / /
                                               / /
                                              / / Tom Milner (Tn: 785-5637)
                                             / /  HP Performance Tech Center
                                            / /   tom@hpptc16.rose.hp.com
                                           /_/    __________________________
                    
Xref: sparky comp.unix.questions:10396 comp.unix.internals:1749 comp.unix.admin:4689 comp.unix.misc:3371 comp.unix.wizards:3694
From: jhelberg@nl.oracle.com (Joost Helberg)
Newsgroups: comp.unix.questions,comp.unix.internals,comp.unix.admin,comp.unix.misc,comp.unix.wizards
Subject: Re: Questions About Unix
Date: 26 Aug 92 11:40:22 GMT
Followup-To: comp.unix.questions
Organization: Oracle Europe
X-Newsreader: Tin 1.1 PL3

X-Disclaimer: This message was written by an unauthenticated user
              at Oracle Corporation.  The opinions expressed are those
              of the user and not necessarily those of Oracle.

bsuresh@cs.ucsd.edu (Suresh Bollapragada) writes:
: Hi,
: 
:  I have a couple of questions about Unix. 
: 
: 1. can a program crash the processor on which it is running ? if so how?.

No, it shouldn't be capable to do so. You might try generating a lot of
signals (preferably recursive) to let the kernel-stack of the process grow,
this crashes some machines.

: 
: 2. the machines (sunSparcs) in my lab are connected through an ethernet cable.
:    how can i simulate a break in the cable on a machine. what i mean is  the
:    machine whose cable is broken (simulated to be) should not be able to
:    communicate with the rest of the world. 

ifconfig <ethernet interface> down
ethernet interface is something like 'le0'.
try netstat -i to get some names.

: 
: i am writing an application in which i need to simulate both 1 and 2. i would
: appreciate if any of you could answer these.
: 

1) try your best
2) there are ioctl's to do that, however it is not 'simulating'!

: please send ur replies to bsuresh@cs.ucsd.edu
maybe this is of general interest?

--  
   Joost Helberg                                Rijnzathe 6
   jhelberg@oracle.nl                           NL-3454 PV De Meern
   jhelberg@nl.oracle.com                       The Netherlands

   Oracle Europe BV                             Product Line Development	
   Phone: +31 3406 94211                        Fax:   +31 3406 65609
Newsgroups: comp.unix.questions
From: slangley@constant.demon.co.uk (Simon Langley)
Subject: Re: missing /etc/resolv.conf - help
Organization: Home
X-Newsreader: Tin 1.1 PL5
Date: Wed, 2 Sep 1992 20:59:51 GMT

Sabina Wolfson (swolfson@nyx.cs.du.edu) wrote:
: wait a minute or two for it to default to the /etc/hosts file and then
: specify another namer server -- this is a pain)?  Or is there some way
: I can send a request to another name server (I know which namer server
: my site should be using)?
: 
my resolv.conf just says:
nameserver 158.152.1.65

and it uses this host as the nameserver.  However, there are other changes
that may need to be made and these are system dependent.  Which UNIX are
you using.
 
-- 
   Simon Langley                   (preferred)   slangley@constant.demon.co.uk
   Hampstead, London                             slangley@cix.compulink.co.uk
Newsgroups: comp.unix.questions
From: jc@optimla.aimla.com (John VanHoozer)
Subject: RCS and make
Reply-To: jc@optimla.aimla.com (John VanHoozer)
Organization: OptImage Interactive Services Co., L.P.
Date: Wed, 2 Sep 92 16:31:53 GMT

Greetings,

I was wondering if anyone had a reasonable method of using 
RCS with the default make program (mine: SUN make v4.1)?  

If my guess is correct,  it can't be done very easily.  I know
that RCS will work with GNU make but this may not be an option.


				jc

-- 
___________________________________________________________________________
John C. VanHoozer			     |
OptImage Interactive Services Company, L.P.  |  uunet!{optimage,aimla}!jc
11040 Santa Monica Blvd., Suite #300	     |  Fax:  (310)445-5720
Los Angeles, Ca. 90025			     |  Phone:(310) 445-5721
___________________________________________________________________________
Disclaimer:
   Opinions,  yew doone neeed my steenkeeng Opinions.

Carpe Diem:  A carp a day, that's all we ask.
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.unix.questions
Subject: Re: Creating a File System in 'C'
Date: 28 Aug 1992 21:59:05 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: telecaster.think.com
Keywords: C subroutine for mkfs command

In article <Aug.28.11.27.51.1992.29451@gauss.rutgers.edu> manmetha@gauss.rutgers.edu (Rajesh Malhotra) writes:
>	Is there a C subroutine that will create file system.
>	The crfs and mkfs commands do it, so I am sure there is a system
>call somewhere to do this.

I'm not so sure.  I'll bet that on most systems, these programs simply open
the disk special file and write to it.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
Newsgroups: comp.unix.questions
From: hassan@cs.ubc.ca (Moustafa M Hassan)
Subject: Re: Postscript files
Summary: Hack!
Keywords: Hack!
Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
Date: Sat, 29 Aug 92 01:58:31 GMT


If you just want to see what the file looks like before printing, use a 
ps viewer like gs or ghostscript (anonymous ftp to nic.funet.fi).  If, 
however, you're at a vt10* terminal or something else with no graphics
capabilities (or for some other reason you insist on seeing the unformatted
text) you can use the following hack (it reads from stdin and writes to 
stdout):

#include <stdio.h>

void process(char *line)
{
  short go=0;
  while(*line){
    if(*line=='(' && *(line-1)!='\\'){
      go=1;
      line++;
    }
    if(*line==')' && *(line-1)!='\\')
      go =0;

    if(!(*line=='\\' && (*(line+1)=='(' || *(line+1)==')') ))
      if(*line && go)
	putchar(*line);
    line++;
  }
}
    
int main(void)
{
  char space[256],c[256], line[256];
  long i,j,k;

  while(fgets(line,256,stdin)){
    if(sscanf(line,"%ld%ld%s%s",&i,&j,space,c)!=4)
      continue;
    process(line);

  }
    exit(0);
}

    
    
It's not guaranteed to work;  I've only tested it on a few files;  besides,
I don't know ps 8^).  I just read through a couple ps files, and this 
worked.  Anyhow, it does absolutely no formatting and looks really ugly, but
if you want something better, you should stick with ps  8^).


Hack, hack!

********************************************************************
* Moustafa Hassan          |                                       *
* hassan@cs.ubc.ca         |  Political correctness is a euphemism *  
* TEL/FAX: (604) 535-2826  |  for intellectual stagnation.         *
********************************************************************
Organization: The American University - University Computing Center
Date: Monday, 31 Aug 1992 16:14:43 EDT
From: <JORDAN@auvm.american.edu>
Newsgroups: comp.unix.questions
Subject: Help: RCS from Purdue U?

Can anyone tell me about a configuration management program for UNIX called RCS
(Revision Control System).  I've heard that it is a shareware product that
recently got an upgrade to V5.7.  Please respond.
From: gross@maxwell.ucsc.edu (Mike Gross)
Newsgroups: comp.unix.questions
Subject: Re: Man page ---> postscript .... help!
Date: 30 Aug 92 15:41:43 GMT
Article-I.D.: darkstar.17qq7nINNbcm
Distribution: all
Organization: University of California, Santa Cruz
NNTP-Posting-Host: maxwell.ucsc.edu

In <1992Aug29.201832.8510@unlinfo.unl.edu> chem001@hoss.unl.edu (Jonathan Skean) writes:

>In <1992Aug29.115148@betsy.mc.ti.com> cobb@betsy.mc.ti.com (Chip Cobb) writes:

>>This is probably a very basic question.  I want to print a man 
>>page on a postscript printer.

>I can't help with the postscript part, but this is what I do to
>convert a man entry for a given command to a text file:

>man command |col -b >temp;uniq temp m_command;rm temp;vi m_command


To print the man page for "command" from manual section x, try

troff -man -t /usr/man/manx/command | lpr -t

Here x should be 1..8 or n or l. For X11 man pages, you will have to look in
/usr/local/X11R5/man/manx/command. If there is any doubt, you can look for
man pages with "whereis command." The -t on both troff and lpr is essential
in order to keep lpr from getting confused. 

Happy printing.

Mike Gross
Physics Board
Univ of California                 GO SLUGS!!!!!
Santa Cruz, CA 95064
gross@maxwell.ucsc.edu
Newsgroups: comp.unix.questions
From: fyl@ssc.wa.com (Phil Hughes)
Subject: Re: Awk and getting the current date
Organization: SSC, Inc.,  Seattle, WA
Date: Thu, 03 Sep 1992 17:12:01 GMT
X-Newsreader: Tin 1.1 PL3

mbrodesky@sc9 writes:
: How can I get the current date in a AWK program

This is the most awk-ish way to do it:

    awk 'BEGIN  {print dt}' dt="`date`"  file

The "program" in this example just consists of the "print dt" statement
performed at begin time.  Following the program, dt="`date`" executes
the date command (because of the backquotes) and then assigns the result
to the awk variable dt.  The double quotes are needed as executing date
expands to multiple words.

-- 
Phil Hughes, SSC, Inc. P.O. Box 55549, Seattle, WA 98155  (206)FOR-UNIX
>>> Publishers of pocket references for UNIX, C, VI, Emacs, Ksh, MS-DOS, ... <<<
     uunet!nwnexus!ssc!fyl or fyl@ssc.wa.com            (206)527-3385

Newsgroups: comp.unix.questions,comp.unix.admin
From: barr@pop.psu.edu (David Barr)
Subject: NFS security flawed (was: Re: chown : HELP!)
Organization: Penn State Population Research Institute
Date: Sat, 29 Aug 92 16:25:02 GMT

In article <p6c4vho@rhyolite.wpd.sgi.com> vjs@rhyolite.wpd.sgi.com (Vernon Schryver) writes:
>In article <id.2FQS.7B6@ferranti.com>, peter@ferranti.com (peter da silva) writes:
>> Yes, you should. But because you're using NFS, you don't. NFS is not a full
>> UNIX file system.
>
>This is political nonsense.

No it's not.

>[stuff everyone knows about root trust deleted]

	The NFS concept that you shouldn't by default trust uid=0 has
a fatal flaw.  If a person breaks root on a client machine, all he
has to do is su to any other user on the system (like bin, adm,
daemon, or sys) and have root access within minutes anyway.  NFS
will just accpet the remote uid to be the same user as the local uid,
and you're in.  No authentication.
	Unfortunately, there really isn't a better solution out there.

sigh.

--Dave
-- 
System Administrator, Population Research Institute    barr@pop.psu.edu
  One is the loneliest number.
  Two is as lonely as one, just shifted to the left.
Newsgroups: comp.unix.questions
From: navarra@casbah.acns.nwu.edu (John Navarra)
Subject: Re: awk help
Organization: Northwestern University, Evanston Illinois.
Date: Tue, 1 Sep 1992 03:32:13 GMT


[ I had trouble sending you mail, so I will post a short reply]


In article <1992Aug31.212717.16872@sunova.ssc.gov> you write:
>
>I am opening several ouput files while in a awk command.  I
>keep getting an error message telling me I have opened
>too many files.  Is there anyway I can get around
>this?
>
>the error message is
>       awk: too many output files 10
>       record number 344
>
        The answer to your question is yes and no.

No, if you are using the original awk, the maximum number of open files
you are allowed to have is 10. This is why you are getting the error
message.

Yes, if you have nawk or gawk. (gawk can be anonymously ftped from
a number of places). The max number of open files is 15 but more
importantly, you can use the 'close' statement to close open files.
See documentation for more info.

-tms

-- 
You can get further with a kind word | You can get further with a kind word
and a gun than a kind word alone.    | and a phaser than a kind word and a gun.
          --al capone                |           -- John Navarra
=======From the Lab of the MaD ScIenTIst....navarra@casbah.acns.nwu.edu========