altq_hfsc.c (130368) | altq_hfsc.c (164033) |
---|---|
1/* $FreeBSD: head/sys/contrib/altq/altq/altq_hfsc.c 130368 2004-06-12 00:57:20Z mlaier $ */ | 1/* $FreeBSD: head/sys/contrib/altq/altq/altq_hfsc.c 164033 2006-11-06 13:42:10Z rwatson $ */ |
2/* $KAME: altq_hfsc.c,v 1.24 2003/12/05 05:40:46 kjc Exp $ */ 3 4/* 5 * Copyright (c) 1997-1999 Carnegie Mellon University. All Rights Reserved. 6 * 7 * Permission to use, copy, modify, and distribute this software and 8 * its documentation is hereby granted (including for commercial or 9 * for-profit use), provided that both the copyright notice and this --- 1960 unchanged lines hidden (view full) --- 1970 struct hfsc_interface *ifacep; 1971 int error = 0; 1972 1973 /* check super-user privilege */ 1974 switch (cmd) { 1975 case HFSC_GETSTATS: 1976 break; 1977 default: | 2/* $KAME: altq_hfsc.c,v 1.24 2003/12/05 05:40:46 kjc Exp $ */ 3 4/* 5 * Copyright (c) 1997-1999 Carnegie Mellon University. All Rights Reserved. 6 * 7 * Permission to use, copy, modify, and distribute this software and 8 * its documentation is hereby granted (including for commercial or 9 * for-profit use), provided that both the copyright notice and this --- 1960 unchanged lines hidden (view full) --- 1970 struct hfsc_interface *ifacep; 1971 int error = 0; 1972 1973 /* check super-user privilege */ 1974 switch (cmd) { 1975 case HFSC_GETSTATS: 1976 break; 1977 default: |
1978#if (__FreeBSD_version > 400000) | 1978#if (__FreeBSD_version > 700000) 1979 if ((error = priv_check(p, PRIV_ALTQ_MANAGE)) != 0) 1980 return (error); 1981#elsif (__FreeBSD_version > 400000) |
1979 if ((error = suser(p)) != 0) 1980 return (error); 1981#else 1982 if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) 1983 return (error); 1984#endif 1985 break; 1986 } --- 287 unchanged lines hidden --- | 1982 if ((error = suser(p)) != 0) 1983 return (error); 1984#else 1985 if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) 1986 return (error); 1987#endif 1988 break; 1989 } --- 287 unchanged lines hidden --- |