[email protected]
[Top] [All Lists]

PERFORCE change 114883 for review

Subject: PERFORCE change 114883 for review
From: Todd Miller
Date: Fri, 23 Feb 2007 17:10:28 GMT
http://perforce.freebsd.org/chv.cgi?CH=114883

Change 114883 by [email protected]_macbook on 2007/02/23 17:10:05

        g/c unused security_get_bools()

Affected files ...

.. 
//depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/ss/services.c#7
 edit

Differences ...

==== 
//depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/ss/services.c#7
 (text+ko) ====

@@ -1960,51 +1960,6 @@
        return (ENOENT);
 }
 
-static __unused int security_get_bools(int *len, char ***names, int **values)
-{
-       int i, rc = ENOMEM;
-
-       POLICY_RDLOCK;
-       *names = NULL;
-       *values = NULL;
-
-       *len = policydb.p_bools.nprim;
-       if (!*len) {
-               rc = 0;
-               goto out;
-       }
-
-       *names = kcalloc(*len, sizeof(char*), GFP_ATOMIC);
-       if (!*names)
-               goto err;
-
-       *values = kcalloc(*len, sizeof(int), GFP_ATOMIC);
-       if (!*values)
-               goto err;
-
-       for (i = 0; i < *len; i++) {
-               size_t name_len;
-               (*values)[i] = policydb.bool_val_to_struct[i]->state;
-               name_len = strlen(policydb.p_bool_val_to_name[i]) + 1;
-               (*names)[i] = kmalloc(sizeof(char) * name_len, GFP_ATOMIC);
-               if (!(*names)[i])
-                       goto err;
-               strncpy((*names)[i], policydb.p_bool_val_to_name[i], name_len);
-               (*names)[i][name_len - 1] = 0;
-       }
-       rc = 0;
-out:
-       POLICY_RDUNLOCK;
-       return rc;
-err:
-       if (*names) {
-               for (i = 0; i < *len; i++)
-                       kfree((*names)[i]);
-       }
-       kfree(*values);
-       goto out;
-}
-
 int security_commit_pending_bools(void)
 {
        u32 i;
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/p4-projects
To unsubscribe, send any mail to "[email protected]"

<Prev in Thread] Current Thread [Next in Thread>
  • PERFORCE change 114883 for review, Todd Miller <=