1924 adrm_int32(adr, &client_id, 1);
1925
1926 return (-1);
1927 }
1928
1929 /*
1930 * Format of privilege set token:
1931 * priv_set type string
1932 * priv_set string
1933 */
1934
1935 int
1936 privilege_token(adr_t *adr)
1937 {
1938 skip_string(adr); /* set type name */
1939 skip_string(adr); /* privilege set */
1940 return (-1);
1941 }
1942
1943 /*
1944 * Format of label token:
1945 * label ID 1 byte
1946 * compartment length 1 byte
1947 * classification 2 bytes
1948 * compartment words <compartment length> * 4 bytes
1949 */
1950 int
1951 label_token(adr_t *adr)
1952 {
1953 static m_label_t *label = NULL;
1954 static size32_t l_size;
1955 int len;
1956
1957 if (label == NULL) {
1958 label = m_label_alloc(MAC_LABEL);
1959 l_size = blabel_size() - 4;
1960 }
1961
1962 if (label == NULL) {
1963 /* out of memory, should never happen; skip label */
|
1924 adrm_int32(adr, &client_id, 1);
1925
1926 return (-1);
1927 }
1928
1929 /*
1930 * Format of privilege set token:
1931 * priv_set type string
1932 * priv_set string
1933 */
1934
1935 int
1936 privilege_token(adr_t *adr)
1937 {
1938 skip_string(adr); /* set type name */
1939 skip_string(adr); /* privilege set */
1940 return (-1);
1941 }
1942
1943 /*
1944 * Format of security flags token:
1945 * security flag set string
1946 * security flags string
1947 */
1948
1949 int
1950 secflags_token(adr_t *adr)
1951 {
1952 skip_string(adr); /* set name */
1953 skip_string(adr); /* security flags */
1954 return (-1);
1955 }
1956
1957 /*
1958 * Format of label token:
1959 * label ID 1 byte
1960 * compartment length 1 byte
1961 * classification 2 bytes
1962 * compartment words <compartment length> * 4 bytes
1963 */
1964 int
1965 label_token(adr_t *adr)
1966 {
1967 static m_label_t *label = NULL;
1968 static size32_t l_size;
1969 int len;
1970
1971 if (label == NULL) {
1972 label = m_label_alloc(MAC_LABEL);
1973 l_size = blabel_size() - 4;
1974 }
1975
1976 if (label == NULL) {
1977 /* out of memory, should never happen; skip label */
|