The Samba-Bugzilla – Attachment 3347 Details for
Bug 5545
libnetapi_init always fails with 'out of memory' error when there's no USER environment variable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch
samba_3_2_netapi_fix_no_user_env_variable_set.patch (text/plain), 652 bytes, created by
Erik van Pienbroek
on 2008-06-16 16:21:26 UTC
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Erik van Pienbroek
Created:
2008-06-16 16:21:26 UTC
Size:
652 bytes
patch
obsolete
>--- source/lib/netapi/netapi.c.orig 2008-06-16 22:52:22.000000000 +0200 >+++ source/lib/netapi/netapi.c 2008-06-16 22:57:02.000000000 +0200 >@@ -85,11 +85,13 @@ > setenv(KRB5_ENV_CCNAME, ctx->krb5_cc_env, 1); > } > >- ctx->username = talloc_strdup(frame, getenv("USER")); >- if (!ctx->username) { >- TALLOC_FREE(frame); >- fprintf(stderr, "out of memory\n"); >- return W_ERROR_V(WERR_NOMEM); >+ if (getenv("USER")) { >+ ctx->username = talloc_strdup(frame, getenv("USER")); >+ if (!ctx->username) { >+ TALLOC_FREE(frame); >+ fprintf(stderr, "libnetapi_init: out of memory\n"); >+ return W_ERROR_V(WERR_NOMEM); >+ } > } > > libnetapi_initialized = true;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 5545
: 3347