PERFORCE change 92511 for review
Robert Watson
rwatson at FreeBSD.org
Mon Feb 27 18:10:45 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=92511
Change 92511 by rwatson at rwatson_lethe.cl.cam.ac.uk on 2006/02/28 02:09:56
Use KERN_HOSTID and NODEV if they are defined, don't otherwise.
(Linux)
Affected files ...
.. //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#17 edit
Differences ...
==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#17 (text+ko) ====
@@ -26,7 +26,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_wrappers.c#16 $
+ * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_wrappers.c#17 $
*/
#ifdef __APPLE__
@@ -56,7 +56,11 @@
if (p == NULL)
return (kAUBadParamErr);
+#ifdef NODEV
*p = NODEV;
+#else
+ *p = -1;
+#endif
/* for /usr/bin/login, try fstat() first */
if (fstat(STDIN_FILENO, &st) != 0) {
@@ -78,6 +82,8 @@
int
audit_set_terminal_host(uint32_t *m)
{
+
+#ifdef KERN_HOSTID
int name[2] = { CTL_KERN, KERN_HOSTID };
size_t len;
@@ -90,6 +96,10 @@
return (kAUSysctlErr);
}
return (kAUNoErr);
+#else
+ *m = -1;
+ return (kAUNoErr);
+#endif
}
int
More information about the trustedbsd-cvs
mailing list