Glands are the terminology mostly used for the structure that secrets the related biochemical outside the plant body and are present mostly in/on surface (might have some exceptions). But, sandalwood oil is not a secretion product. It is a biochemical produced in the plant. One might call it a byproduct, but I don't think it is that.
But, I have limited knowledge related to sandalwood oil biosynthesis and its pathway. This is also not well studied in terms of the mechanism and biosynthesis.