From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,ac930deb159e8231 X-Google-Attributes: gidfee84,public From: John Ferlan Subject: Re: Using SIA calls, modifying INN's nnrpd Date: 1998/09/23 Message-ID: <36095BCE.109F6475@zk3.dec.com>#1/1 X-Deja-AN: 395645261 Content-Transfer-Encoding: 7bit References: Content-Type: text/plain; charset=us-ascii Organization: Compaq Computer Corp Mime-Version: 1.0 Reply-To: johnferlan@iname.com Newsgroups: comp.unix.osf.osf1 Paul Coen wrote: > I'm trying to hack the INN 1.7.2 nnrpd program to use the sia* calls > for user authentication. Am I reading the (dripping sarcasm) wonderfully > thorough documentation correctly, and I have to use sia_ses_init, and > then somehow call the sia version of getpwnam -- some stuff in the > security manual makes it sound like you can just use sia_getpasswd. > The table on page 20-3 lists sia_getpwnam(), though. Or is there another > function that then passes the call based on matrix.conf? > Don't try and mimic what someone else does - that is find out what the username is, get an entry from the password database, ask for the password, compare the result in the password db with a self crypt()'d change of the user's input password. SIA will do what you want it to do very simply if you don't try to follow other examples... The question you should be asking is why do you need to get a passwd pointer? What are you doing with it - and of course will what you're doing work in an Enhanced Security environment (or shadow password db for other unixes). > > Anyway, I'd love to see just one *good* example before I try to hack > this in. I want to do user based security on a 4.0b Digital Unix system > with the enhanced security package installed. Any tips would be > appreciated. See the example in Chapter 20 "Using the SIA Interface" Example 20-3 - "Session Processing Code"... It's basically what login.c does (more or less)... See appendix D for examples of reauthentication and su authentication If you already have a username/password and all you're trying to do is validate if they are correct, then why not use sia_validate_user(). I guess if I knew what it was you were trying to do more exactly, then I could provide a more direct answer... -- John Ferlan | DTN: 264-0854 Office: ZKO3-3/Y26 ferlan aT zk3 dOt dec dOt com | Compaq Computer Corp To reply read above and figure it out@ | 110 Spit Brook Rd. | M/S: ZKO3-3/W20 Spammers can cheerfully send mail to: | Nashua, NH 03062-2698 uce@ftc.gov | (603)884-0854 root@localhost webmaster@localhost postmaster@localhost