HDTenEightyP/NetNews huggingface dataset:
From: szatezal@magnus.acs.ohio-state.edu (Shane M Zatezalo)
Subject: FTP - macros and macdef
Summary: how to use a macro under FTP
Keywords: FTP Macro Macdef
Organization: The Ohio State University
Date: Tue, 22 Dec 1992 20:28:55 GMT

I wanted to use a macro with FTP, so that if I created a user,
and set his shell to "FTP $macroname"
it would run that macro, and then exit that macro (when it was done)
and log the user out.

My question is this: how does one use macros with ftp?

I looked at the man page, and it said this:

     $ macro-name [ args ]
          Execute the macro macro-name that was defined with the
          macdef command.  Arguments are passed to the macro
          unglobbed.

so I wrote a macro like this:

bell
ascii
cd /tmp/ftp
get it
bye

and then typed ftp $ftp.mac (the name of the file)
but nothing happened. (it didn't work)

Then I tried using the macdef command in ftp like this:

ftp>macdef /tmp/ftp.mac
bell
ascii
cd /tmp/ftp
get it
bye
<control-d>

But that didn't work either.

What I want the user to be able to do is this: on login, he 
immediately is dropped into FTP so that he can GET one file
from my system, and only that one file, and can't do anything
else at all.

Any help on this would be appreciated.

 Shane Zatezalo

 _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
:   Shane M. Zatezalo         : i-net> szatezal@magnus.acs.ohio-state.edu :
:   CIS Eng Ohio State        : NeXTMail>  shane@kiwi.shws.ohio-state.edu :
:  ....call T.A.P. a Futurenet BBS 614-297-7031 16.8k DS HST 425 MEGS ... :
:GS:::: Apple II forever!! ::::::GO BUCKS!::::::: Play Lacrosse! :::::::GS:
Newsgroups: comp.unix.questions
From: mcastle@mcs213e.cs.umr.edu (Michael R Castle)
Subject: Re: QUERY: How do I load .o files and execute them at run time?
Date: Tue, 22 Dec 1992 05:42:34 GMT
Organization: University of Missouri - Rolla

In article <11503@uqcspe.cs.uq.oz.au> muzzle@cs.uq.oz.au writes:
>Hi there
>
>I'm doing research into distributed and concurrent systems, and I'm trying to
>write a program which will load in a .o file and then execute functions
>from that file.
>
>I've got the (struct exec) stuff read in (as described in a.out.h), but I'm
>unsure how to access the symbol/string tables, and how to convert a_entry field
>to an address to jump to.

You might consider getting the DLD (Dynamic Link Editory) library.  It does 
exactly this.  It's an GNU library, and so should be at you local GNU archive
site.  The file is, I believe, dld-3.2.3.tar.Z. 

You would do something like:

dld_link("file.o");
func = get_func("func_name");
(*func) (parm1, parm2, ... parmN);

Of course, some error checking in there might save a few core dumps :->.

regards,
mrc
From: holsberg@holsberg.jvnc.net (Pete Holsberg)
Newsgroups: comp.unix.questions
Subject: Please Ignore This Test
Date: 30 Dec 1992 15:55:43 -0600
Organization: UTexas Mail-to-News Gateway
NNTP-Posting-Host: cs.utexas.edu

1 2 3
Xref: sparky comp.unix.questions:15054 alt.binaries.pictures.utilities:2314 alt.binaries.pictures.d:5999
From: meroth@rz.uni-karlsruhe.de (Ansgar Meroth)
Newsgroups: comp.unix.questions,alt.binaries.pictures.utilities,alt.binaries.pictures.d
Subject: Re: PS to Gif?
Date: 30 Dec 1992 17:22:41 GMT
Organization: University of Karlsruhe, Germany
Distribution: world
NNTP-Posting-Host: iehhp2.etec.uni-karlsruhe.de

|> In article <Dec.11.13.52.38.1992.3497@gnumath.rutgers.edu> lukeh@gnumath.rutgers.edu (Luke Higgins) writes:
|> 
|> >Is there any way to convert from a PS file to a gif format. I have some
|> >pictures that are in PS and I want to edit them and the only editor
|> >that I have is one that edits gif files. I know very little about
|> >PostScript and am really a computer novice when it comes to a lot of
|> >things.

the easiest way is to run ghostscript ( a public domain ps-viewer ) on
a high res. workstation screen and create a x-window-dump of it -

this dump is convertable into almost every format (e.g. with the 
pbmplus library programs )

pbmplus is public domain, too.

ciao
Ansgar

Newsgroups: comp.unix.questions
From: teddybur@netcom.com (John Sanger)
Subject: Re: Breaking into Unix via modem
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Fri, 1 Jan 1993 12:08:45 GMT

In article <1992Dec31.221739.10281@unislc.uucp> dold@unislc.uucp (Clarence Dold) writes:
>From article <1992Dec30.025955.8707@candle.uucp>, by root@candle.uucp (Bruce Momjian):
>
>> : Someone just told me that there is a way to break into a Unix box by
>> : dialing the modem, but not getting a login prompt, and somehow getting
>> : to Unix.
>
>If the modem is not properly configured to drop Carrier Detect when the
>phone line is disconnected, this could be possible.
>Log in to the suspect system, then disconnect the phone line to the modem.
>Dial back into the system.  If it is properly configured, you will get a new
>login prompt.  If it is not properly configured, you will be returned to the
>previous login session, still running.
>
>---
But your illustration is a badly administered system.  The premise of the
original implies that one could break into ALL UNIX systems doing as the
original post described.  This is just not the case as you have illustrated
by your case of a poorly installed modem.



Ciao!
	John S. :^)
	teddybur@netcom.com
__
From: mmjjmm@post.its.mcw.edu (Michael Malloy)
Newsgroups: comp.unix.questions
Subject: How do I create a signature block?
Date: 30 Dec 1992 08:51:27 -0600
Organization: Medical College of Wisconsin  (Milwaukee, WI)
NNTP-Posting-Host: post.its.mcw.edu
X-Newsreader: TIN [version 1.1 PL7]


Newsgroups: comp.unix.questions
From: root@n1gva (The Nefarious Dr. Sponge)
Subject: Re: questions! help wanted!
Organization: Evil Weather Machines LTD
Date: Sat, 2 Jan 93 11:59:10 GMT

xu@prim.rose.utoronto.ca (Jiefeng Xu) writes:
: Happy New Year!
: I have two questions. Is it possible to use "talk" or "ntalk" to talk with
: a guy on remote machine which is not on host list in etc/hosts?

Dunno.

: What's the file with suffix ".tar"? I saw a lot of such file on ftp site but I
: don't know how to deal with them under unix.

A file with a '.tar' extension is an archive of files created with the 'tar'
utility. Tar stands for Tape ARchive.

: Thank you for the helps.
: 
: xu@prim.rose.utoronto.ca
:
Fred 
-- 
< Fred Floberg - N1GVA >         Evil Weather Machines LTD.      <
> 136 West Spring St.  <                                         >
< West Haven, CT 06516 >        My employer has no opinions.     <
> USA                  < email: ...!uunet!hsi!a3bee2!n1gva!n1gva >
Newsgroups: comp.unix.questions
From: jpr@jpradley.jpr.com (Jean-Pierre Radley)
Subject: Re: export EXINIT var?
Date: Fri, 01 Jan 1993 19:09:09 GMT
Organization: Unix in NYC

In article <1993Jan1.063424.4374@netcom.com> bcherkas@netcom.com (Brian Cherkas) writes:
>From a UNIX textbook, I recently put this piece of code
>in my .login:
>
>setenv EXINIT="set noautoindent ignorecase magic
>wrapmargin=15 number"
>export EXINIT
>
>I'm trying to define an EXINIT variable for vi. I'm using
>the csh shell.
>
>My question is, why do I get this message every time I
>log on: 'export: Command not found.'? 
>
>Also, any idea how to set the showmode option in vi to be
>turned on at all times?

First error: the setenv command does not take an '=' sign.
Second error: export is a sh command, not a csh command;
setenv is all you need.
Third error: If what you're setting extends over one physical line, you need a
'\' at the end of the lines.

You can include 'set showmode' along with everything else.

Thus, on two lines:

setenv EXINIT "set noautoindent ignorecase magic \
wrapmargin=15 number showmode"
 
Note that if you use the available abbreviations for some of the options,
in your case you can do it on one line:

setenv EXINIT "set noai ic magic wm=15 nu showmode"
 
You really don't need 'magic' and 'noai' in there, since those are the
default settings.
-- 
Jean-Pierre Radley   Unix in NYC   jpr@jpr.com   jpradley!jpr   CIS: 72160.1341
From: smrttadm@uniwa.uwa.edu.au (Jeffrey Smartt)
Newsgroups: comp.unix.questions
Subject: How do I create an interactive link via modem?
Date: 2 Jan 1993 10:40:38 +0800
Organization: The University of Western Australia
NNTP-Posting-Host: uniwa.uwa.edu.au

G'day,

I have two machines that I wish to connect via modem - i.e. I want to be
able to mail between them and perform rlogin's ftp's etc.  I am running
BSD 4.3.  Note that I do not intend connecting the machines to Internet
- so I can assign my own IP numbers etc.

Will someone please give me some reference to material that would help me
with this.

Thanks,
Jeff.
From: czim@hub.caltech.edu (Chris Ziomkowski)
Newsgroups: comp.unix.questions
Subject: Help with getty taking over ttya on Sun
Date: 30 Dec 1992 01:08:09 GMT
Organization: caltech
Distribution: world
NNTP-Posting-Host: hub.ccsf.caltech.edu

I have a Sparc IPC running SunOS 4.1.3. I am trying to get a getty to run
on ttya and ttyb. Unfortunately, the minute I run the getty (either manually
or by uncommenting the /etc/ttytab lines and issuing kill -1 1) the getty
starts going crazy. I can see the transmit/receive lights flashing on
both of my modems. Trying to call out yields "all ports busy" errors, and
the modems will answer but eventually hang up when trying to call in. I
never see a login prompt.

Additionally, I keep getting "repeated login failures" messages on the
console while the getty is being run. When I disable the getty, I can
dial out on the modem fine (but of course, no one can log in.) This
behavior is independent of the modem that I use. I am using the standard
Sun 8 pin mini-din to DB25 cable that comes with IPC's on both serial
ports, which I connect directly to my modem through a gender changer.

The eeprom settings are as follows:

ttyb-rts-dtr-off=true
ttyb-ignore-cd=false
ttya-rts-dtr-off=false
ttya-ignore-cd=false
ttyb-mode=9600,8,n,1,-
ttya-mode=38400,8,n,1,-

My /etc/ttytab file has the following lines:

#ttya   "/usr/etc/getty t3fixed"        dialup          on
#ttyb   "/usr/etc/getty PM9600SA"       dialup          on

/etc/gettytab has the following entries for t3fixed and PM9600SA

t3fixed|T3000-38400 Fixed RTS/CTS Flow Control:\
        :sp#38400:ms=crtscts:
PM9600SA:\
        :sp#9600:de#1:ms=crtscts:

Can anyone give me a clue as to why this is happening? (By the way, I have the
serial port jumpers set to use RS 232 instead of RS 423.)

Thanks in advance for any assitance,

Chris.
-- 
---------------------------------------------------__-----------------------
 Chris Ziomkowski                                 /  |
 Software Consultant                              |  |           _______
                                              |___|  |____/-|   /  |
 czim@scp.caltech.edu - ---- ---- ---- ---- - *|__|  |____----  \_/
                                              |   |  |    \-|
 "Flying is more fun anyway"                      |  |          --------
                                                  \__|
----------------------------------------------------------------------------
Newsgroups: comp.unix.questions
From: thayer@cs.columbia.edu (Charles Thayer)
Subject: Re: RPC descriptions RFC1014 and RFC1057 still up to date ?
Organization: Columbia University Department of Computer Science
Date: Mon, 4 Jan 1993 00:19:53 GMT

In article <1992Dec29.125150.29017@cs.tu-berlin.de> ernst@opal.cs.tu-berlin.de (Ernst Kloecker) writes:
>I am new to RPC programming and I am using the RFC1044 (XDR) and RFC1057

This question is not for comp.unix.wizards.

>Apart from that, can anybody recommend other documentation for RPC and
>XDR ? I had a look at Stevens' Network book, but he only gives a short
>overview.

A very good source of information is the documentation distributed
with the public domain implementations of rpc that sun released around
1988.  ftp.uu.net:/systems/sun/sextape/rpc4.0.

>Ernst Kloecker      phone: ++49-30-6181635      e-mail: ernst@cs.tu-berlin.de

You will also want to check with your local archie server (telnet
archie.funet.fi and login as archie) and read some of the FAQ lists
in the newsgroup news.answers.

/charles
PS.  There are a vast number of sources for up-to-date RFCs, check archie
also.
-- 
Charles Thayer, Columbia University, Dept. CS, Tech-staff... my words only.
Newsgroups: comp.unix.questions
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: how to change shell's PWD(directory) from a C program?
Originator: tchrist@pixel.convex.com
Date: Wed, 30 Dec 1992 19:45:19 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
Organization: Convex Computer Corporation, Colorado Springs, CO
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

From the keyboard of ktf@bc3.GUN.de (Klaus ter Fehn):
:>	Here is what I want to do: UPon the termination of my program, I 
:>want to change to another directory . Normally, a program exit to the
:>directory that invoke it. 
:
:Because of the current newsgroup (comp.unix.questions) I assume, that
:you're programming under the UNIX-environment. Note, that the PWD (Path
:of Working Directory) is an environment-held information of a process.
:Each process gets a copy of the environment of it's parent-process at
:startup-time. So if you call the cd() funktion from within a C-Program,
:only the PWD of the C-program-process is changed. When you exit this
:program, you are returning to the parent-process (most cases: the
:shell). It's PWD information was not changed, because you only changed
:the child's copy.

No, $PWD is not defined by the O/S.  Some shells maintain it.  Many do
not.  Certainly the chdir(2) function from C will not maintain it. 
Therefore, you can't possibly rely upon it.

Now, your cwd is indeed a process attribute, often stored as a struct
vnode * within your user structure in the field u_cdir.  But that's not
a name -- it's a vnode pointer.  That won't help you.

If you want to know how to change your parent, that's a FAQ.  The short
answer is you can't.  The long answer is you can do one of around three 
things:

    poke your parent's cdir in the kernel.  a very bad idea.
    have your parent eval your output
    stuff a cd into your input buffer with TIOCSTI

The latter approach is the one used by the PD program, dired.

--tom
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist

    "* Unix is a footnote of AT&T Bell Laboratories."
                             --Barry Shein
Newsgroups: comp.unix.questions
From: jerrett@iastate.edu (Gregory A Jerrett)
Subject: How many people are on the net?
Organization: Iowa State University, Ames, IA
Date: Tue, 29 Dec 1992 17:29:46 GMT

I have been curious about this for some time.  Is there a rough estimate
out there anywhere of the approximate number of peopele/people who are 
hooked up to the internet?

jerrett@iastate.edu

-- 
Newsgroups: comp.unix.questions
From: gburke@unix2.tcd.ie (Garrett Burke)
Subject: "FREE & Calloc & realloc"
Summary: Does free 'really' work with realloc & calloc.
Keywords: Free, memory
Organization: Trinity College, Dublin
Date: Mon, 21 Dec 1992 16:02:56 GMT

Hi all,
	I have a program that's suffering from a memory leak (circ 12MB
leaking!).  I am allocating memory with calloc for some structures and with
malloc for others, and then calling realloc on those pointers.

Here's the query:

1. Does FREE free memory allocated with realloc & calloc?
2. Could you confirm that realloc frees the original block of memory?

3. How do you get a look at howmuch dynamic memory a process is using right down
to the byte level
	1.e ps will give %mem consumed, what I want to do is to print out how
much is used, then calling my freeing function (which calls free on various
parts of the struct) and then print out how much is left, so I can make sure
that it's working.

	(The man page on our system mentions meminfo but the library malloc
isn't around, so -lmalloc doesn't work. It's not in /usr/lib)

Please reply by email & I will post the answers,

Thanks for the help,
Regards,
GB.


--
| When it all gets too much,	| Garrett Burke,		|
| take to the hills.		| JS Computer Engineering,	|
|				| Trinity College Dublin.	|
|				| gburke@unix2.tcd.ie		|
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.unix.questions
Subject: Re: FTP - macros and macdef
Date: 22 Dec 1992 23:01:02 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: telecaster.think.com
Keywords: FTP Macro Macdef

In article <1992Dec22.202855.20553@magnus.acs.ohio-state.edu> szatezal@magnus.acs.ohio-state.edu (Shane M Zatezalo) writes:
>I wanted to use a macro with FTP, so that if I created a user,
>and set his shell to "FTP $macroname"
>it would run that macro, and then exit that macro (when it was done)
>and log the user out.

The login shell field of the passwd entry is the pathname of a program, not
a shell command line.  On many systems you can set it to the pathname of a
shell script, so you can use a shell script that invokes ftp with the
appropriate parameters.

The next problem is that the argument to the "ftp" command is a host name,
not an ftp command line or a macro file name.

A third problem is that "$" is a special character to the shell.  The
commands that are documented in the ftp(1) man page are intended to be
typed at the "ftp>" prompt.  Macros are also intended to be defined
interactively.

>What I want the user to be able to do is this: on login, he 
>immediately is dropped into FTP so that he can GET one file
>from my system, and only that one file, and can't do anything
>else at all.

Macros aren't useful for this; they're useful when you want to do a
repetitive operation within a single ftp session.  You want a script like:

#!/bin/sh
ftp hostname <<END
username
password
bell
ascii
cd /foo/bar
get it
quit
END

I don't know how secure this is, though.  I'm not sure what it will do if
the user types ctl-C in the middle of it.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
From: ray@astro.ocis.temple.edu (Ray Lauff)
Newsgroups: comp.unix.questions
Subject: How to ctrl-C immediately
Date: 21 Dec 92 17:43:11 GMT
Organization: Temple University
X-Newsreader: TIN [version 1.1 PL8]

When I dial in from home to a Unix system there is frequently a problem
getting the output to stop when I hit control C.  This is only a 
problem on our Unix system.

I assume the output buffer needs to be made smaller, so that once a
control-C stop signal is sent, the output terminates.  Our VMS
system works fine like this.  Our Unix box won't stop output at all.

As a programmer, I frequently have alot of debugging output being
displayed on the screen.  It is a real pain to wait for 10 minutes
as the buffer flushes and the screen is filled with output.  It is
especially a problem if the output contains control characters.

Any help appreciated.

Ray
ray@astro.temple.edu

Thanks in advance for any help.
Newsgroups: comp.unix.questions
From: eric@egsner.cirr.com (Eric Schnoebelen)
Subject: Re: The Revenge of CSH
Organization: Central Iowa (Model) Railroad, Dallas, Tx.
Date: Tue, 29 Dec 1992 03:42:27 GMT

In article <Bzz748.GDK@csn.org> bazyar@teal.csn.org (Jawaid Bazyar) writes:
- > Do yourself a favor, and if you *have* to write a shell script, do it
- > in the Bourne shell.  It's on every UNIX system out there.  However,
- > behavior can vary.
- 
-   Gee.. that means that /bin/sh isn't the universal be-all end-all of
- shells?  You don't say?  You mean /bin/sh has bugs?  Really?

        Yup, the Bourne shell has a few bugs.  It has a lot fewer than
csh.  It is a lot more consistant that csh.  I can certainly take a
Bourne shell script for V7, and run it on my ISC 386/ix System V,
release 3 system, or my ConvexOS 10.x (BSD 4.2++) system.

- >     Tom Christiansen      tchrist@convex.com      convex!tchrist
- > 
- >     "UNIX was not designed to stop you from doing stupid things, because
- >      that would also stop you from doing clever things." -- Doug Gwyn
- 
-    You're not cool enough to quote Doug Gwyn.  Really; it seems that
- 'csh sucks' in your opinion because it's not /bin/sh.  Care to try 
- again?

        Nope, Tom hates sh as an interactive shell.  He actually uses
tcsh as the interactive shell of choice, and perl as the script language
of choice.  Personally, I prefer sh over csh, but like perl about
equally with sh for programming.  csh just doesn't seem as powerful and
seems much less consistant, and much buggier.

        Tom _is_ "cool enough" to be quoting Doug Gwyn.  He's at least
as well known as Doug..

-    All in all, I'm sorely tempted to grab the existing csh source
- and fix it, but I'll continue on our from-scratch project and 
- do it that way.

        I wish you would.  I've played inside both sh and csh.  I would
much prefer to work on sh.  Its much smaller, and therefore much more
robust.

        Are you going to make your re-implementation available to the
rest of the world?  I would be more than interested in trying it out.

-- 
Eric Schnoebelen		eric@cirr.com		 schnoebe@convex.com
	    And on the seventh day, He exited from append mode.
From: robert@diku.dk (Robert Martin-Legene)
Newsgroups: comp.unix.questions
Subject: Re: A Little Terminfo question/problem...
Date: 22 Dec 92 19:02:02 GMT
Organization: Department of Computer Science, U of Copenhagen

schwager@cs.uiuc.edu (Michael Schwager) writes:


To change the size of the screen here, I type
% setenv LINES 27

and to change columns (guess what):
%setenv COLUMNS 60

I hope this helps you.

-----------------------------------------------------------------------------
          robert@diku.dk           |      Department of Computer Science
       Robert Martin-Legene        |    University of Copenhagen,  Denmark
-----------------------------------------------------------------------------
                   Constipation is the thief of all time.
From: cl820@cleveland.Freenet.Edu (Wei Jin Mai)
Newsgroups: comp.unix.questions
Subject: What function should I used to get directory information?
Date: 29 Dec 1992 20:49:53 GMT
Organization: Case Western Reserve University, Cleveland, Ohio (USA)
NNTP-Posting-Host: hela.ins.cwru.edu


	I am a DOS programmer. Now I am porting a utility to unix. My program
uses findfirst() and findnext() to gether information about all directory in
MS_DOS. Are there any equivalent function in unix that allow me to search
directory. I have tried opendir() and readdir(). There functions  don't 
provide much information beside directory name. I want to the permission bits
, the group id and user id.

--
From: jag@ampex.com (Rayaz Jagani)
Newsgroups: comp.unix.questions
Subject: Re: How to total file sizes for selected files?
Date: 30 Dec 92 19:51:52 GMT
Organization: Ampex Corporation, Redwood City CA

In article <1992Dec30.184600.720@news.DKRZ-Hamburg.DE> m212022@regen.DKRZ-Hamburg.DE (Wolfgang Welke) writes:
>In article <1992Dec30.083126.26511@ptsfa.PacBell.COM> dmturne@PacBell.COM (Dave Turner) writes:

... several version presented.

I use the following script

ls -al $* |awk '{i = i + $4;j++} END {print j " files use " i " bytes"}'
Newsgroups: comp.unix.questions
From: bcherkas@netcom.com (Brian Cherkas)
Subject: export EXINIT var?
Summary: Command not found message 'export'?
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Fri, 1 Jan 1993 06:34:24 GMT

From a UNIX textbook, I recently put this piece of code
in my .login:

setenv EXINIT="set noautoindent ignorecase magic
wrapmargin=15 number"
export EXINIT

I'm trying to define an EXINIT variable for vi. I'm using
the csh shell.

My question is, why do I get this message every time I
log on: 'export: Command not found.'? 

Also, any idea how to set the showmode option in vi to be
turned on at all times?

Thanks in advance.
-- 
Brian Cherkas     * *    bcherkas@netcom.com
                   I   
AOL/BrianC22      \_/    compuserve/71251,3253