Re: [Samba] how to submit patches ? (patch for pdb_xml.c included)

2004-09-16 Thread Gerald (Jerry) Carter
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Ilia Chipitsine wrote:
| Dear Sirs,
|
| I wrote a patch for pdbedit (pdb_xml.c) which handles
| cases with national alphabet characters in GECOS fields. I
| sent it directly to  Jelmer  Vernooij, but there was no answer.
Best to file a report in https://bugzilla.samba.org/ and
attach the patch there.  Thanks.

cheers, jerry
- -
Alleviating the pain of Windows(tm)  --- http://www.samba.org
GnuPG Key- http://www.plainjoe.org/gpg_public.asc
"If we're adding to the noise, turn off this song"--Switchfoot (2003)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFBSYnpIR7qMdg1EfYRAsh7AKDOHICgsBYVlwKldJTt0bUaI3LqvACgp1pP
iBua1YTAb9Anewbgdzbxvm8=
=q4jW
-END PGP SIGNATURE-
--
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba


[Samba] how to submit patches ? (patch for pdb_xml.c included)

2004-09-15 Thread Ilia Chipitsine
Dear Sirs,
I wrote a patch for pdbedit (pdb_xml.c) which handles cases with national
alphabet characters in GECOS fields. I sent it directly to  Jelmer 
Vernooij, but there was no answer.

Who can review the supplied patch ?
Cheers,
Ilia Chipitsine--- pdb_xml.c.orig  Tue Aug 31 12:12:02 2004
+++ pdb_xml.c   Tue Aug 31 12:12:07 2004
@@ -373,6 +373,7 @@
fstring sid_str;
xmlNodePtr cur, user, pass, root;
pdb_xml *data;
+char *fullname_utf8;
 
DEBUG(10, ("xmlsam_add_sam_account called!\n"));
 
@@ -427,8 +428,14 @@
if (pdb_get_nt_username(u) && strcmp(pdb_get_nt_username(u), ""))
xmlNewChild(user, data->ns, "nt_username", pdb_get_nt_username(u));
 
-   if (pdb_get_fullname(u) && strcmp(pdb_get_fullname(u), ""))
-   xmlNewChild(user, data->ns, "fullname", pdb_get_fullname(u));
+if(push_utf8_allocate(&fullname_utf8,pdb_get_fullname(u)) == (size_t)-1){
+   return NT_STATUS_NO_MEMORY;
+}
+
+   if (fullname_utf8 && strcmp(fullname_utf8, ""))
+   xmlNewChild(user, data->ns, "fullname", fullname_utf8);
+
+   SAFE_FREE(fullname_utf8);
 
if (pdb_get_homedir(u) && strcmp(pdb_get_homedir(u), ""))
xmlNewChild(user, data->ns, "homedir", pdb_get_homedir(u));
@@ -497,7 +504,7 @@
xmlNewChild(user, data->ns, "bad_password_count", 
iota(pdb_get_bad_password_count(u)));
xmlNewChild(user, data->ns, "logon_count", iota(pdb_get_logon_count(u)));
xmlNewChild(user, data->ns, "unknown_6", iota(pdb_get_unknown_6(u)));
-   xmlSaveFile(data->location, data->doc);
+   xmlSaveFileEnc(data->location, data->doc,"UTF-8");
 
return NT_STATUS_OK;
 }
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba