PERFORCE change 110208 for review
Robert Watson
rwatson at FreeBSD.org
Tue Nov 21 17:28:27 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=110208
Change 110208 by rwatson at rwatson_fledge on 2006/11/18 11:17:09
When generating process*_ex() variants, make sure to write out
addresses in the byte order they are presented to the function, as
addresses will already be in network byte order. The u_int32_t
encoding macros will convert from native to network byte order,
which is not required if they are already in network byte order.
Affected files ...
.. //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#55 edit
Differences ...
==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#55 (text+ko) ====
@@ -30,7 +30,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#54 $
+ * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#55 $
*/
#include <sys/types.h>
@@ -765,11 +765,11 @@
ADD_U_INT32(dptr, sid);
ADD_U_INT32(dptr, tid->at_port);
ADD_U_INT32(dptr, tid->at_type);
- ADD_U_INT32(dptr, tid->at_addr[0]);
+ ADD_MEM(dptr, &tid->at_addr[0], sizeof(u_int32_t));
if (tid->at_type == AU_IPv6) {
- ADD_U_INT32(dptr, tid->at_addr[1]);
- ADD_U_INT32(dptr, tid->at_addr[2]);
- ADD_U_INT32(dptr, tid->at_addr[3]);
+ ADD_MEM(dptr, &tid->at_addr[1], sizeof(u_int32_t));
+ ADD_MEM(dptr, &tid->at_addr[2], sizeof(u_int32_t));
+ ADD_MEM(dptr, &tid->at_addr[3], sizeof(u_int32_t));
}
return (t);
@@ -807,11 +807,11 @@
ADD_U_INT32(dptr, sid);
ADD_U_INT64(dptr, tid->at_port);
ADD_U_INT32(dptr, tid->at_type);
- ADD_U_INT32(dptr, tid->at_addr[0]);
+ ADD_MEM(dptr, &tid->at_addr[0], sizeof(u_int32_t));
if (tid->at_type == AU_IPv6) {
- ADD_U_INT32(dptr, tid->at_addr[1]);
- ADD_U_INT32(dptr, tid->at_addr[2]);
- ADD_U_INT32(dptr, tid->at_addr[3]);
+ ADD_MEM(dptr, &tid->at_addr[1], sizeof(u_int32_t));
+ ADD_MEM(dptr, &tid->at_addr[2], sizeof(u_int32_t));
+ ADD_MEM(dptr, &tid->at_addr[3], sizeof(u_int32_t));
}
return (t);
More information about the trustedbsd-cvs
mailing list