change --picky-developer into --non-picky-developer

Jeremy Allison jra at samba.org
Mon Nov 24 16:41:25 MST 2014


On Mon, Nov 17, 2014 at 08:23:29PM +0100, Stefan (metze) Metzmacher wrote:
> Am 14.11.2014 um 23:27 schrieb Jeremy Allison:
> > On Fri, Nov 14, 2014 at 01:44:31AM +0100, Stefan (metze) Metzmacher wrote:
> >> Hi Jeremy,
> >>
> >> here's a patchset that passed a private autobuild.
> > 
> > Pushed the first chunk of these. Still reviewing (slowly:-).
> 
> Thanks!
> 
> The remaining patches rebased on master.

I don't understand this :

---------------------------------------------------------------
[PATCH 25/48] s3:winbindd: make use of talloc_string_sub2() in
 generate_krb5_ccache()

This way we don't pass a given format string to talloc_asprintf().

Signed-off-by: Stefan Metzmacher <metze at samba.org>
---
 source3/winbindd/winbindd_pam.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index 5351937..d56d2fa 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -512,7 +512,20 @@ static const char *generate_krb5_ccache(TALLOC_CTX *mem_ctx,
                                p++;
 
                                if (p != NULL && *p == 'u' && strchr(p, '%') == NULL) {
-                                       gen_cc = talloc_asprintf(mem_ctx, type, uid);
+                                       char uid_str[sizeof("18446744073709551615")];
+
+                                       snprintf(uid_str, sizeof(uid_str), "%u", uid);
+
+                                       gen_cc = talloc_string_sub2(mem_ctx,
+                                                       type,
+                                                       "%u",
+                                                       uid_str,
+                                                       /* remove_unsafe_characters */
+                                                       false,
+                                                       /* replace_once */
+                                                       true,
+                                                       /* allow_trailing_dollar */
+                                                       false);
                                }
                        }
                }
---------------------------------------------------------------

Where does the string "18446744073709551615" come from ?


More information about the samba-technical mailing list