bus-endpoint.c revision bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8
/***
This file is part of systemd.
Copyright 2014 Daniel Mack
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <stdlib.h>
#include "bus-endpoint.h"
{
if (!*ep)
return -ENOMEM;
return 0;
}
{
_cleanup_free_ char *key;
int r;
/* check if we already have this name in the policy list. If we do, see if the new access level
* is higher than the exising one, and upgrade the entry in that case. Otherwise, do nothing.
*/
if (ep->policy_hash) {
if (po) {
return 0;
}
} else {
if (!ep->policy_hash)
return -ENOMEM;
}
if (!po)
return -ENOMEM;
if (!key)
return -ENOMEM;
if (r < 0)
return r;
return 0;
}
{
if (!endpoint)
return;
}