summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-11-17 01:21:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:19 -0500
commitc9035c6633236c940b915f3cee2a7e87b3038678 (patch)
tree6e27e5f637e0c421b43c5aedbed87c61cbc06ffd /source4/dsdb/samdb/ldb_modules
parente8f77306dd4cf7c54b1d3593f36781b1ce1a0eca (diff)
downloadsamba-c9035c6633236c940b915f3cee2a7e87b3038678.tar.gz
samba-c9035c6633236c940b915f3cee2a7e87b3038678.tar.bz2
samba-c9035c6633236c940b915f3cee2a7e87b3038678.zip
r19757: Don't do the strrchr twice. Pointed out by Martin Kuhl.
Andrew Bartlett (This used to be commit c4bf9cc09b36d8dcc465608b55bbf5dc07aed9e4)
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/samba3sam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samba3sam.c b/source4/dsdb/samdb/ldb_modules/samba3sam.c
index 6c7c3c7066..be60dd7b4c 100644
--- a/source4/dsdb/samdb/ldb_modules/samba3sam.c
+++ b/source4/dsdb/samdb/ldb_modules/samba3sam.c
@@ -70,7 +70,7 @@ static struct ldb_message_element *generate_primaryGroupID(struct ldb_module *mo
el->name = talloc_strdup(ctx, "primaryGroupID");
el->num_values = 1;
el->values = talloc_array(ctx, struct ldb_val, 1);
- el->values[0].data = (uint8_t *)talloc_strdup(el->values, strrchr(sid, '-')+1);
+ el->values[0].data = (uint8_t *)talloc_strdup(el->values, p+1);
el->values[0].length = strlen((char *)el->values[0].data);
return el;