Question

Or, more generally, what does specifying STYPE_TEMPORARY do?

MSDN's "A temporary share." is not helpful.

What are the lifetime guarantees?

Was it helpful?

Solution

The protocol documentation for SMB on MSDN includes slightly more information:

STYPE_TEMPORARY: A temporary share that is not persisted for creation each time the file server initializes.

...and this page on NetrShareAdd explains more of the expected semantics:

If the STYPE_TEMPORARY field is set in shi*_type, Share.IsPersistent MUST be set to FALSE. Otherwise, Share.IsPersistent MUST be set to TRUE.

If Share.IsPersistent is TRUE, the server MUST persist the Share to a persistent configuration store. If a share with the same ShareName already exists in the store, the preexisting entry MUST be overwritten with this entry.

...but mapping that to how specific implementations of the protocol behave is another story.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top