  Consider positive solutions to second order elliptic equations with
measurable coefficients in a bounded domain, which vanish on a portion of the
boundary. We give simple necessary and sufficient geometric conditions on the
domain, which guarantee the Hopf-Oleinik type estimates and the boundary
Lipschitz estimates for solutions. These conditions are sharp even for harmonic
functions.
