Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* popper under V3.0 enhanced security - anyone ported it?
@ 1994-10-24  1:18 Richard A. Muirden
  1994-11-07 14:17 ` Malcolm Beattie
  0 siblings, 1 reply; 4+ messages in thread
From: Richard A. Muirden @ 1994-10-24  1:18 UTC (permalink / raw)


Hi. I don't want to re-invent the wheel even though I know it is
relatively trivial to do, but has anyone ported popper to OSF/1
V3.0 with enhanced security (ie: using getprpwent etc)?

thanks in advance,
richard

-- 
Richard A. Muirden, Sys. Admin |Fan of Shostakovich, "Star Trek" and the Boeing
Email: richard@rmit.EDU.AU     |777 (launch: May 15, 1995 - United Airlines).  
Phone: (+61 3) 660 3814        |I created alt.fan.shostakovich! Fly: UA,QF,WN
http://www.rmit.edu.au/richard |Can *YOU* beat my 95 Shost CD's? :-)
** I used to run a hot dog stand on the information superhighway before the **
                      McCorporations took over


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: popper under V3.0 enhanced security - anyone ported it?
  1994-10-24  1:18 popper under V3.0 enhanced security - anyone ported it? Richard A. Muirden
@ 1994-11-07 14:17 ` Malcolm Beattie
  1994-11-07 18:34   ` IMAP? (was:popper under V3.0 enhanced security) Bob Wier
  0 siblings, 1 reply; 4+ messages in thread
From: Malcolm Beattie @ 1994-11-07 14:17 UTC (permalink / raw)


In article <richard.782961495@exxilon>,
Richard A. Muirden <richard@exxilon.xx.rmit.EDU.AU> wrote:
>Hi. I don't want to re-invent the wheel even though I know it is
>relatively trivial to do, but has anyone ported popper to OSF/1
>V3.0 with enhanced security (ie: using getprpwent etc)?

Here's what I did...

--Malcolm

--------------------------- cut here ---------------------------
*** popper.h.ORI	Wed Aug 24 14:17:20 1994
--- popper.h	Wed Aug 24 14:56:29 1994
***************
*** 24,29 ****
--- 24,32 ----
  #define FALSE           0
  #define NEWLINE         '\n'
  
+ #ifdef MAXHOSTNAMELEN
+ #undef MAXHOSTNAMELEN
+ #endif /* MAXHOSTNAMELEN */
  #define MAXHOSTNAMELEN  256
  #define MAXUSERNAMELEN  65
  #define MAXDROPLEN      64
***************
*** 33,51 ****
  #define MAXPARMCOUNT    5
  #define MAXPARMLEN      10
  #define ALLOC_MSGS  20
! #define MAIL_COMMAND    "/usr/lib/sendmail"
  
! #define POP_FACILITY    LOG_LOCAL0
  #define POP_PRIORITY    LOG_NOTICE
  #define POP_DEBUG       LOG_DEBUG
  #define POP_LOGOPTS     0
! #define POP_MAILDIR     "/usr/spool/mail"
! #define POP_DROP        "/usr/spool/mail/.%s.pop"
  	/* POP_TMPSIZE needs to be big enough to hold the string
  	 * defined by POP_TMPDROP.  POP_DROP and POP_TMPDROP
  	 * must be in the same filesystem.
  	 */
! #define POP_TMPDROP     "/usr/spool/mail/tmpXXXXXX"
  #define POP_TMPSIZE	256
  #define POP_TMPXMIT     "/tmp/xmitXXXXXX"
  #define POP_OK          "+OK"
--- 36,54 ----
  #define MAXPARMCOUNT    5
  #define MAXPARMLEN      10
  #define ALLOC_MSGS  20
! #define MAIL_COMMAND    "/usr/sbin/sendmail"
  
! #define POP_FACILITY    LOG_LOCAL2
  #define POP_PRIORITY    LOG_NOTICE
  #define POP_DEBUG       LOG_DEBUG
  #define POP_LOGOPTS     0
! #define POP_MAILDIR     "/var/spool/mail"
! #define POP_DROP        "/var/spool/mail/.%s.pop"
  	/* POP_TMPSIZE needs to be big enough to hold the string
  	 * defined by POP_TMPDROP.  POP_DROP and POP_TMPDROP
  	 * must be in the same filesystem.
  	 */
! #define POP_TMPDROP     "/var/spool/mail/tmpXXXXXX"
  #define POP_TMPSIZE	256
  #define POP_TMPXMIT     "/tmp/xmitXXXXXX"
  #define POP_OK          "+OK"
*** popper.c.ORI	Wed Aug 24 12:48:06 1994
--- popper.c	Fri Aug 26 15:14:58 1994
***************
*** 13,18 ****
--- 13,23 ----
  #include <sys/types.h>
  #include "popper.h"
  
+ #ifdef __osf__
+ /* Want prototype for set_auth_parameters */
+ #include <prot.h>
+ #endif /* __osf__ */
+ 
  extern  state_table *   pop_get_command();
  
  /* 
***************
*** 26,33 ****
--- 31,47 ----
      state_table     *   s;
      char                message[MAXLINELEN];
  
+ #ifdef __osf__
+     set_auth_parameters(argc, argv);
+ #endif /* __osf__ */    
+ 
      /*  Start things rolling */
      pop_init(&p,argc,argv);
+ 
+ #ifdef __osf__
+     fclose(stderr);		/* workaround for OSF/1 T3.0-2 bug in */
+ 				/* sia_ses_authent */
+ #endif /* __osf __ */
  
      /*  Tell the user that we are listenting */
      pop_msg(&p,POP_SUCCESS,
*** pop_pass.c.ORI	Wed Aug 24 12:32:23 1994
--- pop_pass.c	Wed Aug 24 13:41:07 1994
***************
*** 3,8 ****
--- 3,9 ----
   * All rights reserved.  The Berkeley software License Agreement
   * specifies the terms and conditions for redistribution.
   */
+ /* Rewritten for OSF/1 C2 Enhanced Security. Malcolm Beattie 24 Aug 1994 */
  
  #ifndef lint
  static char copyright[] = "Copyright (c) 1990 Regents of the University of California.\nAll rights reserved.\n";
***************
*** 15,20 ****
--- 16,48 ----
  #include <pwd.h>
  #include "popper.h"
  
+ #include <sia.h>
+ #include <siad.h>
+ #include <string.h>
+ 
+ static char *sia_reason = NULL;
+ 
+ int sia_collect_cache(int timeout, int rendition, unsigned char *title,
+                       int num_prompts, prompt_t *prompt)
+ {
+     size_t len;
+     
+     if (rendition == SIAINFO || rendition == SIAWARNING)
+     {
+ 	if (sia_reason)
+ 	    free(sia_reason);
+ 	sia_reason = strdup(prompt->prompt);
+ 	/* Truncate trailing newline if present */
+ 	if (sia_reason)
+ 	{
+ 	    len = strlen(sia_reason);
+ 	    if (len > 0 && sia_reason[len - 1] == '\n')
+ 		sia_reason[len - 1] = '\0';
+ 	}
+     }
+     return SIACOLSUCCESS;
+ }
+ 
  /* 
   *  pass:   Obtain the user password from a POP client
   */
***************
*** 22,44 ****
  int pop_pass (p)
  POP     *   p;
  {
!     register struct passwd  *   pw;
!     char *crypt();
  
!     /*  Look for the user in the password file */
      if ((pw = getpwnam(p->user)) == NULL)
          return (pop_msg(p,POP_FAILURE,
!             "Password supplied for \"%s\" is incorrect.",p->user));
! 
!     /*  We don't accept connections from users with null passwords */
!     if (pw->pw_passwd == NULL)
!         return (pop_msg(p,POP_FAILURE,
!             "Password supplied for \"%s\" is incorrect.",p->user));
! 
!     /*  Compare the supplied password with the password file entry */
!     if (strcmp (crypt (p->pop_parm[1], pw->pw_passwd), pw->pw_passwd) != 0)
!         return (pop_msg(p,POP_FAILURE,
!             "Password supplied for \"%s\" is incorrect.",p->user));
  
      /*  Build the name of the user's maildrop */
      (void)sprintf(p->drop_name,"%s/%s",POP_MAILDIR,p->user);
--- 50,87 ----
  int pop_pass (p)
  POP     *   p;
  {
!     struct passwd *pw;
!     SIAENTITY *entity = NULL;
!     int sia_argc;
!     char *sia_argv[3];
  
!     sia_argc = 2;
!     sia_argv[0] = "popper";
!     sia_argv[1] = p->user;
!     sia_argv[2] = NULL;
!     if (sia_ses_init(&entity, sia_argc, sia_argv,
! 		     NULL, p->user, NULL, FALSE, NULL) != SIASUCCESS)
!     {
! 	pop_log(p, POP_PRIORITY, "sia_ses_init failed");
! 	return (pop_msg(p, POP_FAILURE,
! 			"System error, SIA authentication problem"));
!     }
!     if (sia_ses_authent(sia_collect_cache,
! 			p->pop_parm[1], entity) != SIASUCCESS)
! 	return (pop_msg(p,POP_FAILURE,
! 			sia_reason ? sia_reason : "Authentication error"));
!     if (sia_ses_estab(sia_collect_cache, entity) != SIASUCCESS)
! 	return (pop_msg(p,POP_FAILURE,
! 			sia_reason ? sia_reason : "Authentication error"));
!     if (sia_ses_release(&entity) != SIASUCCESS)
! 	pop_log(p, POP_PRIORITY, "sia_ses_release failed");
! 
      if ((pw = getpwnam(p->user)) == NULL)
+     {
+ 	pop_log(p, POP_PRIORITY, "getpwnam failed after sia_ses succeeded");
          return (pop_msg(p,POP_FAILURE,
! 			"System error, SIA authentication problem"));
!     }
  
      /*  Build the name of the user's maildrop */
      (void)sprintf(p->drop_name,"%s/%s",POP_MAILDIR,p->user);
*** Makefile~	Wed Aug 24 14:29:08 1994
--- Makefile	Wed Aug 24 15:07:42 1994
***************
*** 38,44 ****
  #					syslog).
  #               STRNCASECMP     -	If you do not have strncasecmp()
  
! CFLAGS		=	-O -DHAVE_VSPRINTF
  
  TARGET		=	popper
  
--- 38,44 ----
  #					syslog).
  #               STRNCASECMP     -	If you do not have strncasecmp()
  
! CFLAGS		=	-O -DHAVE_VSPRINTF -D_BSD
  
  TARGET		=	popper
  
***************
*** 55,61 ****
  
  
  ${TARGET}: ${OBJS}
! 	cc  ${OBJS} -o ${TARGET}
  
  tar: ${SRCS} ${DOCS} ${MAKEFILE}
  	rm -f ${TAR} *.Z*
--- 55,61 ----
  
  
  ${TARGET}: ${OBJS}
! 	cc  ${OBJS} -o ${TARGET} -lsecurity -laud
  
  tar: ${SRCS} ${DOCS} ${MAKEFILE}
  	rm -f ${TAR} *.Z*


--------------------------- cut here ---------------------------
-- 
Malcolm Beattie <mbeattie@sable.ox.ac.uk> (note new address)
Oxford University Computing Services
"Widget. It's got a widget. A lovely widget. A widget it has got." --Jack Dee


^ permalink raw reply	[flat|nested] 4+ messages in thread

* IMAP? (was:popper under V3.0 enhanced security)
  1994-11-07 14:17 ` Malcolm Beattie
@ 1994-11-07 18:34   ` Bob Wier
  1994-11-18  4:10     ` Mark Keppinger
  0 siblings, 1 reply; 4+ messages in thread
From: Bob Wier @ 1994-11-07 18:34 UTC (permalink / raw)


In article <1994Nov7.141737.27364@inca.comlab.ox.ac.uk>,
mbeattie@sable.ox.ac.uk (Malcolm Beattie) wrote:

|  In article <richard.782961495@exxilon>,
|  Richard A. Muirden <richard@exxilon.xx.rmit.EDU.AU> wrote:
|  >Hi. I don't want to re-invent the wheel even though I know it is
|  >relatively trivial to do, but has anyone ported popper to OSF/1
|  >V3.0 with enhanced security (ie: using getprpwent etc)?
|  
|  Here's what I did...
|  
|  --Malcolm
|  
|  --------------------------- cut here ---------------------------
|  *** popper.h.ORI        Wed Aug 24 14:17:20 1994
|  --- popper.h    Wed Aug 24 14:56:29 1994
|  ***************
|  *** 24,29 ****
|  --- 24,32 ----
|    #define FALSE           0
e

and so forth...

I've got a similar question, but for IMAP - has anyone ported it over
(we are running an Alpha 3000/600s - OSF/1 V2) - IMAP would be nice since
it gives you pop2, pop3, and IMAP (which I *think* is required to get 
pine to run - although mostly I'm looking for pop3 capability right now).

THANKS!

-- 
wier@merlin.etsu.edu root@bobcat.etsu.edu
East Texas State University


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: IMAP? (was:popper under V3.0 enhanced security)
  1994-11-07 18:34   ` IMAP? (was:popper under V3.0 enhanced security) Bob Wier
@ 1994-11-18  4:10     ` Mark Keppinger
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Keppinger @ 1994-11-18  4:10 UTC (permalink / raw)


In article <wier-0711941234220001@csci-wiermac.etsu.edu>,
Bob Wier <wier@merlin.etsu.edu> wrote:
>In article <1994Nov7.141737.27364@inca.comlab.ox.ac.uk>,
>mbeattie@sable.ox.ac.uk (Malcolm Beattie) wrote:
>
>|  In article <richard.782961495@exxilon>,
>|  Richard A. Muirden <richard@exxilon.xx.rmit.EDU.AU> wrote:
>|  >Hi. I don't want to re-invent the wheel even though I know it is
>|  >relatively trivial to do, but has anyone ported popper to OSF/1
>|  >V3.0 with enhanced security (ie: using getprpwent etc)?
>|  
>|  Here's what I did...
>|  
>|  --Malcolm
>|  
>|  --------------------------- cut here ---------------------------
>|  *** popper.h.ORI        Wed Aug 24 14:17:20 1994
>|  --- popper.h    Wed Aug 24 14:56:29 1994
>|  ***************
>|  *** 24,29 ****
>|  --- 24,32 ----
>|    #define FALSE           0
>e
>
>and so forth...
>
>I've got a similar question, but for IMAP - has anyone ported it over
>(we are running an Alpha 3000/600s - OSF/1 V2) - IMAP would be nice since
>it gives you pop2, pop3, and IMAP (which I *think* is required to get 
>pine to run - although mostly I'm looking for pop3 capability right now).
>
>THANKS!
>
>-- 
>wier@merlin.etsu.edu root@bobcat.etsu.edu
>East Texas State University

I have taken UofW PINE Version 3.90 and have sucessfully gotten IMAP to
compile and run with C2 security.  What I have done so far is not clean
or pretty.   We are running OSF/1 Version 2.1B on a AXP 2100.  The same
routine that does IMAP password checking is also used by POP2 and POP3.
Our users have complained that certain thing in POP do not work correctly.
Since POP is not a supported product at this site, they will have to wait
for 3.91 which is a bug-fix release for 3.90.  

Our current version required that all passwords be in the new encryption
method since this is what the 'secauthmigrate' utility (moving from Ultrix
to OSF/1) uses.  I plan on putting both encryption methods in the new
code and doing some of the others required checks (accound disabled).  The
hold up has been getting the "Enhanced Security" book for Version 3.0 (the
2.0 book is worthless, examples don't even work) and getting our 2.1 OS
stable (up until this week we crashed on the average of every other day,
been up for 6 days now).

(Note: most of our instability has to do with NFS client to MultiNet NFS
       server over FDDI and C2 security on a system with 7000+ accounts
       running with 150-170 concurrent users with everyones home directory
       NFS mounted.)
-- 
Mark Keppinger                Internet: keppingm@ucs.orst.edu       
University Computing Services           keppingm@ccmail.orst.edu   
Oregon State University
Corvallis, OR 97331-5202         Phone: (503) 737-4483           


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1994-11-18  4:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-10-24  1:18 popper under V3.0 enhanced security - anyone ported it? Richard A. Muirden
1994-11-07 14:17 ` Malcolm Beattie
1994-11-07 18:34   ` IMAP? (was:popper under V3.0 enhanced security) Bob Wier
1994-11-18  4:10     ` Mark Keppinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox