Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mac_free(3) [freebsd man page]

MAC_FREE(3)						   BSD Library Functions Manual 					       MAC_FREE(3)

NAME
mac_free -- free MAC label LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/mac.h> int mac_free(mac_t label); DESCRIPTION
The mac_free() function frees the storage allocated to contain a mac_t. RETURN VALUES
The mac_free() function always returns 0. WARNING: see the notes in the BUGS section regarding the use of this function. SEE ALSO
mac(3), mac_get(3), mac_prepare(3), mac_set(3), mac_text(3), posix1e(3), mac(4), mac(9) STANDARDS
POSIX.1e is described in IEEE POSIX.1e draft 17. Discussion of the draft continues on the cross-platform POSIX.1e implementation mailing list. To join this list, see the FreeBSD POSIX.1e implementation page for more information. HISTORY
Support for Mandatory Access Control was introduced in FreeBSD 5.0 as part of the TrustedBSD Project. BUGS
POSIX.1e specifies that mac_free() will be used to free text strings created using mac_to_text(3). Because mac_t is a complex structure in the TrustedBSD implementation, mac_free() is specific to mac_3, and must not be used to free the character strings returned from mac_to_text(). Doing so may result in undefined behavior. BSD
December 21, 2001 BSD

Check Out this Related Man Page

MAC_TEXT(3)						   BSD Library Functions Manual 					       MAC_TEXT(3)

NAME
mac_from_text, mac_to_text -- convert MAC label to/from text representation LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/mac.h> int mac_from_text(mac_t *mac, const char *text); int mac_to_text(mac_t label, char **text); DESCRIPTION
The mac_from_text() function converts the text representation of a label into the internal policy label format (mac_t) and places it in *mac, which must later be freed with free(3). The mac_to_text() function allocates storage for *text, which will be set to the text representation of label. Refer to maclabel(7) for the MAC label format. RETURN VALUES
The mac_from_text() and mac_to_text() functions return the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error. COMPATIBILITY
POSIX.1e does not define a format for text representations of MAC labels. POSIX.1e requires that text strings allocated using mac_to_text() be freed using mac_free(3); in the FreeBSD implementation, they must be freed using free(3), as mac_free(3) is used only to free memory used for type mac_t. ERRORS
[ENOMEM] Insufficient memory was available to allocate internal storage. SEE ALSO
free(3), mac(3), mac_get(3), mac_is_present(3), mac_prepare(3), mac_set(3), posix1e(3), mac(4), maclabel(7) STANDARDS
POSIX.1e is described in IEEE POSIX.1e draft 17. Discussion of the draft continues on the cross-platform POSIX.1e implementation mailing list. To join this list, see the FreeBSD POSIX.1e implementation page for more information. HISTORY
Support for Mandatory Access Control was introduced in FreeBSD 5.0 as part of the TrustedBSD Project. BSD
December 21, 2001 BSD
Man Page

12 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

time and date in os X help please

i'm new to the unix communtiy i have mac OS X runing the BSD kernel 4.5 that much i know of my friend use unix at work and @ home but he has free bsd and mandrake which does not apply to me tryed to access the terminal but he said can't get to the time and date lock out of it ..... my... (1 Reply)
Discussion started by: dercarcort
1 Replies

2. UNIX for Dummies Questions & Answers

Mac OS X Question

I've looked at all the forums here, and could not find my answer! I don't use a Mac, But have Played with OS X. It is Unix based I know that, but can you Install all the free programs like you can on *BSD and Lunix? MacIain (1 Reply)
Discussion started by: MacIain
1 Replies

3. Linux

mac

i need to now if i can make compatible a mac whit a ibm-pc (1 Reply)
Discussion started by: jam_131
1 Replies

4. What is on Your Mind?

If possible, would you consider buying OS X for a non Mac computer?

Title says it all. I am doing a little research for a blog I want to write up on my website about different OS platforms. One thing that I am trying to figure out, is that would it appeal to people to load OS X on their PC, and would they be willing to pay for it? If so, would you even... (17 Replies)
Discussion started by: tlarkin
17 Replies

5. Programming

Multi-platform includes?

I know that <cstudio> can also be <stdio> and can be written different ways on Linux then with windows. I've see some code doing a IFDEF __APPLE__ (I'm guessing, if compiled on a mac do whats between this) Is there one for Linux/Window? (3 Replies)
Discussion started by: james2432
3 Replies

6. OS X (Apple)

Help installing a Unix operating system on a mac

Hey, I am basically a newb when it comes to anything other than gaming on computers. I am working on changing that and as a first step am installing and learning a UNIX system on my mac. Here is the thing. I already partitioned the hard drive using boot camp to install windows, which I... (6 Replies)
Discussion started by: Socrates1212
6 Replies

7. UNIX for Dummies Questions & Answers

Help The Helpdesk?!!

-- Thanks in advance for any help -- This is a osx specific typically 10.5.x -10.6.x I work at a mac helpdesk - and we do allot of Data Transfers/Migrations As things go, at the helpdesk, with the world of computers; (hard drives) are not always willing to play nice. So here is the... (4 Replies)
Discussion started by: briandanielz
4 Replies

8. UNIX for Dummies Questions & Answers

Lseek implementation

Hi everybody, i've been googling for ages now and gotten kinda desperate... The question, however, might be rather trivial for the experts: What is it exactly, i.e. physically, the POSIX function (for a file) "lseek" does? Does it trigger some kind of synchronization on disk? Is it just for the... (4 Replies)
Discussion started by: Humudituu
4 Replies

9. UNIX for Dummies Questions & Answers

Problems passing strings within an array

i have a list of apps that i need to forcequit and, from time to time, that list changes. perfect excuse to manage a single array! however, my strings with spaces aren't passing as i'd like them to. here's the simple script: #!/bin/sh #-----Array apps=( firefox-bin firefox... (6 Replies)
Discussion started by: hungryd
6 Replies

10. UNIX for Dummies Questions & Answers

Mounted to mac, doesn't show DIR contents on first 'ls'

Hi, I have a cronjob that mounts machines every 15 minutes. sudo mount -t cifs -o username=Ren_user,password=AIB#1109$,nounix,bg,sec=ntlmssp //10.204.129.233/Desktop /mnt/clinical/234mac When I open a new shell and ls /mnt/clinical/234macto the mount point it is blank, but when I do the... (7 Replies)
Discussion started by: jdilts
7 Replies

11. OS X (Apple)

Newbie needs to find file

I need to find a file using Applescript. Applescript is so slow. Someone on the Apple forums gave me some unix code and it works for the most part. The ls command is really list and not find but when it works, it returns the path to the file instantly, NOT 45 seconds Applescript takes. here is... (11 Replies)
Discussion started by: sbrady
11 Replies

12. UNIX for Advanced & Expert Users

[Discussion] POSIX, the Love of Backticks and All That Jazz

But I love my back-ticks - I know exactly how to escape them (after too many years) - I always seem to end unbalanced with (). However, I shall take the hint. (One more trick for this dog... aka - not too old yet!) :);) (17 Replies)
Discussion started by: MichaelFelt
17 Replies