LSTSRV-L Archives

LISTSERV Site Administrators' Forum

LSTSRV-L

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Peter Furmonavicius <PETER@YALEVM>
Tue, 6 Jun 89 16:56:24 EDT
text/plain (41 lines)
>>  How can I 'put' a file onto LISTSERV disk and add a file entry in
>>the file whose filetype is FILELIST? As I knew, the PUT command is
>>used to put a LIST onto LISTSERV disk and PUTC to put a file onto
>>LISTSERV disk but it don't add any index to any FILELIST file.
>
>The adddition to the LISTSERV FILELIST, or any <fn> FILELIST must be done
>by you. First obtain a copy of the FILELIST you wish to add files to,
>add a line that is similar to one of the file descriptions, modify the
>filename filetype, access codes (optional), and finally the description
>that is at the end of the line. Then store this file back. It is easiest
>to use LSVPUT EXEC to do the file storage. You can obtain this program
>via INFO PUT command. Oh, don't bother with the filesize, date, format -
>LISTSERV takes care of these itself.
 
I got tired of doing this and so I modified the LSV$PUT EXEC to do most of
the work for me.  LSV$PUT EXEC is an installation-customizable exit that is
automatically called whenever a PUT request is received for an "unknown" file.
(An "unknown" file is one that is not already in the "FILELIST" file.)
What I do is the following:
 
1) check that the PUT is for one of the filelists that I want to be handled
in this automatic fashion
2) check the user id and node from whence the file came
(make sure its the owner of the list or some other bona fide 'updater')
3) check that the FILELIST file actually still exists for the list
4) see if there is a Listserv password file
5) if there isn't, exit
6) if there is, check the user supplied password against the password in the
Listserv password file
7) presuming that the password checks out okay, make sure the user isn't
storing an EXEC or MODULE file
8) if all is well to this point, create a FILELIST entry for the new file
9) add an entry into the FILEID file for this file
10) then exit to let LISTSERV handle the rest
 
This works and its neat and easy.  In other words, properly authorized users
can add files to Listserv just by sending the file to Listserv using the
LSVPUT exec (or sendfile if they put the header on themselves).
Listserv handles everything else and presto, the files appears ready for
'distribution' if anyone does an index on the particular list.

ATOM RSS1 RSS2