summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-04 16:56:18 -0800
committerJeremy Allison <jra@samba.org>2007-12-04 16:56:18 -0800
commitde7fd585b11413113304334dd75ba6a207ec69eb (patch)
treebfc8b1c808609b735036cc5b04971d10d61f6b91 /source3/utils
parente262c41c6119957c5e4b8d5752040881021175a3 (diff)
downloadsamba-de7fd585b11413113304334dd75ba6a207ec69eb.tar.gz
samba-de7fd585b11413113304334dd75ba6a207ec69eb.tar.bz2
samba-de7fd585b11413113304334dd75ba6a207ec69eb.zip
The usual !pstring...
Jeremy. (This used to be commit b676262a781363e7be49b21817668a53cca75c2d)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/eventlogadm.c2
-rw-r--r--source3/utils/net_ads.c13
2 files changed, 10 insertions, 5 deletions
diff --git a/source3/utils/eventlogadm.c b/source3/utils/eventlogadm.c
index 5424eca496..424cee8189 100644
--- a/source3/utils/eventlogadm.c
+++ b/source3/utils/eventlogadm.c
@@ -85,7 +85,7 @@ static int DoWriteCommand( int argc, char **argv, bool debugflag, char *exename
ELOG_TDB *etdb;
/* fixed constants are bad bad bad */
- pstring linein;
+ char linein[1024];
bool is_eor;
Eventlog_entry ee;
int rcnum;
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index d54b817d15..37a02200f5 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1636,12 +1636,17 @@ int net_ads_join(int argc, const char **argv)
}
if ( createupn ) {
- pstring upn;
+ char *upn;
/* default to using the short UPN name */
- if ( !machineupn ) {
- snprintf( upn, sizeof(upn), "host/%s@%s", global_myname(),
- ads->config.realm );
+ if (!machineupn ) {
+ upn = talloc_asprintf(ctx,
+ "host/%s@%s", global_myname(),
+ ads->config.realm );
+ if (!upn) {
+ nt_status = NT_STATUS_NO_MEMORY;
+ goto fail;
+ }
machineupn = upn;
}