NTSTATUS status;
struct connection_struct *conn;
char *share;
- char *addr;
TALLOC_CTX *tmp_ctx = talloc_new(p->mem_ctx);
if (tmp_ctx == NULL) {
return E_OUTOFMEMORY;
return FSRVP_E_NOT_SUPPORTED;
}
- addr = tsocket_address_inet_addr_string(p->local_address, p->mem_ctx);
- if (addr == NULL) {
- talloc_free(tmp_ctx);
- return E_OUTOFMEMORY;
- }
- *r->out.OwnerMachineName = addr;
+ *r->out.OwnerMachineName = lp_netbios_name();
*r->out.SupportedByThisProvider = 1;
talloc_free(tmp_ctx);
return 0;
struct fss_sc_set *sc_set;
struct fss_sc *sc;
struct fss_sc_smap *sc_smap;
- char *addr;
char *share;
struct fssagent_share_mapping_1 *sm_out;
talloc_free(tmp_ctx);
return E_INVALIDARG;
}
- addr = tsocket_address_inet_addr_string(p->local_address, p->mem_ctx);
- if (addr == NULL) {
+
+ sm_out = talloc_zero(p->mem_ctx, struct fssagent_share_mapping_1);
+ if (sm_out == NULL) {
talloc_free(tmp_ctx);
return E_OUTOFMEMORY;
}
-
- sm_out = talloc_zero(p->mem_ctx, struct fssagent_share_mapping_1);
sm_out->ShadowCopySetId = sc_set->id;
sm_out->ShadowCopyId = sc->id;
- sm_out->ShareNameUNC = talloc_asprintf(p->mem_ctx, "\\\\%s\\%s",
- addr, sc_smap->share_name);
+ sm_out->ShareNameUNC = talloc_asprintf(sm_out, "\\\\%s\\%s",
+ lp_netbios_name(),
+ sc_smap->share_name);
+ if (sm_out->ShareNameUNC == NULL) {
+ talloc_free(sm_out);
+ talloc_free(tmp_ctx);
+ return E_OUTOFMEMORY;
+ }
sm_out->ShadowCopyShareName = sc_smap->sc_share_name;
unix_to_nt_time(&sm_out->tstamp, sc->create_ts);
r->out.ShareMapping->ShareMapping1 = sm_out;