/*
+ * $Id: main.c,v 1.5 2001-05-03 13:57:44 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
struct sigaction sv;
sigset_t sigs;
+#ifdef DIGITAL_UNIX_SECURITY
+ set_auth_parameters( ac, av );
+#endif /* DIGITAL_UNIX_SECURITY */
+
umask( 0 ); /* so inherited file permissions work right */
afp_options_init(&default_options);
/*
+ * $Id: quota.c,v 1.4 2001-05-03 13:57:44 rufustfirefly Exp $
+ *
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
*/
#define QCMD(a,b) (a)
#endif
+#ifndef TRU64
/* for group quotas. we only use these if the user belongs
* to one group. */
struct dqblk dqg;
memset(&dqg, 0, sizeof(dqg));
+#endif /* TRU64 */
#ifdef BSD4_4
if ( quotactl( vol->v_gvs, QCMD(Q_GETQUOTA,USRQUOTA),
quotactl(vol->v_gvs, QCMD(Q_GETQUOTA, GRPQUOTA),
groups[0], (char *) &dqg);
+#elif defined(TRU64)
+ if ( seteuid( getuid() ) == 0 ) {
+ if ( quotactl( vol->v_path, QCMD(Q_GETQUOTA, USRQUOTA),
+ uid, (char *)dq ) != 0 ) {
+ seteuid( uid );
+ return ( AFPERR_PARAM );
+ }
+ }
+
#else /* BSD4_4 */
if ( quotactl(QCMD(Q_GETQUOTA, USRQUOTA), vol->v_gvs, uid,
(caddr_t) dq ) != 0 ) {
groups[0], (char *) &dqg);
#endif /* BSD4_4 */
+#ifndef TRU64
/* set stuff up for group quotas if necessary */
/* max(user blocks, group blocks) */
(dq->dqb_btimelimit > dqg.dqb_btimelimit)))
dq->dqb_btimelimit = dqg.dqb_btimelimit;
+#endif /* TRU64 */
+
#endif /* ultrix */
#endif /* __svr4__ */
+/*
+ * $Id: unix.h,v 1.3 2001-05-03 13:57:44 rufustfirefly Exp $
+ */
+
#ifndef AFPD_UNIX_H
#define AFPD_UNIX_H
#include <sys/statvfs.h>
#define statfs statvfs
#else
+#if defined(TRU64)
+#define f_frsize f_fsize
+#else /* TRU64 */
#define f_frsize f_bsize
-#endif
+#endif /* TRU64 */
+#endif /* USE_STATVFS_H */
#if defined(__svr4__) || defined(USE_MNTTAB_H)
#include <sys/mnttab.h>
/*
- * $Id: uams_passwd.c,v 1.6 2001-02-27 17:07:43 rufustfirefly Exp $
+ * $Id: uams_passwd.c,v 1.7 2001-05-03 13:57:44 rufustfirefly Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
#define PASSWDLEN 8
+#ifdef DIGITAL_UNIX_SECURITY
+#include <sys/types.h>
+#include <sys/security.h>
+#include <prot.h>
+#endif /* DIGITAL_UNIX_SECURITY */
+
/* cleartxt login */
static int passwd_login(void *obj, struct passwd **uam_pwd,
char *ibuf, int ibuflen,
struct passwd *pwd;
#ifdef SHADOWPW
struct spwd *sp;
-#endif
+#endif /* SHADOWPW */
char *username, *p;
int len, ulen;
+#ifdef DIGITAL_UNIX_SECURITY
+ char *bigcrypt();
+ struct pr_passwd *pr;
+#endif /* DIGITAL_UNIX_SECURITY */
*rbuflen = 0;
*uam_pwd = pwd;
+#ifdef DIGITAL_UNIX_SECURITY
+ pr = getprpwnam( username );
+ if ( pr == NULL )
+ return AFPERR_NOTAUTH;
+ if ( strcmp ( bigcrypt ( ibuf, pr->ufld.fd_encrypt ),
+ pr->ufld.fd_encrypt == 0 )
+ return AFP_OK;
+#else /* DIGITAL_UNIX_SECURITY */
p = crypt( ibuf, pwd->pw_passwd );
if ( strcmp( p, pwd->pw_passwd ) == 0 )
return AFP_OK;
+#endif /* DIGITAL_UNIX_SECURITY */
return AFPERR_NOTAUTH;
}