summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
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;
}