Your rights are that of a tenant. Your landlord (the prime tenant) is obligated to comply with the laws just as his landlord must follow when dealing with him.
In california your landlord has 21 days to return your security deposit or a statement itemizing the deductions along with the remainder of your deposit if
the damages did not exceed the amount of the deposit. If he has not done so, you can sue him. If he withheld anything in bad faith, you can sue for treble damages.