summaryrefslogtreecommitdiffstats
path: root/src/providers
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2010-09-29 22:15:39 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-10-15 09:03:07 -0400
commitc1d525a90f06a9414d0788857b271b80625a5858 (patch)
tree82144584d74a7939e801a3fefdf9432c1afd10ad /src/providers
parent3dd54ad87fd6a2bc8f646cd93be0329647e96f0e (diff)
downloadsssd-c1d525a90f06a9414d0788857b271b80625a5858.tar.gz
sssd-c1d525a90f06a9414d0788857b271b80625a5858.tar.xz
sssd-c1d525a90f06a9414d0788857b271b80625a5858.zip
sysdb interface for adding fake users
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ldap/ldap_id_cleanup.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/providers/ldap/ldap_id_cleanup.c b/src/providers/ldap/ldap_id_cleanup.c
index 60bc171cb..6357708a1 100644
--- a/src/providers/ldap/ldap_id_cleanup.c
+++ b/src/providers/ldap/ldap_id_cleanup.c
@@ -306,7 +306,8 @@ static int cleanup_users(TALLOC_CTX *memctx, struct sdap_id_ctx *ctx)
ret = cleanup_users_logged_in(uid_table, msgs[i]);
if (ret == EOK) {
/* If the user is logged in, proceed to the next one */
- DEBUG(5, ("User %s is still logged in, keeping data\n", name));
+ DEBUG(5, ("User %s is still logged in or a dummy entry, "
+ "keeping data\n", name));
continue;
} else if (ret != ENOENT) {
goto done;
@@ -337,9 +338,9 @@ static int cleanup_users_logged_in(hash_table_t *table,
uid = ldb_msg_find_attr_as_uint64(msg,
SYSDB_UIDNUM, 0);
if (!uid) {
- DEBUG(2, ("Entry %s has no UID Attribute ?!?\n",
+ DEBUG(2, ("Entry %s has no UID Attribute, fake user perhaps?\n",
ldb_dn_get_linearized(msg->dn)));
- return EFAULT;
+ return ENOENT;
}
key.type = HASH_KEY_ULONG;
opt">, warp_device_probe); static int __init warp_probe(void) { unsigned long root = of_get_flat_dt_root(); return of_flat_dt_is_compatible(root, "pika,warp"); } define_machine(warp) { .name = "Warp", .probe = warp_probe, .progress = udbg_progress, .init_IRQ = uic_init_tree, .get_irq = uic_get_irq, .restart = ppc4xx_reset_system, .calibrate_decr = generic_calibrate_decr, }; #define LED_GREEN (0x80000000 >> 0) #define LED_RED (0x80000000 >> 1) /* This is for the power LEDs 1 = on, 0 = off, -1 = leave alone */ void warp_set_power_leds(int green, int red) { static void __iomem *gpio_base = NULL; unsigned leds; if (gpio_base == NULL) { struct device_node *np; /* Power LEDS are on the second GPIO controller */ np = of_find_compatible_node(NULL, NULL, "ibm,gpio-440EP"); if (np) np = of_find_compatible_node(np, NULL, "ibm,gpio-440EP"); if (np == NULL) { printk(KERN_ERR __FILE__ ": Unable to find gpio\n"); return; } gpio_base = of_iomap(np, 0); of_node_put(np); if (gpio_base == NULL) { printk(KERN_ERR __FILE__ ": Unable to map gpio"); return; } } leds = in_be32(gpio_base); switch (green) { case 0: leds &= ~LED_GREEN; break; case 1: leds |= LED_GREEN; break; } switch (red) { case 0: leds &= ~LED_RED; break; case 1: leds |= LED_RED; break; } out_be32(gpio_base, leds); } EXPORT_SYMBOL(warp_set_power_leds); #ifdef CONFIG_SENSORS_AD7414 static int pika_dtm_thread(void __iomem *fpga) { extern int ad7414_get_temp(int index); while (!kthread_should_stop()) { int temp = ad7414_get_temp(0); out_be32(fpga, temp); set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(HZ); } return 0; } static int __init pika_dtm_start(void) { struct task_struct *dtm_thread; struct device_node *np; struct resource res; void __iomem *fpga; np = of_find_compatible_node(NULL, NULL, "pika,fpga"); if (np == NULL) return -ENOENT; /* We do not call of_iomap here since it would map in the entire * fpga space, which is over 8k. */ if (of_address_to_resource(np, 0, &res)) { of_node_put(np); return -ENOENT; } of_node_put(np); fpga = ioremap(res.start, 0x24); if (fpga == NULL) return -ENOENT; dtm_thread = kthread_run(pika_dtm_thread, fpga + 0x20, "pika-dtm"); if (IS_ERR(dtm_thread)) { iounmap(fpga); return PTR_ERR(dtm_thread); } return 0; } device_initcall(pika_dtm_start); #endif