projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
useful debugging changes
[unix-history]
/
usr
/
src
/
sys
/
netccitt
/
pk_usrreq.c
diff --git
a/usr/src/sys/netccitt/pk_usrreq.c
b/usr/src/sys/netccitt/pk_usrreq.c
index
c3df394
..
2ef287b
100644
(file)
--- a/
usr/src/sys/netccitt/pk_usrreq.c
+++ b/
usr/src/sys/netccitt/pk_usrreq.c
@@
-9,7
+9,7
@@
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)pk_usrreq.c 7.1
4
(Berkeley) %G%
+ * @(#)pk_usrreq.c 7.1
6
(Berkeley) %G%
*/
#include "param.h"
*/
#include "param.h"
@@
-20,7
+20,6
@@
#include "protosw.h"
#include "errno.h"
#include "ioctl.h"
#include "protosw.h"
#include "errno.h"
#include "ioctl.h"
-#include "user.h"
#include "stat.h"
#include "../net/if.h"
#include "stat.h"
#include "../net/if.h"
@@
-315,8
+314,8
@@
register struct ifnet *ifp;
return (0);
case SIOCSIFCONF_X25:
return (0);
case SIOCSIFCONF_X25:
- if (
error = suser (u.u_cred, &u.u_acflag)
)
- return (
error
);
+ if (
(so->so_state & SS_PRIV) == 0
)
+ return (
EPERM
);
if (ifp == 0)
panic ("pk_control");
if (ifa == (struct ifaddr *)0) {
if (ifp == 0)
panic ("pk_control");
if (ifa == (struct ifaddr *)0) {
@@
-395,7
+394,9
@@
int cmd, level, optname;
return (0);
case PK_ACCTFILE:
return (0);
case PK_ACCTFILE:
- if (m -> m_len)
+ if ((so->so_state & SS_PRIV) == 0)
+ error = EPERM;
+ else if (m -> m_len)
error = pk_accton (mtod (m, char *));
else
error = pk_accton ((char *)0);
error = pk_accton (mtod (m, char *));
else
error = pk_accton ((char *)0);
@@
-412,7
+413,7
@@
int cmd, level, optname;
(void) m_freem (*mp);
*mp = 0;
}
(void) m_freem (*mp);
*mp = 0;
}
- return (
EOPNOTSUPP
);
+ return (
error
);
}
}