Sponsored Content
Full Discussion: System programming in C
Top Forums Programming System programming in C Post 302472876 by fpmurphy on Thursday 18th of November 2010 10:26:37 AM
Old 11-18-2010
If you want portability, you should not be using FreeBSD specific APIs. Stick to the set of APIs defined by the POSIX.1 standard.
This User Gave Thanks to fpmurphy For This Post:
 

10 More Discussions You Might Find Interesting

1. Programming

System Programming

Hi all, I am working on a c program (in a unix environment) making system calls. My program makes references to POSIX, _POSIX_SOURCE 1. When trying to compile the c program, I received a message "Language optional software package not installed." I am not sure if this message refers to... (3 Replies)
Discussion started by: rachael
3 Replies

2. Programming

unix system programming

hey there i have to execute commands that are written on the command line in unix. i have already separated the commands into tokens but now im stuck with the problem of how to actually execute those commands. eg: lets say the user entered " ls -l" to list all the files in a directory ... (1 Reply)
Discussion started by: mile1982
1 Replies

3. Programming

System programming book

please tell me the best book for Unix's System programming..... so that i become expert in System programming.I have completed shell programming and i know C programming in Unix. please tell me which book i should prefer... -ajit (1 Reply)
Discussion started by: ajit_gupta
1 Replies

4. Programming

System programming in C

Hi there, Am very very interested in system level programming in C???? Please give me a good site or a sample program to start with.. will be of a great help to me.. Thanks, Nisha (7 Replies)
Discussion started by: Nisha
7 Replies

5. Programming

system Programming using JAVA.

Dear Sir, How to write Code using JAVA technology for system programming ? I want to develop a new compiler for my own language. thanks in advance roy (1 Reply)
Discussion started by: swapan
1 Replies

6. UNIX for Dummies Questions & Answers

How does unix system administration, unix programming, unix network programming differ?

How does unix system administration, unix programming, unix network programming differ? Please help. (0 Replies)
Discussion started by: thulasidharan2k
0 Replies

7. Programming

What is Unix System Programming???

Hi friends, Hope u r doing well. I really find the phrase, "Unix System Programming" very very cool, I don't know the reason, but it since I love UNIX, I want to do system programming in unix. Could you please tell me what is really the meaning of unix system programming. I have a couple of books... (5 Replies)
Discussion started by: gabam
5 Replies

8. Programming

c programming system call

newPerm = oldPerm & ~0100; where oldPerm holds the value of st_mode from the system call stat(). When I try and compile every line where ive attempted to do these operations gives the warning "parameter names without declaration types in function declaration". what could be the problem? the... (2 Replies)
Discussion started by: bjhum33
2 Replies

9. Shell Programming and Scripting

System programming with Unix

Hi All I want to learn System programming with the help of Unix. System Programming mean to say 1) Playing with the memory of computer 2) Designing some graphical units Hope you understand... (2 Replies)
Discussion started by: parthmittal2007
2 Replies

10. UNIX for Dummies Questions & Answers

From iOS programming to Linux system programming

Hello. I like Linux and C programming language. Allways wanted to understand kernel and become a Linux system programmer. And I also like Objective-C and iOS. These two programming areas have relations: 1. Linux and iOS are UNIX-like systems, POSIX compliant. 2. It is useful to know C language... (2 Replies)
Discussion started by: Rockatansky
2 Replies
MAC(3)							   BSD Library Functions Manual 						    MAC(3)

NAME
mac -- introduction to the MAC security API LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/mac.h> In the kernel configuration file: options MAC DESCRIPTION
Mandatory Access Control labels describe confidentiality, integrity, and other security attributes of operating system objects, overriding discretionary access control. Not all system objects support MAC labeling, and MAC policies must be explicitly enabled by the administrator. This API, based on POSIX.1e, includes routines to retrieve, manipulate, set, and convert to and from text the MAC labels on files and pro- cesses. MAC labels consist of a set of (name, value) tuples, representing security attributes from MAC policies. For example, this label contains security labels defined by two policies, mac_biba(4) and mac_mls(4): biba/low,mls/low Further syntax and semantics of MAC labels may be found in maclabel(7). Applications operate on labels stored in mac_t, but can convert between this internal format and a text format for the purposes of presenta- tion to uses or external storage. When querying a label on an object, a mac_t must first be prepared using the interfaces described in mac_prepare(3), allowing the application to declare which policies it wishes to interrogate. The application writer can also rely on default label names declared in mac.conf(5). When finished with a mac_t, the application must call mac_free(3) to release its storage. The following functions are defined: mac_is_present() This function, described in mac_is_present(3), allows applications to test whether MAC is configured, as well as whether specific policies are configured. mac_get_fd(), mac_get_file(), mac_get_link(), mac_get_peer() These functions, described in mac_get(3), retrieve the MAC labels associated with file descriptors, files, and socket peers. mac_get_pid(), mac_get_proc() These functions, described in mac_get(3), retrieve the MAC labels associated with processes. mac_set_fd(), mac_set_file(), mac_set_link() These functions, described in mac_set(3), set the MAC labels associated with file descriptors and files. mac_set_proc() This function, described in mac_set(3), sets the MAC label associated with the current process. mac_free() This function, described in mac_free(3), frees working MAC label storage. mac_from_text() This function, described in mac_text(3), converts a text-form MAC label into working MAC label storage, mac_t. mac_prepare(), mac_prepare_file_label(), mac_prepare_ifnet_label(), mac_prepare_process_label(), mac_prepare_type() These functions, described in mac_prepare(3), allocate working storage for MAC label operations. mac_prepare(3) prepares a label based on caller-specified label names; the other calls rely on the default configuration specified in mac.conf(5). mac_to_text() This function is described in mac_text(3), and may be used to convert a mac_t into a text-form MAC label. FILES
/etc/mac.conf MAC library configuration file, documented in mac.conf(5). Provides default behavior for applications aware of MAC labels on system objects, but without policy-specific knowledge. SEE ALSO
mac_free(3), mac_get(3), mac_is_present(3), mac_prepare(3), mac_set(3), mac_text(3), posix1e(3), mac(4), mac.conf(5), mac(9) STANDARDS
These APIs are loosely based on the APIs described in POSIX.1e, as described in IEEE POSIX.1e draft 17. However, the resemblance of these APIs to the POSIX APIs is loose, as the POSIX APIs were unable to express some notions required for flexible and extensible access control. HISTORY
Support for Mandatory Access Control was introduced in FreeBSD 5.0 as part of the TrustedBSD Project. BUGS
The TrustedBSD MAC Framework and associated policies, interfaces, and applications are considered to be an experimental feature in FreeBSD. Sites considering production deployment should keep the experimental status of these services in mind during any deployment process. See also mac(9) for related considerations regarding the kernel framework. BSD
August 7, 2009 BSD
All times are GMT -4. The time now is 04:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy