Actually, it's a bit more complicated than that.
There are THREE parts to barreirs:
Active ability (only for manual barriers, the release of the barrier)
Passive ability (the ability of yamato, jirobo, hashirama barrier, also some passive barrier ones like Mei)
Buff
The OPs question is really related to the first 2. Fact of the matter is, for active ability of a barrier, only the caster of the barrier can utilize it. Whereas passive is shared across the team. This is regardless of whether or not the buff part is cross team.
For example, Jirobo vs Yamato. yes, I know the description both says "your lineup" but as it happens, jirobo boosts cross team whereas yamato only boost your own team, as far as buff goes. However, for both of them, the PASSIVE part of the barrier (the extra attack) will trigger for ALL jirobo/yamato on your side of field.
So Active: only caster. Passive: everyone on your field. Buff: depends on the barrier(ninja). And NONE of them are dependent on each other.
P.S. I don't think there is ANY barrier that have both a passive and active portion of effect. Perhaps only Haku, I'm not sure if the dodge bonus is granted to all haku or only the casting haku. But dodge is unreliable to begin with so it's hard to test (and yes, I tested everything I said above)